/* ========================================
   MODERN CLEAN DESIGN
   EURO APAVOL Management System
   Palette: Slate + Teal · Font: DM Sans
   ======================================== */

:root {
    --sidebar-width: 250px;
    --sidebar-collapsed: 64px;
    --header-height: 42px;

    --primary: #0d9488;
    --primary-hover: #0f766e;
    --primary-light: #f0fdfa;
    --primary-border: #99f6e4;

    --text-dark: #1e293b;
    --text-medium: #475569;
    --text-light: #94a3b8;
    --text-white: #ffffff;

    --bg-main: #f1f5f9;
    --bg-white: #ffffff;
    --bg-hover: rgba(13, 148, 136, 0.06);

    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.04);

    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --radius: 10px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-main);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ========================================
   LAYOUT
   ======================================== */

.app-wrapper {
    display: flex;
    min-height: 100vh;
}

.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin-left var(--transition);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.sidebar.collapsed + .main-content {
    margin-left: var(--sidebar-collapsed);
}

/* ========================================
   SIDEBAR — Light, clean
   ======================================== */

.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    left: 0;
    top: 0;
    background: #ffffff;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: width var(--transition);
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar.collapsed .nav-text,
.sidebar.collapsed .company-name,
.sidebar.collapsed .company-subtitle,
.sidebar.collapsed .user-details,
.sidebar.collapsed .user-logout-btn,
.sidebar.collapsed .app-version,
.sidebar.collapsed .nav-section-title,
.sidebar.collapsed .badge-new {
    opacity: 0;
    width: 0;
    overflow: hidden;
}

.sidebar.collapsed .nav-section {
    padding: 0 5px;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 0;
    height: 44px;
}

.sidebar.collapsed .nav-icon {
    width: 38px;
    height: 38px;
}

/* Sidebar Header */
.sidebar-header {
    padding: 0 16px;
    border-bottom: 1px solid #eef1f5;
    border-right: 1px solid #eef1f5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    flex-shrink: 0;
}

.company-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.logo-icon {
    font-size: 18px;
    width: 30px;
    height: 30px;
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.logo-text {
    flex: 1;
    min-width: 0;
    transition: opacity var(--transition);
}

.company-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: 0.2px;
    white-space: nowrap;
    line-height: 1.2;
}

.company-subtitle {
    font-size: 9px;
    color: var(--text-light);
    font-weight: 500;
    white-space: nowrap;
    letter-spacing: 0.3px;
}

.sidebar-toggle {
    background: #f1f5f9;
    border: 1px solid #eef1f5;
    color: var(--text-light);
    width: 24px;
    height: 24px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    flex-shrink: 0;
}

.sidebar-toggle:hover {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

.toggle-icon {
    font-size: 12px;
    transition: transform var(--transition);
}

.sidebar.collapsed .toggle-icon {
    transform: rotate(180deg);
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 16px 0;
    border-right: 1px solid #eef1f5;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.nav-section {
    margin-bottom: 24px;
    padding: 0 10px;
}

.nav-section-title {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.5px;
    color: var(--text-light);
    padding: 0 10px;
    margin-bottom: 8px;
    text-transform: uppercase;
    transition: opacity var(--transition);
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 10px;
    height: 42px;
    color: var(--text-medium);
    text-decoration: none;
    transition: all 0.15s ease;
    position: relative;
    cursor: pointer;
    border: none;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 2px;
}

.nav-item:hover {
    background: var(--bg-main);
    color: var(--text-dark);
}

.nav-item.active {
    background: var(--primary);
    color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
}

.nav-icon {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 8px;
    background: var(--bg-main);
    transition: all 0.15s ease;
}

.nav-icon svg {
    width: 18px;
    height: 18px;
    display: block;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.15));
}

.nav-item:hover .nav-icon {
    background: rgba(13, 148, 136, 0.08);
    color: var(--primary);
}

.nav-item.active .nav-icon {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.nav-text {
    flex: 1;
    font-size: 13px;
    white-space: nowrap;
    transition: opacity var(--transition), width var(--transition);
}

.badge-new {
    background: #ef4444;
    color: white;
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 10px;
    font-weight: 700;
    letter-spacing: 0.3px;
    flex-shrink: 0;
    transition: opacity var(--transition), width var(--transition);
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 12px 12px 10px;
    border-top: 1px solid var(--border);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 8px;
    border-radius: 10px;
    transition: background var(--transition);
    position: relative;
}

.user-card:hover {
    background: var(--bg-hover);
}

.user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.3);
}

.user-initials {
    color: #fff;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.5px;
    line-height: 1;
}

.user-status-dot {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    border: 2px solid var(--bg-white);
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.2);
}

.user-details {
    flex: 1;
    min-width: 0;
    transition: opacity var(--transition);
}

.user-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
}

.user-role-badge {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin-top: 2px;
    padding: 1px 6px 1px 4px;
    border-radius: 6px;
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    color: var(--primary);
    font-size: 9.5px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.6;
}

.user-role-badge--admin {
    background: linear-gradient(135deg, #fef3c7 0%, #fef9c3 100%);
    border-color: #fcd34d;
    color: #92400e;
}

.user-role-badge--admin svg {
    color: #d97706;
}

.user-role {
    white-space: nowrap;
}

.user-logout-btn {
    width: 30px;
    height: 30px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: transparent;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: all var(--transition);
}

.user-logout-btn:hover {
    background: #fef2f2;
    border-color: #fecaca;
    color: #dc2626;
}

.user-logout-btn:active {
    transform: scale(0.92);
}

.app-version {
    text-align: center;
    font-size: 9.5px;
    color: var(--text-light);
    margin-top: 6px;
    opacity: 0.6;
    letter-spacing: 0.3px;
}

/* Collapsed sidebar — center avatar only */
.sidebar.collapsed .user-card {
    justify-content: center;
    padding: 6px 0;
}

.sidebar.collapsed .user-avatar {
    width: 34px;
    height: 34px;
}

.sidebar.collapsed .user-initials {
    font-size: 12px;
}

/* ========================================
   TOP HEADER
   ======================================== */

.top-header {
    display: none;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
}

.mobile-menu-toggle span {
    width: 20px;
    height: 2px;
    background: var(--text-dark);
    border-radius: 2px;
    transition: all var(--transition);
}

.page-title {
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    letter-spacing: 0.01em;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.header-clock {
    display: flex;
    align-items: center;
    gap: 0;
    font-size: 12px;
    font-weight: 500;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
}

.header-clock-sep {
    margin: 0 6px;
    color: #cbd5e1;
}

.header-btn {
    position: relative;
    background: transparent;
    border: none;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
    color: #94a3b8;
}

.header-btn:hover {
    background: #f1f5f9;
    color: #475569;
}

.notification-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: #ef4444;
    color: white;
    font-size: 9px;
    font-weight: 700;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

/* ========================================
   MODULE CONTAINER
   ======================================== */

.module-container {
    flex: 1;
    padding: 24px;
}

.module {
    display: none;
    animation: fadeIn 0.25s ease;
}

.module.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

.module-placeholder {
    text-align: center;
    padding: 80px 20px;
    background: var(--bg-white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.placeholder-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.2;
}

.module-placeholder h2 {
    font-size: 22px;
    color: var(--text-dark);
    margin-bottom: 8px;
}

.module-placeholder p {
    font-size: 14px;
    color: var(--text-medium);
    margin-bottom: 6px;
}

.placeholder-hint {
    font-size: 12px;
    color: var(--primary);
    font-style: italic;
    margin-top: 10px;
}

/* ========================================
   SETTINGS MODULE
   ======================================== */

/* ========================================
   CONFIGURARE — Side-Nav Premium Layout
   ======================================== */

.cfg {
    height: 100%;
}

.cfg-shell {
    display: flex;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    min-height: 520px;
    box-shadow: var(--shadow-sm);
}

/* ── Left Navigation ── */
.cfg-nav {
    width: 200px;
    flex-shrink: 0;
    background: #f8fafc;
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
}

.cfg-nav-header {
    padding: 22px 20px 18px;
    border-bottom: 1px solid var(--border);
}

.cfg-nav-title {
    font-size: 15px;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.3px;
}

.cfg-nav-items {
    flex: 1;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.cfg-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: none;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    transition: all 0.15s;
    text-align: left;
    width: 100%;
}

.cfg-nav-item svg {
    flex-shrink: 0;
    opacity: 0.5;
    transition: opacity 0.15s;
}

.cfg-nav-item:hover {
    background: rgba(0,0,0,0.03);
    color: var(--text-medium);
}

.cfg-nav-item:hover svg {
    opacity: 0.7;
}

.cfg-nav-item.active {
    background: var(--bg-white);
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.cfg-nav-item.active svg {
    opacity: 1;
    color: var(--primary);
}

/* Nav footer — status badge */
.cfg-nav-footer {
    padding: 14px;
    border-top: 1px solid var(--border);
}

.cfg-status {
    display: flex;
    align-items: center;
    gap: 7px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-light);
}

.cfg-status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #cbd5e1;
    flex-shrink: 0;
}

.cfg-status-dot.online {
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
}

.cfg-status-dot.offline {
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15);
}

/* ── Right Content ── */
.cfg-content {
    flex: 1;
    min-width: 0;
    padding: 28px 32px;
    overflow-y: auto;
}

.cfg-panel {
    display: none;
}

.cfg-panel.active {
    display: block;
    animation: cfgSlide 0.2s ease;
}

@keyframes cfgSlide {
    from { opacity: 0; transform: translateX(8px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Panel header */
.cfg-panel-head {
    margin-bottom: 24px;
}

.cfg-panel-head h3 {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-dark);
    margin: 0 0 4px 0;
    letter-spacing: -0.3px;
}

.cfg-panel-head p {
    font-size: 13px;
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
}

/* ── Cards / Sections ── */
.cfg-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 14px;
}

.cfg-card-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-bottom: 14px;
}

.cfg-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ── Form Fields ── */
.cfg-field label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-medium);
    margin-bottom: 5px;
}

.cfg-input {
    width: 100%;
    padding: 9px 12px;
    border: 1.5px solid var(--border);
    border-radius: 7px;
    font-family: inherit;
    font-size: 13px;
    color: var(--text-dark);
    background: var(--bg-white);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.cfg-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.08);
}

select.cfg-input {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%2394a3b8' d='M5 7L1 3h8z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}

/* ── Custom Toggle Switch ── */
.cfg-switch-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 4px;
}

.cfg-switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
    flex-shrink: 0;
    cursor: pointer;
}

.cfg-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.cfg-switch-track {
    position: absolute;
    inset: 0;
    background: #d1d5db;
    border-radius: 22px;
    transition: background 0.2s;
}

.cfg-switch-thumb {
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.cfg-switch input:checked + .cfg-switch-track {
    background: var(--primary);
}

.cfg-switch input:checked + .cfg-switch-track .cfg-switch-thumb {
    transform: translateX(18px);
}

.cfg-switch-label {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.3;
}

/* ── Action Buttons ── */
.cfg-actions {
    display: flex;
    gap: 8px;
    margin-top: 6px;
}

.cfg-btn {
    padding: 9px 20px;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    white-space: nowrap;
}

.cfg-btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 1px 3px rgba(13, 148, 136, 0.3);
}

.cfg-btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 2px 6px rgba(13, 148, 136, 0.35);
}

.cfg-btn-ghost {
    background: none;
    color: var(--text-light);
    padding: 9px 16px;
}

.cfg-btn-ghost:hover {
    background: var(--bg-main);
    color: var(--text-medium);
}

.cfg-btn-outline {
    background: var(--bg-white);
    color: var(--text-medium);
    border: 1.5px solid var(--border);
}

.cfg-btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.cfg-btn-sm {
    padding: 7px 16px;
    font-size: 12px;
}

/* ── Backup List ── */
.cfg-bk-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 18px;
}

.cfg-bk-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 10px;
    transition: border-color 0.15s;
}

.cfg-bk-item:hover {
    border-color: var(--primary-border);
}

.cfg-bk-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    flex-shrink: 0;
}

.cfg-bk-icon svg {
    stroke-linecap: round;
    stroke-linejoin: round;
}

.cfg-bk-icon-export {
    background: linear-gradient(135deg, #ecfdf5, #d1fae5);
    color: #059669;
}

.cfg-bk-icon-import {
    background: linear-gradient(135deg, #eff6ff, #dbeafe);
    color: #2563eb;
}

.cfg-bk-icon-diag {
    background: linear-gradient(135deg, #fefce8, #fef08a);
    color: #ca8a04;
}

.cfg-bk-body {
    flex: 1;
    min-width: 0;
}

.cfg-bk-body strong {
    display: block;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1px;
}

.cfg-bk-body span {
    font-size: 12px;
    color: var(--text-light);
    line-height: 1.4;
}

.cfg-bk-item .cfg-btn {
    flex-shrink: 0;
}

/* Info bar */
.cfg-info-bar {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-medium);
    line-height: 1.5;
}

.cfg-info-bar svg {
    flex-shrink: 0;
    color: var(--primary);
    margin-top: 1px;
}

/* ── Responsive ── */
@media (max-width: 700px) {
    .cfg-shell {
        flex-direction: column;
        min-height: auto;
    }

    .cfg-nav {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .cfg-nav-header {
        display: none;
    }

    .cfg-nav-items {
        flex-direction: row;
        padding: 6px;
        gap: 2px;
    }

    .cfg-nav-item {
        flex: 1;
        justify-content: center;
        padding: 10px 8px;
    }

    .cfg-nav-item span {
        display: none;
    }

    .cfg-nav-footer {
        display: none;
    }

    .cfg-content {
        padding: 20px 16px;
    }

    .cfg-row {
        grid-template-columns: 1fr;
    }

    .cfg-bk-item {
        flex-wrap: wrap;
    }

    .cfg-bk-item .cfg-btn {
        width: 100%;
        text-align: center;
    }
}

/* ── Legacy toggle (keep for other modules) ── */
.switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    flex-shrink: 0;
}

.switch input { opacity: 0; width: 0; height: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background-color: #cbd5e1;
    transition: var(--transition);
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: var(--transition);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

input:checked + .slider { background: var(--primary); }
input:checked + .slider:before { transform: translateX(22px); }

/* ========================================
   HELP MODULE
   ======================================== */

.help-container {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 28px;
    border: 1px solid var(--border);
}

.help-container h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-dark);
}

.help-sections {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.help-card {
    padding: 24px;
    background: var(--bg-main);
    border-radius: 8px;
    text-align: center;
    transition: all var(--transition);
    border: 1px solid var(--border);
}

.help-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary);
    background: white;
}

.help-icon {
    font-size: 36px;
    margin-bottom: 12px;
}

.help-card h3 {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-dark);
}

.help-card p {
    font-size: 12px;
    color: var(--text-medium);
    margin-bottom: 12px;
    line-height: 1.5;
}

.btn-link {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    padding: 4px 0;
    transition: all var(--transition);
}

.btn-link:hover {
    color: var(--primary-hover);
}

/* ========================================
   BUTTONS (layout-level)
   ======================================== */

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-main);
    color: var(--text-dark);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    .main-content {
        margin-left: 0 !important;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .header-info {
        display: none;
    }

    .page-title {
        font-size: 15px;
    }

    .module-container {
        padding: 14px;
    }

    .settings-grid,
    .help-sections {
        grid-template-columns: 1fr;
    }

    .top-header {
        padding: 0 14px;
    }
}

@media print {
    .sidebar,
    .top-header {
        display: none !important;
    }

    .main-content {
        margin-left: 0 !important;
    }

    .module-container {
        padding: 0 !important;
    }
}