/* La Casita · estilos compartidos (replica del prototipo) */
:root{
  --crema:#F7F6F2; --fondo:#FFF8F2; --papel:#FFFEF9; --tinta:#2B2A27;
  --acento:#ED7522; --acento-osc:#C2581A; --acento-50:#FEF4EB; --acento-100:#FDE6D2; --acento-200:#FACDA6;
  --stone-200:#E7E5E4; --stone-500:#78716C; --stone-700:#44403C;
  --bs-body-font-family:Figtree,system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
}
body{font-family:Figtree,system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;background:var(--fondo);color:var(--tinta)}
.font-display{font-family:Fraunces,Georgia,serif}

/* Cabecera */
.cs-header{position:sticky;top:0;z-index:40;background:rgba(255,255,255,.95);backdrop-filter:blur(6px);border-bottom:1px solid var(--stone-200);box-shadow:0 1px 2px rgba(0,0,0,.05)}
.cs-header .in{max-width:1760px;margin:0 auto;padding:0 clamp(16px,2.5vw,40px);height:64px;display:flex;align-items:center;gap:12px}
.cs-brand{display:flex;align-items:center;gap:10px;text-decoration:none;color:inherit}
.mlogo{display:block;flex-shrink:0;width:40px;height:44px;background:url(logo.avif) center/contain no-repeat}
.cs-brand .t{line-height:1}
.cs-brand .t b{display:block;font-family:Fraunces,Georgia,serif;font-size:22px;font-weight:600;letter-spacing:-.01em;color:#1c1917}
.cs-brand .t span{display:block;font-size:11px;font-weight:500;color:var(--stone-500);margin-top:2px}
.cs-user{margin-left:auto;display:flex;align-items:center;gap:8px}
.cs-user .who{text-align:right;line-height:1.2;padding-right:8px}
.cs-user .who b{display:block;font-size:14px;font-weight:600}
.cs-user .who span{display:block;font-size:12px;color:var(--stone-500)}
.cs-icon-btn{width:44px;height:44px;border-radius:12px;border:0;background:#fff;box-shadow:inset 0 0 0 1px var(--stone-200);display:flex;align-items:center;justify-content:center;color:var(--stone-700);text-decoration:none;font-size:18px}
.cs-icon-btn:hover{background:#fafaf9;color:var(--acento-osc)}

/* Estructura */
.cs-wrap{max-width:1760px;margin:0 auto;padding:0 clamp(16px,2.5vw,40px)}
@media (min-width:768px){.cs-wrap{display:grid;grid-template-columns:230px minmax(0,1fr);gap:clamp(24px,3vw,48px)}}
.cs-nav{display:none;padding:24px 0}
@media (min-width:768px){.cs-nav{display:block}}
.cs-nav .sticky{position:sticky;top:88px;display:flex;flex-direction:column;gap:4px}
.cs-link{height:48px;padding:0 12px;border-radius:12px;display:flex;align-items:center;gap:12px;font-size:15px;font-weight:600;color:var(--stone-700);text-decoration:none;transition:.15s}
.cs-link i{font-size:18px}
.cs-link:hover{background:#fff;box-shadow:inset 0 0 0 1px var(--stone-200);color:var(--stone-700)}
.cs-link.on{background:var(--acento);color:#fff;box-shadow:0 1px 2px rgba(0,0,0,.1)}
.cs-sep{margin-top:16px;padding:16px 12px 4px;border-top:1px solid var(--stone-200);font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--stone-500)}
.cs-acceso{margin-top:16px;padding-top:16px;border-top:1px solid var(--stone-200);font-size:13px;color:var(--stone-500);display:flex;gap:8px;align-items:flex-start}
.cs-main{padding:24px 0 110px;min-width:0}
@media (min-width:768px){.cs-main{padding-bottom:96px}}
.cs-foot{margin-top:48px;padding-top:20px;border-top:1px solid var(--stone-200);font-size:14px;color:var(--stone-500)}
.cs-foot p:first-child{font-weight:600;color:var(--stone-700);display:flex;gap:8px}
.cs-foot p:first-child i{color:var(--acento)}

/* Barra inferior móvil */
.cs-bottom{position:fixed;bottom:0;left:0;right:0;z-index:30;background:#fff;border-top:1px solid var(--stone-200);display:grid;grid-template-columns:repeat(5,1fr);padding-bottom:env(safe-area-inset-bottom,0)}
@media (min-width:768px){.cs-bottom{display:none}}
.cs-bottom a,.cs-bottom button{position:relative;height:70px;border:0;background:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;font-size:12px;font-weight:600;color:var(--stone-500);text-decoration:none}
.cs-bottom i{font-size:22px}
.cs-bottom .on{color:var(--acento-osc)}
.cs-bottom .on::before{content:'';position:absolute;top:0;left:20px;right:20px;height:3px;border-radius:0 0 4px 4px;background:var(--acento)}

/* Tarjetas y botones */
.card{border:0;border-radius:16px;box-shadow:0 0 0 1px var(--stone-200)}
.btn-casita{background:var(--acento);border-color:var(--acento);color:#fff;font-weight:600;border-radius:12px}
.btn-casita:hover,.btn-casita:focus{background:var(--acento-osc);border-color:var(--acento-osc);color:#fff}
.btn-outline-primary{--bs-btn-color:var(--acento-osc);--bs-btn-border-color:var(--acento-200);--bs-btn-hover-bg:var(--acento);--bs-btn-hover-border-color:var(--acento);--bs-btn-hover-color:#fff;--bs-btn-active-bg:var(--acento);--bs-btn-active-border-color:var(--acento)}
.form-control:focus,.form-select:focus{border-color:var(--acento);box-shadow:0 0 0 .2rem rgba(237,117,34,.2)}
.form-check-input:checked{background-color:var(--acento);border-color:var(--acento)}
.page-title{font-size:26px;font-weight:700;margin:0}
.page-sub{color:var(--stone-500);margin:2px 0 20px}
.tile{display:flex;flex-direction:column;justify-content:space-between;gap:12px;min-height:96px;padding:16px;border-radius:16px;background:#fff;box-shadow:0 0 0 1px var(--stone-200);text-decoration:none;color:var(--tinta);font-weight:600;transition:.15s}
.tile i{font-size:26px;color:var(--acento-osc)}
.tile:hover{box-shadow:0 0 0 2px var(--acento-200);transform:translateY(-1px);color:var(--tinta)}
.kicker{font-size:11px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--acento)}
.pill-soon{display:inline-block;font-size:12px;font-weight:700;background:var(--acento-100);color:var(--acento-osc);border-radius:999px;padding:3px 10px}

/* Tablas: más aire y legibilidad en escritorio */
.card .table{--bs-table-bg:transparent;margin-bottom:0}
.card .table>:not(caption)>*>*{padding:.95rem 1.1rem}
.card .table thead th{font-size:12px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--stone-500);background:var(--acento-50);border-bottom:1px solid var(--acento-100);white-space:nowrap}
.card .table tbody td{vertical-align:middle}
.card .table tbody tr:last-child td{border-bottom:0}
.card .table td:last-child{white-space:nowrap}
.card .table-hover>tbody>tr:hover>*{--bs-table-bg-state:var(--acento-50)}
.card .table-responsive{border-radius:16px}
@media (min-width:1200px){.card .table{font-size:15px}}

/* Tablas -> tarjetas en móvil (usar class="table-stack" y data-label en cada td) */
@media (max-width:767.98px){
  .table-stack thead{display:none}
  .table-stack,.table-stack tbody{display:block}
  .table-stack tbody tr{display:block;margin:12px;padding:12px 14px;border-radius:14px;background:#fff;box-shadow:0 0 0 1px var(--stone-200)}
  .table-stack tbody tr:hover>*{--bs-table-bg-state:transparent}
  .card .table-stack>:not(caption)>*>*{padding:.4rem 0;border:0}
  .table-stack td{display:flex;justify-content:space-between;align-items:center;gap:12px;text-align:right;white-space:normal!important}
  .table-stack td::before{content:attr(data-label);flex:0 0 38%;text-align:left;font-size:11px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--stone-500)}
  .table-stack td:first-child{font-size:16px;padding-bottom:.6rem;margin-bottom:.3rem;border-bottom:1px solid var(--stone-200)}
  .table-stack td:first-child::before{display:none}
  .table-stack td:first-child{justify-content:flex-start;text-align:left}
  .table-stack td:last-child{justify-content:flex-end;flex-wrap:wrap;padding-top:.7rem;margin-top:.3rem;border-top:1px solid var(--stone-200)}
  .table-stack td:last-child::before{display:none}
  .table-stack td:empty{display:none}
  .table-stack td[colspan]{display:block;text-align:center}
  .table-stack td[colspan]::before{display:none}
  .card:has(.table-stack){box-shadow:none;background:transparent}
}
