@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --coral:        #FF5A5F;
    --coral-dark:   #E0484D;
    --coral-light:  #FFF0F0;
    --coral-mid:    #FFD5D6;
    --verde:        #00A699;
    --verde-light:  #E6F7F6;
    --amarillo:     #FFB400;
    --amarillo-light:#FFF8E6;
    --azul:         #428AF8;
    --azul-light:   #EEF4FF;
    --gris-50:      #F7F7F7;
    --gris-100:     #EBEBEB;
    --gris-200:     #DDDDDD;
    --gris-300:     #B0B0B0;
    --gris-400:     #717171;
    --gris-600:     #484848;
    --gris-800:     #222222;
    --blanco:       #FFFFFF;
    --negro:        #222222;

    --fuente:       'Plus Jakarta Sans', system-ui, sans-serif;

    --sidebar-w:    260px;
    --header-h:     68px;
    --r-sm:         8px;
    --r:            12px;
    --r-lg:         16px;
    --r-xl:         20px;
    --r-pill:       100px;

    --shadow-xs:    0 1px 2px rgba(0,0,0,.05);
    --shadow-sm:    0 2px 8px rgba(0,0,0,.08);
    --shadow-md:    0 4px 16px rgba(0,0,0,.10);
    --shadow-lg:    0 8px 32px rgba(0,0,0,.12);

    --ease:         all .2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; }

body {
    font-family: var(--fuente);
    background: var(--gris-50);
    color: var(--negro);
    display: flex;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--gris-200); border-radius: 10px; }

.sr-only {
    position: absolute; width: 1px; height: 1px;
    overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}

/* ── Layout ── */
#layout { display: flex; width: 100%; min-height: 100vh; }

#contenido {
    margin-left: var(--sidebar-w);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

/* ── Top bar ── */
#topbar {
    height: var(--header-h);
    background: var(--blanco);
    border-bottom: 1px solid var(--gris-100);
    display: flex;
    align-items: center;
    padding: 0 32px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 50;
}

.topbar-titulo h1 {
    font-size: 19px;
    font-weight: 700;
    color: var(--negro);
}

.topbar-titulo p {
    font-size: 12px;
    color: var(--gris-400);
    margin-top: 1px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.topbar-titulo { flex: 1; }

.topbar-acciones {
    display: flex;
    align-items: center;
    gap: 10px;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: var(--r-pill);
    font-size: 13.5px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: var(--ease);
    white-space: nowrap;
    font-family: var(--fuente);
}

.btn-primario {
    background: var(--coral);
    color: #fff;
}
.btn-primario:hover { background: var(--coral-dark); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255,90,95,.35); }

.btn-secundario {
    background: var(--blanco);
    color: var(--gris-600);
    border: 1.5px solid var(--gris-200);
}
.btn-secundario:hover { border-color: var(--gris-300); background: var(--gris-50); }

.topbar-notif {
    width: 38px; height: 38px;
    border: 1.5px solid var(--gris-200);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: var(--gris-400);
    font-size: 17px;
    cursor: pointer;
    transition: var(--ease);
    position: relative;
}
.topbar-notif:hover { border-color: var(--gris-400); color: var(--negro); }

.notif-dot {
    position: absolute;
    top: 6px; right: 6px;
    width: 8px; height: 8px;
    background: var(--coral);
    border-radius: 50%;
    border: 2px solid var(--blanco);
}

.topbar-sep { width: 1px; height: 26px; background: var(--gris-100); }

.topbar-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--coral);
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700;
    color: #fff;
    cursor: pointer;
    border: 2px solid var(--gris-100);
    transition: var(--ease);
}
.topbar-avatar:hover { border-color: var(--coral-mid); }

/* ── Página ── */
#pagina {
    flex: 1;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

/* ── Card base ── */
.card {
    background: var(--blanco);
    border-radius: var(--r-xl);
    border: 1px solid var(--gris-100);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card:hover { box-shadow: var(--shadow-md); }

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 24px 16px;
}

.card-titulo {
    font-size: 16px;
    font-weight: 700;
    color: var(--negro);
    display: flex;
    align-items: center;
    gap: 9px;
}

.card-titulo i {
    font-size: 18px;
    color: var(--coral);
}

.card-accion {
    font-size: 13px;
    font-weight: 600;
    color: var(--coral);
    display: flex; align-items: center; gap: 4px;
    padding: 6px 12px;
    border-radius: var(--r-pill);
    transition: var(--ease);
}
.card-accion:hover { background: var(--coral-light); }

.card-body { padding: 0 24px 22px; }

/* ── Badges ── */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--r-pill);
    white-space: nowrap;
}

.badge.confirmada  { background: #E6FAF5; color: #008A7B; }
.badge.pendiente   { background: var(--amarillo-light); color: #8A5E00; }
.badge.cancelada   { background: var(--coral-light); color: var(--coral-dark); }
.badge.llegada     { background: var(--azul-light); color: #1A5ED0; }
.badge.salida      { background: #FFF4E6; color: #B05A00; }
.badge.en-curso    { background: #F0EAFF; color: #6B3AD4; }

/* Tipo pill */
.tipo-pill {
    font-size: 11.5px; font-weight: 600;
    padding: 4px 10px;
    border-radius: var(--r-pill);
}
.tipo-pill.casa     { background: var(--verde-light); color: #007A6E; }
.tipo-pill.parcela  { background: #FFF4E6; color: #B05A00; }
.tipo-pill.bungalow { background: var(--azul-light); color: #1A5ED0; }

/* ── Grids ── */
.fila-dos { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.fila-dos.grande-pequena { grid-template-columns: 1.65fr 1fr; }

/* ── Tabla ── */
.tabla-wrap { overflow-x: auto; }

.tabla-reservas { width: 100%; border-collapse: collapse; font-size: 13.5px; }

.tabla-reservas th {
    text-align: left;
    padding: 10px 16px;
    font-size: 11px; font-weight: 700;
    color: var(--gris-400);
    text-transform: uppercase; letter-spacing: .7px;
    background: var(--gris-50);
    border-bottom: 1.5px solid var(--gris-100);
    white-space: nowrap;
}
.tabla-reservas th:first-child { padding-left: 24px; border-radius: var(--r-sm) 0 0 0; }
.tabla-reservas th:last-child  { padding-right: 24px; border-radius: 0 var(--r-sm) 0 0; }

.tabla-reservas td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--gris-100);
    vertical-align: middle;
    color: var(--gris-600);
}
.tabla-reservas td:first-child { padding-left: 24px; }
.tabla-reservas td:last-child  { padding-right: 24px; }
.tabla-reservas tbody tr:hover { background: var(--gris-50); cursor: pointer; }
.tabla-reservas tbody tr:last-child td { border-bottom: none; }

.celda-cliente { display: flex; align-items: center; gap: 10px; }
.cliente-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700;
    color: #fff; flex-shrink: 0;
}
.cliente-nombre { font-weight: 600; font-size: 13.5px; color: var(--negro); }
.cliente-email  { font-size: 11.5px; color: var(--gris-400); display: block; }

/* Avatar colors */
.cl-av-1 { background: #00A699; }
.cl-av-2 { background: #FF5A5F; }
.cl-av-3 { background: #428AF8; }
.cl-av-4 { background: #9B59B6; }
.cl-av-5 { background: #E67E22; }
.cl-av-6 { background: #1ABC9C; }
.cl-av-7 { background: #E91E8C; }
.cl-av-8 { background: #2C3E50; }

/* ── Responsive ── */
@media (max-width: 1280px) { :root { --sidebar-w: 240px; } }
@media (max-width: 1100px) { .fila-dos, .fila-dos.grande-pequena { grid-template-columns: 1fr; } }
@media (max-width: 768px) {
    #contenido { margin-left: 0; }
    #pagina { padding: 20px; gap: 20px; }
    #topbar { padding: 0 20px; }
}
