/* ===== SIGDES COMPLETE THEME.CSS ===== */

/* ===== CSS VARIABLES - ENHANCED SYSTEM ===== */
:root {
    /* Light mode colors - Default */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --bg-card: #ffffff;
    --text-primary: #1f2937;
    --text-secondary: #6b7280;
    --text-muted: #9ca3af;
    --text-white: #ffffff;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Button colors */
    --btn-primary-bg: #3b82f6;
    --btn-primary-hover: #2563eb;
    --btn-secondary-bg: #6b7280;
    --btn-secondary-hover: #4b5563;
    --btn-success-bg: #10b981;
    --btn-success-hover: #059669;
    --btn-warning-bg: #f59e0b;
    --btn-warning-hover: #d97706;
    --btn-danger-bg: #ef4444;
    --btn-danger-hover: #dc2626;
}

/* Dark mode colors */
.dark {
    --bg-primary: #111827;
    --bg-secondary: #1f2937;
    --bg-tertiary: #374151;
    --bg-card: #1f2937;
    --text-primary: #f9fafb;
    --text-secondary: #d1d5db;
    --text-muted: #9ca3af;
    --text-white: #ffffff;
    --border-color: #374151;
    --border-light: #4b5563;
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.3), 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2);

    /* Button colors for dark mode */
    --btn-primary-bg: #3b82f6;
    --btn-primary-hover: #60a5fa;
    --btn-secondary-bg: #6b7280;
    --btn-secondary-hover: #9ca3af;
}

/* ===== BASE LAYOUT & BODY ===== */
body {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    transition: background-color 0.3s ease, color 0.3s ease !important;
}

/* ===== THEME UTILITY CLASSES ===== */
.bg-theme-primary {
    background-color: var(--theme-primary) !important;
}

.bg-theme-secondary {
    background-color: var(--theme-secondary) !important;
}

.bg-theme-accent {
    background-color: var(--theme-accent) !important;
}

.bg-theme-header {
    background-color: var(--theme-header) !important;
}

.bg-theme-navbar {
    background-color: var(--theme-navbar) !important;
}

.bg-theme-footer {
    background-color: var(--theme-footer) !important;
}

.bg-theme-card {
    background-color: var(--bg-card) !important;
}

.text-theme-primary {
    color: var(--theme-primary) !important;
}

.text-theme-secondary {
    color: var(--theme-secondary) !important;
}

.text-theme-accent {
    color: var(--theme-accent) !important;
}

/* Enhanced text colors with proper contrast */
.text-primary {
    color: var(--text-primary) !important;
}

.text-secondary {
    color: var(--text-secondary) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.font-heading {
    font-family: var(--theme-font-heading);
    color: var(--text-primary) !important;
}

.font-body {
    font-family: var(--theme-font-body);
    color: var(--text-primary) !important;
}

.rounded-theme {
    border-radius: var(--theme-border-radius);
}

.rounded-button {
    border-radius: var(--theme-button-radius);
}

/* ===== NAVIGATION ENHANCEMENTS ===== */
.nav-header {
    background-color: var(--theme-header) !important;
    color: white !important;
    transition: all 0.3s ease !important;
    box-shadow: var(--shadow) !important;
}

.nav-main {
    background: linear-gradient(135deg, var(--theme-navbar), #1e40af) !important;
    backdrop-filter: blur(10px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
    transition: all 0.3s ease !important;
    box-shadow: var(--shadow-lg) !important;
}

.dark .nav-main {
    background: linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary)) !important;
    border-bottom-color: var(--border-color) !important;
}

.nav-link {
    color: white !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    position: relative !important;
    text-decoration: none !important;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    transform: translateY(-1px) !important;
    border-radius: 0.5rem !important;
}

.nav-link:active {
    transform: translateY(0) !important;
}

/* ===== DROPDOWN SYSTEM ===== */
.dropdown {
    position: relative !important;
}

.dropdown-menu {
    display: none !important;
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    min-width: 220px !important;
    background: var(--bg-card) !important;
    border-radius: 0.75rem !important;
    box-shadow: var(--shadow-xl) !important;
    border: 1px solid var(--border-color) !important;
    z-index: 1000 !important;
    opacity: 0 !important;
    transform: translateY(-10px) !important;
    transition: all 0.3s ease !important;
    overflow: hidden !important;
    padding: 8px 0 !important;
    backdrop-filter: blur(10px) !important;
}

.dropdown-menu.show {
    display: block !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.dropdown-menu a {
    display: block !important;
    padding: 12px 16px !important;
    color: var(--text-primary) !important;
    text-decoration: none !important;
    font-weight: 500 !important;
    transition: all 0.2s ease !important;
    border: none !important;
    font-size: 0.875rem !important;
}

.dropdown-menu a:hover {
    background-color: var(--bg-secondary) !important;
    color: var(--btn-primary-bg) !important;
    padding-left: 20px !important;
}

.dropdown-chevron {
    transition: transform 0.3s ease !important;
    color: white !important;
    font-size: 0.75rem !important;
}

.dropdown.active .dropdown-chevron {
    transform: rotate(180deg) !important;
}

/* ===== MOBILE MENU SYSTEM ===== */
.mobile-menu {
    background: var(--bg-card) !important;
    backdrop-filter: blur(10px) !important;
    border-radius: 0 0 1rem 1rem !important;
    box-shadow: var(--shadow-lg) !important;
    margin: 0.5rem !important;
    border: 1px solid var(--border-color) !important;
    max-height: 80vh !important;
    overflow-y: auto !important;
}

.mobile-menu-link {
    display: block !important;
    padding: 0.875rem 1rem !important;
    color: var(--text-primary) !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.mobile-menu-link:hover {
    background: var(--bg-secondary) !important;
    color: var(--btn-primary-bg) !important;
    padding-left: 1.5rem !important;
}

.mobile-dropdown {
    max-height: 0 !important;
    overflow: hidden !important;
    transition: max-height 0.3s ease-out !important;
    background: var(--bg-secondary) !important;
}

.mobile-dropdown.open {
    max-height: 250px !important;
}

.mobile-dropdown a {
    display: block !important;
    padding: 0.75rem 1rem 0.75rem 2.5rem !important;
    color: var(--text-secondary) !important;
    font-size: 0.875rem !important;
    text-decoration: none !important;
    transition: all 0.2s ease !important;
    border-left: 3px solid transparent !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.mobile-dropdown a:hover {
    background: var(--bg-primary) !important;
    color: var(--btn-primary-bg) !important;
    border-left-color: var(--btn-primary-bg) !important;
    padding-left: 3rem !important;
}

.mobile-dropdown-toggle {
    width: 100% !important;
    text-align: left !important;
    padding: 0.875rem 1rem !important;
    border: none !important;
    background: transparent !important;
    color: var(--text-primary) !important;
    font-weight: 500 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    transition: all 0.2s ease !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.mobile-dropdown-toggle:hover {
    background: var(--bg-secondary) !important;
    color: var(--btn-primary-bg) !important;
}

/* ===== LOADING SYSTEM ===== */
#page-loading-overlay {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.8) !important;
    z-index: 9999 !important;
    display: none !important;
    opacity: 0 !important;
    transition: opacity 0.3s ease !important;
    justify-content: center !important;
    align-items: center !important;
    backdrop-filter: blur(5px) !important;
}

#page-loading-overlay.show {
    opacity: 1 !important;
    display: flex !important;
}

.loading-spinner {
    width: 48px !important;
    height: 48px !important;
    border: 5px solid rgba(255, 255, 255, 0.3) !important;
    border-top: 5px solid var(--btn-primary-bg) !important;
    border-radius: 50% !important;
    animation: spin 1s linear infinite !important;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loading-content {
    background: var(--bg-card) !important;
    padding: 2rem !important;
    border-radius: 1rem !important;
    box-shadow: var(--shadow-xl) !important;
    text-align: center !important;
    border: 1px solid var(--border-color) !important;
    max-width: 300px !important;
}

.loading-content h3 {
    color: var(--text-primary) !important;
    margin-bottom: 0.5rem !important;
    font-size: 1.125rem !important;
}

.loading-content p {
    color: var(--text-secondary) !important;
    font-size: 0.875rem !important;
    margin: 0 !important;
}

/* ===== MAIN CONTENT WRAPPER ===== */
.main-content-wrapper {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    background-color: var(--bg-primary) !important;
    min-height: calc(100vh - 200px) !important;
    transition: background-color 0.3s ease !important;
}

.main-content-wrapper .container {
    max-width: none !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* ===== FOOTER ENHANCEMENTS ===== */
.footer {
    background: linear-gradient(135deg, var(--theme-footer), #1f2937) !important;
    color: white !important;
    margin-top: auto !important;
}

.footer h3 {
    color: #fbbf24 !important;
    font-weight: 600 !important;
}

.footer a {
    color: #e5e7eb !important;
    transition: color 0.3s ease !important;
    text-decoration: none !important;
}

.footer a:hover {
    color: #fbbf24 !important;
}

.footer p {
    color: #d1d5db !important;
}

.footer i {
    color: #fbbf24 !important;
}

/* ===== DARK MODE TOGGLE ===== */
.dark-mode-toggle {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 0.5rem !important;
    padding: 0.5rem !important;
    transition: all 0.3s ease !important;
    backdrop-filter: blur(10px) !important;
    cursor: pointer !important;
}

.dark-mode-toggle:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    transform: translateY(-1px) !important;
    box-shadow: var(--shadow-lg) !important;
}

.dark-mode-toggle i {
    font-size: 1.125rem !important;
    transition: all 0.3s ease !important;
    color: #fbbf24 !important;
}

/* ===== RESPONSIVE UTILITIES ===== */
@media (max-width: 768px) {
    body {
        padding-top: 120px !important;
    }

    .mobile-welcome-content {
        margin-top: 6rem !important;
    }

    .nav-header .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    .nav-main .container {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    #time-display {
        font-size: 0.75rem !important;
    }

    .dark-mode-toggle {
        padding: 0.375rem !important;
    }

    .dark-mode-toggle i {
        font-size: 1rem !important;
    }
}

/* ===== ENHANCED COMPONENTS ===== */
.card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 0.75rem !important;
    box-shadow: var(--shadow) !important;
    transition: all 0.3s ease !important;
}

.card:hover {
    box-shadow: var(--shadow-lg) !important;
    transform: translateY(-2px) !important;
}

.card-header {
    background: linear-gradient(135deg, var(--theme-primary), var(--theme-secondary)) !important;
    color: white !important;
    padding: 1rem 1.5rem !important;
    border-radius: 0.75rem 0.75rem 0 0 !important;
    font-weight: 600 !important;
}

.card-body {
    padding: 1.5rem !important;
    color: var(--text-primary) !important;
    background-color: var(--bg-card) !important;
}

/* ===== FORMS ===== */
.form-control {
    background: var(--bg-primary) !important;
    border: 1px solid var(--border-color) !important;
    color: var(--text-primary) !important;
    border-radius: 0.5rem !important;
    padding: 0.75rem !important;
    transition: all 0.3s ease !important;
    width: 100% !important;
}

.form-control:focus {
    outline: none !important;
    border-color: var(--theme-primary) !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
    background-color: var(--bg-primary) !important;
}

.form-control::placeholder {
    color: var(--text-muted) !important;
}

/* ===== BUTTONS ===== */
.btn {
    padding: 0.75rem 1.5rem !important;
    border-radius: 0.5rem !important;
    font-weight: 500 !important;
    transition: all 0.3s ease !important;
    border: none !important;
    cursor: pointer !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-decoration: none !important;
}

.btn-primary {
    background: linear-gradient(135deg, var(--theme-primary), #059669) !important;
    color: white !important;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #059669, var(--theme-primary)) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.btn-secondary {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

.btn-secondary:hover {
    background: var(--border-color) !important;
    transform: translateY(-1px) !important;
}

/* ===== TABLES ===== */
.table {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-color) !important;
    border-radius: 0.75rem !important;
    overflow: hidden !important;
    width: 100% !important;
    border-collapse: collapse !important;
}

.table th {
    background: var(--bg-secondary) !important;
    color: var(--text-primary) !important;
    padding: 0.75rem !important;
    font-weight: 600 !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.table td {
    padding: 0.75rem !important;
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border-color) !important;
}

.table tr:hover {
    background: var(--bg-secondary) !important;
}

/* ===== SCROLLBARS ===== */
::-webkit-scrollbar {
    width: 8px !important;
    height: 8px !important;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary) !important;
    border-radius: 4px !important;
}

::-webkit-scrollbar-thumb {
    background: var(--text-muted) !important;
    border-radius: 4px !important;
    transition: background 0.3s ease !important;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--btn-primary-bg) !important;
}

/* ===== TAILWIND OVERRIDES FOR DARK MODE ===== */
.dark .text-gray-800 {
    color: var(--text-primary) !important;
}

.dark .text-gray-600 {
    color: var(--text-secondary) !important;
}

.dark .text-gray-400 {
    color: var(--text-muted) !important;
}

.dark .bg-white {
    background-color: var(--bg-card) !important;
}

.dark .bg-gray-50 {
    background-color: var(--bg-secondary) !important;
}

.dark .bg-gray-100 {
    background-color: var(--bg-secondary) !important;
}

.dark .border-gray-200 {
    border-color: var(--border-color) !important;
}

.dark .border-gray-300 {
    border-color: var(--border-color) !important;
}

/* Light mode overrides */
.text-gray-800 {
    color: var(--text-primary) !important;
}

.text-gray-600 {
    color: var(--text-secondary) !important;
}

.text-gray-400 {
    color: var(--text-muted) !important;
}

.bg-white {
    background-color: var(--bg-card) !important;
}

.bg-gray-50 {
    background-color: var(--bg-secondary) !important;
}

.bg-gray-100 {
    background-color: var(--bg-secondary) !important;
}

.border-gray-200 {
    border-color: var(--border-color) !important;
}

.border-gray-300 {
    border-color: var(--border-color) !important;
}

/* ===== TEXT VISIBILITY FIXES ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-primary) !important;
}

p,
span,
div {
    color: var(--text-primary) !important;
}

/* Input placeholders */
input,
textarea,
select {
    background-color: var(--bg-primary) !important;
    color: var(--text-primary) !important;
    border-color: var(--border-color) !important;
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted) !important;
    opacity: 1 !important;
}

/* Ensure icons are visible */
i,
.fas,
.far,
.fab {
    color: inherit !important;
}

/* Specific color overrides */
.text-yellow-300 {
    color: #fcd34d !important;
}

.text-orange-300 {
    color: #fdba74 !important;
}

.text-blue-400 {
    color: #60a5fa !important;
}

.text-red-400 {
    color: #f87171 !important;
}

.text-red-300 {
    color: #fca5a5 !important;
}

/* Banner dots */
.banner-dot {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    background-color: rgba(255, 255, 255, 0.3) !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    border: 2px solid transparent !important;
}

.banner-dot.active {
    background-color: var(--theme-accent) !important;
    border-color: white !important;
    transform: scale(1.2) !important;
}

/* ===== ACCESSIBILITY ===== */
.focus-visible:focus {
    outline: 2px solid var(--theme-primary) !important;
    outline-offset: 2px !important;
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== SMOOTH TRANSITIONS ===== */
* {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease !important;
}
