/* ================================================================
   Hotel Refugio del Lago — admin.css
   Todos los estilos del panel. No modifica ninguna clase del landing.
   Usa los tokens de :root de styles.css (--forest, --gold, etc.)
   pero define sus propias clases con prefijo adm- donde hay riesgo
   de colisión.
   ================================================================ */

/* ─── TOKENS LOCALES ──────────────────────────────────────────── */
:root {
  --sidebar-w: 240px;
  --topbar-h:  64px;
  --border:    rgba(20,48,31,.1);
  --card-bg:   rgba(255,255,255,.52);
}

/* El admin usa cream de fondo en vez de parch */
body { background: var(--cream); }

/* ─── TARJETA BASE ────────────────────────────────────────────── */
.adm-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(8px);
  overflow: hidden;
}
.adm-card-head {
  padding: 18px 24px 16px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.adm-card-title {
  font-size: .58rem; letter-spacing: .22em;
  text-transform: uppercase; font-weight: 600; color: var(--forest);
}
.adm-card-action {
  font-size: .58rem; letter-spacing: .14em; text-transform: uppercase;
  font-weight: 600; color: var(--gold); background: none; border: none;
  font-family: 'Raleway', sans-serif; cursor: pointer; transition: color .25s;
}
.adm-card-action:hover { color: var(--gilded); }

/* ─── BADGES ──────────────────────────────────────────────────── */
.adm-badge {
  display: inline-block; padding: 4px 10px; border-radius: 2px;
  font-size: .54rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600;
}
.adm-badge-ok       { background: rgba(58,124,90,.1);  color: #2d6b4a; border: 1px solid rgba(58,124,90,.2); }
.adm-badge-pending  { background: rgba(184,147,63,.1); color: #8a6a28; border: 1px solid rgba(184,147,63,.2); }
.adm-badge-canceled { background: rgba(160,64,64,.08); color: #833030; border: 1px solid rgba(160,64,64,.18); }
.adm-badge-active   { background: rgba(20,48,31,.08);  color: var(--forest); border: 1px solid rgba(20,48,31,.15); }

/* ─── FORMULARIOS DEL ADMIN ───────────────────────────────────── */
.adm-label {
  font-size: .54rem; letter-spacing: .22em;
  text-transform: uppercase; color: var(--gold); font-weight: 600;
}
.adm-input,
.adm-select,
.adm-textarea {
  background: transparent; border: none;
  border-bottom: 1px solid rgba(20,48,31,.2); outline: none;
  padding: 9px 0; font-family: 'Raleway', sans-serif;
  font-size: .85rem; font-weight: 300; color: var(--forest); width: 100%;
  transition: border-color .3s;
}
.adm-input:focus,
.adm-select:focus,
.adm-textarea:focus   { border-color: var(--gold); }
.adm-input::placeholder { color: rgba(20,48,31,.3); }
.adm-select option    { background: var(--parch); }
.adm-textarea         { resize: none; height: 72px; }
.adm-divider          { height: 1px; background: rgba(20,48,31,.1); margin: 20px 0; }
.adm-row              { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.adm-field            { display: flex; flex-direction: column; gap: 7px; }
.adm-field.full       { grid-column: 1 / -1; }

/* ─── MODAL DEL ADMIN ─────────────────────────────────────────── */
.adm-overlay {
  position: fixed; inset: 0; z-index: 500;
  background: rgba(14,28,19,.88); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; pointer-events: none; transition: opacity .4s;
}
.adm-overlay.open         { opacity: 1; pointer-events: all; }
.adm-panel {
  background: var(--parch); border-radius: 4px;
  width: 100%; max-width: 520px; max-height: 90vh; overflow-y: auto;
  transform: translateY(20px);
  transition: transform .45s cubic-bezier(.22,1,.36,1);
}
.adm-overlay.open .adm-panel { transform: translateY(0); }
.adm-panel-head {
  background: var(--forest); padding: 28px 32px 22px; position: relative;
}
.adm-panel-tag {
  font-size: .52rem; letter-spacing: .28em; text-transform: uppercase;
  color: var(--gold); font-weight: 600; margin-bottom: 8px;
  display: flex; align-items: center; gap: 10px;
}
.adm-panel-tag::before { content: ''; width: 24px; height: 1px; background: var(--gold); display: block; }
.adm-panel-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.5rem; font-weight: 300; color: var(--parch);
}
.adm-panel-title em { font-style: italic; color: var(--gilded); }
.adm-panel-close {
  position: absolute; top: 16px; right: 16px;
  background: none; border: none; color: rgba(242,237,228,.4);
  font-size: 1.2rem; cursor: pointer; width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; transition: color .25s, background .25s;
}
.adm-panel-close:hover { color: var(--parch); background: rgba(242,237,228,.08); }
.adm-panel-body { padding: 28px 32px 32px; }

/* ─── BOTONES DEL ADMIN ───────────────────────────────────────── */
.btn-submit {
  width: 100%; background: var(--forest); color: var(--parch); border: none;
  padding: 16px; font-family: 'Raleway', sans-serif;
  font-size: .7rem; font-weight: 600; letter-spacing: .22em; text-transform: uppercase;
  cursor: pointer; border-radius: 2px; transition: background .3s;
}
.btn-submit:hover { background: var(--pine); }

.btn-action {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'Raleway', sans-serif; font-size: .63rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  background: var(--forest); color: var(--parch);
  border: none; border-radius: 2px; padding: 10px 18px;
  cursor: pointer; transition: background .3s;
}
.btn-action:hover { background: var(--pine); }
.btn-action svg   { width: 13px; height: 13px; }

.btn-ghost {
  font-size: .56rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 600;
  color: var(--gold); background: none; border: none;
  font-family: 'Raleway', sans-serif; cursor: pointer; transition: color .25s;
}
.btn-ghost:hover { color: var(--gilded); }

/* ─── EYEBROW DEL ADMIN ───────────────────────────────────────── */
.adm-eyebrow {
  font-size: .55rem; letter-spacing: .3em; text-transform: uppercase; font-weight: 600;
  color: var(--gold); display: flex; align-items: center; gap: 12px; margin-bottom: 8px;
}
.adm-eyebrow::after { content: ''; display: block; width: 32px; height: 1px; background: var(--gold); }

.page-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.65rem; font-weight: 300; color: var(--forest);
  line-height: 1.1; margin-bottom: 28px;
}

/* ─── ESTRUCTURA ──────────────────────────────────────────────── */
.admin-layout { display: flex; min-height: 100vh; }

/* ─── SIDEBAR ─────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w); background: var(--forest);
  display: flex; flex-direction: column;
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 100;
  border-right: 1px solid rgba(184,147,63,.1);
}
.sidebar-brand { padding: 30px 24px 26px; border-bottom: 1px solid rgba(184,147,63,.1); }
.sidebar-brand-eyebrow {
  font-size: .5rem; letter-spacing: .28em; text-transform: uppercase;
  color: var(--gold); font-weight: 600; margin-bottom: 6px;
}
.sidebar-brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 1.05rem; font-weight: 300; color: var(--parch); line-height: 1.2;
}
.sidebar-brand-name em { font-style: italic; color: var(--gilded); }

.sidebar-nav   { flex: 1; padding: 18px 0; overflow-y: auto; }
.sidebar-footer { padding: 18px 24px; border-top: 1px solid rgba(184,147,63,.1); }
.sidebar-user  { display: flex; align-items: center; gap: 11px; }
.sidebar-avatar {
  width: 30px; height: 30px; border-radius: 50%; background: var(--gold);
  color: var(--forest); font-size: .62rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.sidebar-user-name { font-size: .7rem; font-weight: 500; color: rgba(242,237,228,.7); }
.sidebar-user-role { font-size: .58rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(242,237,228,.28); }

.nav-group-label {
  font-size: .48rem; letter-spacing: .3em; text-transform: uppercase;
  color: rgba(184,147,63,.45); font-weight: 600; padding: 14px 24px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 24px;
  font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 500;
  color: rgba(242,237,228,.4); cursor: pointer;
  transition: color .25s, background .25s;
  border-left: 2px solid transparent; text-decoration: none;
}
.nav-item:hover  { color: rgba(242,237,228,.75); background: rgba(242,237,228,.04); }
.nav-item.active { color: var(--gilded); background: rgba(184,147,63,.07); border-left-color: var(--gold); }
.nav-item svg    { width: 14px; height: 14px; flex-shrink: 0; opacity: .65; }
.nav-item.active svg { opacity: 1; }

/* ─── TOPBAR + MAIN ───────────────────────────────────────────── */
.main    { margin-left: var(--sidebar-w); flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar  {
  height: var(--topbar-h); background: rgba(242,237,228,.75); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 36px; position: sticky; top: 0; z-index: 50;
}
.topbar-left  { display: flex; align-items: center; gap: 8px; }
.topbar-title { font-family: 'Playfair Display', serif; font-size: 1.1rem; font-weight: 300; color: var(--forest); }
.topbar-sep   { color: var(--muted); margin: 0 2px; }
.topbar-sub   { font-size: .62rem; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
.topbar-right { display: flex; align-items: center; gap: 18px; }
.topbar-date  { font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.topbar-notif {
  width: 30px; height: 30px; border: 1px solid var(--border); border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
  background: transparent; cursor: pointer; position: relative; transition: border-color .25s;
}
.topbar-notif:hover { border-color: var(--gold); }
.notif-dot {
  position: absolute; top: 5px; right: 5px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--gold);
}
.topbar-link {
  font-size: .6rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold); text-decoration: none; font-weight: 600; transition: color .25s;
}
.topbar-link:hover { color: var(--gilded); }
.content { padding: 36px; flex: 1; }

/* ─── SECCIONES ───────────────────────────────────────────────── */
.section        { display: none; }
.section.active { display: block; }

/* ─── KPI GRID ────────────────────────────────────────────────── */
.kpi-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 14px; margin-bottom: 24px;
}
.kpi-grid--3 { grid-template-columns: repeat(3, 1fr); }
.kpi-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px 24px;
  backdrop-filter: blur(8px); position: relative; overflow: hidden; transition: border-color .3s;
}
.kpi-card:hover { border-color: rgba(184,147,63,.3); }
.kpi-card::after {
  content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: 0; transition: opacity .3s;
}
.kpi-card:hover::after { opacity: 1; }
.kpi-label { font-size: .54rem; letter-spacing: .24em; text-transform: uppercase; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.kpi-value { font-family: 'Playfair Display', serif; font-size: 1.9rem; font-weight: 300; color: var(--forest); line-height: 1; margin-bottom: 8px; }
.kpi-value-unit { font-family: 'Raleway', sans-serif; font-size: .7rem; font-weight: 400; color: var(--muted); vertical-align: middle; margin-left: 2px; }
.kpi-delta      { font-size: .63rem; font-weight: 500; letter-spacing: .04em; }
.kpi-delta.up   { color: #3a7c5a; }
.kpi-delta.down { color: #a04040; }
.kpi-delta span { color: var(--muted); font-weight: 300; margin-left: 4px; }
.kpi-note { font-size: .63rem; color: var(--muted); font-weight: 300; letter-spacing: .02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.two-col { display: grid; grid-template-columns: 1.45fr 1fr; gap: 14px; margin-bottom: 24px; }

/* ─── TABLA GENÉRICA ──────────────────────────────────────────── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  font-size: .5rem; letter-spacing: .24em; text-transform: uppercase;
  font-weight: 600; color: var(--muted); padding: 11px 22px;
  text-align: left; border-bottom: 1px solid var(--border);
}
.data-table td {
  padding: 13px 22px; font-size: .76rem; font-weight: 300;
  color: var(--forest); border-bottom: 1px solid rgba(20,48,31,.05); vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td      { background: rgba(20,48,31,.02); }
.data-table .ref             { color: var(--muted); font-size: .66rem; }

.guest-name   { font-weight: 500; font-size: .78rem; }
.guest-origin { font-size: .64rem; color: var(--muted); margin-top: 2px; }
.guest-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: rgba(184,147,63,.15); color: #7a5d20;
  font-size: .62rem; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
  margin-right: 9px; vertical-align: middle;
}

/* ─── OCUPACIÓN ───────────────────────────────────────────────── */
.occ-item { display: flex; align-items: center; gap: 14px; padding: 13px 22px; border-bottom: 1px solid rgba(20,48,31,.05); }
.occ-item:last-child { border-bottom: none; }
.occ-num  { font-family: 'Playfair Display', serif; font-size: 1.05rem; font-weight: 300; color: var(--forest); width: 28px; flex-shrink: 0; }
.occ-info { flex: 1; min-width: 0; }
.occ-name  { font-size: .74rem; font-weight: 500; color: var(--forest); margin-bottom: 2px; }
.occ-dates { font-size: .62rem; color: var(--muted); font-weight: 300; }
.occ-bar-wrap { width: 72px; height: 3px; background: rgba(20,48,31,.08); border-radius: 2px; flex-shrink: 0; }
.occ-bar      { height: 100%; border-radius: 2px; background: var(--gold); }

/* ─── CALENDARIO ──────────────────────────────────────────────── */
.cal-wrap  { padding: 18px 22px; }
.cal-grid  { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-day-label {
  font-size: .48rem; letter-spacing: .18em; text-transform: uppercase;
  font-weight: 600; color: var(--muted); text-align: center; padding: 3px 0 7px;
}
.cal-day {
  aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 300; color: var(--forest);
  border-radius: 2px; cursor: pointer; position: relative;
  transition: background .2s, color .2s; user-select: none;
}
.cal-day:hover:not(.empty) { background: rgba(20,48,31,.06); }
.cal-day.empty    { color: transparent; pointer-events: none; }
.cal-day.today    { background: var(--forest); color: var(--parch); font-weight: 500; }
.cal-day.occupied { background: rgba(184,147,63,.14); color: #7a5d20; font-weight: 500; }
.cal-day.occupied::after {
  content: ''; position: absolute; bottom: 3px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--gold);
}
.cal-day.selected { outline: 1px solid var(--gold); }
.cal-nav-btn {
  width: 26px; height: 26px; border: 1px solid var(--border); border-radius: var(--radius);
  background: none; cursor: pointer; color: var(--forest);
  display: flex; align-items: center; justify-content: center;
  font-size: .75rem; transition: border-color .25s, color .25s;
}
.cal-nav-btn:hover { border-color: var(--gold); color: var(--gold); }
.cal-legend      { display: flex; gap: 16px; margin-top: 14px; align-items: center; }
.cal-legend-item { display: flex; align-items: center; gap: 6px; }
.cal-legend-dot  { width: 9px; height: 9px; border-radius: 2px; }
.cal-legend-lbl  { font-size: .58rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* ─── HABITACIONES ────────────────────────────────────────────── */
.rooms-admin-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px; margin-bottom: 28px;
}
.room-admin-card {
  background: var(--card-bg); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden; backdrop-filter: blur(8px);
  transition: border-color .3s;
}
.room-admin-card:hover { border-color: rgba(184,147,63,.3); }
.room-admin-thumb {
  height: 120px;
  background: linear-gradient(135deg, var(--pine) 0%, var(--forest) 100%);
  position: relative;
}
.room-admin-thumb.v2 { background: linear-gradient(135deg, #2c3a1b 0%, #1f2e0e 100%); }
.room-admin-thumb.v3 { background: linear-gradient(135deg, #1a2d3d 0%, #0e1c2c 100%); }
.room-admin-thumb-badge { position: absolute; top: 10px; right: 10px; }
.room-admin-body  { padding: 16px 18px; }
.room-admin-name  { font-family: 'Playfair Display', serif; font-size: .92rem; font-weight: 300; color: var(--forest); margin-bottom: 3px; }
.room-admin-type  { font-size: .58rem; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-bottom: 12px; }
.room-admin-meta  { display: flex; align-items: center; justify-content: space-between; }
.room-admin-price { font-size: .76rem; font-weight: 500; color: var(--forest); }
.room-admin-price span { font-size: .58rem; font-weight: 300; color: var(--muted); }

/* ─── GRÁFICO DE BARRAS ───────────────────────────────────────── */
.bar-chart-wrap { padding: 18px 22px; }
.bar-chart {
  display: flex; align-items: flex-end; gap: 8px;
  height: 96px; border-bottom: 1px solid var(--border);
  padding-bottom: 6px; margin-bottom: 10px;
}
.bar-col  { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; justify-content: flex-end; }
.bar      { width: 100%; border-radius: 2px 2px 0 0; background: rgba(20,48,31,.1); }
.bar.hi   { background: var(--gold); }
.bar-lbl  { font-size: .5rem; letter-spacing: .1em; text-transform: uppercase; font-weight: 500; color: var(--muted); }
.bar-lbl.hi { color: var(--gold); }
.chart-legend { display: flex; gap: 14px; align-items: center; }
.legend-dot   { width: 8px; height: 8px; border-radius: 1px; flex-shrink: 0; }
.legend-lbl   { font-size: .58rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

/* ─── STATS ───────────────────────────────────────────────────── */
.stat-row { display: flex; align-items: center; justify-content: space-between; padding: 11px 22px; border-bottom: 1px solid rgba(20,48,31,.05); }
.stat-row:last-child { border-bottom: none; }
.stat-name { font-size: .72rem; font-weight: 300; color: var(--forest); }
.stat-val  { font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 300; color: var(--forest); }
.stat-val em { font-size: .66rem; font-style: normal; color: var(--muted); margin-left: 3px; }

/* ─── FILTROS ─────────────────────────────────────────────────── */
.filters    { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.filter-btn {
  padding: 7px 14px; border-radius: 2px; font-size: .6rem; letter-spacing: .16em;
  text-transform: uppercase; font-weight: 600; font-family: 'Raleway', sans-serif;
  cursor: pointer; background: transparent; border: 1px solid var(--border); color: var(--muted);
  transition: border-color .2s, color .2s, background .2s;
}
.filter-btn:hover  { border-color: var(--gold); color: var(--forest); }
.filter-btn.active { background: var(--forest); color: var(--parch); border-color: var(--forest); }

/* ─── RESPONSIVE ──────────────────────────────────────────────── */
@media (max-width: 1100px) {
  .kpi-grid         { grid-template-columns: 1fr 1fr; }
  .two-col          { grid-template-columns: 1fr; }
  .rooms-admin-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  :root    { --sidebar-w: 200px; }
  .content { padding: 24px; }
  .topbar  { padding: 0 24px; }
}
@media (max-width: 600px) {
  .sidebar          { display: none; }
  .main             { margin-left: 0; }
  .kpi-grid         { grid-template-columns: 1fr 1fr; }
  .rooms-admin-grid { grid-template-columns: 1fr; }
}