/**
 * Professional Government Enterprise Management System Styles
 * Clean, accessible, and responsive design
 */

/* ===== CSS VARIABLES ===== */
:root {
    /* Government Color Palette - Green Gradient Theme */
    --gov-primary: #059669;
    /* Primary green */
    --gov-primary-light: #10b981;
    /* Light green */
    --gov-primary-dark: #047857;
    /* Dark green */
    --gov-secondary: #64748b;
    /* Slate gray */
    --gov-accent: #059669;
    /* Green accent */
    --gov-warning: #d97706;
    /* Orange warning */
    --gov-danger: #dc2626;
    /* Red danger */
    --gov-success: #16a34a;
    /* Green success */

    /* Neutral Colors */
    --gov-white: #ffffff;
    --gov-gray-50: #f8fafc;
    --gov-gray-100: #f1f5f9;
    --gov-gray-200: #e2e8f0;
    --gov-gray-300: #cbd5e1;
    --gov-gray-400: #94a3b8;
    --gov-gray-500: #64748b;
    --gov-gray-600: #475569;
    --gov-gray-700: #334155;
    --gov-gray-800: #1e293b;
    --gov-gray-900: #0f172a;

    /* Ethiopian Flag Colors */
    --eth-green: #009639;
    --eth-yellow: #ffde00;
    --eth-red: #da020e;

    /* Typography */
    --font-family-primary: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-family-mono: 'Courier New', Courier, monospace;

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;

    /* Layout */
    --header-height: 70px;
    --footer-height: 60px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px 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);

    /* Transitions */
    --transition-fast: 0.15s ease-in-out;
    --transition-normal: 0.3s ease-in-out;
    --transition-slow: 0.5s ease-in-out;
}

/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family-primary);
    line-height: 1.6;
    color: var(--gov-gray-800);
    background-color: var(--gov-gray-50);
    overflow-x: hidden;
}

.gov-body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===== GOVERNMENT HEADER ===== */
.gov-header, .main-header {
    background: #1f2937;
    color: white;
    padding: 0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 70px;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    border-bottom: 1px solid #374151;
}

.header-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo-icon {
    width: 80px;
    height: 80px;
    background: transparent;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.logo-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.logo-icon:hover {
    transform: scale(1.05);
}

.logo-text h1 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
    line-height: 1.2;
    font-family: 'Nyala', 'Ebrima', 'Segoe UI', sans-serif;
    color: white;
}

.logo-text p {
    font-size: 0.9rem;
    opacity: 0.95;
    margin: 0;
    line-height: 1.2;
    color: white;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover {
    background: rgba(255,255,255,0.1);
    color: white;
    transform: translateY(-2px);
}

/* Hamburger Menu */
.hamburger-menu, .mobile-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 60px;
    height: 60px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.15s ease-in-out;
}

.hamburger-menu:hover, .mobile-menu-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    transform: scale(1.05);
}

.hamburger-line {
    width: 32px;
    height: 4px;
    background-color: white;
    margin: 3px 0;
    transition: all 0.3s ease-in-out;
    border-radius: 2px;
}

.hamburger-menu.active .hamburger-line:nth-child(1),
.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger-menu.active .hamburger-line:nth-child(2),
.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active .hamburger-line:nth-child(3),
.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

/* Mobile Navigation Menu */
.nav-menu.mobile-active {
    display: flex;
    position: fixed;
    top: 70px;
    left: 0;
    right: 0;
    background: #1f2937;
    flex-direction: column;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
    z-index: 999;
}

/* Responsive Header */
@media (max-width: 768px) {
    .header-container {
        padding: 0 0.5rem;
    }

    .logo-section {
        gap: 0.5rem;
    }

    .logo-icon {
        width: 50px;
        height: 50px;
    }

    .logo-text {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 0.25rem;
    }

    .logo-text h1 {
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .logo-text p {
        font-size: 0.85rem;
        white-space: nowrap;
    }

    .logo-text h1::after {
        content: " ";
    }

    .nav-menu {
        display: none;
    }

    .hamburger-menu, .mobile-menu-btn {
        display: flex;
        margin-right: 0;
    }
}

/* ===== SIDEBAR NAVIGATION ===== */
.sidebar.dropdown-style {
    position: fixed;
    top: 0;
    right: -320px; /* Hidden off-screen by default */
    width: 320px;
    height: 100vh;
    background: #1f2937;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
    transform: translateX(0);
    transition: right 0.3s ease;
    z-index: 1050;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar.dropdown-style.active {
    right: 0; /* Slide in from right */
}

/* Sidebar scrollbar styling */
.sidebar.dropdown-style::-webkit-scrollbar {
    width: 6px;
}

.sidebar.dropdown-style::-webkit-scrollbar-track {
    background: #111827;
}

.sidebar.dropdown-style::-webkit-scrollbar-thumb {
    background: #374151;
    border-radius: 3px;
}

.sidebar.dropdown-style::-webkit-scrollbar-thumb:hover {
    background: #4b5563;
}

/* Sidebar overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 1040;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Prevent body scroll when sidebar is open */
body.sidebar-open {
    overflow: hidden;
}

/* Close button inside sidebar */
.sidebar-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 4px;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 10;
}

.sidebar-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Sidebar header styling */
.sidebar-header {
    padding: 3.5rem 1.5rem 1rem 1.5rem; /* Extra top padding for close button */
    border-bottom: 1px solid #374151;
    background: linear-gradient(135deg, #059669, #047857);
    position: relative;
}

.sidebar-header .user-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.sidebar-header .user-avatar {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
}

.sidebar-header .user-name {
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
}

.sidebar-header .user-role {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    margin: 0;
}

/* Sidebar menu styling */
.sidebar-menu {
    padding: 0.5rem 0;
    display: block;
    width: 100%;
    background: #1f2937; /* Ensure background */
}

.sidebar-menu .nav-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: block;
}

.sidebar-menu .nav-item {
    margin: 0;
    display: block;
}

.sidebar-menu .nav-link {
    display: flex !important;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: #d1d5db !important;
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
    width: 100%;
    background: transparent;
}

.sidebar-menu .nav-link:hover {
    background: #374151 !important;
    color: white !important;
    border-left-color: #059669;
}

.sidebar-menu .nav-icon {
    width: 20px;
    min-width: 20px;
    margin-right: 0.75rem;
    text-align: center;
    font-size: 1rem;
    color: inherit;
}

.sidebar-menu .nav-text {
    flex: 1;
    font-size: 0.95rem;
    color: inherit;
    white-space: nowrap;
}

.sidebar-menu .nav-divider {
    height: 1px;
    background: #374151;
    margin: 0.5rem 0;
    list-style: none;
}

.sidebar-menu .logout-link {
    color: white !important;
    background-color: #dc2626 !important;
    border-radius: 8px;
    margin: 10px 15px;
    width: calc(100% - 30px) !important;
    text-align: center;
    justify-content: center;
}

.sidebar-menu .logout-link:hover {
    background-color: #b91c1c !important;
    color: white !important;
}

/* Ensure all nav items are visible */
.sidebar-menu .nav-item,
.sidebar-menu .nav-link,
.sidebar-menu .nav-text,
.sidebar-menu .nav-icon {
    opacity: 1;
    visibility: visible;
}

/* Submenu styles */
.sidebar-menu .submenu {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #111827;
    display: none; /* Hidden by default */
}

.sidebar-menu .has-submenu.submenu-open .submenu {
    display: block; /* Show when parent has submenu-open class */
}

.sidebar-menu .submenu-arrow {
    margin-left: auto;
    transition: transform 0.3s ease;
}

.sidebar-menu .has-submenu.submenu-open .submenu-arrow {
    transform: rotate(90deg);
}

/* Inner submenu styles (nested dropdowns) */
.sidebar-menu .submenu-inner {
    list-style: none;
    padding: 0;
    margin: 0;
    background: #0d1117;
    display: none;
}

.sidebar-menu .submenu-toggle-inner {
    display: flex;
    align-items: center;
    padding: 0.6rem 1.5rem 0.6rem 3.5rem;
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    cursor: pointer;
}

.sidebar-menu .submenu-toggle-inner:hover {
    background: #1f2937;
    color: white;
    padding-left: 3.75rem;
}

.sidebar-menu .submenu-arrow-inner {
    margin-left: auto;
    font-size: 0.75rem;
    transition: transform 0.3s ease;
}

.sidebar-menu .submenu-inner li a {
    display: block;
    padding: 0.5rem 1.5rem 0.5rem 4.5rem;
    color: #6b7280;
    text-decoration: none;
    font-size: 0.85rem;
    transition: all 0.2s ease;
}

.sidebar-menu .submenu-inner li a:hover {
    background: #0d1117;
    color: white;
    padding-left: 4.75rem;
}

/* Menu header styles */
.sidebar-menu .menu-header {
    padding: 0.5rem 1.5rem 0.5rem 3.5rem;
    color: #6b7280;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-menu .submenu-link {
    display: block;
    padding: 0.6rem 1.5rem 0.6rem 3.5rem;
    color: #9ca3af;
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.sidebar-menu .submenu-link:hover {
    background: #1f2937;
    color: white;
    padding-left: 3.75rem;
}

/* Mobile Sidebar */
@media (max-width: 768px) {
    .sidebar.dropdown-style {
        width: 85%;
        max-width: 320px;
        right: -85%; /* Hidden off-screen */
    }
    
    .sidebar.dropdown-style.active {
        right: 0;
    }
}

/* ===== MAIN CONTENT ===== */
.main-content {
    flex: 1;
    margin-top: 70px;
    padding: var(--spacing-xl);
    transition: var(--transition-normal);
}

.main-content.public-page,
.main-content.protected-page {
    margin-left: 0;
}

/* ===== GOVERNMENT FOOTER ===== */
.gov-footer {
    position: relative;
    bottom: 0;
    left: 0;
    right: 0;
    min-height: var(--footer-height);
    background-color: var(--gov-gray-800);
    color: var(--gov-white);
    border-top: 2px solid var(--gov-primary);
    z-index: 100;
}

.footer-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding: 0 var(--spacing-lg);
    max-width: 100%;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-xs);
}

.footer-branding {
    display: flex;
    justify-content: center;
    margin-bottom: var(--spacing-sm);
}

.footer-logo-container {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.footer-ethiopia-logo {
    display: flex;
    align-items: center;
}

.footer-logo-shape {
    width: 32px;
    height: 32px;
    background: var(--gov-white);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.footer-logo-icon {
    font-size: 1rem;
    color: var(--gov-primary);
}

.footer-branding-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.footer-amharic-text {
    font-size: 0.85rem;
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1px;
    font-family: 'Nyala', 'Ebrima', 'Segoe UI', sans-serif;
    color: var(--gov-white);
}

.footer-english-text {
    font-size: 0.75rem;
    font-weight: 400;
    opacity: 0.9;
    line-height: 1.2;
    color: var(--gov-white);
}

.footer-text {
    flex: 1;
}

.copyright-text {
    font-size: 0.85rem;
    font-weight: 500;
}

.footer-links {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.footer-link {
    color: var(--gov-white);
    text-decoration: none;
    font-size: 0.8rem;
    transition: var(--transition-fast);
}

.footer-link:hover {
    color: var(--gov-primary-light);
    text-decoration: underline;
}

.footer-separator {
    color: var(--gov-gray-400);
    font-size: 0.8rem;
}

.footer-info {
    display: flex;
    justify-content: center;
}

.system-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    font-size: 0.75rem;
    color: var(--gov-gray-300);
}

.info-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.info-icon {
    font-size: 0.7rem;
}

.info-separator {
    color: var(--gov-gray-500);
}

/* ===== ALERT SYSTEM ===== */
.alert {
    display: flex;
    align-items: flex-start;
    padding: var(--spacing-md);
    margin-bottom: var(--spacing-md);
    border-radius: 6px;
    border-left: 4px solid;
    background-color: var(--gov-white);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-fast);
}

.alert-success {
    border-left-color: var(--gov-success);
    background-color: #f0fdf4;
}

.alert-danger {
    border-left-color: var(--gov-danger);
    background-color: #fef2f2;
}

.alert-warning {
    border-left-color: var(--gov-warning);
    background-color: #fffbeb;
}

.alert-info {
    border-left-color: var(--gov-primary);
    background-color: #eff6ff;
}

.alert-icon {
    margin-right: var(--spacing-md);
    margin-top: 2px;
    font-size: 1.1rem;
}

.alert-success .alert-icon {
    color: var(--gov-success);
}

.alert-danger .alert-icon {
    color: var(--gov-danger);
}

.alert-warning .alert-icon {
    color: var(--gov-warning);
}

.alert-info .alert-icon {
    color: var(--gov-primary);
}

.alert-content {
    flex: 1;
    line-height: 1.5;
}

.alert-close {
    background: none;
    border: none;
    color: var(--gov-gray-500);
    cursor: pointer;
    padding: 4px;
    margin-left: var(--spacing-md);
    border-radius: 4px;
    transition: var(--transition-fast);
}

.alert-close:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: var(--gov-gray-700);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Mobile First Approach */
@media (max-width: 767px) {
    :root {
        --header-height: 60px;
        --footer-height: auto;
    }

    .main-content {
        padding: var(--spacing-md);
        margin-top: 60px;
    }

    .footer-content {
        flex-direction: column;
        gap: var(--spacing-xs);
        text-align: center;
    }

    .footer-logo-container {
        gap: var(--spacing-sm);
    }

    .footer-logo-shape {
        width: 28px;
        height: 28px;
    }

    .footer-logo-icon {
        font-size: 0.9rem;
    }

    .footer-amharic-text {
        font-size: 0.8rem;
    }

    .footer-english-text {
        font-size: 0.7rem;
    }

    .footer-links {
        justify-content: center;
    }

    .system-info {
        justify-content: center;
        flex-wrap: wrap;
    }

    .gov-footer {
        position: static;
        height: auto;
        padding: var(--spacing-md) 0;
    }

    .main-content {
        margin-bottom: 0;
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {

    .official-branding {
        gap: var(--spacing-lg);
    }

    .logo-shape {
        width: 45px;
        height: 45px;
    }

    .amharic-text {
        font-size: 1rem;
    }

    .english-text {
        font-size: 0.85rem;
    }

    .sidebar {
        width: 260px;
        left: -260px;
    }

    .main-content {
        padding: var(--spacing-lg);
    }

    .footer-logo-container {
        gap: var(--spacing-md);
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .main-content.protected-page {
        margin-left: 0;
    }

    .gov-footer {
        left: 0;
    }
}

/* Large Desktop */
@media (min-width: 1440px) {
    .footer-container {
        max-width: 1400px;
        margin: 0 auto;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --gov-primary: #000080;
        --gov-gray-800: #000000;
        --gov-white: #ffffff;
    }

    .nav-link:hover {
        background-color: #000000;
        color: #ffffff;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Print Styles */
@media print {

    .gov-footer {
        display: none !important;
    }

    .main-content {
        margin: 0 !important;
        padding: 0 !important;
    }

    .alert {
        border: 1px solid #000 !important;
        box-shadow: none !important;
    }
}

/* ===== UTILITY CLASSES ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.d-none {
    display: none !important;
}

.d-block {
    display: block !important;
}

.d-flex {
    display: flex !important;
}

.justify-content-center {
    justify-content: center !important;
}

.align-items-center {
    align-items: center !important;
}

.mt-auto {
    margin-top: auto !important;
}

.mb-auto {
    margin-bottom: auto !important;
}

/* Focus Management */
.focus-visible:focus {
    outline: 2px solid var(--gov-primary);
    outline-offset: 2px;
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid var(--gov-gray-300);
    border-top-color: var(--gov-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ===== LEGACY BOOTSTRAP COMPATIBILITY ===== */
/* These classes maintain compatibility with existing Bootstrap-based pages */

.navbar-brand {
    font-weight: 700;
    font-size: 1.25rem;
    color: var(--gov-primary);
    text-decoration: none;
}

.navbar-brand:hover {
    color: var(--gov-primary-dark);
    text-decoration: none;
}

.navbar-brand-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--gov-primary), var(--gov-primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.card {
    border: none;
    box-shadow: var(--shadow-sm);
    border-radius: 0.75rem;
    transition: all var(--transition-normal);
    background-color: var(--gov-white);
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    background: linear-gradient(135deg, #059669, #047857);
    border-radius: 0.75rem 0.75rem 0 0 !important;
    border: none;
    padding: 1rem 1.5rem;
    color: var(--gov-white);
}

.card-header h5 {
    margin: 0;
    font-weight: 600;
    color: var(--gov-white);
}

.card-body {
    padding: 1.5rem;
}

.btn {
    font-weight: 500;
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    transition: all var(--transition-normal);
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary {
    background: linear-gradient(135deg, #059669, #047857);
    box-shadow: var(--shadow-sm);
    color: var(--gov-white);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #047857, #065f46);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: var(--gov-white);
    text-decoration: none;
}

.btn-outline-primary {
    border: 2px solid #059669;
    color: #059669;
    background: transparent;
}

.btn-outline-primary:hover {
    background: #059669;
    border-color: #059669;
    transform: translateY(-1px);
    color: var(--gov-white);
    text-decoration: none;
}

.form-control,
.form-select {
    border: 2px solid var(--gov-gray-300);
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    transition: all var(--transition-fast);
    font-size: 0.95rem;
    background-color: var(--gov-white);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--gov-primary);
    box-shadow: 0 0 0 0.2rem rgba(30, 58, 138, 0.25);
    outline: none;
}

.form-label {
    font-weight: 600;
    color: var(--gov-gray-800);
    margin-bottom: 0.5rem;
}

.form-label.required::after {
    content: " *";
    color: var(--gov-danger);
}

.form-check-input:checked {
    background-color: var(--gov-primary);
    border-color: var(--gov-primary);
}

.table {
    background-color: var(--gov-white);
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table thead th {
    background-color: var(--gov-gray-50);
    border: none;
    font-weight: 600;
    color: var(--gov-gray-800);
    padding: 1rem;
}

.table tbody td {
    border: none;
    padding: 1rem;
    vertical-align: middle;
}

.table tbody tr {
    border-bottom: 1px solid var(--gov-gray-200);
}

.table tbody tr:hover {
    background-color: var(--gov-gray-50);
}

.badge {
    font-weight: 500;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
}

.bg-light {
    background-color: var(--gov-gray-50) !important;
}

.text-primary {
    color: var(--gov-primary) !important;
}

.text-muted {
    color: var(--gov-gray-500) !important;
}

.container,
.container-fluid {
    padding-left: var(--spacing-lg);
    padding-right: var(--spacing-lg);
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-left: -0.75rem;
    margin-right: -0.75rem;
}

.col,
.col-md-6,
.col-md-8,
.col-lg-6 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.col-md-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

.col-md-8 {
    flex: 0 0 66.666667%;
    max-width: 66.666667%;
}

.col-lg-6 {
    flex: 0 0 50%;
    max-width: 50%;
}

@media (max-width: 767px) {

    .col-md-6,
    .col-md-8,
    .col-lg-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.mb-4 {
    margin-bottom: 1.5rem !important;
}

.mt-4 {
    margin-top: 1.5rem !important;
}

.mt-5 {
    margin-top: 3rem !important;
}

.py-4 {
    padding-top: 1.5rem !important;
    padding-bottom: 1.5rem !important;
}

.d-grid {
    display: grid !important;
}

.justify-content-center {
    justify-content: center !important;
}

.text-decoration-none {
    text-decoration: none !important;
}

.small {
    font-size: 0.875rem;
}

.border-bottom {
    border-bottom: 1px solid var(--gov-gray-200) !important;
}

.pb-2 {
    padding-bottom: 0.5rem !important;
}

.me-1,
.me-2 {
    margin-right: 0.5rem !important;
}

.invalid-feedback {
    font-size: 0.875rem;
    color: var(--gov-danger);
    margin-top: 0.25rem;
}

.form-help {
    margin-top: 0.25rem;
}

.form-help small {
    color: var(--gov-gray-500);
    font-size: 0.8rem;
}


/* ============================================
   PROFESSIONAL FOOTER STYLES
   ============================================ */

.main-footer {
    background: #1f2937;
    color: white;
    padding: 2rem 0 1rem;
    margin-top: auto;
}

.main-footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: white;
}

.footer-section p {
    color: #d1d5db;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.footer-section p i {
    margin-right: 0.5rem;
    color: #059669;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links li {
    margin-bottom: 0;
}

.footer-links a {
    color: #d1d5db;
    text-decoration: none;
    line-height: 1.8;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    background: #374151;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: #059669;
    color: white;
    transform: translateY(-2px);
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 2rem;
    text-align: center;
    color: #9ca3af;
}

.footer-bottom p {
    margin: 0;
    padding: 0;
}

.footer-session-info {
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #9ca3af;
}

.footer-session-info .info-item {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.footer-session-info .info-separator {
    margin: 0 0.5rem;
}

.footer-session-info i {
    font-size: 0.85rem;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .main-footer {
        padding: 3rem 0 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }nt {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .social-links {
        justify-content: center;
    }

    .footer-session-info {
        font-size: 0.8rem;
    }

    .footer-session-info .info-item {
        display: block;
        margin: 0.25rem 0;
    }

    .footer-session-info .info-separator {
        display: none;
    }
}

/* Ensure footer stays at bottom */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

main {
    flex: 1;
}



/* ============================================
   GREEN GRADIENT THEME - GLOBAL OVERRIDES
   ============================================ */

/* Welcome/Hero Sections */
.card.bg-primary {
    background: linear-gradient(135deg, #059669, #047857) !important;
    border: none;
}

.card.bg-primary .card-body {
    color: white;
}

/* Progress bars */
.progress-bar.bg-primary {
    background: linear-gradient(135deg, #059669, #047857) !important;
}

/* Badges */
.badge.bg-primary {
    background: linear-gradient(135deg, #059669, #047857) !important;
}

/* Buttons */
.btn.btn-primary,
.btn-primary {
    background: linear-gradient(135deg, #059669, #047857) !important;
    border: none;
    color: white;
}

.btn.btn-primary:hover,
.btn-primary:hover {
    background: linear-gradient(135deg, #047857, #065f46) !important;
    color: white;
}

.btn-outline-primary {
    border-color: #059669 !important;
    color: #059669 !important;
}

.btn-outline-primary:hover {
    background: #059669 !important;
    border-color: #059669 !important;
    color: white !important;
}

/* Links */
.text-primary {
    color: #059669 !important;
}

a.text-primary:hover {
    color: #047857 !important;
}

/* Borders */
.border-primary {
    border-color: #059669 !important;
}

/* Backgrounds */
.bg-primary {
    background: linear-gradient(135deg, #059669, #047857) !important;
}

/* Focus states */
.form-control:focus,
.form-select:focus {
    border-color: #059669;
    box-shadow: 0 0 0 0.2rem rgba(5, 150, 105, 0.25);
}

.form-check-input:checked {
    background-color: #059669;
    border-color: #059669;
}

/* Alert info - use green theme */
.alert-info {
    border-left-color: #059669;
    background-color: #f0fdf4;
}

.alert-info .alert-icon {
    color: #059669;
}

/* Table hover */
.table tbody tr:hover {
    background-color: #f0fdf4;
}

/* Card hover effects */
.card:hover {
    box-shadow: 0 8px 16px rgba(5, 150, 105, 0.15);
}

/* Timeline markers */
.timeline-marker-icon.bg-primary {
    background: linear-gradient(135deg, #059669, #047857) !important;
}

/* List group items */
.list-group-item.active {
    background: linear-gradient(135deg, #059669, #047857);
    border-color: #059669;
}

/* Nav pills/tabs */
.nav-pills .nav-link.active {
    background: linear-gradient(135deg, #059669, #047857);
}

/* Dropdown items */
.dropdown-item.active,
.dropdown-item:active {
    background: #059669;
}

/* Pagination */
.pagination .page-item.active .page-link {
    background: #059669;
    border-color: #059669;
}

.pagination .page-link:hover {
    color: #059669;
}

/* Spinners */
.spinner-border.text-primary {
    color: #059669 !important;
}

/* Custom scrollbar for green theme */
::-webkit-scrollbar-thumb {
    background: #059669;
}

::-webkit-scrollbar-thumb:hover {
    background: #047857;
}

/* Modal headers */
.modal-header {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
}

.modal-header .btn-close {
    filter: brightness(0) invert(1);
}

/* Accordion */
.accordion-button:not(.collapsed) {
    background-color: #f0fdf4;
    color: #059669;
}

/* Toast */
.toast-header {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
}

/* Offcanvas */
.offcanvas-header {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
}

/* Breadcrumb */
.breadcrumb-item.active {
    color: #059669;
}

.breadcrumb-item a {
    color: #059669;
}

.breadcrumb-item a:hover {
    color: #047857;
}

/* Stats cards with green theme */
.stat-card-primary .stat-icon {
    background: linear-gradient(135deg, #059669, #047857) !important;
}

/* Dashboard welcome cards */
.dashboard-welcome {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
    padding: 2rem;
    border-radius: 15px;
    margin-bottom: 2rem;
}

/* Quick action buttons with green hover */
.quick-action-card:hover {
    border-color: #059669;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

/* Status indicators */
.status-active {
    color: #059669;
}

.status-dot.active {
    background: #059669;
}

/* Charts and graphs - green theme */
.chart-primary {
    color: #059669;
}

/* Loading overlay */
.loading-overlay {
    background: rgba(5, 150, 105, 0.1);
}

/* Success states with green */
.success-message {
    background: #f0fdf4;
    border-left: 4px solid #059669;
    color: #065f46;
}

/* Icon backgrounds */
.icon-circle-primary {
    background: linear-gradient(135deg, #059669, #047857);
    color: white;
}

/* Sidebar active state */
.sidebar .nav-link.active {
    background: rgba(5, 150, 105, 0.1);
    border-left-color: #059669;
    color: #059669;
}

/* Footer links hover */
.footer-link:hover {
    color: #10b981;
}

/* High contrast mode - green theme */
@media (prefers-contrast: high) {
    :root {
        --gov-primary: #047857;
        --gov-primary-light: #059669;
        --gov-primary-dark: #065f46;
    }
}

/* Print - maintain green theme for headers */
@media print {
    .card-header {
        background: #059669 !important;
        color: white !important;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}
/* ===== ACTION BUTTONS ===== */
.btn-action {
    background-color: #059669;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.35rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}
.btn-action:hover {
    background-color: #047857;
    color: white;
}
.btn-action:focus {
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.4);
    color: white;
}
.btn-action i {
    font-size: 0.9em;
}
