:root {
    --bg: #f5f0e8;
    --surface: #fffdf7;
    --surface2: #f0ebe0;
    --border: #d4c9b0;
    --border-light: #e8e0cc;
    --text: #2c2416;
    --text-muted: #7a6d58;
    --text-light: #a8977e;
    --accent: #5c8a3c;
    --accent-light: #7aaa52;
    --accent-bg: #eef5e8;
    --accent2: #8b5e3c;
    --accent2-light: #c4854e;
    --danger: #c0392b;
    --danger-bg: #fdf0ef;
    --warning: #d68910;
    --warning-bg: #fef9ec;
    --sidebar-w: 240px;
    --radius: 10px;
    --shadow: 0 2px 12px rgba(44,36,22,0.10);
    --shadow-md: 0 4px 20px rgba(44,36,22,0.14);
    --glass-bg: rgba(255, 253, 247, 0.72);
    --glass-border: rgba(255, 255, 255, 0.22);
    --glass-shadow: 0 18px 60px rgba(0,0,0,0.22);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.6;
}

/* ─── LAYOUT ─── */
.admin-body { background: #0e0b07; }
.app-bg {
    position: fixed;
    inset: 0;
    background: url("../img/fondo.jpg") center/cover no-repeat;
    z-index: 0;
    pointer-events: none;
    transform: scale(1.03);
    filter: saturate(1.05) contrast(1.08);
}
.app-bg::after {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 30%, rgba(0,0,0,0.35), transparent 55%),
        radial-gradient(circle at 80% 10%, rgba(0,0,0,0.30), transparent 60%),
        linear-gradient(180deg, rgba(10,8,6,0.42), rgba(10,8,6,0.72));
}

.layout { display: flex; min-height: 100vh; position: relative; z-index: 1; }

/* ─── SIDEBAR ─── */
.sidebar {
    width: var(--sidebar-w);
    background: rgba(18, 14, 9, 0.55);
    backdrop-filter: blur(10px);
    border-right: 1px solid rgba(255,255,255,0.10);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 100;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 22px 18px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.brand-logo {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    object-fit: cover;
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow: 0 10px 22px rgba(0,0,0,0.35);
    flex-shrink: 0;
}
.brand-name {
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    font-weight: 700;
    color: #f0ebe0;
    line-height: 1.2;
}
.brand-sub { font-size: 10px; color: var(--text-light); letter-spacing: 0.08em; text-transform: uppercase; }

.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; }

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: rgba(240,235,224,0.75);
    text-decoration: none;
    font-size: 13.5px;
    font-weight: 400;
    transition: all 0.18s ease;
    margin-bottom: 2px;
}
.nav-item:hover { background: rgba(255,255,255,0.08); color: #f0ebe0; }
.nav-item.active { background: var(--accent); color: #fff; font-weight: 500; }
.nav-icon { font-size: 16px; width: 20px; text-align: center; }
.nav-divider { height: 1px; background: rgba(255,255,255,0.1); margin: 10px 4px; }
.nav-logout:hover { background: rgba(192,57,43,0.25); color: #ff9a91; }

.sidebar-footer {
    padding: 14px 18px;
    border-top: 1px solid rgba(255,255,255,0.1);
}
.user-info { display: flex; align-items: center; gap: 10px; }
.user-avatar {
    width: 34px; height: 34px;
    background: var(--accent);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px; font-weight: 700; color: #fff;
    flex-shrink: 0;
}
.user-name { font-size: 13px; font-weight: 500; color: #f0ebe0; }
.user-role { font-size: 11px; color: var(--text-light); }

/* ─── MAIN CONTENT ─── */
.main-content {
    margin-left: var(--sidebar-w);
    flex: 1;
    min-height: 100vh;
    background: transparent;
}
.mobile-topbar {
    display: none;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    margin: 12px 12px 0;
    border-radius: 14px;
    background: rgba(245,240,232,0.88);
    border: 1px solid rgba(255,255,255,0.18);
    box-shadow: 0 8px 26px rgba(0,0,0,0.18);
    backdrop-filter: blur(6px);
}
.install-app-btn{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    padding: 9px 12px;
    border-radius: 12px;
    border: 1px solid rgba(0,0,0,0.10);
    background: rgba(255,255,255,0.70);
    color: var(--text);
    cursor: pointer;
    font-weight: 600;
    box-shadow: 0 10px 28px rgba(0,0,0,0.18);
    backdrop-filter: blur(8px);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    white-space: nowrap;
}
.install-app-btn:hover{
    transform: translateY(-2px);
    box-shadow: 0 16px 40px rgba(0,0,0,0.22);
}

.install-app-fab{
    display: none; /* (login) ya no se usa; lo dejamos oculto */
    position: absolute;
    right: 18px;
    bottom: 18px;
    z-index: 3;
    padding: 12px 14px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.22);
    background: rgba(0,0,0,0.35);
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    box-shadow: 0 18px 60px rgba(0,0,0,0.35);
    backdrop-filter: blur(10px);
}

/* En PC (sidebar) lo ponemos con ancho completo */
.pwa-install-desktop{
    width: 100%;
    margin-top: 12px;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.18);
    color: #f0ebe0;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}
.pwa-install-desktop:hover{
    box-shadow: 0 18px 60px rgba(0,0,0,0.32);
}
.install-app-fab:hover{ transform: translateY(-2px); }
.sidebar-toggle {
    width: 40px;
    height: 40px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-size: 20px;
    line-height: 1;
}
.sidebar-toggle:hover { background: var(--surface2); }
.mobile-title {
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.mobile-logo {
    width: 26px;
    height: 26px;
    border-radius: 9px;
    object-fit: cover;
    border: 1px solid rgba(0,0,0,0.10);
}

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 90;
}
.content-wrapper {
    padding: 28px 32px;
    max-width: 1200px;
    width: calc(100% - 48px);
    margin: 24px auto;
    /* En admin: dejamos el contenido “encima” de la imagen (sin gran recuadro) */
    background: transparent;
    border: none;
    border-radius: 0;
    box-shadow: none;
}

/* ─── EFECTO VIDRIO / 3D (ADMIN) ─── */
.admin-body .stat-card,
.admin-body .quick-card,
.admin-body .table-card,
.admin-body .form-card,
.admin-body .mini-stat,
.admin-body .summary-bar {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}
.admin-body .stat-card::before,
.admin-body .quick-card::before,
.admin-body .table-card::before,
.admin-body .form-card::before,
.admin-body .mini-stat::before,
.admin-body .summary-bar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.35), rgba(255,255,255,0.08) 45%, rgba(0,0,0,0.03));
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
}
.admin-body .stat-card > *,
.admin-body .quick-card > *,
.admin-body .table-card > *,
.admin-body .form-card > *,
.admin-body .mini-stat > *,
.admin-body .summary-bar > * {
    position: relative;
    z-index: 1;
}
.admin-body .stat-card:hover,
.admin-body .quick-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 80px rgba(0,0,0,0.28);
}
.admin-body .table-card { box-shadow: 0 20px 70px rgba(0,0,0,0.20); }
.admin-body .data-table thead th {
    background: rgba(255,255,255,0.55);
    border-bottom-color: rgba(0,0,0,0.08);
}
.admin-body .data-table tbody tr:hover { background: rgba(255,255,255,0.22); }
/* Textos de cabecera legibles sobre la foto (solo admin) */
.admin-body .page-title,
.admin-body .section-title {
    color: #f7f2e8;
    text-shadow: 0 2px 16px rgba(0,0,0,0.55);
}
.admin-body .page-date {
    background: rgba(0,0,0,0.35);
    color: #f7f2e8;
    border: 1px solid rgba(255,255,255,0.18);
    backdrop-filter: blur(6px);
}

/* Tabs legibles en admin */
.admin-body .tabs { border-bottom-color: rgba(255,255,255,0.22); }
.admin-body .tab-btn { color: rgba(247,242,232,0.78); }
.admin-body .tab-btn:hover { color: #ffffff; }
.admin-body .tab-btn.active { color: #ffffff; border-bottom-color: rgba(255,255,255,0.9); }

/* ─── PAGE HEADER ─── */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}
.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    font-weight: 700;
    color: var(--text);
}
.page-date {
    font-size: 13px;
    color: var(--text-muted);
    background: var(--surface);
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

/* ─── ALERTS ─── */
.alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-radius: var(--radius);
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 500;
}
.alert button { background: none; border: none; cursor: pointer; font-size: 18px; opacity: 0.6; }
.alert button:hover { opacity: 1; }
.alert-success { background: var(--accent-bg); color: var(--accent); border: 1px solid #c3ddb0; }
.alert-error { background: var(--danger-bg); color: var(--danger); border: 1px solid #f5c6c3; }
.alert-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid #f5dea0; }

/* ─── STATS GRID ─── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 30px;
}
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 20px 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow);
    transition: transform 0.15s, box-shadow 0.15s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon { font-size: 32px; }
.stat-value { font-family: 'Playfair Display', serif; font-size: 24px; font-weight: 700; line-height: 1; }
.stat-label { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

/* ─── QUICK LINKS ─── */
.section-title {
    font-family: 'Playfair Display', serif;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 14px;
    color: var(--text);
}
.quick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.quick-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 14px;
    text-decoration: none;
    color: var(--text);
    font-size: 13.5px;
    font-weight: 500;
    text-align: center;
    transition: all 0.15s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}
.quick-card span { font-size: 26px; }
.quick-card:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ─── TABLES ─── */
.table-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
}
.data-table td {
    padding: 11px 16px;
    border-bottom: 1px solid var(--border-light);
    font-size: 13.5px;
    vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #faf7f0; }
.empty { text-align: center; color: var(--text-muted); padding: 30px !important; font-style: italic; }
.obs-cell { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-muted); }
.text-green { color: var(--accent); }

.total-row { background: var(--surface2) !important; }
.total-row td { font-size: 14px; color: var(--text); border-top: 2px solid var(--border); }

.badge {
    background: var(--surface2);
    border: 1px solid var(--border);
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.status-badge {
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}
.status-badge.active { background: var(--accent-bg); color: var(--accent); }
.status-badge.inactive { background: #f0f0f0; color: #888; }

/* ─── ACTIONS ─── */
.actions { display: flex; gap: 6px; }
.btn-edit, .btn-delete {
    background: none;
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.15s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
.btn-edit:hover { background: var(--accent-bg); border-color: var(--accent); }
.btn-delete:hover { background: var(--danger-bg); border-color: var(--danger); }

/* ─── BUTTONS ─── */
.btn-primary {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.15s;
    font-family: 'DM Sans', sans-serif;
}
.btn-primary:hover { background: var(--accent-light); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(92,138,60,0.3); }

.btn-secondary {
    background: var(--surface);
    color: var(--text-muted);
    border: 1px solid var(--border);
    padding: 9px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.15s;
}
.btn-secondary:hover { background: var(--surface2); color: var(--text); }

/* ─── FORMS ─── */
.form-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
    margin-bottom: 24px;
}
.card-title {
    font-family: 'Playfair Display', serif;
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 20px;
    color: var(--text);
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full-width { grid-column: 1 / -1; }
.form-group label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 14px;
    font-family: 'DM Sans', sans-serif;
    transition: border-color 0.15s, box-shadow 0.15s;
    outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(92,138,60,0.12);
    background: var(--surface);
}
.form-group textarea { resize: vertical; min-height: 80px; }

.checkbox-group { display: flex; align-items: center; gap: 8px; padding: 10px 0; }
.checkbox-group input { width: auto; }
.checkbox-group label { text-transform: none; letter-spacing: 0; font-size: 14px; font-weight: 400; color: var(--text); }

.form-actions { display: flex; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border-light); }

.total-preview { 
    background: var(--accent-bg);
    border: 1px solid #c3ddb0;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 16px;
    font-size: 15px;
    color: var(--accent);
}
.total-preview-field {
    padding: 10px 12px;
    background: var(--accent-bg);
    border: 1px solid #c3ddb0;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--accent);
}

/* ─── TABS ─── */
.tabs { display: flex; gap: 4px; margin-bottom: 20px; border-bottom: 2px solid var(--border); padding-bottom: 0; }
.tab-btn {
    background: none;
    border: none;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-family: 'DM Sans', sans-serif;
    transition: all 0.15s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ─── SUMMARY / SECTION HEADER ─── */
.summary-bar {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 14px 20px;
    margin-bottom: 20px;
    display: flex;
    gap: 30px;
}
.summary-label { font-size: 12px; color: var(--text-muted); }
.summary-value { font-family: 'Playfair Display', serif; font-size: 20px; font-weight: 700; color: var(--accent); margin-top: 2px; }

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.total-badge {
    background: var(--accent-bg);
    border: 1px solid #c3ddb0;
    color: var(--accent);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 14px;
}

.stats-row {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}
.mini-stat {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 16px 22px;
    flex: 1;
    min-width: 150px;
    box-shadow: var(--shadow);
}
.mini-stat-value { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 700; color: var(--accent); }
.mini-stat-label { font-size: 12px; color: var(--text-muted); margin-top: 3px; }

/* ─── CONFIG ─── */
.config-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.info-card { }
.info-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 20px; }
.info-item { display: flex; justify-content: space-between; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--border-light); }
.info-label { font-size: 13px; color: var(--text-muted); }
.info-value { font-size: 13px; font-weight: 600; }
.nav-links-config h3 { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.05em; }
.config-link {
    display: block;
    padding: 8px 12px;
    color: var(--text);
    text-decoration: none;
    border-radius: 6px;
    font-size: 13.5px;
    transition: background 0.12s;
    margin-bottom: 4px;
}
.config-link:hover { background: var(--surface2); color: var(--accent); }

/* ─── LOGIN ─── */
.login-body { margin: 0; padding: 0; }
.login-bg {
    min-height: 100vh;
    background: url("../img/fondo.jpg") center/cover no-repeat;
    display: flex;
    align-items: center;
    /* Card al lado para ver más el fondo */
    justify-content: flex-end;
    padding: 28px 48px;
    position: relative;
    overflow: hidden;
}
.login-bg::before {
    content: '';
    position: absolute;
    inset: -20px;
    background:
        radial-gradient(circle at 15% 20%, rgba(0,0,0,0.12), transparent 55%),
        radial-gradient(circle at 85% 30%, rgba(0,0,0,0.18), transparent 60%),
        linear-gradient(180deg, rgba(10,8,6,0.18), rgba(10,8,6,0.45));
    z-index: 0;
}
.login-overlay {
    position: absolute;
    inset: 0;
    /* más claro para que se vea mejor la imagen */
    background: linear-gradient(180deg, rgba(0,0,0,0.10) 0%, rgba(0,0,0,0.28) 60%, rgba(0,0,0,0.38) 100%);
    z-index: 1;
}
.login-scene{
    position: relative;
    z-index: 2;
    perspective: 1100px;
    width: 100%;
    max-width: 310px;
}
.login-card {
    /* vidrio más transparente */
    background: rgba(255,253,247,0.55);
    border: 1px solid rgba(255,255,255,0.30);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    padding: 28px 24px;
    width: 100%;
    max-width: 310px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.4);
    position: relative;
    z-index: 2;
    /* “Forma 3D” */
    transform: translateY(-2px) rotateY(-10deg) rotateX(4deg);
    transform-style: preserve-3d;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
    overflow: hidden;
}
.login-card:hover{
    transform: translateY(-6px) rotateY(-6deg) rotateX(2deg);
    box-shadow: 0 26px 85px rgba(0,0,0,0.48);
}
.login-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.55), rgba(255,255,255,0.12) 45%, rgba(0,0,0,0.05));
    opacity: 0.30;
    pointer-events: none;
    z-index: 0;
}
.login-card > * { position: relative; z-index: 1; }
.login-brand { text-align: center; margin-bottom: 22px; }
.login-logo {
    width: 58px;
    height: 58px;
    border-radius: 18px;
    object-fit: cover;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 18px 38px rgba(0,0,0,0.25);
    margin-bottom: 12px;
}
.login-title { font-family: 'Playfair Display', serif; font-size: 28px; font-weight: 700; color: var(--text); }
.login-subtitle { color: var(--text-muted); font-size: 14px; margin-top: 4px; }
.login-form { display: flex; flex-direction: column; gap: 18px; }
.login-form .form-group input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    font-size: 15px;
    font-family: 'DM Sans', sans-serif;
    color: var(--text);
    outline: none;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.login-form .form-group input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(92,138,60,0.12); }
.login-form .form-group label { font-size: 12px; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.06em; display: block; margin-bottom: 6px; }
.btn-login {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'DM Sans', sans-serif;
    transition: all 0.15s;
    margin-top: 4px;
}
.btn-login:hover { background: var(--accent-light); box-shadow: 0 4px 16px rgba(92,138,60,0.35); transform: translateY(-1px); }
.login-hint { text-align: center; margin-top: 16px; font-size: 12px; color: var(--text-muted); }

@media (max-width: 768px) {
    .mobile-topbar { display: flex; }

    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.2s ease;
        box-shadow: 16px 0 40px rgba(0,0,0,0.35);
        z-index: 100;
    }
    .sidebar-backdrop { display: none; }
    .sidebar-open .sidebar { transform: translateX(0); }
    .sidebar-open .sidebar-backdrop { display: block; }

    .main-content { margin-left: 0; }
    .content-wrapper { padding: 16px; margin: 12px auto; width: calc(100% - 24px); }
    .config-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }

    /* Login: mantener la MISMA experiencia que PC (card al lado) */
    .login-bg { justify-content: flex-end; padding: 18px; }
    .login-scene { max-width: 340px; }
    .login-card {
        width: min(340px, 92vw);
        max-width: 340px;
        transform: translateY(-2px) rotateY(-8deg) rotateX(3deg);
    }
}
