/* ============================================================
   FUNERARIA LO BLANCO - Estilos Panel Admin
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --navy:       #2C3E50;
    --navy-dark:  #1a2332;
    --navy-light: #3d5166;
    --gold:       #C9A96E;
    --gold-dark:  #a8854a;
    --cream:      #F8F6F3;
    --white:      #FFFFFF;
    --text:       #2C2C2C;
    --text-light: #666666;
    --border:     #E0D8CF;
    --sidebar-w:  260px;
    --topbar-h:   64px;
    --radius:     8px;
    --radius-lg:  12px;
    --shadow:     rgba(44,62,80,0.10);
    --shadow-lg:  rgba(44,62,80,0.20);
    --transition: 0.3s ease;
    --font-head:  'Playfair Display', Georgia, serif;
    --font-body:  'Lato', Arial, sans-serif;
    /* Status colors */
    --success:    #28a745;
    --danger:     #dc3545;
    --warning:    #ffc107;
    --info:       #17a2b8;
    --success-bg: #d4edda;
    --danger-bg:  #f8d7da;
    --warning-bg: #fff3cd;
    --info-bg:    #d1ecf1;
}

html { font-size: 15px; }
body {
    font-family: var(--font-body);
    background: #f0f2f5;
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
}
a { color: var(--gold); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold-dark); }
ul { list-style: none; }
img { max-width: 100%; }

/* ============================================================
   LAYOUT
   ============================================================ */
.admin-sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    background: var(--navy-dark);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: transform var(--transition);
}
.admin-main {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin var(--transition);
}
.admin-content {
    padding: 28px;
    flex: 1;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar-header {
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-logo-icon {
    width: 40px;
    height: 40px;
    background: rgba(201,169,110,0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 1.1rem;
    flex-shrink: 0;
}
.sidebar-logo-name {
    display: block;
    font-family: var(--font-head);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
}
.sidebar-logo-sub {
    display: block;
    font-size: 0.65rem;
    color: rgba(255,255,255,0.4);
    text-transform: uppercase;
    letter-spacing: 1px;
}
.sidebar-close {
    display: none;
    background: none;
    border: none;
    color: rgba(255,255,255,0.5);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
}

.sidebar-nav { padding: 16px 0; flex: 1; }
.nav-section-label {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255,255,255,0.3);
    padding: 12px 20px 6px;
}
.sidebar-nav ul { padding: 0 10px; }
.sidebar-nav ul li a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 600;
    color: rgba(255,255,255,0.65);
    transition: all var(--transition);
    margin-bottom: 2px;
    position: relative;
}
.sidebar-nav ul li a i { width: 18px; text-align: center; font-size: 0.9rem; }
.sidebar-nav ul li a:hover { background: rgba(255,255,255,0.07); color: var(--white); }
.sidebar-nav ul li a.active { background: var(--gold); color: var(--white); }
.sidebar-nav ul li a.active i { color: var(--white); }
.sidebar-nav ul li a.nav-logout { color: rgba(220,53,69,0.8); }
.sidebar-nav ul li a.nav-logout:hover { background: rgba(220,53,69,0.15); color: #dc3545; }
.nav-badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    min-width: 20px;
    text-align: center;
}

/* Overlay sidebar mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}
.sidebar-overlay.active { display: block; }

/* ============================================================
   TOPBAR ADMIN
   ============================================================ */
.admin-topbar {
    height: var(--topbar-h);
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px var(--shadow);
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.sidebar-toggle {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--navy);
    cursor: pointer;
    padding: 8px;
    border-radius: var(--radius);
    display: none;
    transition: background var(--transition);
}
.sidebar-toggle:hover { background: var(--cream); }
.topbar-breadcrumb { font-size: 0.9rem; font-weight: 700; color: var(--navy); }
.topbar-notif {
    position: relative;
    width: 38px;
    height: 38px;
    background: var(--cream);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy);
    font-size: 0.9rem;
    transition: all var(--transition);
}
.topbar-notif:hover { background: var(--gold); color: white; }
.notif-badge {
    position: absolute;
    top: -2px; right: -2px;
    background: var(--danger);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    width: 16px; height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: var(--cream);
    border-radius: 30px;
}
.user-avatar {
    width: 32px; height: 32px;
    background: var(--navy);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 0.85rem;
}
.user-info { display: flex; flex-direction: column; }
.user-name { font-size: 0.8rem; font-weight: 700; color: var(--navy); line-height: 1.2; }
.user-role { font-size: 0.65rem; color: var(--text-light); }
.user-logout {
    color: var(--text-light);
    font-size: 0.85rem;
    padding: 4px;
    border-radius: 4px;
    transition: color var(--transition);
}
.user-logout:hover { color: var(--danger); }

/* ============================================================
   PAGE HEADER
   ============================================================ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}
.page-header-left h1 {
    font-family: var(--font-head);
    font-size: 1.6rem;
    color: var(--navy);
    margin-bottom: 4px;
}
.page-header-left p { font-size: 0.875rem; color: var(--text-light); margin: 0; }
.page-header-right { display: flex; gap: 10px; flex-wrap: wrap; }

/* ============================================================
   STAT CARDS (Dashboard)
   ============================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}
.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 2px 12px var(--shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all var(--transition);
    border-left: 4px solid transparent;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 6px 20px var(--shadow-lg); }
.stat-card.gold   { border-left-color: var(--gold); }
.stat-card.navy   { border-left-color: var(--navy); }
.stat-card.green  { border-left-color: var(--success); }
.stat-card.red    { border-left-color: var(--danger); }
.stat-card.blue   { border-left-color: var(--info); }
.stat-icon {
    width: 52px; height: 52px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.stat-card.gold  .stat-icon { background: rgba(201,169,110,0.12); color: var(--gold); }
.stat-card.navy  .stat-icon { background: rgba(44,62,80,0.1);     color: var(--navy); }
.stat-card.green .stat-icon { background: rgba(40,167,69,0.1);    color: var(--success); }
.stat-card.red   .stat-icon { background: rgba(220,53,69,0.1);    color: var(--danger); }
.stat-card.blue  .stat-icon { background: rgba(23,162,184,0.1);   color: var(--info); }
.stat-info { flex: 1; }
.stat-number {
    font-family: var(--font-head);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--navy);
    line-height: 1;
    display: block;
}
.stat-label { font-size: 0.8rem; color: var(--text-light); margin-top: 4px; }

/* ============================================================
   CARDS / PANELS
   ============================================================ */
.admin-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: 0 2px 12px var(--shadow);
    overflow: hidden;
    margin-bottom: 24px;
}
.admin-card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.admin-card-header h2 {
    font-family: var(--font-head);
    font-size: 1.1rem;
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: 8px;
}
.admin-card-header h2 i { color: var(--gold); }
.admin-card-body { padding: 24px; }
.admin-card-footer {
    padding: 14px 24px;
    border-top: 1px solid var(--border);
    background: var(--cream);
    font-size: 0.8rem;
    color: var(--text-light);
}

/* ============================================================
   TABLA ADMIN
   ============================================================ */
.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}
.table-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--cream);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 8px 14px;
    flex: 1;
    max-width: 320px;
}
.table-search i { color: var(--text-light); font-size: 0.85rem; }
.table-search input {
    border: none;
    background: none;
    outline: none;
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--text);
    width: 100%;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}
.admin-table thead th {
    background: var(--navy);
    color: rgba(255,255,255,0.85);
    padding: 12px 16px;
    text-align: left;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.admin-table thead th:first-child { border-radius: var(--radius) 0 0 0; }
.admin-table thead th:last-child  { border-radius: 0 var(--radius) 0 0; }
.admin-table tbody tr { border-bottom: 1px solid var(--border); transition: background var(--transition); }
.admin-table tbody tr:hover { background: var(--cream); }
.admin-table tbody tr:last-child { border-bottom: none; }
.admin-table td { padding: 12px 16px; color: var(--text); vertical-align: middle; }
.admin-table td.td-actions { white-space: nowrap; }
.table-empty {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-light);
}
.table-empty i { font-size: 2.5rem; color: var(--border); display: block; margin-bottom: 12px; }

/* ============================================================
   BOTONES ADMIN
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition);
    text-decoration: none;
    white-space: nowrap;
}
.btn-primary   { background: var(--navy);    color: white; border-color: var(--navy); }
.btn-primary:hover   { background: var(--navy-dark); border-color: var(--navy-dark); color: white; }
.btn-gold      { background: var(--gold);    color: white; border-color: var(--gold); }
.btn-gold:hover      { background: var(--gold-dark); border-color: var(--gold-dark); color: white; }
.btn-success   { background: var(--success); color: white; border-color: var(--success); }
.btn-success:hover   { background: #218838; color: white; }
.btn-danger    { background: var(--danger);  color: white; border-color: var(--danger); }
.btn-danger:hover    { background: #c82333; color: white; }
.btn-warning   { background: var(--warning); color: var(--text); border-color: var(--warning); }
.btn-secondary { background: #6c757d; color: white; border-color: #6c757d; }
.btn-secondary:hover { background: #5a6268; color: white; }
.btn-outline   { background: transparent; color: var(--navy); border-color: var(--border); }
.btn-outline:hover   { background: var(--cream); }
.btn-sm  { padding: 6px 12px; font-size: 0.78rem; }
.btn-lg  { padding: 12px 24px; font-size: 0.95rem; }
.btn-icon { padding: 7px 10px; }

/* ============================================================
   FORMULARIOS ADMIN
   ============================================================ */
.form-group { margin-bottom: 18px; }
.form-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 6px;
}
.form-label .required { color: var(--danger); }
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 0.875rem;
    color: var(--text);
    background: var(--cream);
    transition: all var(--transition);
    outline: none;
}
.form-control:focus {
    border-color: var(--gold);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(201,169,110,0.15);
}
.form-control::placeholder { color: #aaa; }
textarea.form-control { resize: vertical; min-height: 100px; }
select.form-control { cursor: pointer; }
.form-hint { font-size: 0.75rem; color: var(--text-light); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.form-actions {
    display: flex;
    gap: 10px;
    align-items: center;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    margin-top: 20px;
}

/* Toggle switch */
.toggle-switch { display: flex; align-items: center; gap: 10px; }
.toggle-switch input[type="checkbox"] { display: none; }
.toggle-switch label {
    position: relative;
    width: 44px;
    height: 24px;
    background: #ccc;
    border-radius: 12px;
    cursor: pointer;
    transition: background var(--transition);
}
.toggle-switch label::after {
    content: '';
    position: absolute;
    top: 3px; left: 3px;
    width: 18px; height: 18px;
    background: white;
    border-radius: 50%;
    transition: transform var(--transition);
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.toggle-switch input:checked + label { background: var(--success); }
.toggle-switch input:checked + label::after { transform: translateX(20px); }
.toggle-label { font-size: 0.875rem; color: var(--text); }

/* ============================================================
   BADGES / PILLS
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-warning { background: var(--warning-bg); color: #856404; }
.badge-info    { background: var(--info-bg);    color: #0c5460; }
.badge-navy    { background: rgba(44,62,80,0.1); color: var(--navy); }
.badge-gold    { background: rgba(201,169,110,0.15); color: var(--gold-dark); }

/* ============================================================
   ALERTAS ADMIN
   ============================================================ */
.admin-alert {
    padding: 12px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 4px solid;
}
.admin-alert-success { background: var(--success-bg); color: #155724; border-color: var(--success); }
.admin-alert-error   { background: var(--danger-bg);  color: #721c24; border-color: var(--danger); }
.admin-alert-warning { background: var(--warning-bg); color: #856404; border-color: var(--warning); }
.admin-alert-info    { background: var(--info-bg);    color: #0c5460; border-color: var(--info); }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.active { display: flex; }
.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalIn 0.3s ease;
}
.modal-lg { max-width: 800px; }
.modal-sm { max-width: 420px; }
@keyframes modalIn {
    from { opacity: 0; transform: translateY(-20px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.modal-header h3 {
    font-family: var(--font-head);
    font-size: 1.1rem;
    color: var(--navy);
    display: flex;
    align-items: center;
    gap: 8px;
}
.modal-header h3 i { color: var(--gold); }
.modal-close {
    background: none;
    border: none;
    font-size: 1.1rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius);
    transition: all var(--transition);
}
.modal-close:hover { background: var(--cream); color: var(--danger); }
.modal-body { padding: 24px; }
.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* ============================================================
   LOGIN PAGE
   ============================================================ */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--navy-dark), var(--navy));
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.login-card {
    background: var(--white);
    border-radius: 20px;
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.login-logo {
    text-align: center;
    margin-bottom: 32px;
}
.login-logo-icon {
    width: 72px; height: 72px;
    background: linear-gradient(135deg, var(--navy), var(--navy-light));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--gold);
    margin: 0 auto 16px;
}
.login-logo h1 {
    font-family: var(--font-head);
    font-size: 1.3rem;
    color: var(--navy);
    margin-bottom: 4px;
}
.login-logo p { font-size: 0.8rem; color: var(--text-light); }
.login-form .form-group { margin-bottom: 20px; }
.login-form .form-control { padding: 12px 16px; font-size: 0.95rem; }
.login-form .btn { width: 100%; justify-content: center; padding: 13px; font-size: 1rem; }
.login-footer { text-align: center; margin-top: 24px; font-size: 0.8rem; color: var(--text-light); }
.login-footer a { color: var(--gold); }

/* ============================================================
   DASHBOARD WIDGETS
   ============================================================ */
.dashboard-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}
.recent-list { list-style: none; padding: 0; margin: 0; }
.recent-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.recent-item:last-child { border-bottom: none; }
.recent-icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    flex-shrink: 0;
}
.recent-icon.unread { background: rgba(220,53,69,0.1); color: var(--danger); }
.recent-icon.read   { background: var(--cream); color: var(--text-light); }
.recent-info { flex: 1; min-width: 0; }
.recent-name { font-size: 0.875rem; font-weight: 700; color: var(--navy); }
.recent-msg  { font-size: 0.8rem; color: var(--text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-time { font-size: 0.72rem; color: var(--text-light); white-space: nowrap; }
.quick-links { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 10px;
    background: var(--cream);
    border-radius: var(--radius);
    text-align: center;
    color: var(--navy);
    font-size: 0.78rem;
    font-weight: 700;
    transition: all var(--transition);
    border: 2px solid transparent;
}
.quick-link i { font-size: 1.3rem; color: var(--gold); }
.quick-link:hover { background: var(--navy); color: white; border-color: var(--navy); }
.quick-link:hover i { color: var(--gold); }

/* ============================================================
   MENSAJE DETALLE
   ============================================================ */
.message-detail {
    background: var(--cream);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
}
.message-meta {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
}
.message-meta-item { font-size: 0.875rem; }
.message-meta-item strong { color: var(--navy); }
.message-body { font-size: 0.9rem; color: var(--text); line-height: 1.7; white-space: pre-wrap; }

/* ============================================================
   ORDEN / DRAG HANDLE
   ============================================================ */
.drag-handle {
    cursor: grab;
    color: var(--text-light);
    padding: 4px 8px;
    font-size: 0.9rem;
}
.drag-handle:active { cursor: grabbing; }

/* ============================================================
   ICON PICKER
   ============================================================ */
.icon-preview {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: var(--cream);
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    color: var(--navy);
    margin-top: 8px;
}
.icon-preview i { color: var(--gold); font-size: 1.1rem; }

/* ============================================================
   RESPONSIVE ADMIN
   ============================================================ */
@media (max-width: 1024px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .form-row-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
    .admin-sidebar {
        transform: translateX(-100%);
        z-index: 1001;
    }
    .admin-sidebar.open { transform: translateX(0); }
    .sidebar-close { display: block; }
    .admin-main { margin-left: 0; }
    .sidebar-toggle { display: flex; }
    .admin-content { padding: 16px; }
    .admin-topbar { padding: 0 16px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .form-row-3 { grid-template-columns: 1fr; }
    .page-header { flex-direction: column; align-items: flex-start; }
    .table-toolbar { flex-direction: column; align-items: stretch; }
    .table-search { max-width: 100%; }
    .admin-table { font-size: 0.8rem; }
    .admin-table td, .admin-table th { padding: 10px 10px; }
    .user-info { display: none; }
    .login-card { padding: 32px 24px; }
    .quick-links { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .modal { margin: 10px; }
    .modal-body { padding: 16px; }
    .modal-header, .modal-footer { padding: 14px 16px; }
}
