/* Variables globales */
:root {
    --bg-main: #f9fafc;
    --bg-card: #ffffff;
    --bg-sidebar: #0b1220;
    --text-main: #1a1a1a;
    --text-muted: #6b7280;
    --accent: #3df0c2;
    --radius: 10px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);

    /* Legacy variables maintained for compatibility */
    --color-navy: #003C71;
    --color-greentsika: #228848;
    --color-accent: #8b5cf6;
    --font-family: 'Mulish', 'Inter', system-ui, sans-serif;
    --font-size-base: 16px;
}

/* Layout */
body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    background: var(--bg-main);
    color: var(--text-main);
    margin: 0;
}

/* Legacy Utilities Overrides */
.bg-navy {
    background-color: var(--color-navy) !important;
}

.text-navy {
    color: var(--color-navy) !important;
}

.border-navy {
    border-color: var(--color-navy) !important;
}

.bg-greentsika-main {
    background-color: var(--color-greentsika) !important;
}

.text-greentsika-main {
    color: var(--color-greentsika) !important;
}

.hover\:bg-navy:hover {
    background-color: var(--color-navy) !important;
}

.hover\:bg-greentsika-dark:hover {
    background-color: color-mix(in srgb, var(--color-greentsika) 80%, black) !important;
}

.hover\:bg-navy-light:hover {
    background-color: color-mix(in srgb, var(--color-navy) 80%, white) !important;
}

/* Custom Scrollbar */
.custom-scrollbar::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Sidebar */
.sidebar {
    background: var(--bg-sidebar);
    color: #94a3b8;
    /* Muted nice gray for contrast */
    width: 260px;
    min-height: 100vh;
    padding: 1.5rem 1rem;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid rgba(255, 255, 255, 0.03);
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.1);
}

.sidebar.collapsed {
    width: 88px;
    /* Slightly wider for comfortable icons */
    padding: 1.5rem 0.75rem;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0.6rem 1rem;
    border-radius: 14px;
    color: inherit;
    text-decoration: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    overflow: hidden;
    margin-bottom: 0.2rem;
    border: 1px solid transparent;
    /* Prepare for active state */
}

.sidebar a i {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
    transition: transform 0.2s;
}

.sidebar a.active {
    background: rgba(61, 240, 194, 0.1);
    color: var(--accent);
    font-weight: 600;
    border-color: rgba(61, 240, 194, 0.2);
    box-shadow: 0 0 15px rgba(61, 240, 194, 0.05);
    /* Soft glow */
}

/* Icon glow in active state */
.sidebar a.active i {
    filter: drop-shadow(0 0 5px rgba(61, 240, 194, 0.4));
    transform: scale(1.05);
}

.sidebar a:hover {
    background: rgba(255, 255, 255, 0.04);
    color: #f1f5f9;
    transform: translateX(3px);
    /* Interactive nudge */
}


/* Collapsed Sidebar Logic */
.sidebar.collapsed a span {
    display: none;
}

.sidebar.collapsed .sidebar-header span {
    display: none;
}

/* Collapsed Footer */
.sidebar.collapsed .sidebar-footer span {
    display: none;
}

.sidebar.collapsed .sidebar-version {
    display: none;
}

.sidebar.collapsed .sidebar-footer button {
    padding-left: 0;
    padding-right: 0;
    width: 100%;
}

/* Collapsed Header Layout */
.sidebar.collapsed .sidebar-header {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.sidebar.collapsed .sidebar-header>div {
    /* Logo container */
    justify-content: center;
    margin: 0;
}

.sidebar.collapsed a {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

/* Sidebar Toggle Button */
.sidebar-toggle {
    cursor: pointer;
    color: white;
    opacity: 0.7;
    margin-bottom: 0;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    transition: background 0.2s;
}

.sidebar-toggle:hover {
    opacity: 1;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar.collapsed .sidebar-toggle {
    margin: 0;
}

/* Navigation Buttons (Legacy class support) */
.nav-btn {
    text-decoration: none;
    display: flex;
    cursor: pointer;
}

.nav-btn:hover {
    text-decoration: none;
}

.nav-btn:focus {
    outline: 2px solid rgba(255, 255, 255, 0.3);
    outline-offset: 2px;
}

/* Header Transition */
.header-transition {
    transition: all 0.3s ease;
}

.header-compact {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.header-compact img {
    height: 28px;
}

.header-compact h1 {
    font-size: 1rem;
}

.header-compact p {
    display: none;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--color-greentsika);
    color: white;
}

.btn-primary:hover {
    background: var(--color-greentsika);
    filter: brightness(110%);
}

.btn-secondary {
    background: var(--color-navy);
    border: 1px solid var(--color-navy);
    color: white;
}

.btn-secondary:hover {
    background: #2c4a7c;
    color: white;
}

/* Score badges */
.score {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius);
    font-weight: 600;
    background: rgba(61, 240, 194, 0.1);
    color: var(--accent);
}

/* Print Styles */
@media print {

    aside,
    header,
    #payment-config-panel,
    .no-print,
    #sidebar-backdrop,
    #mobile-menu-btn {
        display: none !important;
    }

    #content-scroll-area {
        overflow: visible !important;
        height: auto !important;
        padding: 0 !important;
    }

    body {
        background: white;
        height: auto;
        overflow: visible;
    }

    #payments {
        display: block !important;
    }

    #sidebar {
        display: none !important;
    }

    main {
        margin: 0 !important;
    }
}