:root{
    --bg:#f4f8ff;
    --card:#ffffff;
    --text:#0f172a;
    --muted:#64748b;
    --primary:#1d5cff;
    --primary-dark:#0e43d8;
    --line:#dbe6f5;
    --success:#16a34a;
    --danger:#ef4444;
    --blue:#2563eb;
    --shadow:0 15px 35px rgba(15,23,42,.08);
    --radius:18px;
}
*{box-sizing:border-box}
body{margin:0;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;color:var(--text);background:linear-gradient(180deg,#edf6ff 0%,#f8fbff 100%);}
a{color:inherit;text-decoration:none}.app-shell{min-height:100vh;display:flex}.sidebar{width:260px;background:#fff;border-right:1px solid var(--line);padding:24px 20px;position:fixed;top:0;bottom:0;left:0;overflow:auto}.brand{display:flex;align-items:center;gap:14px;font-weight:800;margin-bottom:30px}.brand img{width:54px;height:54px;border-radius:13px}.brand span{line-height:1.15}.sidebar nav{display:flex;flex-direction:column;gap:8px}.sidebar nav a{padding:14px 16px;border-radius:14px;color:#1f2a44;font-weight:700}.sidebar nav a:hover,.sidebar nav a.active{background:#e9f1ff;color:#1254ff}.main{flex:1;margin-left:260px;padding:54px 36px}.topbar{display:flex;align-items:center;justify-content:space-between;margin-bottom:36px}.topbar h1{margin:0;font-size:34px;letter-spacing:-.04em}.user-chip{font-weight:700;color:#231942}.grid{display:grid;gap:20px}.grid.two{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.three{grid-template-columns:repeat(3,minmax(0,1fr))}.grid.four{grid-template-columns:repeat(4,minmax(0,1fr))}.card{background:rgba(255,255,255,.94);border:1px solid var(--line);border-radius:var(--radius);box-shadow:var(--shadow);padding:26px}.card h2,.card h3{margin:0 0 20px}.stat{display:flex;align-items:center;gap:16px}.stat-icon{width:58px;height:58px;border-radius:16px;display:grid;place-items:center;background:#e9f1ff;color:var(--primary);font-size:30px}.stat small{display:block;color:var(--muted);font-weight:700}.stat strong{font-size:30px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.field{display:flex;flex-direction:column;gap:8px}.field label{font-size:13px;font-weight:800;color:#334155}.input,select,textarea{width:100%;border:1px solid #ccd9ee;background:#fff;border-radius:14px;padding:14px 16px;font-size:15px;color:var(--text);outline:none}.input:focus,select:focus,textarea:focus{border-color:var(--primary);box-shadow:0 0 0 4px rgba(29,92,255,.10)}.btn{border:none;border-radius:14px;background:var(--primary);color:#fff;font-weight:800;padding:14px 22px;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;gap:8px;transition:.15s}.btn:hover{background:var(--primary-dark);transform:translateY(-1px)}.btn.secondary{background:#e9f1ff;color:#1254ff}.btn.secondary:hover{background:#dce9ff}.btn.danger{background:#ef4444}.btn.success{background:#16a34a}.actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.table-wrap{overflow:auto}.table{width:100%;border-collapse:collapse}.table th{text-align:left;font-size:13px;color:#667085;padding:14px 12px;border-bottom:1px solid #edf2f7}.table td{padding:16px 12px;border-bottom:1px solid #edf2f7;vertical-align:middle}.badge{border-radius:999px;padding:7px 12px;font-weight:800;font-size:12px;display:inline-flex;align-items:center;gap:6px}.badge.active,.badge.success{background:#dcfce7;color:#15803d}.badge.inactive,.badge.muted{background:#e5e7eb;color:#475569}.badge.danger{background:#fee2e2;color:#dc2626}.badge.primary{background:#dbeafe;color:#1d4ed8}.badge.recovered{background:#fff7ed;color:#c2410c}.alert{padding:14px 16px;border-radius:14px;margin-bottom:18px;font-weight:700;border:1px solid}.alert.success{background:#ecfdf5;color:#047857;border-color:#a7f3d0}.alert.error{background:#fef2f2;color:#b91c1c;border-color:#fecaca}.alert.info{background:#eff6ff;color:#1d4ed8;border-color:#bfdbfe}.login-page{min-height:100vh;display:grid;place-items:center;padding:20px;background:radial-gradient(circle at 70% 10%,#d9ebff,transparent 35%),linear-gradient(135deg,#f9fbff,#eaf4ff)}.login-card{width:min(440px,100%);background:#fff;padding:36px;border-radius:26px;box-shadow:0 25px 70px rgba(15,23,42,.12);border:1px solid var(--line)}.login-logo{display:flex;align-items:center;gap:15px;margin-bottom:28px}.login-logo img{width:58px}.login-logo h1{font-size:26px;line-height:1;margin:0}.login-logo span{color:#1d5cff}.helper{color:var(--muted);font-size:13px}.mobile-shell{min-height:100vh;background:#f8fbff;display:flex;justify-content:center;padding:24px}.phone-frame{width:min(430px,100%);background:#fff;border-radius:32px;box-shadow:0 22px 60px rgba(15,23,42,.16);padding:22px;border:1px solid var(--line)}.mobile-header{display:flex;align-items:center;justify-content:space-between;margin-bottom:24px}.mobile-header img{width:42px}.plate-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}.plate-card{border:2px solid #e5e7eb;border-radius:16px;padding:14px;background:#fff}.plate-card.danger{border-color:#fb7185;background:#fff1f2}.plate-card.success{border-color:#86efac;background:#f0fdf4}.plate-card.primary{border-color:#93c5fd;background:#eff6ff}.plate-card.muted{border-color:#d1d5db;background:#f9fafb}.plate-card h3{margin:0 0 10px;font-size:24px}.bottom-nav{position:sticky;bottom:0;background:#fff;border-top:1px solid var(--line);margin:20px -22px -22px;padding:14px 22px;display:flex;justify-content:space-around;border-radius:0 0 32px 32px}.bottom-nav a{font-weight:800;color:#64748b}.bottom-nav a.active{color:var(--primary)}.install-box{max-width:760px;margin:40px auto}.mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;background:#f1f5f9;border-radius:10px;padding:2px 6px}.searchbar{display:flex;gap:10px}.searchbar input{flex:1}.hidden{display:none!important}@media(max-width:1100px){.grid.four{grid-template-columns:repeat(2,minmax(0,1fr))}.grid.two{grid-template-columns:1fr}.sidebar{width:220px}.main{margin-left:220px}}@media(max-width:760px){.app-shell{display:block}.sidebar{position:static;width:auto;border-right:none;border-bottom:1px solid var(--line);padding:14px}.sidebar nav{flex-direction:row;overflow:auto}.sidebar nav a{white-space:nowrap}.main{margin-left:0;padding:24px 16px}.topbar{align-items:flex-start;gap:16px}.topbar h1{font-size:28px}.form-grid,.grid.two,.grid.three,.grid.four{grid-template-columns:1fr}.card{padding:20px}.plate-grid{grid-template-columns:1fr}.searchbar{flex-direction:column}}
.whatsapp-pin{border:1px solid #bbf7d0;background:#f0fdf4;border-radius:16px;padding:12px 14px;margin-bottom:18px;display:flex;flex-direction:column;gap:2px;color:#14532d}.whatsapp-pin span{font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.03em}.whatsapp-pin strong{font-size:18px}.whatsapp-pin small{color:#166534}.plate-date{margin:8px 0 12px;color:#334155;font-size:13px;font-weight:700}.live-results{margin:12px 0 18px}.btn-small{width:100%;padding:10px 12px;border-radius:12px;font-size:13px}.plate-card .helper{display:block;margin-top:10px}

.phone-pin-clean {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.call-icon {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: #25D366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    box-shadow: 0 8px 18px rgba(22, 163, 74, .28);
}
.call-report-btn {
    background: #25D366 !important;
    border-color: #25D366 !important;
}
.live-results:empty {
    display: none;
}

/* RESULTADOS DEL BUSCADOR Mﾃ天IL: SOLO PLACA + FECHA */
.live-results {
    margin: 14px 0 18px;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}
.live-results:empty { display: none; }
.plate-result-mini {
    min-height: 86px;
    border-radius: 12px;
    padding: 14px 10px;
    border: 0;
    box-shadow: 0 5px 13px rgba(15, 23, 42, .18);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}
.plate-result-mini strong {
    font-size: 27px;
    line-height: 1;
    letter-spacing: .02em;
    font-weight: 900;
    font-style: italic;
    color: #fff;
}
.plate-result-mini span {
    margin-top: 9px;
    font-size: 16px;
    font-style: italic;
    font-weight: 600;
    color: #fff;
}
.plate-result-mini.danger {
    background: #d16450;
}
.plate-result-mini.success {
    background: #007400;
}
.plate-result-mini.primary {
    background: #0d0aa8;
}
.plate-result-mini.muted {
    background: #6b7280;
}
#liveStatus:empty { display: none; }
#liveStatus {
    margin-top: 8px;
    margin-bottom: 6px;
}
@media(max-width:420px){
    .live-results{grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
    .plate-result-mini strong{font-size:24px}
    .plate-result-mini span{font-size:14px}
}

#liveResults{
    display:grid !important;
    grid-template-columns:repeat(3, 1fr) !important;
    gap:6px !important;
    margin-top:10px !important;
}

#liveResults .plate-result-mini{
    height:54px !important;
    min-height:54px !important;
    padding:4px 2px !important;
    border-radius:8px !important;
    display:flex !important;
    flex-direction:column !important;
    justify-content:center !important;
    align-items:center !important;
    gap:0 !important;
}

#liveResults .plate-result-mini strong{
    display:block !important;
    font-size:16px !important;
    line-height:16px !important;
    margin:0 !important;
    padding:0 !important;
}

#liveResults .plate-result-mini span{
    display:block !important;
    font-size:11px !important;
    line-height:12px !important;
    margin:1px 0 0 0 !important;
    padding:0 !important;
}
/* =====================================================
   IDENTIDAD RARA INMOVILIZACIONES JMV
   PALETA VERDE + BLANCO
   ===================================================== */

:root{
    --primary:#0f7a3b !important;
    --primary-dark:#0b5f2e !important;
    --primary-soft:#e8fbe9 !important;
    --primary-light:#f0fff4 !important;
    --text:#0f172a !important;
    --muted:#64748b !important;
    --line:#d9f2df !important;
}

/* Fondo general */
body{
    background:linear-gradient(180deg,#f0fff4 0%,#ffffff 100%) !important;
    color:#0f172a !important;
}

/* Barra lateral */
.sidebar{
    background:#ffffff !important;
    border-right:1px solid #d9f2df !important;
}

.brand{
    color:#0b5f2e !important;
}

.brand span{
    color:#0f172a !important;
}

/* Menú lateral */
.sidebar nav a{
    color:#0f172a !important;
    background:transparent !important;
}

.sidebar nav a:hover,
.sidebar nav a.active{
    background:#e8fbe9 !important;
    color:#0b5f2e !important;
}

/* Títulos */
h1,
h2,
h3,
.topbar h1{
    color:#0f172a !important;
}

/* Usuario administrador */
.user-chip{
    background:#e8fbe9 !important;
    color:#0b5f2e !important;
}

/* Tarjetas */
.card{
    background:#ffffff !important;
    border:1px solid #d9f2df !important;
    box-shadow:0 18px 45px rgba(15,122,59,.08) !important;
}

/* Iconos de estadísticas */
.stat-icon{
    background:#e8fbe9 !important;
    color:#0f7a3b !important;
}

/* Botones principales */
.btn,
button,
button[type="submit"],
input[type="submit"]{
    background:#0f7a3b !important;
    color:#ffffff !important;
    border:none !important;
}

.btn:hover,
button:hover,
button[type="submit"]:hover,
input[type="submit"]:hover{
    background:#0b5f2e !important;
    color:#ffffff !important;
}

/* Botones secundarios */
.btn.secondary{
    background:#e8fbe9 !important;
    color:#0b5f2e !important;
}

/* Botones de peligro */
.btn.danger{
    background:#dc2626 !important;
    color:#ffffff !important;
}

/* Inputs */
.input,
input,
select,
textarea{
    border:1px solid #b7e5c2 !important;
}

.input:focus,
input:focus,
select:focus,
textarea:focus{
    border-color:#0f7a3b !important;
    box-shadow:0 0 0 4px rgba(15,122,59,.15) !important;
    outline:none !important;
}

/* Badges */
.badge.success,
.badge.active{
    background:#dcfce7 !important;
    color:#15803d !important;
}

.badge.muted,
.badge.inactive{
    background:#e5e7eb !important;
    color:#475569 !important;
}

.badge.warning{
    background:#fff7ed !important;
    color:#c2410c !important;
}

.badge.danger{
    background:#fee2e2 !important;
    color:#b91c1c !important;
}

/* Vista móvil capturador */
.mobile-shell{
    background:#f0fff4 !important;
}

.phone-frame{
    background:#ffffff !important;
    border:1px solid #d9f2df !important;
    box-shadow:0 22px 60px rgba(15,122,59,.16) !important;
}

.bottom-nav{
    background:#ffffff !important;
    border-top:1px solid #d9f2df !important;
}

.bottom-nav a.active{
    color:#0f7a3b !important;
}

/* Fichas de placas */
#liveResults .plate-result-mini.success{
    background:#0f7a3b !important;
}

#liveResults .plate-result-mini.primary{
    background:#166534 !important;
}

#liveResults .plate-result-mini.danger{
    background:#b91c1c !important;
}

#liveResults .plate-result-mini.muted{
    background:#64748b !important;
}

/* Enlaces */
a{
    color:#0b5f2e;
}

a:hover{
    color:#0f7a3b;
}

/* =====================================================
   PANTALLA USUARIOS - TARJETAS ORGANIZADAS
   ===================================================== */

.users-page-layout{
    display:grid;
    grid-template-columns: minmax(340px, 0.85fr) minmax(520px, 1.15fr);
    gap:28px;
    align-items:start;
}

.users-create-card,
.users-list-card{
    background:#ffffff;
    border:1px solid #d9f2df;
    border-radius:24px;
    padding:30px;
    box-shadow:0 18px 45px rgba(15,122,59,.08);
}

.section-title{
    margin-bottom:24px;
}

.section-title h3{
    margin:0;
    font-size:24px;
    font-weight:900;
    color:#0f172a;
}

.section-title p{
    margin:8px 0 0;
    font-size:14px;
    color:#64748b;
}

.users-title-row{
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:16px;
}

.users-counter{
    background:#e8fbe9;
    color:#0b5f2e;
    border-radius:999px;
    padding:8px 14px;
    font-size:13px;
    font-weight:900;
    white-space:nowrap;
}

.user-form{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:18px;
}

.field-full{
    grid-column:1 / -1;
}

.user-main-btn{
    width:auto;
    min-width:180px;
}

.users-card-list{
    display:flex;
    flex-direction:column;
    gap:18px;
}

.user-admin-card{
    border:1px solid #d9f2df;
    border-radius:22px;
    padding:20px;
    background:#fcfffd;
    display:grid;
    grid-template-columns:1fr 240px;
    gap:20px;
    align-items:start;
}

.user-admin-top{
    display:flex;
    gap:16px;
    align-items:flex-start;
    min-width:0;
}

.user-avatar{
    width:56px;
    height:56px;
    min-width:56px;
    border-radius:18px;
    background:linear-gradient(135deg,#0f7a3b,#0b5f2e);
    color:#ffffff;
    display:flex;
    align-items:center;
    justify-content:center;
    font-size:24px;
    font-weight:900;
    box-shadow:0 10px 22px rgba(15,122,59,.20);
}

.user-main-info{
    min-width:0;
}

.user-name-row{
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    gap:10px;
}

.user-name-row h4{
    margin:0;
    font-size:22px;
    font-weight:900;
    color:#0f172a;
}

.user-username{
    margin-top:4px;
    color:#64748b;
    font-size:14px;
    font-weight:800;
}

.user-detail-chips,
.user-device-summary{
    display:flex;
    flex-wrap:wrap;
    gap:8px;
    margin-top:12px;
}

.user-detail-chips span,
.user-device-summary span{
    background:#f0fff4;
    color:#0b5f2e;
    border:1px solid #d9f2df;
    border-radius:999px;
    padding:7px 11px;
    font-size:12px;
    font-weight:900;
}

.user-device-summary span{
    background:#ffffff;
    color:#475569;
}

.user-device-summary .pending-device-alert{
    background:#fff7ed;
    color:#c2410c;
    border-color:#fed7aa;
}

.user-status-pill{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border-radius:999px;
    padding:7px 12px;
    font-size:12px;
    font-weight:900;
}

.user-status-pill.active{
    background:#dcfce7;
    color:#15803d;
}

.user-status-pill.inactive{
    background:#fee2e2;
    color:#b91c1c;
}

.user-actions-panel{
    display:flex;
    flex-direction:column;
    gap:10px;
}

.user-actions-panel form{
    margin:0;
}

.user-action-btn{
    width:100%;
    min-height:44px;
    border-radius:14px !important;
    display:flex !important;
    align-items:center;
    justify-content:center;
    text-align:center;
    font-size:14px;
    font-weight:900;
}

.user-action-btn.soft{
    background:#e8fbe9 !important;
    color:#0b5f2e !important;
}

.user-action-btn.outline{
    background:#ffffff !important;
    color:#0b5f2e !important;
    border:1px solid #b7e5c2 !important;
}

.user-action-btn.danger{
    background:#dc2626 !important;
    color:#ffffff !important;
}

.user-action-btn.disabled,
.user-action-btn:disabled{
    background:#e5e7eb !important;
    color:#64748b !important;
    cursor:not-allowed !important;
}

.password-mini-form{
    display:grid;
    grid-template-columns:1fr;
    gap:8px;
}

.password-mini-form .input{
    height:44px;
    padding:10px 14px !important;
    font-size:14px;
}

.empty-users-box{
    padding:28px;
    text-align:center;
    border:1px dashed #b7e5c2;
    border-radius:18px;
    background:#f8fff9;
    color:#64748b;
    font-weight:800;
}

@media(max-width:1200px){
    .users-page-layout{
        grid-template-columns:1fr;
    }

    .user-admin-card{
        grid-template-columns:1fr;
    }

    .user-actions-panel{
        display:grid;
        grid-template-columns:repeat(2,minmax(0,1fr));
    }
}

@media(max-width:760px){
    .user-form{
        grid-template-columns:1fr;
    }

    .field-full{
        grid-column:auto;
    }

    .users-create-card,
    .users-list-card{
        padding:22px;
    }

    .user-admin-top{
        flex-direction:column;
    }

    .user-actions-panel{
        grid-template-columns:1fr;
    }

    .users-title-row{
        flex-direction:column;
    }
}
/* =====================================================
   LOGIN - LOGO GRANDE CENTRADO
   ===================================================== */

.login-page{
    min-height:100vh !important;
    display:grid !important;
    place-items:center !important;
    padding:20px !important;
    background:linear-gradient(180deg,#f0fff4 0%,#ffffff 100%) !important;
}

.login-card{
    width:min(440px, calc(100% - 34px)) !important;
    background:#ffffff !important;
    padding:36px !important;
    border-radius:26px !important;
    border:1px solid #d9f2df !important;
    box-shadow:0 25px 70px rgba(15,122,59,.13) !important;
}

.login-logo{
    display:flex !important;
    flex-direction:column !important;
    align-items:center !important;
    justify-content:center !important;
    text-align:center !important;
    gap:0 !important;
    margin-bottom:24px !important;
}

.login-logo img{
    display:block !important;
    width:150px !important;
    max-width:150px !important;
    height:auto !important;
    margin:0 auto 14px auto !important;
    border-radius:0 !important;
    object-fit:contain !important;
}

.login-logo h1{
    margin:0 !important;
    font-size:28px !important;
    line-height:1.16 !important;
    font-weight:900 !important;
    color:#0f7a3b !important;
    text-align:center !important;
}

.login-logo h1 span{
    display:block !important;
    color:#0f7a3b !important;
}

.login-card .helper{
    text-align:left !important;
    color:#64748b !important;
}

.login-card .field label{
    color:#0f172a !important;
    font-weight:900 !important;
}

.login-card .input{
    border:1px solid #b7e5c2 !important;
    border-radius:16px !important;
    padding:16px 18px !important;
}

.login-card .btn{
    background:#0f7a3b !important;
    color:#ffffff !important;
    border-radius:16px !important;
    padding:16px 20px !important;
    font-weight:900 !important;
}

.login-card .btn:hover{
    background:#0b5f2e !important;
}

@media(max-width:480px){
    .login-card{
        padding:30px 24px !important;
    }

    .login-logo img{
        width:135px !important;
        max-width:135px !important;
    }

    .login-logo h1{
        font-size:25px !important;
    }
}