/* ============================================================
   RepairFlow — Hoja de estilos global
   Paleta: fondo oscuro #0f1923, acento celeste #38bdf8
   Modo claro/oscuro con data-theme="light" / "dark"
   ============================================================ */

:root,
[data-theme="dark"] {
    --bg:         #0f1923;
    --bg-main:    #0f1923;
    --bg-card:    #1a2634;
    --bg-sidebar: #111d27;
    --bg-input:   #1e3045;
    --accent:     #38bdf8;
    --accent-rgb: 56, 189, 248;
    --accent2:    #00ff99;
    --secondary:  #00ff99;
    --danger:     #ff4d4d;
    --warning:    #ffb347;
    --text:       #e0e8f0;
    --text-muted: #7a97b0;
    --border:     #243447;
    --shadow:     rgba(56,189,248,0.08);
    --radius:     10px;
    --sidebar-w:  240px;
}

[data-theme="light"] {
    --bg:         #f0f5fa;
    --bg-main:    #f0f5fa;
    --bg-card:    #ffffff;
    --bg-sidebar: #111d27;
    --bg-input:   #e4eef8;
    --accent:     #0284c7;
    --accent-rgb: 2, 132, 199;
    --accent2:    #059669;
    --secondary:  #059669;
    --danger:     #dc2626;
    --warning:    #d97706;
    --text:       #0f2233;
    --text-muted: #4a6080;
    --border:     #bfd4e8;
    --shadow:     rgba(2,132,199,0.10);
    --radius:     10px;
    --sidebar-w:  240px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
    overflow-x: hidden;
}

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--bg-main);
    color: var(--text);
    min-height: 100vh;
    font-size: 15px;
    line-height: 1.5;
    transition: background .25s, color .25s;
    overflow-x: hidden;
}

a { color: var(--accent); text-decoration: none; }
a:hover { opacity: .85; }

/* ── LAYOUT ── */
.rf-layout {
    display: flex;
    min-height: 100vh;
}

/* ── SIDEBAR ── (always dark regardless of theme) */
.rf-sidebar {
    width: var(--sidebar-w);
    background: #111d27;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0;
    height: 100vh;
    z-index: 100;
    border-right: 1px solid #243447;
    overflow-y: auto;
}

.rf-sidebar-logo {
    padding: 20px 18px 14px;
    border-bottom: 1px solid #243447;
    display: flex;
    align-items: center;
    gap: 12px;
}

.rf-sidebar-logo img {
    height: 38px;
    border-radius: 8px;
    object-fit: contain;
    background: #1a2634;
    padding: 3px;
}

.rf-sidebar-logo span {
    font-size: 15px;
    font-weight: 700;
    color: #38bdf8;
    letter-spacing: .5px;
}

.rf-sidebar-user {
    padding: 12px 18px;
    border-bottom: 1px solid #243447;
    font-size: 13px;
    color: #7a97b0;
}

.rf-sidebar-user strong {
    display: block;
    color: #e0e8f0;
    font-size: 14px;
    margin-bottom: 2px;
}

.rf-sidebar-user .badge-rol {
    display: inline-block;
    background: #38bdf8;
    color: #000;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.badge-rol-encargado, .badge-rol-duenio { background: #38bdf8; color: #000; }
.badge-rol-vendedor                      { background: #60a5fa; color: #000; }
.badge-rol-tecnico                       { background: #a78bfa; color: #000; }

.rf-nav {
    flex: 1;
    padding: 10px 0;
}

.rf-nav-section {
    padding: 10px 18px 4px;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #7a97b0;
}

.rf-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px;
    color: #7a97b0;
    font-size: 14px;
    font-weight: 500;
    transition: all .18s;
    border-left: 3px solid transparent;
}

.rf-nav a:hover,
.rf-nav a.active {
    color: #38bdf8;
    background: rgba(56,189,248,.09);
    border-left-color: #38bdf8;
}

.rf-nav a i {
    width: 18px;
    text-align: center;
    font-size: 15px;
}

/* Sidebar promo banner */
.rf-sidebar-ad {
    margin: 12px 14px;
    border-radius: var(--radius);
    background: linear-gradient(135deg, #0f1e2e 0%, #111d27 100%);
    border: 1px solid #1e3a50;
    padding: 12px;
    text-align: center;
    font-size: 12px;
}

.rf-sidebar-ad img {
    width: 60px;
    margin-bottom: 6px;
    border-radius: 6px;
}

.rf-sidebar-ad strong {
    display: block;
    color: #38bdf8;
    font-size: 13px;
    margin-bottom: 2px;
}

.rf-sidebar-ad p {
    color: #7a97b0;
    font-size: 11px;
    margin-bottom: 8px;
}

.rf-sidebar-ad a.ad-btn {
    display: inline-block;
    background: #38bdf8;
    color: #000;
    font-size: 11px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: 20px;
}

.rf-sidebar-logout {
    padding: 14px 18px;
    border-top: 1px solid #243447;
}

.rf-sidebar-logout a {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #ff4d4d;
    font-size: 14px;
    font-weight: 600;
}

/* ── MAIN CONTENT ── */
.rf-main {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-width: 0;
}

/* ── TOP BAR ── */
.rf-topbar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 90;
    transition: background .25s, border-color .25s;
}

.rf-topbar h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--accent);
}

.rf-topbar-right {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    color: var(--text-muted);
}

.rf-topbar-right strong {
    color: var(--text);
}

/* Theme & Language toggle buttons */
.rf-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 5px 12px;
    font-size: 12px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: all .18s;
    white-space: nowrap;
}
.rf-toggle-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ── PAGE CONTENT ── */
.rf-content {
    padding: 28px;
    flex: 1;
    transition: background .25s;
}

/* ── CARDS ── */
.rf-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.rf-stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    transition: transform .18s, box-shadow .18s, background .25s, border-color .25s;
}

.rf-stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 24px var(--shadow);
}

.rf-stat-card .stat-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.rf-stat-card .stat-label {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .8px;
    font-weight: 600;
}

.rf-stat-card .stat-value {
    font-size: 30px;
    font-weight: 800;
    color: var(--accent);
}

.rf-stat-card .stat-sub {
    font-size: 12px;
    color: var(--text-muted);
}

/* ── CARD GENÉRICO ── */
.rf-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 24px;
    margin-bottom: 22px;
    transition: background .25s, border-color .25s;
}

.rf-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── GRILLA DOS COLUMNAS ── */
.rf-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ── TABLA ── */
.rf-table {
    width: 100%;
    border-collapse: collapse;
}

.rf-table th {
    background: var(--bg-sidebar);
    color: var(--text-muted);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .8px;
    padding: 10px 14px;
    text-align: left;
}

[data-theme="light"] .rf-table th {
    background: var(--bg-input);
}

.rf-table td {
    padding: 11px 14px;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    vertical-align: middle;
    word-break: break-word;
    max-width: 300px;
}

.rf-table tr:last-child td { border-bottom: none; }

.rf-table tr:hover td {
    background: rgba(var(--accent-rgb),.04);
}

/* ── BADGES DE ESTADO ── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
}

.badge-revision    { background: rgba(100,180,255,.15); color: #64b4ff; }
.badge-reparacion  { background: rgba(255,179,71,.15);  color: var(--warning); }
.badge-listo       { background: rgba(56,189,248,.15);  color: var(--accent); }
.badge-entregado   { background: rgba(0,255,153,.12);   color: var(--accent2); }
.badge-sin-solucion{ background: rgba(239,68,68,.15);   color: #f87171; }
.badge-retira      { background: rgba(167,139,250,.15); color: #a78bfa; }

/* ── FORMULARIOS ── */
.rf-form label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 5px;
    margin-top: 14px;
}

.rf-form input,
.rf-form select,
.rf-form textarea {
    width: 100%;
    padding: 10px 13px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text);
    font-size: 14px;
    transition: border-color .18s, background .25s;
    font-family: inherit;
}

.rf-form input:focus,
.rf-form select:focus,
.rf-form textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb),.12);
}

.rf-form input::placeholder,
.rf-form textarea::placeholder {
    color: var(--text-muted);
}

.rf-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ── BOTONES ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border-radius: 7px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: opacity .18s, transform .12s;
}

.btn:hover { opacity: .88; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary   { background: var(--accent);  color: #000; }
.btn-secondary { background: var(--accent2); color: #000; }
.btn-danger    { background: var(--danger);  color: #fff; }
.btn-ghost     { background: var(--border);  color: var(--text); }
.btn-sm        { padding: 5px 12px; font-size: 12px; }
.btn-full      { width: 100%; justify-content: center; }

/* ── ALERTAS ── */
.alert {
    padding: 13px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.alert-success { background: rgba(0,255,153,.1);  border-left: 4px solid var(--accent2); color: var(--accent2); }
.alert-warning { background: rgba(255,179,71,.1);  border-left: 4px solid var(--warning); color: var(--warning); }
.alert-danger  { background: rgba(255,77,77,.1);   border-left: 4px solid var(--danger);  color: var(--danger); }
.alert-info    { background: rgba(var(--accent-rgb),.08); border-left: 4px solid var(--accent); color: var(--accent); }

/* ── CHECKLIST 4 ESTADOS ── */

.estado-leyenda {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 18px;
    padding: 10px 14px;
    background: rgba(255,255,255,.03);
    border-radius: 8px;
    border: 1px solid var(--border);
}

.est-badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 9px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    white-space: nowrap;
}
.est-badge.est-ok          { background: rgba(0,255,153,.15);  color: #00ff99; border: 1px solid rgba(0,255,153,.3); }
.est-badge.est-danado      { background: rgba(251,191,36,.15); color: #fbbf24; border: 1px solid rgba(251,191,36,.3); }
.est-badge.est-nofunciona  { background: rgba(255,77,77,.15);  color: #ff6b6b; border: 1px solid rgba(255,77,77,.3); }
.est-badge.est-noaplica    { background: rgba(255,255,255,.05);color: #4a6070; border: 1px solid #2a3f52; }

.checklist-lista { display: flex; flex-direction: column; }

.cl-header {
    padding: 6px 0 10px !important;
    border-bottom: 2px solid var(--border) !important;
    margin-bottom: 4px;
}
.cl-header .cl-nombre,
.cl-header .cl-ingreso-header,
.cl-header .cl-estados {
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--text-muted);
}
.cl-ingreso-header { min-width: 130px; }

.cl-fila {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 9px 4px;
    border-bottom: 1px solid rgba(255,255,255,.04);
    flex-wrap: wrap;
}
.cl-fila:last-child { border-bottom: none; }

.cl-nombre {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 165px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
}
.cl-icon { font-size: 16px; }

.cl-ingreso { min-width: 130px; }

.cl-estados {
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
}

.est-pill { display: inline-flex; }
.est-pill input[type="radio"] { display: none; }
.est-pill span {
    display: inline-block;
    padding: 5px 11px;
    border-radius: 99px;
    border: 1.5px solid var(--border);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all .14s;
    color: var(--text-muted);
    background: var(--bg-input);
    white-space: nowrap;
    user-select: none;
}
.est-pill span:hover { opacity: .85; }

.est-pill.est-ok input:checked ~ span           { background: rgba(0,255,153,.18);  border-color: #00ff99; color: #00ff99; }
.est-pill.est-ok span:hover                     { border-color: rgba(0,255,153,.4); }
.est-pill.est-danado input:checked ~ span       { background: rgba(251,191,36,.18); border-color: #fbbf24; color: #fbbf24; }
.est-pill.est-danado span:hover                 { border-color: rgba(251,191,36,.4); }
.est-pill.est-nofunciona input:checked ~ span   { background: rgba(255,77,77,.18);  border-color: #ff6b6b; color: #ff6b6b; }
.est-pill.est-nofunciona span:hover             { border-color: rgba(255,77,77,.4); }
.est-pill.est-noaplica input:checked ~ span     { background: rgba(255,255,255,.07); border-color: #3a5060; color: #6b8090; }
.est-pill.est-noaplica span:hover               { border-color: #3a5060; }

/* ── LOCK TYPE SELECTOR ── */
.lock-type-wrap {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}
.lock-type-btn { display: inline-flex; }
.lock-type-btn input[type="radio"] { display: none; }
.lock-type-btn span {
    display: inline-block;
    padding: 9px 18px;
    border-radius: 10px;
    border: 1.5px solid var(--border);
    background: var(--bg-input);
    color: var(--text-muted);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .14s;
    user-select: none;
}
.lock-type-btn input:checked ~ span {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(var(--accent-rgb),.08);
}
.lock-type-btn span:hover { border-color: rgba(var(--accent-rgb),.35); }

.lock-section { padding-top: 4px; }
.lock-section label { display: block; font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing:.4px; margin-bottom: 7px; }

/* ── SELECTOR TIPO DISPOSITIVO ── */
.tipo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px;
}
.tipo-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 10px;
    border-radius: 12px;
    border: 2px solid var(--border);
    background: var(--bg-input);
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    transition: all .15s;
    line-height: 1.3;
}
.tipo-btn:hover { border-color: rgba(var(--accent-rgb),.4); color: var(--text); }
.tipo-btn.tipo-selected {
    border-color: var(--accent);
    background: rgba(var(--accent-rgb),.08);
    color: var(--accent);
}
.tipo-icon { font-size: 28px; line-height: 1; }

/* ── CHECKLIST WIZARD ── */
.wiz-btn {
    width: 100%;
    padding: 14px 20px;
    border-radius: 12px;
    border: 2px solid var(--border);
    background: var(--bg-input);
    color: var(--text-muted);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all .15s;
}
.wiz-btn:hover         { border-color: rgba(255,255,255,.2); color: var(--text); }
.wiz-icon              { font-size: 18px; width: 28px; text-align: center; flex-shrink: 0; }
.wiz-btn.wiz-selected  { font-weight: 700; }

.wiz-btn.wiz-ok.wiz-selected          { border-color: #00ff99; background: rgba(0,255,153,.1);  color: #00ff99; }
.wiz-btn.wiz-danado.wiz-selected      { border-color: #fbbf24; background: rgba(251,191,36,.1); color: #fbbf24; }
.wiz-btn.wiz-nofunciona.wiz-selected  { border-color: #ff6b6b; background: rgba(255,77,77,.1);  color: #ff6b6b; }
.wiz-btn.wiz-noaplica.wiz-selected    { border-color: #3a5060; background: rgba(255,255,255,.05); color: #6b8090; }

.wiz-btn.wiz-ok:hover         { border-color: rgba(0,255,153,.4);  }
.wiz-btn.wiz-danado:hover     { border-color: rgba(251,191,36,.4); }
.wiz-btn.wiz-nofunciona:hover { border-color: rgba(255,77,77,.4);  }
.wiz-btn.wiz-noaplica:hover   { border-color: #3a5060; }

.wiz-ingreso-ref {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    background: rgba(255,255,255,.04);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 3px 10px;
    margin-bottom: 20px;
}

/* ── CHART WRAPPER ── */
.rf-chart-wrap {
    position: relative;
    height: 220px;
}

/* ── FIRMA DIGITAL ── */

/* ── TABLE RESPONSIVE WRAPPER ── */
.rf-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}
.rf-table-wrap .rf-table {
    min-width: 480px;
}
.signature-pad {
    border: 2px dashed var(--border);
    border-radius: 8px;
    background: var(--bg-input);
    cursor: crosshair;
    display: block;
    width: 100%;
    height: 160px;
}

/* ── WATERMARK (versión gratuita) ── */
.rf-watermark {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 5px 0;
    font-size: 11px;
    color: rgba(56,189,248,.5);
    font-weight: 600;
    letter-spacing: .3px;
    user-select: none;
    pointer-events: none;
}
.rf-watermark a {
    color: rgba(56,189,248,.6);
    pointer-events: all;
    font-weight: 700;
}
.rf-watermark a:hover { color: #38bdf8; }

/* ── FOOTER ── */
.rf-footer {
    background: var(--bg-sidebar);
    border-top: 1px solid #243447;
    padding: 16px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 12px;
    color: #7a97b0;
}

.rf-footer-gtec {
    display: flex;
    align-items: center;
    gap: 10px;
}

.rf-footer-gtec img {
    height: 26px;
    border-radius: 5px;
    opacity: .85;
}

.rf-footer-gtec span {
    font-size: 11px;
    color: #7a97b0;
}

.rf-footer-gtec a {
    color: #38bdf8;
    font-weight: 700;
}

/* ── LOGIN ── */
.rf-login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0a1218 url('../imagenes/fondo.png') no-repeat center center / cover;
    position: relative;
}

.rf-login-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.7);
    z-index: 0;
}

.rf-login-box {
    position: relative;
    z-index: 1;
    background: rgba(20,35,50,.97);
    border: 1px solid #243447;
    border-radius: 14px;
    padding: 40px 36px;
    width: 380px;
    box-shadow: 0 20px 60px rgba(0,0,0,.5);
    text-align: center;
}

.rf-login-box img.logo {
    height: 55px;
    margin-bottom: 16px;
    border-radius: 10px;
}

.rf-login-box h2 {
    color: #38bdf8;
    font-size: 20px;
    margin-bottom: 4px;
}

.rf-login-box p.sub {
    color: #7a97b0;
    font-size: 13px;
    margin-bottom: 24px;
}

/* ── LANDING ── */
.rf-landing-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: rgba(10,18,28,.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #243447;
    padding: 0 40px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.rf-landing-header .brand {
    font-size: 22px;
    font-weight: 800;
    color: #38bdf8;
    display: flex;
    align-items: center;
    gap: 10px;
}

.rf-landing-header nav a {
    color: #7a97b0;
    font-size: 14px;
    font-weight: 600;
    margin-left: 24px;
    transition: color .18s;
}

.rf-landing-header nav a:hover { color: #38bdf8; }

.rf-landing-header nav a.btn {
    margin-left: 12px;
    padding: 7px 18px;
}

/* ── SPONSOR BANNER (index) ── */
.sponsor-section {
    padding: 0 40px 60px;
    max-width: 1100px;
    margin: 0 auto;
}
.sponsor-title {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #4a6080;
    margin-bottom: 20px;
}
.sponsor-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}
.sponsor-card {
    background: #1a2634;
    border: 1px solid #243447;
    border-radius: 12px;
    padding: 20px 28px;
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 280px;
    max-width: 420px;
    flex: 1;
    transition: border-color .2s, transform .2s;
}
.sponsor-card:hover {
    border-color: #38bdf8;
    transform: translateY(-2px);
}
.sponsor-card img {
    height: 52px;
    border-radius: 8px;
    object-fit: contain;
    flex-shrink: 0;
}
.sponsor-card .sp-info h4 { color: #38bdf8; font-size: 14px; margin-bottom: 3px; }
.sponsor-card .sp-info p  { color: #7a97b0; font-size: 12px; line-height: 1.5; }
.sponsor-card .sp-info a  { color: #38bdf8; font-size: 12px; font-weight: 700; }
.sponsor-cta {
    text-align: center;
    margin-top: 18px;
    font-size: 12px;
    color: #4a6080;
}
.sponsor-cta a { color: #38bdf8; font-weight: 700; }

/* ── HAMBURGER (solo mobile) ── */
.rf-hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 6px;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.rf-hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all .25s;
}
.rf-hamburger:hover span { background: var(--accent); }
.rf-hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.rf-hamburger.active span:nth-child(2) { opacity: 0; }
.rf-hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── OVERLAY SIDEBAR ── */
.rf-sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    z-index: 99;
    backdrop-filter: blur(2px);
}
.rf-sidebar-overlay.active { display: block; }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
    .rf-grid-2 { grid-template-columns: 1fr; }
    .rf-form-row { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
    .rf-hamburger { display: flex; }
    .rf-sidebar {
        transform: translateX(-240px);
        width: var(--sidebar-w) !important;
        transition: transform .28s cubic-bezier(.4,0,.2,1);
        z-index: 200;
    }
    .rf-sidebar.open { transform: translateX(0); }
    .rf-sidebar-logo span,
    .rf-sidebar-user,
    .rf-nav-section,
    .rf-nav a span,
    .rf-sidebar-ad,
    .rf-sidebar-logout a span { display: revert !important; }
    .rf-nav a { justify-content: flex-start !important; padding: 9px 18px !important; }
    .rf-main { margin-left: 0 !important; }
    .rf-topbar { padding: 12px 16px; gap: 10px; }
    .rf-topbar h1 { font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 180px; }
    .rf-content { padding: 16px; }
    .rf-stats { grid-template-columns: 1fr 1fr; }
    .rf-table th, .rf-table td { padding: 8px 10px; font-size: 13px; }
    .rf-card { padding: 14px 16px; }
    .rf-topbar-right span { display: none; }
    .rf-topbar-right .rf-toggle-btn { display: flex; }
}

@media (max-width: 600px) {
    .rf-content { padding: 12px; }
    .rf-landing-header { padding: 0 16px; }
    .sponsor-section { padding: 0 16px 40px; }
    .btn { padding: 8px 14px; font-size: 13px; }
}

/* ── TABLE RESPONSIVE WRAPPER ── */
.rf-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}
.rf-table-wrap .rf-table {
    min-width: 480px;
}
.signature-pad {
    width: 100%;
    max-width: 600px;
    height: 160px;
    background: var(--bg-input);
    border-radius: 10px;
    border: 1px solid var(--border);
}
