﻿/* ============================================================
   QuedaListo — Dashboard Cliente (dark theme)
   ============================================================ */

:root {
    --color-bg:           #0d0d0d;
    --color-card:         #141a22;
    --color-card-2:       #1a212b;
    --color-card-hover:   #1e2531;
    --color-border:       #1f2733;
    --color-border-soft:  #29323f;
    --color-text:         #ffffff;
    --color-text-muted:   #9ca3af;
    --color-text-soft:    #6b7280;
    --color-sidebar-bg:   #0a0a0a;
    --color-sidebar-hover:#16181c;

    --color-primary:      var(--ql-primario);
    --color-primary-hov:  var(--ql-primario-hover);
    --color-blue:         var(--ql-azul-activo);
    --color-blue-soft:    #1e3a8a;
    --color-success:      #22c55e;
    --color-warning:      var(--ql-primario);
    --color-gray:         #475569;

    --shadow-sm: 0 4px 12px rgba(0,0,0,.3);
    --shadow-md: 0 10px 30px rgba(0,0,0,.4);
}

/* Modo claro (día) — el oscuro es el default en :root */
html[data-theme="light"] {
    --color-bg:           #f4f6f9;
    --color-card:         #ffffff;
    --color-card-2:       #f1f3f7;
    --color-card-hover:   #e9edf3;
    --color-border:       #e3e8ef;
    --color-border-soft:  #eef1f6;
    --color-text:         #0f172a;
    --color-text-muted:   #475569;
    --color-text-soft:    #94a3b8;
    --color-sidebar-bg:   #ffffff;
    --color-sidebar-hover:#eef2f6;
    --color-success:      #16a34a;
    --shadow-sm: 0 1px 3px rgba(0,0,0,.08);
    --shadow-md: 0 10px 30px rgba(0,0,0,.10);
}

/* Banner hero + CTA prestador: claros en modo día (en noche mantienen el degradé oscuro) */
html[data-theme="light"] .hero-section,
html[data-theme="light"] .prestador-cta {
    background: linear-gradient(135deg, #fff5ef 0%, #ffffff 60%);
    border-color: #ffe0cc;
}
html[data-theme="light"] .hero-search-bar {
    background: #ffffff;
    border-color: var(--color-border);
    box-shadow: var(--shadow-sm);
}
html[data-theme="light"] .hero-search-bar:hover {
    background: #ffffff;
    border-color: var(--color-primary);
}

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

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    transition: background-color .2s ease, color .2s ease;
}

/* ============================================================
   TARJETA "MI INFORMACIÓN DE PRESTADOR" (solo lectura)
   ============================================================ */
.ip-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 18px;
}
.ip-head { margin-bottom: 10px; }
.ip-motivo {
    display: flex; align-items: center; gap: 8px;
    background: rgb(var(--ql-primario-rgb) / .12); color: var(--color-primary);
    border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 12px;
}
.ip-motivo svg { width: 16px; height: 16px; flex-shrink: 0; }
.ip-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.ip-chip {
    background: var(--color-card-2); border: 1px solid var(--color-border-soft);
    color: var(--color-text); border-radius: 999px; padding: 5px 12px;
    font-size: 12px; font-weight: 600;
}
.ip-desc { color: var(--color-text-muted); font-size: 14px; line-height: 1.5; margin-bottom: 14px; }
.ip-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px; margin-bottom: 16px;
}
.ip-field { display: flex; flex-direction: column; gap: 3px; }
.ip-label {
    font-size: 11px; text-transform: uppercase; letter-spacing: .04em;
    color: var(--color-text-soft); font-weight: 700;
}
.ip-value { font-size: 14px; color: var(--color-text); font-weight: 600; }
.ip-actions {
    display: flex; flex-wrap: wrap; gap: 16px;
    border-top: 1px solid var(--color-border); padding-top: 14px;
}
.ip-link {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 600; color: var(--color-primary); cursor: pointer;
}
.ip-link svg { width: 16px; height: 16px; }

/* Botón de tema día/noche (esta página no carga modernizacion.css) */
.btn-theme-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px; border-radius: 50%;
    border: 1px solid var(--color-border); background: var(--color-card);
    color: var(--color-text); cursor: pointer; flex-shrink: 0;
    transition: background .2s ease, transform .15s ease;
}
.btn-theme-toggle:hover { background: var(--color-card-hover); transform: rotate(20deg) scale(1.08); }
.btn-theme-toggle svg { width: 18px; height: 18px; }
.btn-theme-toggle--float { position: fixed; top: 16px; right: 16px; z-index: 9990; box-shadow: var(--shadow-md); }

/* ============================================================
   BUSCADOR INLINE (buscar prestadores dentro del inicio)
   ============================================================ */
#buscadorInline { scroll-margin-top: 70px; }
.bi-header {
    display: flex; align-items: center; justify-content: space-between;
    gap: 12px; margin-bottom: 14px; flex-wrap: wrap;
}
.bi-header-right { display: flex; align-items: center; gap: 12px; }
.bi-ubic { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--color-text-muted); font-weight: 600; }
.bi-ubic svg { width: 15px; height: 15px; color: var(--color-primary); }
.bi-close {
    width: 34px; height: 34px; border-radius: 50%;
    border: 1px solid var(--color-border); background: var(--color-card);
    color: var(--color-text); cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
}
.bi-close:hover { background: var(--color-card-hover); }
.bi-close svg { width: 16px; height: 16px; }

.bi-tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.bi-tab {
    padding: 9px 16px; border-radius: 10px; border: 1px solid var(--color-border);
    background: var(--color-card); color: var(--color-text-muted); font-weight: 700; font-size: 13px;
    cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.bi-tab:hover { background: var(--color-card-hover); }
.bi-tab.active { background: var(--color-primary); border-color: var(--color-primary); color: #fff; }

.bi-auto-card { background: var(--color-card); border: 1px solid var(--color-border); border-radius: 16px; padding: 20px; max-width: 520px; }
.bi-auto-select { width: 100%; }
/* El popup nativo del <select> siempre se abre con fondo claro (el navegador no
   respeta el tema oscuro ahí), así que forzamos texto oscuro en las opciones
   para que no queden invisibles (blanco sobre blanco). */
.bi-auto-select option { color: #111827; background: #fff; }
.bi-auto-geo { display: flex; align-items: center; gap: 10px; margin: 4px 0 16px; flex-wrap: wrap; }
.bi-geo-status { font-size: 12px; color: var(--color-text-muted); }
.bi-btn-buscar { width: 100%; justify-content: center; display: inline-flex; align-items: center; gap: 8px; }
.bi-btn-buscar svg { width: 16px; height: 16px; }

.bi-layout { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }

.bi-results { background: var(--color-card); border: 1px solid var(--color-border); border-radius: 16px; overflow: hidden; display: flex; flex-direction: column; max-height: 440px; }
.bi-results-head { padding: 14px 16px; border-bottom: 1px solid var(--color-border); font-weight: 800; font-size: 15px; color: var(--color-text); }
.bi-results-head span { color: var(--color-text-muted); font-weight: 600; }
.bi-list { overflow-y: auto; padding: 10px; display: flex; flex-direction: column; gap: 10px; }

.bi-card {
    display: flex; align-items: center; gap: 12px;
    background: var(--color-card-2); border: 1px solid var(--color-border);
    border-radius: 12px; padding: 12px; cursor: pointer;
    transition: transform .2s, background .2s, border-color .2s;
}
.bi-card:hover { transform: translateY(-2px); background: var(--color-card-hover); border-color: var(--color-border-soft); }
.bi-card.highlight { border-color: var(--color-primary); box-shadow: 0 0 0 2px rgb(var(--ql-primario-rgb) / .25); }
.bi-avatar {
    width: 52px; height: 52px; border-radius: 50%;
    background: var(--color-card); border: 1px solid var(--color-border-soft);
    overflow: hidden; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
    font-weight: 700; color: var(--color-primary); font-size: 19px;
}
.bi-avatar img { width: 100%; height: 100%; object-fit: cover; }
.bi-cardinfo { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.bi-nombre { font-size: 14px; font-weight: 800; color: var(--color-text); display: inline-flex; align-items: center; gap: 5px; }
.bi-nombre .verif { width: 14px; height: 14px; color: var(--color-blue); }
.bi-cat { font-size: 12px; color: var(--color-text-muted); }
.bi-extra { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; }
.bi-dist { font-size: 11px; color: var(--color-text-muted); }
.bi-verperfil {
    border: 1px solid var(--color-primary); color: var(--color-primary);
    padding: 6px 12px; border-radius: 8px; font-size: 12px; font-weight: 700;
    transition: background .15s, color .15s;
}
.bi-verperfil:hover { background: var(--color-primary); color: #fff; }
.bi-empty { text-align: center; padding: 30px 16px; color: var(--color-text-muted); font-size: 13px; }
.bi-empty svg { width: 34px; height: 34px; margin-bottom: 8px; color: var(--color-text-soft); }

@media (max-width: 1100px) {
    .bi-results { max-height: none; }
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }

/* Globales legacy (de nav.js) */
.bottom-nav { display: none; }
.topbar-user-btn  { display: none !important; }
.topbar-user-popup { display: none !important; }
.offline-bar { display: none !important; }

/* ============================================================
   LAYOUT
   ============================================================ */
.app-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.sidebar {
    background: var(--color-sidebar-bg);
    border-right: 1px solid var(--color-border);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    height: 100dvh;
    overflow-y: auto;
    padding: 0;
}

/* Logo */
.sidebar-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 18px 20px 16px;
    border-bottom: 1px solid var(--color-border);
}
.sidebar-logo-img {
    width: 66%;
    height: auto;
    object-fit: contain;
    display: block;
}
.sidebar-logo .sidebar-sub {
    font-size: 12px;
    color: var(--color-text-muted);
    font-weight: 500;
}

/* Nav */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 10px;
    flex: 1;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    color: var(--color-text-muted);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    transition: background .18s, color .18s;
    position: relative;
}

.sidebar-nav a svg,
.sidebar-nav a i {
    width: 18px; height: 18px;
    flex-shrink: 0;
}

.sidebar-nav a:hover {
    background: var(--color-sidebar-hover);
    color: var(--color-text);
}

.sidebar-nav a.active {
    background: var(--color-primary);
    color: #fff;
    box-shadow: 0 6px 16px rgb(var(--ql-primario-rgb) / .3);
}
.sidebar-nav a.active:hover {
    background: var(--color-primary-hov);
}

.nav-badge {
    margin-left: auto;
    background: var(--color-primary);
    color: #fff;
    border-radius: 999px;
    min-width: 22px; height: 22px;
    padding: 0 7px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.sidebar-nav a.active .nav-badge {
    background: #fff;
    color: var(--color-primary);
}

/* Footer (avatar + logout) */
.sidebar-footer {
    border-top: 1px solid var(--color-border);
    padding: 14px 14px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-user-avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--color-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}
.sidebar-user-details {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    min-width: 0;
}
.sidebar-user-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-user-role {
    font-size: 11px;
    color: var(--color-text-muted);
}

.btn-logout-sidebar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: transparent;
    border: 1px solid var(--color-border-soft);
    border-radius: 10px;
    color: var(--color-text);
    padding: 10px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .18s, color .18s, background .18s;
}
.btn-logout-sidebar svg { width: 16px; height: 16px; }
.btn-logout-sidebar:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: rgb(var(--ql-primario-rgb) / .06);
}

/* ============================================================
   MAIN
   ============================================================ */
.main-area {
    min-width: 0;
    display: flex;
    flex-direction: column;
}

/* Topbar */
.topbar {
    height: 64px;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-primary);
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 50;
}
.topbar-menu-btn {
    display: none;
    width: 36px; height: 36px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--color-text);
    cursor: pointer;
    align-items: center;
    justify-content: center;
}
.topbar-menu-btn svg { width: 22px; height: 22px; }
.topbar-menu-btn:hover { background: var(--color-card-hover); }

.topbar-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--color-text);
    flex: 1;
}
.topbar-title span {
    color: var(--color-primary);
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-icon-btn {
    position: relative;
    width: 40px; height: 40px;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .15s;
}
.topbar-icon-btn:hover { background: rgba(255,255,255,.06); }
.topbar-icon-btn svg { width: 20px; height: 20px; }

.topbar-bell-badge {
    position: absolute;
    top: 4px; right: 4px;
    background: var(--color-primary);
    color: #fff;
    min-width: 18px; height: 18px;
    padding: 0 5px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--color-bg);
}

.topbar-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--color-card-2);
    border: 1px solid var(--color-border-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-muted);
    cursor: pointer;
}
.topbar-avatar svg { width: 20px; height: 20px; }

/* ============================================================
   PAGE CONTENT
   ============================================================ */
.page-content {
    padding: 22px 28px 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* ============================================================
   KPI CARDS
   ============================================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

.stat-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 18px;
    cursor: pointer;
    transition: transform .18s, background .18s, border-color .18s;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 120px;
}

.stat-card:hover {
    transform: translateY(-3px);
    background: var(--color-card-hover);
    border-color: var(--color-border-soft);
}

/* Diagonal stripes decorativos (lado derecho) */
.stat-card::after {
    content: "";
    position: absolute;
    top: -10%;
    right: -25%;
    width: 60%;
    height: 130%;
    background:
        repeating-linear-gradient(
            -65deg,
            transparent 0px,
            transparent 14px,
            var(--stripe, rgba(255,255,255,.06)) 14px,
            var(--stripe, rgba(255,255,255,.06)) 18px
        );
    opacity: .55;
    pointer-events: none;
    transform: skewX(-8deg);
}

.stat-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 6px;
    position: relative;
    z-index: 1;
}

.stat-icon {
    width: 38px; height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
}
.stat-icon svg { width: 19px; height: 19px; }

.stat-label {
    font-size: 14px;
    font-weight: 700;
    color: var(--color-text);
}

.stat-value {
    font-size: 36px;
    font-weight: 900;
    color: var(--color-text);
    line-height: 1.05;
    margin: 4px 0 8px;
    position: relative;
    z-index: 1;
}

.stat-link {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-blue);
    display: inline-flex;
    align-items: center;
    gap: 4px;
    position: relative;
    z-index: 1;
}
.stat-link svg { width: 14px; height: 14px; }

/* Variantes por estado */
.stat-card-primary .stat-icon  { background: var(--color-blue); }
.stat-card-primary .stat-label { color: var(--color-blue); }
.stat-card-primary { --stripe: rgb(30 136 229 / .12); }

.stat-card-warning .stat-icon  { background: var(--color-primary); }
.stat-card-warning .stat-label { color: var(--color-primary); }
.stat-card-warning { --stripe: rgb(var(--ql-primario-rgb) / .14); }
.stat-card-warning .stat-link  { color: var(--color-primary); }

.stat-card-success .stat-icon  { background: var(--color-success); }
.stat-card-success .stat-label { color: var(--color-success); }
.stat-card-success { --stripe: rgba(34,197,94,.12); }
.stat-card-success .stat-link  { color: var(--color-success); }

.stat-card-total .stat-icon    { background: var(--color-gray); }
.stat-card-total .stat-label   { color: #cbd5e1; }
.stat-card-total { --stripe: rgba(148,163,184,.10); }
.stat-card-total .stat-link    { color: #cbd5e1; }

/* ============================================================
   CONTENT GRID (turnos + acciones)
   ============================================================ */
.content-grid {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 18px;
    align-items: start;
}

/* ============================================================
   CARDS GENÉRICAS
   ============================================================ */
.card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    overflow: hidden;
}

.card-header {
    padding: 16px 18px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.card-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 800;
    color: var(--color-text);
}
.card-header-title svg {
    color: var(--color-primary);
    width: 19px; height: 19px;
}

.card-body { padding: 16px 18px; }

/* ============================================================
   TURNOS LIST
   ============================================================ */
.turnos-list { display: flex; flex-direction: column; }

.turno-row {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--color-border);
    cursor: pointer;
    transition: background .15s;
}
.turno-row:hover { background: rgba(255,255,255,.02); }
.turno-row:last-child { border-bottom: none; }

.turno-cat-icon {
    width: 54px; height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: #fff;
    background: var(--cat-bg, var(--color-blue));
}
.turno-cat-icon svg { width: 24px; height: 24px; }

/* Variantes por categoría */
.cat-plomeria      { --cat-bg: #1e3a8a; }
.cat-electricidad  { --cat-bg: var(--ql-primario); }
.cat-gas           { --cat-bg: #ef4444; }
.cat-aire         ,
.cat-aire_acondicionado { --cat-bg: var(--ql-azul-activo); }
.cat-jardineria    { --cat-bg: #16a34a; }
.cat-albanileria   { --cat-bg: #a16207; }
.cat-pintura       { --cat-bg: var(--ql-primario-claro); }
.cat-carpinteria   { --cat-bg: #92400e; }
.cat-cerrajeria    { --cat-bg: #475569; }
.cat-informatica   { --cat-bg: #0891b2; }
.cat-limpieza      { --cat-bg: #06b6d4; }
.cat-mudanzas      { --cat-bg: #d97706; }
.cat-otros         { --cat-bg: #475569; }

.turno-info { flex: 1; min-width: 0; }
.turno-titulo {
    font-size: 16px;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 2px;
}
.turno-desc {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-bottom: 8px;
}
.turno-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 12px;
    color: var(--color-text-muted);
}
.turno-meta-item {
    display: flex;
    align-items: center;
    gap: 5px;
}
.turno-meta-item svg {
    width: 13px; height: 13px;
    color: var(--color-primary);
}

.turno-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
    min-width: 140px;
}

.estado-badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 700;
}
.badge-agendado   { background: var(--color-blue);    color: #fff; }
.badge-en_curso   { background: var(--color-primary); color: #fff; }
.badge-completado { background: var(--color-success); color: #fff; }
.badge-cancelado  { background: var(--color-gray);    color: #fff; }

.turno-prestador {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-text);
}

.turno-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--color-text-muted);
}
.turno-rating-stars {
    display: inline-flex;
    gap: 1px;
    color: var(--st-amber, #fbbf24);
}
.turno-rating-stars svg {
    width: 12px; height: 12px;
    fill: currentColor;
    stroke: currentColor;
}
.turno-rating-stars svg.empty {
    fill: transparent;
    color: #374151;
}
.turno-rating-num { font-weight: 700; color: var(--color-text); }

.turno-chevron {
    color: var(--color-text-muted);
    flex-shrink: 0;
}
.turno-chevron svg { width: 18px; height: 18px; }

.turnos-footer {
    padding: 14px;
    text-align: center;
    border-top: 1px solid var(--color-border);
}
.turnos-footer a {
    font-size: 13px;
    font-weight: 700;
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.turnos-footer a:hover { color: var(--color-primary-hov); }

/* ============================================================
   ACCIONES RÁPIDAS
   ============================================================ */
.acciones-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 18px;
}

.btn-accion {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--color-card-2);
    border: 1px solid var(--color-border-soft);
    border-radius: 10px;
    padding: 12px 14px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, border-color .15s;
    text-decoration: none;
    width: 100%;
}
.btn-accion svg { width: 18px; height: 18px; flex-shrink: 0; }
.btn-accion:hover {
    background: var(--color-card-hover);
    border-color: var(--color-primary);
}

.btn-accion-primary {
    background: var(--color-primary);
    border-color: var(--color-primary);
}
.btn-accion-primary:hover {
    background: var(--color-primary-hov);
    border-color: var(--color-primary-hov);
}

.btn-accion-badge {
    margin-left: auto;
    background: var(--color-primary);
    color: #fff;
    border-radius: 999px;
    min-width: 22px; height: 22px;
    padding: 0 7px;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* ============================================================
   SOPORTE CARD
   ============================================================ */
.soporte-card {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 22px 22px;
    position: relative;
    overflow: hidden;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 14px;
}
.soporte-card::after {
    content: "";
    position: absolute;
    top: -10%;
    right: -20%;
    width: 70%;
    height: 130%;
    background:
        repeating-linear-gradient(
            -65deg,
            transparent 0px,
            transparent 16px,
            rgb(var(--ql-primario-rgb) / .10) 16px,
            rgb(var(--ql-primario-rgb) / .10) 20px
        );
    pointer-events: none;
    transform: skewX(-8deg);
}
.soporte-card-content {
    position: relative;
    z-index: 1;
}
.soporte-card h3 {
    font-size: 18px;
    font-weight: 800;
    color: var(--color-text);
    margin-bottom: 4px;
    line-height: 1.25;
}
.soporte-card h3 .accent {
    color: var(--color-primary);
    display: block;
}
.btn-soporte {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--color-primary);
    color: #fff;
    border: none;
    border-radius: 10px;
    padding: 10px 18px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    align-self: flex-start;
    text-decoration: none;
    transition: background .15s;
}
.btn-soporte:hover { background: var(--color-primary-hov); }

/* ============================================================
   FOOTER
   ============================================================ */
.app-footer {
    border-top: 1px solid var(--color-border);
    padding: 16px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    color: var(--color-text-muted);
    font-size: 12px;
    margin-top: auto;
}
.app-footer-text { display: flex; gap: 14px; }
.app-footer-social {
    display: flex;
    gap: 14px;
}
.app-footer-social a {
    color: var(--color-text-muted);
    transition: color .15s;
    display: inline-flex;
}
.app-footer-social a:hover { color: var(--color-primary); }
.app-footer-social svg { width: 18px; height: 18px; }

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--color-text-muted);
}
.empty-state svg {
    width: 40px; height: 40px;
    margin-bottom: 10px;
    color: var(--color-text-soft);
}
.empty-state p { font-size: 14px; line-height: 1.5; }
.empty-state a { color: var(--color-primary); font-weight: 700; }

/* ============================================================
   MODAL (verTurnosEstado)
   ============================================================ */
.cp-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.7);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity .2s;
}
.cp-modal-overlay.cp-modal-show { opacity: 1; }

.cp-modal {
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 22px 26px;
    width: 100%;
    max-width: 480px;
    max-height: 85vh;
    overflow-y: auto;
    color: var(--color-text);
}
.cp-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}
.cp-modal-titulo { font-size: 18px; font-weight: 800; }
.cp-modal-x {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
}
.cp-modal-x:hover { background: rgba(255,255,255,.06); color: var(--color-text); }
.cp-modal-x svg { width: 18px; height: 18px; }
.cp-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--color-border);
}

/* ============================================================
   BOTONES legacy (compatibilidad)
   ============================================================ */
.btn {
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
    transition: filter .15s, background .15s;
}
.btn-sm { padding: 7px 12px; font-size: 12px; border-radius: 8px; }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: var(--color-primary-hov); }
.btn-ghost {
    background: transparent;
    color: var(--color-text-muted);
    border: 1px solid var(--color-border-soft);
}
.btn-ghost:hover { color: var(--color-text); border-color: var(--color-primary); }

/* ============================================================
   RESPONSIVE TABLET (769–1024px)
   ============================================================ */
@media (max-width: 1100px) {
    .app-layout { grid-template-columns: 220px 1fr; }
    .stats-grid { grid-template-columns: repeat(4, 1fr); gap: 12px; }
    .stat-value { font-size: 30px; }
    .content-grid { grid-template-columns: 1fr 280px; }
}

@media (max-width: 900px) and (min-width: 769px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .content-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   MOBILE (≤ 768px)
   ============================================================ */
@media (max-width: 768px) {
    body { background: var(--color-bg); overflow-x: hidden; }
    .app-layout { display: block; }
    .main-area { padding-bottom: 84px; }

    /* Sidebar drawer manejado por nav.js (CSS inyectado) — solo
       confirmamos visual */
    .sidebar {
        width: 280px !important;
        background: var(--color-sidebar-bg);
    }

    /* Topbar */
    .topbar {
        padding: 0 14px;
        height: 60px;
        gap: 10px;
    }
    .topbar-menu-btn { display: flex; }
    .topbar-title { font-size: 16px; }

    /* Page content */
    .page-content { padding: 16px 14px 90px; gap: 16px; }

    /* KPIs: scroll horizontal */
    .stats-grid {
        display: flex;
        overflow-x: auto;
        gap: 12px;
        margin: 0 -14px;
        padding: 4px 14px 6px;
        scroll-snap-type: x mandatory;
        scrollbar-width: none;
    }
    .stats-grid::-webkit-scrollbar { display: none; }
    .stat-card {
        min-width: 200px;
        flex-shrink: 0;
        scroll-snap-align: start;
    }

    /* Content grid → columna */
    .content-grid { grid-template-columns: 1fr; gap: 16px; }

    /* Turnos */
    .turno-row { flex-wrap: wrap; gap: 12px; padding: 14px 16px; }
    .turno-cat-icon { width: 46px; height: 46px; }
    .turno-cat-icon svg { width: 20px; height: 20px; }
    .turno-info { flex: 1; min-width: 0; }
    .turno-right {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: flex-end;
        min-width: 0;
        gap: 10px;
        width: 100%;
    }
    .turno-titulo { font-size: 15px; }
    .turno-meta { flex-wrap: wrap; gap: 10px; }

    /* Soporte card */
    .soporte-card { min-height: 180px; padding: 18px; }
    .soporte-card h3 { font-size: 16px; }

    /* Footer */
    .app-footer {
        flex-direction: column;
        gap: 10px;
        padding: 14px;
        text-align: center;
    }
    .app-footer-text { flex-direction: column; gap: 4px; }
}

/* Hide elementos solo-mobile en desktop por defecto */
.mob-only { display: none; }
@media (max-width: 768px) {
    .mob-only { display: initial; }
}

/* ============================================================
   BOTTOM NAV (mobile)
   ============================================================ */
@media (max-width: 768px) {
    .bottom-nav {
        display: block;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        background: var(--color-sidebar-bg);
        border-top: 1px solid var(--color-border);
        z-index: 100;
        padding-bottom: env(safe-area-inset-bottom);
    }
    .bottom-nav-inner {
        display: flex;
        justify-content: space-around;
        align-items: center;
        height: 58px;
    }
    .bottom-nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        flex: 1;
        height: 100%;
        color: var(--color-text-muted);
        font-size: 10px;
        font-weight: 600;
        text-decoration: none;
        position: relative;
        transition: color .15s;
    }
    .bottom-nav-item svg { width: 20px; height: 20px; }
    .bottom-nav-item.active { color: var(--color-primary); }
    .bottom-nav-badge {
        position: absolute;
        top: 5px; right: calc(50% - 16px);
        background: var(--color-primary); color: #fff;
        min-width: 16px; height: 16px;
        padding: 0 4px;
        border-radius: 999px;
        font-size: 9px; font-weight: 700;
        display: flex; align-items: center; justify-content: center;
        border: 2px solid var(--color-sidebar-bg);
    }
}

/* ============================================================
   NUEVO DASHBOARD — Hero, categorías, sección prestador, modal
   ============================================================ */

/* Secciones genéricas */
.section-block { margin-bottom: 28px; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.section-title  { font-size: 15px; font-weight: 700; color: var(--color-text); margin-bottom: 14px; }
.section-link   {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 13px; font-weight: 600; color: var(--color-primary);
    text-decoration: none;
}
.section-link svg { width: 14px; height: 14px; }

/* Hero buscador */
.hero-section {
    background: linear-gradient(135deg, #1a0a00 0%, #0d0d0d 60%);
    border: 1px solid #2a1500;
    border-radius: 18px;
    padding: 28px 24px 24px;
    margin-bottom: 28px;
}
.hero-text h1 {
    font-size: 24px; font-weight: 900; line-height: 1.2;
    color: var(--color-text); margin-bottom: 4px;
}
.hero-text p { font-size: 14px; color: var(--color-text-muted); margin-bottom: 18px; }

.hero-search-bar {
    display: flex; align-items: center; gap: 10px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 12px;
    padding: 13px 16px;
    color: var(--color-text-muted);
    font-size: 14px;
    text-decoration: none;
    transition: background .15s, border-color .15s;
}
.hero-search-bar:hover { background: rgba(255,255,255,.1); border-color: var(--color-primary); }
.hero-search-bar svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--color-primary); }

/* Grid de categorías */
.cat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
}
.cat-item {
    display: flex; flex-direction: column; align-items: center; gap: 7px;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    padding: 14px 8px 12px;
    text-decoration: none; color: var(--color-text);
    transition: background .15s, transform .1s, border-color .15s;
    cursor: pointer;
}
.cat-item:hover { background: var(--color-card-hover); border-color: var(--color-border-soft); transform: translateY(-2px); }
.cat-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.cat-icon svg { width: 18px; height: 18px; }
.cat-nombre { font-size: 11px; font-weight: 600; text-align: center; line-height: 1.3; color: var(--color-text-muted); }

/* Colores por categoría */
.cat-electricidad .cat-icon { background: rgba(250,204,21,.15); color: #facc15; }
.cat-plomeria     .cat-icon { background: rgba(59,130,246,.15); color: #3b82f6; }
.cat-gas          .cat-icon { background: rgba(249,115,22,.15); color: #f97316; }
.cat-aire         .cat-icon { background: rgba(56,189,248,.15); color: #38bdf8; }
.cat-pintura      .cat-icon { background: rgba(168,85,247,.15); color: var(--ql-primario-claro); }
.cat-albanileria  .cat-icon { background: rgba(107,114,128,.15); color: #9ca3af; }
.cat-carpinteria  .cat-icon { background: rgba(217,119,6,.15);  color: #d97706; }
.cat-limpieza     .cat-icon { background: rgba(34,197,94,.15);  color: #22c55e; }
.cat-cerrajeria   .cat-icon { background: rgba(239,68,68,.15);  color: #ef4444; }
.cat-informatica  .cat-icon { background: rgb(var(--ql-primario-rgb) / .15); color: var(--ql-primario); }
.cat-jardineria   .cat-icon { background: rgba(34,197,94,.15);  color: #16a34a; }
.cat-mudanzas     .cat-icon { background: rgba(245,158,11,.15); color: #f59e0b; }
.cat-otros        .cat-icon { background: rgba(100,116,139,.15);color: #64748b; }

/* Skeleton */
.skeleton-list { display: flex; flex-direction: column; gap: 10px; }
.skeleton-row  { height: 68px; border-radius: 12px; background: var(--color-card); animation: shimmer 1.4s infinite; }
@keyframes shimmer {
    0%   { opacity: .5; } 50%  { opacity: 1; } 100% { opacity: .5; }
}

/* Tarjetas de turnos */
.turnos-scroll { display: flex; flex-direction: column; gap: 10px; }
.turno-card {
    display: flex; align-items: center; gap: 12px;
    background: var(--color-card);
    border: 1px solid var(--color-border);
    border-radius: 12px; padding: 12px 14px;
    cursor: pointer; transition: background .15s;
    text-decoration: none;
}
.turno-card:hover { background: var(--color-card-hover); }
.turno-card-icon {
    width: 42px; height: 42px; border-radius: 10px; flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
}
.turno-card-icon svg { width: 18px; height: 18px; }
.turno-card-body { flex: 1; min-width: 0; }
.turno-card-titulo { font-size: 13px; font-weight: 600; color: var(--color-text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.turno-card-meta   { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.turno-card-meta span { display: flex; align-items: center; gap: 4px; font-size: 11px; color: var(--color-text-muted); }
.turno-card-meta svg { width: 11px; height: 11px; }
.turno-card-badge { font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }

/* Estado badges */
.badge-agendado    { background: rgba(59,130,246,.15);  color: var(--st-blue, #60a5fa); }
.badge-en_curso    { background: rgba(245,158,11,.15);  color: var(--st-amber, #fbbf24); }
.badge-completado  { background: rgba(34,197,94,.15);   color: var(--st-green, #4ade80); }
.badge-cancelado   { background: rgba(239,68,68,.15);   color: var(--st-red, #f87171); }
.badge-pendiente   { background: rgba(245,158,11,.15); color: #f59e0b; } /* "En revisión" en amarillo */
.badge-aceptado    { background: rgba(34,197,94,.15);   color: var(--st-green, #4ade80); }
.badge-rechazado   { background: rgba(239,68,68,.15);   color: var(--st-red, #f87171); }

/* Estado vacío turnos */
.empty-turno {
    text-align: center; padding: 28px 16px;
    background: var(--color-card); border-radius: 12px;
    border: 1px dashed var(--color-border-soft);
}
.empty-turno svg { width: 32px; height: 32px; color: var(--color-text-soft); margin-bottom: 8px; }
.empty-turno p   { font-size: 13px; color: var(--color-text-muted); }
.empty-turno-link { font-size: 13px; font-weight: 600; color: var(--color-primary); margin-top: 8px; display: inline-block; }

/* Sección prestador — CTA */
.prestador-cta {
    display: flex; align-items: center; gap: 16px;
    background: linear-gradient(135deg, #1a0a00, #0d0d0d);
    border: 1px solid #2a1500;
    border-radius: 16px; padding: 20px;
    flex-wrap: wrap;
}
.prestador-cta-ico {
    width: 48px; height: 48px; flex-shrink: 0;
    background: rgb(var(--ql-primario-rgb) / .15); border-radius: 12px;
    display: flex; align-items: center; justify-content: center; color: var(--color-primary);
}
.prestador-cta-ico svg { width: 24px; height: 24px; }
.prestador-cta-body { flex: 1; min-width: 180px; }
.prestador-cta-body h3 { font-size: 15px; font-weight: 700; color: var(--color-text); margin-bottom: 4px; }
.prestador-cta-body p  { font-size: 12px; color: var(--color-text-muted); line-height: 1.5; }
.prestador-cta-btn {
    background: var(--color-primary); color: #fff;
    border: none; border-radius: 10px;
    padding: 10px 18px; font-size: 13px; font-weight: 700;
    cursor: pointer; white-space: nowrap;
    transition: background .15s, transform .1s;
}
.prestador-cta-btn:hover { background: var(--color-primary-hov); transform: translateY(-1px); }

/* Sección prestador — Mini panel */
.prestador-mini {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    background: var(--color-card); border: 1px solid var(--color-border);
    border-radius: 12px; padding: 14px 16px; flex-wrap: wrap;
}
.prestador-mini-info { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.prestador-mini-stat { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--color-text-muted); }
.prestador-mini-stat svg { width: 12px; height: 12px; }
.mp-pendientes { font-size: 11px; font-weight: 700; background: rgb(var(--ql-primario-rgb) / .15); color: var(--color-primary); padding: 2px 8px; border-radius: 999px; }

/* Toggle disponibilidad */
.prestador-mini-disponible { display: flex; align-items: center; gap: 10px; }
.disponible-label { font-size: 12px; color: var(--color-text-muted); }
.toggle-switch { position: relative; width: 42px; height: 24px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; inset: 0; background: var(--color-border);
    border-radius: 999px; cursor: pointer; transition: background .2s;
}
.toggle-slider::before {
    content: ''; position: absolute;
    width: 18px; height: 18px; border-radius: 50%;
    background: #fff; left: 3px; top: 3px;
    transition: transform .2s;
}
.toggle-switch input:checked + .toggle-slider { background: var(--color-success); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ── MODAL PRESTADOR ──────────────────────────────────────── */
.mp-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.7); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000; padding: 16px;
    opacity: 0; transition: opacity .25s;
}
.mp-overlay.mp-show { opacity: 1; }

.mp-box {
    background: var(--color-card); border: 1px solid var(--color-border);
    border-radius: 20px; width: 100%; max-width: 520px;
    max-height: 90vh; overflow-y: auto;
    padding: 28px 28px 24px;
    transform: translateY(20px); transition: transform .25s;
}
.mp-overlay.mp-show .mp-box { transform: translateY(0); }

.mp-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 4px; }
.mp-step-label { font-size: 11px; font-weight: 700; color: var(--color-primary); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 4px; }
.mp-title { font-size: 18px; font-weight: 800; color: var(--color-text); }
.mp-close {
    background: rgba(255,255,255,.07); border: none; border-radius: 8px;
    width: 32px; height: 32px; cursor: pointer; color: var(--color-text-muted);
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    transition: background .15s;
}
.mp-close:hover { background: rgba(255,255,255,.12); }
.mp-close svg { width: 16px; height: 16px; }

.mp-progress { height: 3px; background: #1f2733; border-radius: 999px; margin: 16px 0 24px; }
.mp-progress-bar { height: 3px; background: var(--color-primary); border-radius: 999px; transition: width .3s ease; }

/* Campos del modal */
.mp-field { margin-bottom: 14px; }
.mp-field label { font-size: 12px; font-weight: 600; color: var(--color-text-muted); display: block; margin-bottom: 6px; }
.mp-hint { display: block; margin-top: 5px; font-size: 11px; font-weight: 400; color: var(--color-text-soft); }
.mp-field input, .mp-field textarea, .mp-field select {
    width: 100%; background: rgba(255,255,255,.05);
    border: 1px solid var(--color-border-soft);
    border-radius: 10px; padding: 11px 13px;
    font-size: 13px; color: var(--color-text); font-family: inherit;
    transition: border-color .15s;
    outline: none;
}
.mp-field input:focus, .mp-field textarea:focus { border-color: var(--color-primary); }
.mp-field textarea { resize: vertical; min-height: 80px; }
.mp-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* Radio slider */
.mp-radio-wrap { display: flex; align-items: center; gap: 12px; }
.mp-radio-wrap input[type=range] { flex: 1; accent-color: var(--color-primary); }
.mp-radio-val { font-size: 13px; font-weight: 700; color: var(--color-primary); white-space: nowrap; }

/* Checkboxes categorías */
.mp-cats-check {
    display: flex; flex-wrap: wrap; gap: 8px;
    max-height: 160px; overflow-y: auto;
    padding-right: 4px;
}
.mp-cat-check {
    display: flex; align-items: center; gap: 6px;
    background: rgba(255,255,255,.05);
    border: 1px solid var(--color-border);
    border-radius: 8px; padding: 7px 12px;
    font-size: 12px; font-weight: 500;
    cursor: pointer; color: var(--color-text-muted);
    transition: background .12s, border-color .12s, color .12s;
}
.mp-cat-check input { display: none; }
.mp-cat-check:has(input:checked) {
    background: rgb(var(--ql-primario-rgb) / .15);
    border-color: var(--color-primary);
    color: var(--color-text);
}

/* Documentos */
.mp-doc-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 8px; }
.mp-doc-item { background: rgba(255,255,255,.04); border: 1px solid var(--color-border); border-radius: 10px; padding: 12px 14px; }
.mp-doc-opt  { opacity: .7; }
.mp-doc-label {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; font-weight: 600; color: var(--color-text-muted);
    margin-bottom: 8px;
}
.mp-doc-label svg { width: 14px; height: 14px; }
.mp-req { color: var(--color-primary); }
.mp-opt { font-weight: 400; color: var(--color-text-soft); font-size: 11px; }
.mp-file-btn {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,.07); border: 1px dashed var(--color-border-soft);
    border-radius: 8px; padding: 8px 14px;
    font-size: 12px; color: var(--color-text-muted);
    cursor: pointer; transition: background .15s, border-color .15s;
    max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mp-file-btn:hover { background: rgb(var(--ql-primario-rgb) / .1); border-color: var(--color-primary); color: var(--color-text); }
.mp-file-btn svg { width: 13px; height: 13px; flex-shrink: 0; }

.mp-info-text { font-size: 12px; color: var(--color-text-muted); line-height: 1.6; margin-bottom: 16px; }

/* Alerta del modal */
.mp-alerta { display: none; font-size: 12px; font-weight: 600; color: var(--st-red, #f87171); margin-bottom: 10px; }
.mp-alerta.mp-alerta-show { display: block; }

/* Botones footer del modal */
.mp-footer {
    display: flex; justify-content: space-between; align-items: center;
    margin-top: 20px; padding-top: 16px;
    border-top: 1px solid var(--color-border);
}
.mp-btn-primary {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--color-primary); color: #fff;
    border: none; border-radius: 10px;
    padding: 11px 20px; font-size: 13px; font-weight: 700;
    cursor: pointer; transition: background .15s, transform .1s;
}
.mp-btn-primary:hover:not(:disabled) { background: var(--color-primary-hov); transform: translateY(-1px); }
.mp-btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.mp-btn-ghost {
    display: inline-flex; align-items: center; gap: 6px;
    background: transparent; color: var(--color-text-muted);
    border: 1px solid var(--color-border); border-radius: 10px;
    padding: 10px 16px; font-size: 13px; font-weight: 600;
    cursor: pointer; transition: background .15s;
}
.mp-btn-ghost:hover { background: rgba(255,255,255,.05); }

/* ── Modal cámara (selfie de verificación) ────────────────── */
.mp-cam-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.8); backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    z-index: 1100; padding: 16px;
}
.mp-cam-box {
    background: var(--color-card); border: 1px solid var(--color-border);
    border-radius: 20px; width: 100%; max-width: 400px;
    padding: 20px;
}
.mp-cam-head {
    display: flex; justify-content: space-between; align-items: center;
    font-size: 15px; font-weight: 800; color: var(--color-text);
    margin-bottom: 14px;
}
.mp-cam-body {
    position: relative; border-radius: 14px; overflow: hidden;
    background: #000; aspect-ratio: 3 / 4;
}
#mpCamVideo {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transform: scaleX(-1); /* espejo natural de selfie; la captura no se espeja */
}
#mpCamPreview { width: 100%; height: 100%; object-fit: cover; display: none; }
.mp-cam-guia { position: absolute; inset: 0; pointer-events: none; }
.mp-cam-guia::before {
    content: ''; position: absolute;
    left: 50%; top: 50%; transform: translate(-50%, -54%);
    width: 64%; aspect-ratio: 3 / 4;
    border: 3px dashed rgba(255,255,255,.85); border-radius: 50%;
    box-shadow: 0 0 0 999px rgba(0,0,0,.35);
}
.mp-cam-hint {
    font-size: 12px; color: var(--color-text-muted);
    text-align: center; line-height: 1.5;
    margin: 12px 0;
}
.mp-cam-actions { display: flex; justify-content: center; gap: 10px; }
.mp-cam-actions .mp-btn-primary,
.mp-cam-actions .mp-btn-ghost { touch-action: manipulation; }

/* Paso éxito */
.mp-success {
    text-align: center; padding: 20px 8px 8px;
    display: flex; flex-direction: column; align-items: center; gap: 14px;
}
.mp-success-icon { width: 64px; height: 64px; background: rgba(34,197,94,.15); border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #22c55e; }
.mp-success-icon svg { width: 32px; height: 32px; }
.mp-success h3 { font-size: 20px; font-weight: 800; color: var(--color-text); }
.mp-success p  { font-size: 13px; color: var(--color-text-muted); line-height: 1.6; max-width: 340px; }

/* Spin animation */
.spin { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Responsive nuevo dashboard */
@media (max-width: 600px) {
    .hero-text h1 { font-size: 20px; }
    .cat-grid { grid-template-columns: repeat(4, 1fr); gap: 8px; }
    .cat-item { padding: 12px 6px 10px; }
    .cat-icon { width: 32px; height: 32px; border-radius: 8px; }
    .cat-icon svg { width: 16px; height: 16px; }
    .prestador-cta { flex-direction: column; text-align: center; }
    .prestador-cta-btn { width: 100%; }
    .mp-row { grid-template-columns: 1fr; }
    .mp-box { padding: 20px 18px 18px; }
}

/* ── Modo claro: superficies del alta de prestador (mp-*) ──────────
   Estaban pensadas solo para fondo oscuro (blancos translúcidos). */
html[data-theme="light"] .mp-close,
html[data-theme="light"] .mp-file-btn        { background: rgba(15,23,42,.06); }
html[data-theme="light"] .mp-close:hover,
html[data-theme="light"] .mp-btn-ghost:hover { background: rgba(15,23,42,.08); }
html[data-theme="light"] .mp-progress        { background: var(--color-border); }
html[data-theme="light"] .mp-field input,
html[data-theme="light"] .mp-field textarea,
html[data-theme="light"] .mp-field select,
html[data-theme="light"] .mp-cat-check,
html[data-theme="light"] .mp-doc-item        { background: var(--color-card-2); }

/* Colores de estado en modo claro: los tonos claros (#4ade80, #f87171…) están
   pensados para fondo oscuro y sobre blanco no se leen. */
html[data-theme="light"] {
    --st-green: #15803d; --st-red: #b91c1c; --st-orange: #c2410c;
    --st-blue: #1d4ed8; --st-amber: #b45309; --st-purple: #6d28d9;
}

/* Pedido: "Es urgente" y la opción secundaria de búsqueda automática */
.bi-urgente { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; margin: 4px 0 12px; cursor: pointer; }
.bi-urgente input { margin-top: 2px; }
.bi-btn-auto { width: 100%; justify-content: center; display: inline-flex; align-items: center; gap: 8px; margin-top: 8px; }
.bi-btn-auto svg { width: 16px; height: 16px; }
