/* =============================================
   ARGO ERP - Stylesheet
   Brand Colors from ARGO SRL logo
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

:root {
    /* Brand Colors */
    --argo-navy: #2D3E6B;
    --argo-navy-dark: #1E2A4A;
    --argo-navy-light: #3D5090;
    --argo-blue: #4A6FA5;
    --argo-purple: #7B4BAE;
    --argo-cyan: #00BCD4;
    --argo-lime: #C4D600;
    --argo-white: #FFFFFF;

    /* UI Colors */
    --bg-primary: #F0F2F5;
    --bg-secondary: #FFFFFF;
    --bg-sidebar: #1A2342;
    --bg-sidebar-hover: #253361;
    --bg-sidebar-active: #2D3E6B;
    --text-primary: #1A1A2E;
    --text-secondary: #6B7280;
    --text-light: #9CA3AF;
    --text-white: #FFFFFF;
    --text-sidebar: #B0BCC9;
    --border-color: #E5E7EB;
    --border-light: #F3F4F6;

    /* Status */
    --success: #10B981;
    --success-bg: #ECFDF5;
    --warning: #F59E0B;
    --warning-bg: #FFFBEB;
    --danger: #EF4444;
    --danger-bg: #FEF2F2;
    --info: #3B82F6;
    --info-bg: #EFF6FF;

    /* Layout */
    --sidebar-width: 260px;
    --sidebar-collapsed: 70px;
    --header-height: 64px;
    --radius: 10px;
    --radius-sm: 6px;
    --radius-lg: 14px;
    --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md: 0 4px 12px rgba(0,0,0,.08);
    --shadow-lg: 0 10px 30px rgba(0,0,0,.12);
    --transition: all .2s ease;
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; -webkit-font-smoothing: antialiased; }
body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}
a { color: var(--argo-navy); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--argo-navy-light); }
img { max-width: 100%; }

/* ===== LOGIN PAGE ===== */
.login-wrapper {
    display: flex;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--argo-navy-dark) 0%, var(--argo-navy) 50%, var(--argo-navy-light) 100%);
}
.login-left {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    position: relative;
    overflow: hidden;
}
.login-left::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(0,188,212,.15) 0%, transparent 70%);
    top: -100px; right: -100px;
    border-radius: 50%;
}
.login-left::after {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    background: radial-gradient(circle, rgba(123,75,174,.12) 0%, transparent 70%);
    bottom: -100px; left: -100px;
    border-radius: 50%;
}
.login-brand {
    text-align: center;
    z-index: 1;
    margin-bottom: 40px;
}
.login-brand img { background: #fff; border-radius: 10px; padding: 8px 16px;
    width: 280px;
    
    margin-bottom: 16px;
}
.login-brand p {
    color: rgba(255,255,255,.6);
    font-size: .95rem;
    letter-spacing: .5px;
}
.login-right {
    width: 480px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}
.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
}
.login-card h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--argo-navy);
}
.login-card p.subtitle {
    color: var(--text-secondary);
    margin-bottom: 28px;
    font-size: .9rem;
}

/* ===== FORMS ===== */
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block;
    font-size: .8rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .5px;
}
.form-control {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: .95rem;
    color: var(--text-primary);
    background: var(--bg-secondary);
    transition: var(--transition);
    outline: none;
}
.form-control:focus {
    border-color: var(--argo-navy);
    box-shadow: 0 0 0 3px rgba(45,62,107,.1);
}
.form-control::placeholder { color: var(--text-light); }
select.form-control { appearance: auto; }
textarea.form-control { resize: vertical; min-height: 80px; }
.form-row { display: flex; gap: 16px; }
.form-row .form-group { flex: 1; }

.input-icon-wrap {
    position: relative;
}
.input-icon-wrap .form-control { padding-left: 42px; }
.input-icon-wrap svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
    width: 18px; height: 18px;
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: .9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.4;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary {
    background: var(--argo-navy);
    color: var(--text-white);
}
.btn-primary:hover { background: var(--argo-navy-light); color: var(--text-white); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #DC2626; color: #fff; }
.btn-warning { background: var(--warning); color: #fff; }
.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border-color);
    color: var(--text-primary);
}
.btn-outline:hover { border-color: var(--argo-navy); color: var(--argo-navy); }
.btn-sm { padding: 6px 12px; font-size: .8rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; justify-content: center; }
.btn-icon {
    padding: 8px;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    border: none;
    cursor: pointer;
}
.btn-icon:hover { background: var(--bg-primary); color: var(--argo-navy); }

/* ===== APP LAYOUT ===== */
.app-wrapper { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    transition: var(--transition);
    overflow-y: auto;
    overflow-x: hidden;
}
.sidebar-logo {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,.06);
    display: flex;
    align-items: center;
    gap: 14px;
}
.sidebar-logo span {
    color: var(--text-white);
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: .3px;
}

.sidebar-nav { padding: 16px 12px; flex: 1; }
.sidebar-section {
    margin-bottom: 8px;
}
.sidebar-section-title {
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: rgba(255,255,255,.3);
    padding: 12px 12px 6px;
    font-weight: 500;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-sidebar);
    font-size: .88rem;
    font-weight: 400;
    transition: var(--transition);
    margin-bottom: 2px;
}
.sidebar-link svg { width: 20px; height: 20px; flex-shrink: 0; opacity: .7; }
.sidebar-link:hover {
    background: var(--bg-sidebar-hover);
    color: var(--text-white);
}
.sidebar-link:hover svg { opacity: 1; }
.sidebar-link.active {
    background: var(--bg-sidebar-active);
    color: var(--text-white);
    font-weight: 500;
}
.sidebar-link.active svg { opacity: 1; color: var(--argo-cyan); }

.sidebar-link .badge-count {
    margin-left: auto;
    background: var(--danger);
    color: #fff;
    font-size: .7rem;
    padding: 2px 7px;
    border-radius: 10px;
    font-weight: 600;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,.06);
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition);
}
.sidebar-user:hover { background: var(--bg-sidebar-hover); }
.sidebar-user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--argo-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 600;
    font-size: .85rem;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { color: var(--text-white); font-size: .85rem; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-role { color: rgba(255,255,255,.4); font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; }

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: var(--transition);
}

/* Top Header */
.top-header {
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 50;
}
.top-header-left { display: flex; align-items: center; gap: 16px; }
.top-header-left h1 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--text-primary);
}
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: .82rem;
    color: var(--text-secondary);
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--argo-navy); }
.breadcrumb svg { width: 14px; height: 14px; }

.top-header-right { display: flex; align-items: center; gap: 12px; }

.notification-btn {
    position: relative;
    background: none;
    border: none;
    padding: 8px;
    cursor: pointer;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.notification-btn:hover { background: var(--bg-primary); color: var(--argo-navy); }
.notification-btn svg { width: 22px; height: 22px; }
.notification-dot {
    position: absolute;
    top: 6px; right: 6px;
    width: 8px; height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--bg-secondary);
}

/* Page Content */
.page-content { padding: 28px; }

/* ===== CARDS ===== */
.card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-header h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
}
.card-body { padding: 22px; }
.card-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--border-light);
    background: var(--bg-primary);
}

/* Stat Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--bg-secondary);
    border-radius: var(--radius);
    padding: 22px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow);
    display: flex;
    align-items: flex-start;
    gap: 16px;
    transition: var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon {
    width: 48px; height: 48px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.stat-icon svg { width: 24px; height: 24px; }
.stat-icon.navy { background: rgba(45,62,107,.1); color: var(--argo-navy); }
.stat-icon.purple { background: rgba(123,75,174,.1); color: var(--argo-purple); }
.stat-icon.cyan { background: rgba(0,188,212,.1); color: var(--argo-cyan); }
.stat-icon.lime { background: rgba(196,214,0,.15); color: #8B9A00; }
.stat-icon.success { background: var(--success-bg); color: var(--success); }
.stat-icon.warning { background: var(--warning-bg); color: var(--warning); }
.stat-icon.danger { background: var(--danger-bg); color: var(--danger); }
.stat-info { flex: 1; }
.stat-value { font-size: 1.6rem; font-weight: 700; color: var(--text-primary); line-height: 1.2; }
.stat-label { font-size: .8rem; color: var(--text-secondary); margin-top: 2px; }
.stat-trend { font-size: .75rem; margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* ===== TABLES ===== */
.table-wrap { overflow-x: auto; }
table {
    width: 100%;
    border-collapse: collapse;
}
thead th {
    padding: 12px 16px;
    text-align: left;
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: .5px;
    background: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    white-space: nowrap;
}
tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: .9rem;
    color: var(--text-primary);
    vertical-align: middle;
}
tbody tr:hover { background: rgba(45,62,107,.02); }
tbody tr:last-child td { border-bottom: none; }

/* ===== BADGES ===== */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 500;
    letter-spacing: .2px;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-danger { background: var(--danger-bg); color: var(--danger); }
.badge-info { background: var(--info-bg); color: var(--info); }
.badge-secondary { background: var(--bg-primary); color: var(--text-secondary); }
.badge-navy { background: rgba(45,62,107,.1); color: var(--argo-navy); }

/* ===== GRID LAYOUT ===== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.gap-16 { gap: 16px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }

/* ===== MODAL ===== */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--bg-secondary);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    animation: modalIn .2s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(.96) translateY(8px); }
    to { opacity: 1; transform: none; }
}
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-header h3 { font-size: 1.1rem; font-weight: 600; }
.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-light);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
.modal-close {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 4px;
}
.modal-close:hover { color: var(--text-primary); }

/* ===== ALERTS ===== */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: .9rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert svg { width: 20px; height: 20px; flex-shrink: 0; }
.alert-success { background: var(--success-bg); color: #065F46; border: 1px solid rgba(16,185,129,.2); }
.alert-warning { background: var(--warning-bg); color: #92400E; border: 1px solid rgba(245,158,11,.2); }
.alert-danger { background: var(--danger-bg); color: #991B1B; border: 1px solid rgba(239,68,68,.2); }
.alert-info { background: var(--info-bg); color: #1E40AF; border: 1px solid rgba(59,130,246,.2); }

/* ===== TABS ===== */
.tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-light);
    margin-bottom: 20px;
}
.tab-link {
    padding: 10px 20px;
    font-size: .88rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    cursor: pointer;
    transition: var(--transition);
    background: none;
    border-top: none; border-left: none; border-right: none;
}
.tab-link:hover { color: var(--argo-navy); }
.tab-link.active {
    color: var(--argo-navy);
    border-bottom-color: var(--argo-navy);
}
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    justify-content: center;
    margin-top: 20px;
}
.pagination a, .pagination span {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: .85rem;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: var(--transition);
}
.pagination a:hover { background: var(--argo-navy); color: #fff; border-color: var(--argo-navy); }
.pagination .active { background: var(--argo-navy); color: #fff; border-color: var(--argo-navy); }

/* ===== EMPTY STATE ===== */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}
.empty-state svg { width: 48px; height: 48px; color: var(--text-light); margin-bottom: 16px; }
.empty-state h4 { font-size: 1.1rem; margin-bottom: 8px; color: var(--text-primary); }
.empty-state p { font-size: .9rem; margin-bottom: 20px; }

/* ===== TOAST NOTIFICATIONS ===== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.toast {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
    border-left: 4px solid;
    box-shadow: var(--shadow-md);
    font-size: .9rem;
    animation: toastIn .3s ease;
    min-width: 300px;
}
.toast-success { border-color: var(--success); }
.toast-error { border-color: var(--danger); }
.toast-warning { border-color: var(--warning); }
@keyframes toastIn {
    from { opacity: 0; transform: translateX(100%); }
    to { opacity: 1; transform: none; }
}

/* ===== SIDEBAR TOGGLE (Mobile) ===== */
.sidebar-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-primary);
    padding: 4px;
}
.sidebar-toggle svg { width: 24px; height: 24px; }

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .sidebar-toggle { display: block; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr; }
    .form-row { flex-direction: column; gap: 0; }
    .page-content { padding: 16px; }
    .login-wrapper { flex-direction: column; }
    .login-left { padding: 40px 20px; min-height: auto; }
    .login-right { width: 100%; padding: 20px; }
    .login-card { padding: 28px; }
    .top-header { padding: 0 16px; }
    .table-wrap { margin: 0 -22px; }
}

/* ===== LOADING SPINNER ===== */
.spinner {
    width: 36px; height: 36px;
    border: 3px solid var(--border-color);
    border-top-color: var(--argo-navy);
    border-radius: 50%;
    animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== COLORED ACCENT BAR (matches ARGO logo bars) ===== */
.accent-bar {
    width: 4px;
    border-radius: 4px;
    min-height: 30px;
}
.accent-bar.purple { background: var(--argo-purple); }
.accent-bar.cyan { background: var(--argo-cyan); }
.accent-bar.lime { background: var(--argo-lime); }

/* ===== SEARCH ===== */
.search-box {
    position: relative;
    max-width: 320px;
}
.search-box input {
    width: 100%;
    padding: 9px 14px 9px 38px;
    border: 1.5px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: .88rem;
    background: var(--bg-primary);
    outline: none;
    transition: var(--transition);
}
.search-box input:focus { border-color: var(--argo-navy); background: var(--bg-secondary); }
.search-box svg {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 16px; height: 16px;
    color: var(--text-light);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-light); }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.1); }



/* Logo sidebar finale */
.sidebar-logo {
    padding: 20px !important;
    text-align: center !important;
}
.sidebar-logo img {
    height: auto !important;
    width: 200px !important;
    background: #fff !important;
    border-radius: 8px !important;
    padding: 8px 12px !important;
    display: block !important;
    margin: 0 auto !important;
}


/* Logo login page definitivo */
.login-brand img {
    background: #fff !important;
    border-radius: 10px !important;
    padding: 12px 24px !important;
    width: 280px !important;
    height: auto !important;
}

/* PWA Mobile Responsive */
@media (max-width: 768px) {
    .sidebar { 
        position: fixed; left: -260px; z-index: 1000; 
        transition: left 0.3s ease; height: 100vh;
    }
    .sidebar.open { left: 0; }
    .main-content { margin-left: 0 !important; }
    .top-bar { padding-left: 16px !important; }
    .stats-grid { grid-template-columns: 1fr 1fr !important; }
    .grid-2 { grid-template-columns: 1fr !important; }
    .flex-between { flex-direction: column; gap: 12px; }
    .modal { width: 95vw !important; max-width: 95vw !important; margin: 10px; }
    .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    table { min-width: 600px; }
    .form-row { flex-direction: column; }
    body { padding-bottom: env(safe-area-inset-bottom); }
    
    /* Hamburger menu */
    .mobile-menu-btn { 
        display: flex !important; align-items: center; justify-content: center;
        width: 40px; height: 40px; cursor: pointer; 
        background: none; border: none; color: var(--text-primary);
    }
    .mobile-overlay {
        display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
        background: rgba(0,0,0,0.5); z-index: 999;
    }
    .mobile-overlay.active { display: block; }
}
@media (min-width: 769px) {
    .mobile-menu-btn, .mobile-overlay { display: none !important; }
}

/* Fix mobile - padding contenuto */
@media (max-width: 768px) {
    .main-content { padding: 16px 12px !important; }
    .page-header { padding: 12px !important; }
    .card { margin-left: 0 !important; margin-right: 0 !important; }
    .table-wrap { margin: 0 -12px; padding: 0 12px; }
    table { font-size: .82rem; }
    table th, table td { padding: 8px 6px !important; }
    .sidebar-user-avatar { min-width: 32px; }
    .stats-grid { gap: 8px !important; }
    .stat-card { padding: 12px !important; }
    .stat-value { font-size: 1.3rem !important; }
    .tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .tab-link { white-space: nowrap; font-size: .85rem; }
}
