/* ============================================================
   WorkManager — Diseño Fillow Style
   Colores: Negro #000000 | Amarillo #fdc605
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;600;700&display=swap');

/* ---------- VARIABLES ---------- */
:root {
    --primary:        #fdc605;
    --primary-dark:   #e0ad00;
    --primary-light:  #fff3c0;
    --primary-rgba1:  rgba(253,198,5,0.1);
    --primary-rgba2:  rgba(253,198,5,0.2);
    --sidebar-bg:     #000000;
    --sidebar-hover:  #1a1a1a;
    --sidebar-active: #fdc605;
    --sidebar-w:      250px;
    --header-h:       70px;
    --body-bg:        #f4f5f7;
    --card-bg:        #ffffff;
    --border:         #e8e8e8;
    --text:           #3d4152;
    --text-muted:     #888ea8;
    --text-dark:      #000000;
    --success:        #00ab55;
    --warning:        #ffba00;
    --danger:         #e7515a;
    --info:           #2196f3;
    --radius:         12px;
    --shadow:         0 0 40px 0 rgba(94,92,154,.06);
    --shadow-lg:      0 10px 30px rgba(0,0,0,0.12);
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
    font-family: 'Roboto', -apple-system, sans-serif;
    font-size: 0.9rem;
    background: var(--body-bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    overflow-x: hidden;
    line-height: 1.6;
}

/* ---------- SIDEBAR ---------- */
.sidebar {
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    min-height: 100vh;
    position: fixed;
    left: 0; top: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    transition: transform .3s ease;
    overflow-y: auto;
    overflow-x: hidden;
}
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    z-index: 199;
    backdrop-filter: blur(2px);
}

/* Logo */
.sidebar-header {
    padding: 1.5rem 1.25rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #1a1a1a;
    flex-shrink: 0;
    min-height: 80px;
}
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}
.sidebar-logo-img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    border-radius: 8px;
}
.sidebar-logo-icon {
    width: 42px; height: 42px;
    background: var(--primary);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}
.sidebar-logo-text {
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.2;
}
.sidebar-logo-sub {
    color: #888;
    font-size: 0.7rem;
    font-weight: 400;
    display: block;
    margin-top: 1px;
}
.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: #888;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: color .2s;
}
.sidebar-close:hover { color: #fff; }

/* Nav */
.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}
.nav-section-title {
    padding: 0.75rem 1.5rem 0.25rem;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #555;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0.7rem 1.5rem;
    color: #adb5c7;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all .2s ease;
    margin: 1px 0.75rem;
    border-radius: 8px;
    position: relative;
}
.nav-item:hover {
    background: var(--sidebar-hover);
    color: #ffffff;
}
.nav-item.active {
    background: var(--primary);
    color: #000000;
    font-weight: 700;
}
.nav-item.active .nav-icon { opacity: 1; }
.nav-icon {
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    opacity: 0.65;
}
.nav-item:hover .nav-icon,
.nav-item.active .nav-icon { opacity: 1; }

/* SVG icons — heredan color del padre via currentColor */
.nav-svg-icon {
    display: block;
    flex-shrink: 0;
}

/* Íconos de contacto (img tag) — invertir en fondos oscuros */
.icon-contact {
    width: 16px;
    height: 16px;
    opacity: 0.75;
    filter: brightness(0);   /* negro por defecto (fondo claro) */
}
.icon-contact-white {
    width: 16px;
    height: 16px;
    filter: brightness(0) invert(1);  /* blanco para fondos oscuros */
}

/* Botón de menú mobile */
.btn-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text);
    padding: 4px;
    border-radius: 6px;
    align-items: center;
    justify-content: center;
}
.btn-menu:hover { color: var(--primary); }
.nav-divider {
    height: 1px;
    background: #1a1a1a;
    margin: 0.5rem 1.25rem;
}

/* Sidebar footer */
.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid #1a1a1a;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.user-avatar {
    width: 38px; height: 38px;
    background: var(--primary);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #000;
    font-weight: 700;
    font-size: 0.9rem;
    flex-shrink: 0;
}
.user-details { flex: 1; overflow: hidden; }
.user-name {
    display: block;
    color: #f0f0f0;
    font-size: 0.82rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-role { display: block; color: #666; font-size: 0.72rem; }
.btn-logout {
    color: #555;
    text-decoration: none;
    font-size: 1.1rem;
    padding: 5px;
    border-radius: 6px;
    transition: color .2s;
}
.btn-logout:hover { color: var(--danger); }

/* ---------- MAIN CONTENT ---------- */
.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left .3s;
    min-width: 0;
}

/* ---------- TOPBAR / HEADER ---------- */
.topbar {
    height: var(--header-h);
    background: var(--card-bg);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 1.75rem;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}
.btn-menu {
    display: none;
    background: none;
    border: none;
    font-size: 1.3rem;
    cursor: pointer;
    color: var(--text);
    padding: 6px;
    border-radius: 8px;
    transition: background .2s;
}
.btn-menu:hover { background: var(--primary-rgba1); }
.topbar-title {
    flex: 1;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.01em;
}
.topbar-actions { display: flex; align-items: center; gap: 8px; }

/* ---------- PAGE CONTENT ---------- */
.page-content {
    flex: 1;
    padding: 1.75rem;
    overflow-x: hidden;
}

/* ---------- CARDS ---------- */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--shadow-lg); }
.card-header {
    padding: 1.1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    background: var(--card-bg);
}
.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    letter-spacing: -0.01em;
}
.card-body { padding: 1.5rem; }

/* ---------- STAT CARDS ---------- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}
.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 1.5rem;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: transform .2s, box-shadow .2s;
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}
.stat-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}
.stat-icon.yellow { background: rgba(253,198,5,0.15); }
.stat-icon.green  { background: rgba(0,171,85,0.12);  }
.stat-icon.blue   { background: rgba(33,150,243,0.12);}
.stat-icon.red    { background: rgba(231,81,90,0.12); }
.stat-icon.purple { background: rgba(100,60,200,0.1); }
.stat-info { flex: 1; }
.stat-value {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.1;
    letter-spacing: -0.02em;
}
.stat-label {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 3px;
    font-weight: 500;
}
.stat-trend {
    font-size: 0.72rem;
    font-weight: 600;
    margin-top: 4px;
}
.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0.55rem 1.1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all .2s;
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
    letter-spacing: 0.01em;
}
.btn-primary {
    background: var(--primary);
    color: #000000;
    box-shadow: 0 4px 15px rgba(253,198,5,0.35);
}
.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: 0 6px 20px rgba(253,198,5,0.45);
    transform: translateY(-1px);
}
.btn-dark { background: #000000; color: #ffffff; }
.btn-dark:hover { background: #1a1a1a; transform: translateY(-1px); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #008f47; transform: translateY(-1px); }
.btn-warning { background: var(--warning); color: #000; }
.btn-warning:hover { background: #e0a800; }
.btn-danger  { background: var(--danger);  color: #fff; }
.btn-danger:hover  { background: #d63a42; }
.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text);
}
.btn-outline:hover {
    border-color: var(--primary);
    color: var(--text-dark);
    background: var(--primary-rgba1);
}
.btn-sm { padding: 0.35rem 0.8rem; font-size: 0.78rem; }
.btn-icon { padding: 0.45rem; }
.btn-icon:hover { background: var(--primary-rgba1) !important; }

/* ---------- BADGES / ESTADO ---------- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    white-space: nowrap;
}
.badge-pendiente  { background: #fff8e1; color: #b7821a; border: 1px solid #ffe082; }
.badge-en_curso   { background: #e3f2fd; color: #1565c0; border: 1px solid #90caf9; }
.badge-pausado    { background: #f5f5f5; color: #616161; border: 1px solid #e0e0e0; }
.badge-terminado  { background: #e8f5e9; color: #2e7d32; border: 1px solid #a5d6a7; }
.badge-cobrado    { background: #e8f5e9; color: #1b5e20; border: 1px solid #81c784; }
.badge-cancelado  { background: #fce4ec; color: #880e4f; border: 1px solid #f48fb1; }
.badge-baja       { background: #e8f5e9; color: #2e7d32; }
.badge-media      { background: #fff8e1; color: #b7821a; }
.badge-alta       { background: #fff3e0; color: #e65100; }
.badge-urgente    { background: #fce4ec; color: #880e4f; }

/* ---------- TABLA ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
thead th {
    padding: 0.85rem 1.1rem;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border);
    background: #fafafa;
    white-space: nowrap;
}
tbody td {
    padding: 0.9rem 1.1rem;
    font-size: 0.855rem;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    color: var(--text);
}
tbody tr {
    transition: background .15s;
}
tbody tr:hover { background: #fafbfc; }
tbody tr:last-child td { border-bottom: none; }

/* ---------- FORMULARIOS ---------- */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.1rem;
}
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group.full { grid-column: 1 / -1; }
label {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
input[type=text], input[type=email], input[type=tel], input[type=number],
input[type=date], input[type=datetime-local], input[type=url],
input[type=password], select, textarea {
    padding: 0.6rem 0.9rem;
    border: 1.5px solid var(--border);
    border-radius: 8px;
    font-size: 0.875rem;
    color: var(--text-dark);
    background: #fff;
    transition: border-color .2s, box-shadow .2s;
    outline: none;
    width: 100%;
    font-family: inherit;
}
input:focus, select:focus, textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(253,198,5,0.15);
}
textarea { resize: vertical; min-height: 80px; }
.form-hint { font-size: 0.73rem; color: var(--text-muted); }

/* ---------- FILTROS Y BÚSQUEDA ---------- */
.filter-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1.25rem;
}
.search-box {
    flex: 1;
    min-width: 220px;
    position: relative;
}
.search-box::before {
    content: '🔍';
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.85rem;
    pointer-events: none;
    z-index: 1;
}
.search-box input { padding-left: 2.25rem; }
select.filter-select {
    width: auto;
    min-width: 150px;
}

/* ---------- MODAL ---------- */
.modal-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(3px);
    z-index: 300;
}
.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 16px;
    width: 90%;
    max-width: 640px;
    max-height: 90vh;
    overflow-y: auto;
    z-index: 301;
    box-shadow: 0 25px 60px rgba(0,0,0,0.25);
}
.modal.open, .modal-backdrop.open { display: block; }
.modal-header {
    padding: 1.35rem 1.75rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: #fff;
    border-radius: 16px 16px 0 0;
    z-index: 1;
}
.modal-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
}
.modal-close {
    background: none; border: none;
    font-size: 1rem; cursor: pointer;
    color: var(--text-muted);
    width: 32px; height: 32px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    transition: background .2s;
}
.modal-close:hover { background: #f4f5f7; color: var(--text-dark); }
.modal-body { padding: 1.75rem; }
.modal-footer {
    padding: 1.1rem 1.75rem;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    position: sticky;
    bottom: 0;
    background: #fff;
    border-radius: 0 0 16px 16px;
}

/* ---------- TOAST ---------- */
.toast-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.toast {
    background: #1a1a1a;
    color: #fff;
    padding: 0.85rem 1.25rem;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 500;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    animation: toastIn .3s ease;
    max-width: 320px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-left: 4px solid var(--primary);
}
.toast.toast-success { border-left-color: var(--success); }
.toast.toast-error   { border-left-color: var(--danger); background: #2d0a0b; }
.toast.toast-warning { border-left-color: var(--warning); }
@keyframes toastIn {
    from { opacity: 0; transform: translateX(100%); }
    to   { opacity: 1; transform: translateX(0); }
}

/* ---------- EMPTY STATE ---------- */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.6; }
.empty-state h3 { font-size: 1.1rem; color: var(--text-dark); margin-bottom: 0.5rem; font-weight: 600; }
.empty-state p  { font-size: 0.85rem; }

/* ---------- DETAIL VIEW ---------- */
.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1.1rem;
    margin-bottom: 1.5rem;
}
.detail-field label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-muted);
    font-weight: 700;
}
.detail-field span {
    display: block;
    font-size: 0.92rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-top: 3px;
}

/* ---------- PROGRESS BAR ---------- */
.progress-bar {
    width: 100%;
    height: 6px;
    background: var(--border);
    border-radius: 999px;
    overflow: hidden;
}
.progress-fill {
    height: 100%;
    border-radius: 999px;
    background: var(--primary);
    transition: width .5s ease;
}

/* ---------- PAGOS ---------- */
.pagos-list { display: flex; flex-direction: column; gap: 8px; }
.pago-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    background: #fafbfc;
    border-radius: 10px;
    border: 1px solid var(--border);
    transition: border-color .2s;
}
.pago-item:hover { border-color: var(--primary); }
.pago-amount { font-size: 1rem; font-weight: 700; color: var(--success); }
.pago-meta   { font-size: 0.78rem; color: var(--text-muted); margin-top: 2px; }

/* ---------- CALENDAR ---------- */
.fc {
    --fc-border-color: var(--border);
    --fc-today-bg-color: rgba(253,198,5,0.07);
    --fc-page-bg-color: transparent;
    --fc-button-bg-color: #000;
    --fc-button-border-color: #000;
    --fc-button-hover-bg-color: #1a1a1a;
    --fc-button-active-bg-color: var(--primary);
    --fc-button-active-border-color: var(--primary);
}
.fc-toolbar-title { font-size: 1.05rem !important; font-weight: 700 !important; color: var(--text-dark) !important; }
.fc-button {
    border-radius: 8px !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
    padding: 0.4rem 0.85rem !important;
}
.fc-button-primary { color: #fff !important; }
.fc-button-primary.fc-button-active { background: var(--primary) !important; color: #000 !important; }
.fc-event { border-radius: 6px !important; font-size: 0.76rem !important; padding: 2px 5px !important; border: none !important; }
.fc-daygrid-event-dot { display: none; }
.fc-col-header-cell { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; }

/* ---------- LOADING ---------- */
.spinner {
    width: 26px; height: 26px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin .65s linear infinite;
    display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- LOGIN PAGE ---------- */
.login-page {
    background: #000;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    position: relative;
    overflow: hidden;
}
.login-page::before {
    content: '';
    position: absolute;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(253,198,5,0.15) 0%, transparent 70%);
    top: -100px; right: -100px;
    border-radius: 50%;
}
.login-page::after {
    content: '';
    position: absolute;
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(253,198,5,0.08) 0%, transparent 70%);
    bottom: -50px; left: -50px;
    border-radius: 50%;
}
.login-card {
    background: #111;
    border: 1px solid #222;
    border-radius: 20px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.5);
    position: relative;
    z-index: 1;
}
.login-logo {
    text-align: center;
    margin-bottom: 2rem;
}
.login-logo img {
    width: 70px; height: 70px;
    object-fit: contain;
    border-radius: 14px;
    margin-bottom: 1rem;
}
.login-logo-icon {
    width: 70px; height: 70px;
    background: var(--primary);
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1rem;
}
.login-logo h1 { font-size: 1.4rem; color: #fff; font-weight: 700; }
.login-logo p  { font-size: 0.82rem; color: #666; margin-top: 4px; }
.login-card label { color: #888; font-size: 0.72rem; }
.login-card input {
    background: #1a1a1a;
    border-color: #333;
    color: #fff;
    border-radius: 10px;
}
.login-card input:focus {
    border-color: var(--primary);
    background: #1f1f1f;
    box-shadow: 0 0 0 3px rgba(253,198,5,0.1);
}
.login-card input::placeholder { color: #444; }
.btn-login {
    width: 100%;
    padding: 0.9rem;
    background: var(--primary);
    color: #000;
    border: none;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all .2s;
    margin-top: 0.5rem;
    letter-spacing: 0.02em;
}
.btn-login:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(253,198,5,0.3);
}
.login-error {
    background: rgba(231,81,90,0.1);
    color: #ff6b72;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(231,81,90,0.2);
}
.login-hint { text-align: center; margin-top: 1.5rem; font-size: 0.78rem; color: #444; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 992px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .sidebar-overlay.open { display: block; }
    .sidebar-close { display: flex; }
    .main-content { margin-left: 0; }
    .btn-menu { display: flex; }
    .page-content { padding: 1.25rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
    .page-content { padding: 1rem; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .stat-value { font-size: 1.3rem; }
    .stat-icon { width: 46px; height: 46px; font-size: 1.2rem; }
    .topbar { padding: 0 1rem; }
    .modal { width: 96%; max-height: 95vh; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .search-box { min-width: unset; }
    .toast-container { left: 1rem; right: 1rem; }
    .card-header, .card-body { padding: 1rem; }
    table { font-size: 0.8rem; }
    thead th, tbody td { padding: 0.65rem 0.75rem; }
    .detail-grid { grid-template-columns: 1fr 1fr; }
}
