@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Fraunces:ital,wght@0,400;0,600;1,400&display=swap');

:root {
  --bg:       #F0F2F7;
  --surface:  #FFFFFF;
  --surface2: #F7F8FC;
  --border:   #E2E6EF;
  --text:     #1A1D2E;
  --text2:    #6B7280;
  --text3:    #9CA3AF;

  --sidebar-bg:    #1C2340;
  --sidebar-hover: #252D50;
  --sidebar-active:#2E3A63;
  --sidebar-text:  #C8CFEA;
  --sidebar-accent:#4F6EF7;

  --salon:   #4F6EF7;
  --aula:    #F7604F;
  --success: #22C55E;
  --warning: #F59E0B;
  --danger:  #EF4444;

  --radius: 10px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 12px rgba(0,0,0,.05);
  --shadow-lg: 0 4px 24px rgba(0,0,0,.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; font-family: 'Outfit', sans-serif; background: var(--bg); color: var(--text); }

.app-layout { display: flex; height: 100vh; overflow: hidden; }

/* SIDEBAR */
.sidebar { width: 220px; flex-shrink: 0; background: var(--sidebar-bg); display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; }
.sidebar-logo { padding: 1.1rem 1rem .9rem; border-bottom: 1px solid rgba(255,255,255,.07); display: flex; align-items: center; gap: .7rem; }
.sidebar-logo-img { width: 36px; height: 36px; object-fit: contain; border-radius: 7px; flex-shrink: 0; }
.sidebar-logo-placeholder { width: 36px; height: 36px; border-radius: 7px; background: var(--sidebar-accent); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .95rem; color: #fff; flex-shrink: 0; }
.sidebar-app-name { font-weight: 700; font-size: .88rem; color: #fff; line-height: 1.2; }
.sidebar-app-sub  { font-size: .65rem; color: var(--sidebar-text); opacity: .6; }

.sidebar-nav { flex: 1; padding: .6rem 0; }
.nav-section-label { font-size: .6rem; text-transform: uppercase; letter-spacing: .08em; color: var(--sidebar-text); opacity: .4; padding: .7rem 1rem .25rem; }
.nav-item { display: flex; align-items: center; gap: .6rem; padding: .5rem 1rem; margin: .08rem .5rem; border-radius: 7px; color: var(--sidebar-text); cursor: pointer; font-size: .82rem; font-weight: 500; transition: all .16s; }
.nav-item:hover  { background: var(--sidebar-hover); color: #fff; }
.nav-item.active { background: var(--sidebar-active); color: #fff; }
.nav-icon { font-size: .95rem; opacity: .75; flex-shrink: 0; width: 18px; text-align: center; }
.nav-item.active .nav-icon { opacity: 1; }

.sidebar-stats { padding: .7rem; border-top: 1px solid rgba(255,255,255,.07); display: flex; flex-direction: column; gap: .45rem; }
.stat-card { background: rgba(255,255,255,.06); border-radius: 8px; padding: .6rem .75rem; border: 1px solid rgba(255,255,255,.07); }
.stat-label { font-size: .65rem; color: var(--sidebar-text); opacity: .65; margin-bottom: .12rem; }
.stat-val   { font-size: 1.45rem; font-weight: 800; color: #fff; line-height: 1; }
.stat-sub   { font-size: .62rem; color: var(--sidebar-text); opacity: .55; margin-top: .12rem; }

.sidebar-user { padding: .75rem; border-top: 1px solid rgba(255,255,255,.07); display: flex; align-items: center; gap: .55rem; }
.user-avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--sidebar-accent); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .78rem; color: #fff; flex-shrink: 0; }
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: .78rem; font-weight: 600; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-rol  { font-size: .62rem; color: var(--sidebar-accent); }
.btn-logout-side { background: none; border: none; color: var(--sidebar-text); opacity: .5; cursor: pointer; font-size: .85rem; padding: .2rem; transition: opacity .18s; }
.btn-logout-side:hover { opacity: 1; color: var(--danger); }

/* MAIN */
.main-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

.topbar { background: var(--surface); border-bottom: 1px solid var(--border); padding: .65rem 1.1rem; display: flex; align-items: center; gap: .7rem; flex-shrink: 0; box-shadow: var(--shadow); flex-wrap: wrap; }
.topbar-titles { flex: 1; min-width: 0; }
.topbar-title { font-weight: 700; font-size: 1.05rem; }
.topbar-sub   { font-size: .72rem; color: var(--text2); }

.view-tabs { display: flex; background: var(--bg); border: 1.5px solid var(--border); border-radius: 8px; padding: 2px; gap: 1px; }
.view-tab  { background: none; border: none; color: var(--text2); padding: .28rem .7rem; border-radius: 6px; cursor: pointer; font-family: 'Outfit', sans-serif; font-size: .8rem; font-weight: 500; transition: all .16s; }
.view-tab.active { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.1); font-weight: 600; }

.nav-fecha { display: flex; align-items: center; gap: .3rem; }
.nav-fecha button { background: var(--surface); border: 1.5px solid var(--border); color: var(--text2); width: 27px; height: 27px; border-radius: 7px; cursor: pointer; font-size: .9rem; display: flex; align-items: center; justify-content: center; transition: all .16s; }
.nav-fecha button:hover { border-color: var(--salon); color: var(--salon); }
.fecha-label { font-weight: 700; font-size: .88rem; min-width: 165px; text-align: center; }
.btn-hoy { background: var(--surface); border: 1.5px solid var(--border); color: var(--text2); padding: .28rem .65rem; border-radius: 7px; cursor: pointer; font-family: 'Outfit', sans-serif; font-size: .75rem; font-weight: 500; transition: all .16s; }
.btn-hoy:hover { border-color: var(--salon); color: var(--salon); }

.btn-nueva-reserva { background: var(--salon); color: #fff; border: none; padding: .42rem .95rem; border-radius: 8px; cursor: pointer; font-family: 'Outfit', sans-serif; font-weight: 700; font-size: .82rem; display: flex; align-items: center; gap: .35rem; transition: all .18s; box-shadow: 0 2px 8px rgba(79,110,247,.3); }
.btn-nueva-reserva:hover { background: #3d5ce0; transform: translateY(-1px); box-shadow: 0 4px 14px rgba(79,110,247,.4); }

/* CONTENT SPLIT */
.content-split { flex: 1; display: flex; overflow: hidden; }
.calendar-area { flex: 1; overflow: auto; padding: .9rem; min-height: 0; }
.detail-panel  { width: 290px; flex-shrink: 0; background: var(--surface); border-left: 1px solid var(--border); overflow-y: auto; display: flex; flex-direction: column; }

/* FILTROS */
.filtros-bar { display: flex; align-items: center; gap: .45rem; margin-bottom: .75rem; flex-wrap: wrap; }
.filtro-chip { display: flex; align-items: center; gap: .3rem; padding: .27rem .75rem; border-radius: 20px; cursor: pointer; font-size: .75rem; font-weight: 500; transition: all .16s; border: 1.5px solid var(--border); color: var(--text2); background: var(--surface); }
.filtro-chip .dot { width: 7px; height: 7px; border-radius: 50%; }
.filtro-chip.active.todos { border-color: var(--salon); color: var(--salon); background: rgba(79,110,247,.06); }
.filtro-chip.active.salon { border-color: var(--salon); color: var(--salon); background: rgba(79,110,247,.06); }
.filtro-chip.active.aula  { border-color: var(--aula);  color: var(--aula);  background: rgba(247,96,79,.06); }

/* MENSUAL */
.cal-mensual { display: grid; grid-template-columns: repeat(7, minmax(0,1fr)); gap: 3px; }
.cal-header-day { text-align: center; font-size: .68rem; font-weight: 600; color: var(--text2); text-transform: uppercase; padding: .45rem 0; }
.cal-day { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); aspect-ratio: 1/1; padding: .38rem .4rem; cursor: pointer; transition: all .16s; display: flex; flex-direction: column; overflow: hidden; box-sizing: border-box; }
.cal-day:hover { border-color: var(--salon); box-shadow: 0 2px 8px rgba(79,110,247,.1); }
.cal-day.otro-mes { background: var(--surface2); opacity: .55; }
.cal-day.hoy { border-color: var(--salon); border-width: 2px; }
.day-num { font-size: .77rem; font-weight: 600; margin-bottom: .28rem; color: var(--text2); }
.cal-day.hoy .day-num { background: var(--salon); color: #fff; border-radius: 50%; width: 21px; height: 21px; display: flex; align-items: center; justify-content: center; font-size: .7rem; }
.cal-evento { font-size: .64rem; padding: .1rem .3rem; border-radius: 4px; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; font-weight: 500; transition: opacity .14s; }
.cal-evento:hover { opacity: .75; }
.cal-evento.salon { background: rgba(79,110,247,.13); color: #3555d0; border-left: 2px solid var(--salon); }
.cal-evento.aula  { background: rgba(247,96,79,.1);   color: #c43a2b; border-left: 2px solid var(--aula); }
.mas-eventos { font-size: .6rem; color: var(--text3); margin-top: 1px; padding: 0 .15rem; }

/* SEMANAL */
.cal-semanal { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.sem-header-row { display: grid; grid-template-columns: 46px repeat(7,1fr); }
.sem-header-cell { background: var(--surface2); border-bottom: 1px solid var(--border); padding: .5rem .3rem; text-align: center; font-size: .7rem; font-weight: 600; color: var(--text2); }
.sem-header-cell.hoy-col { color: var(--salon); font-weight: 700; }
.sem-body-row { display: grid; grid-template-columns: 46px repeat(7,1fr); position: relative; }
.sem-hora { height: 54px; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); display: flex; align-items: flex-start; justify-content: flex-end; padding: 2px 5px 0; font-size: .6rem; color: var(--text3); background: var(--surface2); }
.sem-col { position: relative; border-right: 1px solid var(--border); cursor: pointer; }
.sem-col:last-child { border-right: none; }
.sem-slot { height: 54px; border-bottom: 1px solid rgba(0,0,0,.04); }
.sem-evento { position: absolute; left: 2px; right: 2px; border-radius: 5px; padding: 2px 5px; font-size: .65rem; overflow: hidden; cursor: pointer; z-index: 2; border-left: 3px solid; font-weight: 500; }
.sem-evento.salon { background: rgba(79,110,247,.15); border-color: var(--salon); color: #2d4bc4; }
.sem-evento.aula  { background: rgba(247,96,79,.12);  border-color: var(--aula);  color: #c43a2b; }

/* DIARIA */
.cal-diaria { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.dia-grid { display: grid; grid-template-columns: 46px 1fr; }
.dia-hora { height: 54px; border-bottom: 1px solid var(--border); border-right: 1px solid var(--border); background: var(--surface2); display: flex; align-items: flex-start; justify-content: flex-end; padding: 2px 6px 0; font-size: .62rem; color: var(--text3); }
.dia-col  { position: relative; cursor: pointer; }
.dia-slot { height: 54px; border-bottom: 1px solid rgba(0,0,0,.04); transition: background .1s; }
.dia-slot:hover { background: rgba(79,110,247,.04); }
.dia-evento { position: absolute; border-radius: 7px; padding: 4px 8px; font-size: .76rem; cursor: pointer; border-left: 3px solid; overflow: hidden; font-weight: 500; }
.dia-evento.salon { background: rgba(79,110,247,.13); border-color: var(--salon); color: #2d4bc4; }
.dia-evento.aula  { background: rgba(247,96,79,.1);   border-color: var(--aula);  color: #c43a2b; }

/* LISTA */
.cal-lista { max-width: 100%; }
.lista-grupo { margin-bottom: 1.1rem; }
.lista-fecha-header { font-size: .75rem; font-weight: 700; color: var(--text2); text-transform: uppercase; letter-spacing: .05em; padding: .38rem 0; border-bottom: 1px solid var(--border); margin-bottom: .45rem; }
.lista-fecha-header.hoy { color: var(--salon); }
.lista-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: .65rem .85rem; margin-bottom: .35rem; display: flex; align-items: center; gap: .75rem; cursor: pointer; transition: all .16s; }
.lista-item:hover { border-color: var(--salon); box-shadow: 0 2px 8px rgba(79,110,247,.1); transform: translateX(2px); }
.lista-item.selected { border-color: var(--salon); background: rgba(79,110,247,.04); }
.lista-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.lista-dot.salon { background: var(--salon); }
.lista-dot.aula  { background: var(--aula); }
.lista-hora { font-size: .75rem; color: var(--text2); min-width: 92px; font-weight: 500; }
.lista-info { flex: 1; }
.lista-titulo { font-weight: 600; font-size: .85rem; }
.lista-sol    { font-size: .72rem; color: var(--text2); margin-top: .08rem; }
.lista-tag { font-size: .68rem; padding: .15rem .5rem; border-radius: 20px; font-weight: 500; white-space: nowrap; }
.lista-tag.salon { background: rgba(79,110,247,.1); color: #3555d0; }
.lista-tag.aula  { background: rgba(247,96,79,.1);  color: #d94a3a; }
.lista-vacia { text-align: center; color: var(--text3); padding: 2.5rem 1rem; font-size: .85rem; }

/* DETAIL PANEL */
.detail-panel-header { padding: .9rem 1.1rem .65rem; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.detail-panel-header h3 { font-weight: 700; font-size: .9rem; }
.detail-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--text3); font-size: .8rem; text-align: center; padding: 1.5rem; }
.detail-empty-icon { font-size: 1.8rem; margin-bottom: .5rem; opacity: .35; }
.detail-content { padding: .9rem 1.1rem; flex: 1; }
.detail-espacio-badge { display: inline-flex; align-items: center; gap: .3rem; padding: .22rem .7rem; border-radius: 20px; font-size: .72rem; font-weight: 600; margin-bottom: .8rem; }
.detail-espacio-badge.salon { background: rgba(79,110,247,.1); color: #3555d0; }
.detail-espacio-badge.aula  { background: rgba(247,96,79,.1);  color: #d94a3a; }
.detail-espacio-badge .dot  { width: 6px; height: 6px; border-radius: 50%; }
.detail-espacio-badge.salon .dot { background: var(--salon); }
.detail-espacio-badge.aula  .dot { background: var(--aula); }
.detail-titulo { font-family: 'Fraunces', serif; font-size: 1.1rem; font-weight: 600; margin-bottom: .9rem; line-height: 1.3; }
.detail-row { display: flex; gap: .45rem; align-items: flex-start; margin-bottom: .55rem; font-size: .8rem; }
.detail-icon  { width: 15px; flex-shrink: 0; text-align: center; color: var(--text3); margin-top: 1px; }
.detail-label { color: var(--text2); min-width: 76px; flex-shrink: 0; }
.detail-val   { color: var(--text); font-weight: 500; }
.detail-desc  { background: var(--bg); border-radius: 7px; padding: .6rem .85rem; font-size: .77rem; color: var(--text2); margin: .7rem 0; line-height: 1.5; }
.detail-actions { display: flex; gap: .45rem; padding-top: .75rem; border-top: 1px solid var(--border); flex-wrap: wrap; }
.btn-edit { flex: 1; padding: .42rem; background: var(--salon); color: #fff; border: none; border-radius: 7px; cursor: pointer; font-family: 'Outfit', sans-serif; font-weight: 600; font-size: .78rem; transition: all .16s; }
.btn-edit:hover { background: #3d5ce0; }
.btn-del  { padding: .42rem .75rem; background: rgba(239,68,68,.07); color: var(--danger); border: 1.5px solid rgba(239,68,68,.18); border-radius: 7px; cursor: pointer; font-size: .78rem; transition: all .16s; }
.btn-del:hover { background: rgba(239,68,68,.14); }

/* MODAL */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.42); backdrop-filter: blur(3px); z-index: 300; align-items: center; justify-content: center; padding: 1rem; }
.modal-overlay.open { display: flex; }
.modal { background: var(--surface); border-radius: 14px; width: 100%; max-width: 480px; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lg); }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem .75rem; border-bottom: 1px solid var(--border); }
.modal-header h3 { font-weight: 700; font-size: .95rem; }
.modal-header button { background: none; border: none; color: var(--text2); font-size: 1rem; cursor: pointer; width: 27px; height: 27px; border-radius: 6px; display: flex; align-items: center; justify-content: center; transition: all .14s; }
.modal-header button:hover { background: var(--bg); color: var(--text); }
.modal-body   { padding: 1rem 1.2rem; }
.modal-footer { padding: .75rem 1.2rem 1rem; display: flex; gap: .45rem; justify-content: flex-end; border-top: 1px solid var(--border); }

.field { margin-bottom: .85rem; }
.field label { display: block; font-size: .72rem; font-weight: 600; color: var(--text2); margin-bottom: .32rem; text-transform: uppercase; letter-spacing: .04em; }
.field input, .field select, .field textarea { width: 100%; background: var(--bg); border: 1.5px solid var(--border); color: var(--text); padding: .52rem .82rem; border-radius: 8px; font-family: 'Outfit', sans-serif; font-size: .86rem; outline: none; transition: border-color .16s; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--salon); background: #fff; }
.field textarea { resize: vertical; min-height: 62px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }

.btn-primary   { background: var(--salon); color: #fff; border: none; padding: .48rem 1.1rem; border-radius: 8px; cursor: pointer; font-family: 'Outfit', sans-serif; font-weight: 700; font-size: .82rem; transition: all .16s; }
.btn-primary:hover { background: #3d5ce0; }
.btn-secondary { background: var(--surface); color: var(--text2); border: 1.5px solid var(--border); padding: .48rem 1.1rem; border-radius: 8px; cursor: pointer; font-family: 'Outfit', sans-serif; font-size: .82rem; transition: all .16s; }
.btn-secondary:hover { border-color: var(--salon); color: var(--text); }
.btn-danger    { background: rgba(239,68,68,.07); color: var(--danger); border: 1.5px solid rgba(239,68,68,.18); padding: .48rem 1.1rem; border-radius: 8px; cursor: pointer; font-size: .82rem; transition: all .16s; }
.btn-danger:hover { background: rgba(239,68,68,.14); }

.conflicto-box { background: rgba(245,158,11,.07); border: 1.5px solid rgba(245,158,11,.28); border-radius: 9px; padding: .75rem .95rem; margin-bottom: .85rem; }
.conflicto-title { font-size: .77rem; font-weight: 700; color: var(--warning); margin-bottom: .38rem; }
.conflicto-item { font-size: .74rem; color: var(--text2); padding: .18rem 0; border-bottom: 1px solid rgba(0,0,0,.05); }
.conflicto-item:last-child { border-bottom: none; }
.conflicto-item strong { color: var(--text); }

.admin-table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.admin-table th { background: var(--bg); padding: .55rem .75rem; text-align: left; font-size: .67rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text2); font-weight: 600; }
.admin-table td { padding: .55rem .75rem; border-top: 1px solid var(--border); vertical-align: middle; }
.admin-table tr:hover td { background: var(--bg); }
.rol-badge { padding: .13rem .5rem; border-radius: 20px; font-size: .68rem; font-weight: 600; }
.rol-badge.admin { background: rgba(79,110,247,.1); color: var(--salon); }
.rol-badge.staff { background: rgba(107,114,128,.1); color: var(--text2); }
.btn-icon { background: none; border: 1.5px solid var(--border); color: var(--text2); padding: .18rem .52rem; border-radius: 6px; cursor: pointer; font-size: .72rem; transition: all .16s; }
.btn-icon:hover { border-color: var(--salon); color: var(--salon); }

.logo-upload-area { border: 2px dashed var(--border); border-radius: 9px; padding: 1.1rem; text-align: center; cursor: pointer; transition: all .16s; position: relative; }
.logo-upload-area:hover { border-color: var(--salon); }
.logo-upload-area input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.logo-preview { max-height: 65px; object-fit: contain; margin-bottom: .38rem; }

.toast { position: fixed; bottom: 1.4rem; right: 1.4rem; background: var(--text); color: #fff; border-radius: 10px; padding: .65rem 1rem; font-size: .8rem; z-index: 999; transform: translateY(16px); opacity: 0; transition: all .25s; max-width: 280px; font-weight: 500; box-shadow: var(--shadow-lg); }
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { background: #15803d; }
.toast.error   { background: #b91c1c; }

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

/* ═══════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════ */

/* Hamburger — solo mobile */
.btn-hamburger {
  display: none; background: none; border: 1.5px solid var(--border);
  color: var(--text); width: 36px; height: 36px; border-radius: 8px;
  cursor: pointer; font-size: 1.1rem; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all .16s;
}
.btn-hamburger:hover { border-color: var(--salon); color: var(--salon); }

/* Logout top — solo mobile */
.btn-logout-top {
  display: none; background: rgba(239,68,68,.08); color: var(--danger);
  border: 1.5px solid rgba(239,68,68,.2); padding: .38rem .8rem;
  border-radius: 8px; cursor: pointer; font-family: 'Outfit', sans-serif;
  font-weight: 600; font-size: .8rem; flex-shrink: 0; transition: all .16s;
  white-space: nowrap;
}
.btn-logout-top:hover { background: rgba(239,68,68,.16); }

/* Drawer overlay */
.drawer-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.45); z-index: 250; backdrop-filter: blur(2px);
}
.drawer-overlay.open { display: block; }

/* Sidebar drawer en mobile */
.sidebar.drawer-open {
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 260;
  width: 240px !important; display: flex !important;
  box-shadow: 4px 0 24px rgba(0,0,0,.25);
  animation: drawerIn .22s ease;
}
@keyframes drawerIn {
  from { transform: translateX(-100%); }
  to   { transform: translateX(0); }
}

/* ── Tablet (≤900px) ── */
@media (max-width: 900px) {
  .sidebar { width: 56px; }
  .sidebar-app-name, .sidebar-app-sub,
  .nav-item span:not(.nav-icon), .sidebar-stats,
  .user-info, .nav-section-label { display: none; }
  .nav-item { justify-content: center; padding: .55rem; margin: .08rem .3rem; }
  .sidebar-logo { padding: .7rem .5rem; justify-content: center; }
  .sidebar-logo > div:last-child { display: none; }
  .sidebar-user { justify-content: center; padding: .6rem .3rem; }
  .detail-panel { width: 260px; }
  .fecha-label { min-width: 130px; font-size: .82rem; }

  /* En drawer abierto mostrar todo */
  .sidebar.drawer-open .sidebar-app-name,
  .sidebar.drawer-open .sidebar-app-sub,
  .sidebar.drawer-open .nav-item span,
  .sidebar.drawer-open .sidebar-stats,
  .sidebar.drawer-open .user-info,
  .sidebar.drawer-open .nav-section-label { display: block; }
  .sidebar.drawer-open .nav-item { justify-content: flex-start; padding: .5rem 1rem; margin: .08rem .5rem; }
  .sidebar.drawer-open .sidebar-logo { padding: 1.1rem 1rem .9rem; justify-content: flex-start; }
  .sidebar.drawer-open .sidebar-logo > div:last-child { display: block; }
  .sidebar.drawer-open .sidebar-user { justify-content: flex-start; padding: .75rem; }

  #labelGeneral { display: none !important; }
  .sidebar.drawer-open #labelGeneral { display: block !important; }
}

/* ── Tablet (641px–900px) ──
   El sidebar queda colapsado a íconos (regla de 900px) pero antes no había
   forma de expandirlo ni de ver los filtros completos: se agrega el botón
   hamburguesa (con el drawer que ya existía) y se hacen scrolleables los
   filtros de espacio, sin activar el layout 100% mobile (bottom-nav, FAB,
   modal desde abajo siguen siendo exclusivos de ≤640px). */
@media (min-width: 641px) and (max-width: 900px) {
  .btn-hamburger  { display: flex; }
  .btn-logout-top { display: flex; }
  .btn-logout-side { display: none; }

  .filtros-bar {
    flex-wrap: nowrap; overflow-x: auto; padding-bottom: .3rem;
    -webkit-overflow-scrolling: touch;
  }
  .filtros-bar::-webkit-scrollbar { display: none; }
  .filtro-chip { flex-shrink: 0; }

  .detail-panel { width: 240px; }
  .detail-titulo { font-size: .95rem; }

  .topbar-titles { display: none; }

  .modal { max-width: 92vw; }

  .dash-table { font-size: .76rem; }
  .dash-bar-label { width: 120px; }
}

/* ── Mobile (≤640px) ── */
@media (max-width: 640px) {
  .sidebar { display: none; }
  .detail-panel { display: none; }
  .btn-hamburger { display: flex; }
  .btn-logout-top { display: flex; }
  .btn-logout-side { display: none; }

  /* Topbar */
  .topbar { padding: .5rem .65rem; gap: .4rem; flex-wrap: nowrap; }
  .topbar-titles { display: none; }
  .view-tabs { display: none; }
  .btn-nueva-reserva { display: none; }

  /* Fecha nav compacto */
  .fecha-label { min-width: 90px; font-size: .78rem; }
  .nav-fecha button { width: 26px; height: 26px; font-size: .85rem; }
  .btn-hoy { padding: .25rem .55rem; font-size: .72rem; }

  /* Contenido */
  .calendar-area { padding: .55rem .45rem; }

  /* Mensual compacto */
  .cal-mensual { gap: 2px; }
  .cal-day { aspect-ratio: 1/1; min-height: 0; padding: .22rem .25rem; border-radius: 6px; }
  .day-num { font-size: .7rem; margin-bottom: .2rem; }
  .cal-evento { font-size: .56rem; padding: .07rem .2rem; }
  .cal-header-day { font-size: .6rem; padding: .32rem 0; }
  .cal-day.hoy .day-num { width: 19px; height: 19px; font-size: .66rem; }

  /* Semanal scroll */
  .cal-semanal { overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Filtros scroll */
  .filtros-bar { flex-wrap: nowrap; overflow-x: auto; padding-bottom: .25rem; -webkit-overflow-scrolling: touch; gap: .35rem; }
  .filtros-bar::-webkit-scrollbar { display: none; }
  .filtro-chip { flex-shrink: 0; font-size: .72rem; padding: .24rem .65rem; }

  /* Banner hoy */
  .banner-hoy { padding: .55rem .7rem; }
  .banner-hoy-title { font-size: .76rem; }
  .banner-item { font-size: .7rem; padding: .2rem .55rem; }

  /* Modal desde abajo */
  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal { border-radius: 16px 16px 0 0; max-height: 93dvh; max-width: 100%; }

  /* Bottom nav */
  .bottom-nav { display: flex; }
  .content-split { padding-bottom: 64px; }
  .toast { bottom: 5.2rem; }

  /* Listado de reservas: se reordena a 2 líneas para que el nombre del
     espacio (ahora más largo: "Sala de conferencias", "Aula punto digital")
     no empuje el título/solicitante fuera de la tarjeta ni la deforme. */
  .lista-item {
    flex-wrap: wrap; align-items: center;
    padding: .6rem .7rem; gap: .35rem .5rem;
  }
  .lista-dot  { order: 1; }
  .lista-hora { order: 2; min-width: 0; font-size: .7rem; }
  .lista-tag  { order: 3; margin-left: auto; font-size: .62rem; padding: .12rem .45rem; }
  .lista-info { order: 4; flex: 1 1 100%; }
  .lista-titulo { font-size: .82rem; }
  .lista-sol     { font-size: .7rem; }
  .lista-fecha-header { font-size: .7rem; }
}

/* ── Bottom Nav ── */
.bottom-nav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
  background: var(--surface); border-top: 1px solid var(--border);
  padding: .35rem 0 calc(.35rem + env(safe-area-inset-bottom));
  box-shadow: 0 -2px 14px rgba(0,0,0,.08);
}
.bottom-nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: .18rem;
  padding: .3rem .4rem; cursor: pointer; color: var(--text2);
  font-size: .58rem; font-weight: 500; transition: color .16s;
  background: none; border: none; font-family: 'Outfit', sans-serif;
}
.bottom-nav-item .bnav-icon {
  font-size: 1.1rem; line-height: 1; display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 8px; transition: all .16s;
}
.bottom-nav-item.active .bnav-icon { background: rgba(79,110,247,.12); color: var(--salon); }
.bottom-nav-item.active { color: var(--salon); }
.bottom-nav-item:hover { color: var(--salon); }

/* ── Nueva reserva FAB (mobile) ── */
.fab-nueva {
  display: none; position: fixed; bottom: 80px; right: 1rem; z-index: 210;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--salon); color: #fff; border: none;
  font-size: 1.6rem; line-height: 1; cursor: pointer; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(79,110,247,.45); transition: all .18s;
}
.fab-nueva:hover { transform: scale(1.08); }
@media (max-width: 640px) { .fab-nueva { display: flex; } }

/* ── Colores por espacio ── */
:root {
  --aula1:        #4F6EF7;
  --aula2:        #9D5CFF;
  --cine:         #F7604F;
  --conferencias: #20C997;
  --ingreso:      #F59E0B;
  --puntodigital1: #00B8D9;
  --puntodigital2: #0747A6;
}

/* Filtro chips */
.filtro-chip.active.aula1        { border-color: var(--aula1);        color: var(--aula1);        background: rgba(79,110,247,.06); }
.filtro-chip.active.aula2        { border-color: var(--aula2);        color: var(--aula2);        background: rgba(157,92,255,.06); }
.filtro-chip.active.cine         { border-color: var(--cine);         color: var(--cine);         background: rgba(247,96,79,.06); }
.filtro-chip.active.conferencias { border-color: var(--conferencias); color: var(--conferencias); background: rgba(32,201,151,.06); }
.filtro-chip.active.ingreso      { border-color: var(--ingreso);      color: var(--ingreso);      background: rgba(245,158,11,.06); }
.filtro-chip.active.puntodigital1 { border-color: var(--puntodigital1); color: var(--puntodigital1); background: rgba(0,184,217,.06); }
.filtro-chip.active.puntodigital2 { border-color: var(--puntodigital2); color: var(--puntodigital2); background: rgba(7,71,166,.06); }

/* Eventos en calendario */
.cal-evento.aula1        { background: rgba(79,110,247,.13);  color: #3555d0; border-left-color: var(--aula1); }
.cal-evento.aula2        { background: rgba(157,92,255,.13);  color: #7a3cc4; border-left-color: var(--aula2); }
.cal-evento.cine         { background: rgba(247,96,79,.12);   color: #c43a2b; border-left-color: var(--cine); }
.cal-evento.conferencias { background: rgba(32,201,151,.12);  color: #0e8a67; border-left-color: var(--conferencias); }
.cal-evento.ingreso      { background: rgba(245,158,11,.13);  color: #b45309; border-left-color: var(--ingreso); }
.cal-evento.puntodigital1 { background: rgba(0,184,217,.13); color: #00708a; border-left-color: var(--puntodigital1); }
.cal-evento.puntodigital2 { background: rgba(7,71,166,.13);  color: #0747a6; border-left-color: var(--puntodigital2); }

/* Semana / día */
.sem-evento.aula1        { background: rgba(79,110,247,.15);  border-color: var(--aula1);        color: #2d4bc4; }
.sem-evento.aula2        { background: rgba(157,92,255,.15);  border-color: var(--aula2);        color: #7a3cc4; }
.sem-evento.cine         { background: rgba(247,96,79,.13);   border-color: var(--cine);         color: #c43a2b; }
.sem-evento.conferencias { background: rgba(32,201,151,.13);  border-color: var(--conferencias); color: #0e8a67; }
.sem-evento.ingreso      { background: rgba(245,158,11,.14);  border-color: var(--ingreso);      color: #b45309; }
.sem-evento.puntodigital1 { background: rgba(0,184,217,.15); border-color: var(--puntodigital1); color: #00708a; }
.sem-evento.puntodigital2 { background: rgba(7,71,166,.15);  border-color: var(--puntodigital2); color: #0747a6; }

.dia-evento.aula1        { background: rgba(79,110,247,.13);  border-color: var(--aula1);        color: #2d4bc4; }
.dia-evento.aula2        { background: rgba(157,92,255,.13);  border-color: var(--aula2);        color: #7a3cc4; }
.dia-evento.cine         { background: rgba(247,96,79,.10);   border-color: var(--cine);         color: #c43a2b; }
.dia-evento.conferencias { background: rgba(32,201,151,.10);  border-color: var(--conferencias); color: #0e8a67; }
.dia-evento.ingreso      { background: rgba(245,158,11,.12);  border-color: var(--ingreso);      color: #b45309; }
.dia-evento.puntodigital1 { background: rgba(0,184,217,.10); border-color: var(--puntodigital1); color: #00708a; }
.dia-evento.puntodigital2 { background: rgba(7,71,166,.10);  border-color: var(--puntodigital2); color: #0747a6; }

/* Lista */
.lista-dot.aula1        { background: var(--aula1); }
.lista-dot.aula2        { background: var(--aula2); }
.lista-dot.cine         { background: var(--cine); }
.lista-dot.conferencias { background: var(--conferencias); }
.lista-dot.ingreso      { background: var(--ingreso); }
.lista-dot.puntodigital1 { background: var(--puntodigital1); }
.lista-dot.puntodigital2 { background: var(--puntodigital2); }

.lista-tag.aula1        { background: rgba(79,110,247,.1);  color: #3555d0; }
.lista-tag.aula2        { background: rgba(157,92,255,.1);  color: #7a3cc4; }
.lista-tag.cine         { background: rgba(247,96,79,.1);   color: #d94a3a; }
.lista-tag.conferencias { background: rgba(32,201,151,.1);  color: #0e8a67; }
.lista-tag.ingreso      { background: rgba(245,158,11,.1);  color: #b45309; }
.lista-tag.puntodigital1 { background: rgba(0,184,217,.1); color: #00708a; }
.lista-tag.puntodigital2 { background: rgba(7,71,166,.1);  color: #0747a6; }

/* Detail badge */
.detail-espacio-badge.aula1        { background: rgba(79,110,247,.1);  color: #3555d0; }
.detail-espacio-badge.aula1  .dot  { background: var(--aula1); }
.detail-espacio-badge.aula2        { background: rgba(157,92,255,.1);  color: #7a3cc4; }
.detail-espacio-badge.aula2  .dot  { background: var(--aula2); }
.detail-espacio-badge.cine         { background: rgba(247,96,79,.1);   color: #d94a3a; }
.detail-espacio-badge.cine   .dot  { background: var(--cine); }
.detail-espacio-badge.conferencias { background: rgba(32,201,151,.1);  color: #0e8a67; }
.detail-espacio-badge.conferencias .dot { background: var(--conferencias); }
.detail-espacio-badge.ingreso      { background: rgba(245,158,11,.1);  color: #b45309; }
.detail-espacio-badge.ingreso .dot { background: var(--ingreso); }
.detail-espacio-badge.puntodigital1 { background: rgba(0,184,217,.1); color: #00708a; }
.detail-espacio-badge.puntodigital1 .dot { background: var(--puntodigital1); }
.detail-espacio-badge.puntodigital2 { background: rgba(7,71,166,.1);  color: #0747a6; }
.detail-espacio-badge.puntodigital2 .dot { background: var(--puntodigital2); }

/* ── Banner hoy ── */
@keyframes slideUp {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Logo más grande en sidebar */
.sidebar-logo { padding: 1rem; min-height: 72px; }
.sidebar-logo-img     { width: 56px !important; height: 56px !important; border-radius: 10px !important; }
.sidebar-logo-placeholder { width: 56px !important; height: 56px !important; border-radius: 10px !important; font-size: 1.2rem !important; }

/* ── Logo más grande ── */
.sidebar-logo-img { width: 57px !important; height: 57px !important; }
.sidebar-logo-placeholder { width: 57px !important; height: 57px !important; font-size: 1.3rem !important; }

/* ── Banner de hoy ── */
.banner-hoy {
  background: linear-gradient(135deg, rgba(79,110,247,.08) 0%, rgba(79,110,247,.04) 100%);
  border: 1.5px solid rgba(79,110,247,.2);
  border-radius: var(--radius); padding: .75rem 1rem;
  margin-bottom: .85rem; display: flex; align-items: flex-start;
  gap: .75rem; animation: bannerSlide .35s ease;
}
@media (max-width: 640px) {
  .banner-hoy { margin-right: 0; }
}
@keyframes bannerSlide {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.banner-hoy-inner { flex: 1; }
.banner-hoy-title { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; font-size: .82rem; flex-wrap: wrap; }
.banner-hoy-icon  { font-size: 1rem; }
.banner-hoy-count { background: var(--salon); color: #fff; font-size: .67rem; font-weight: 700; padding: .1rem .5rem; border-radius: 20px; }
.banner-hoy-eventos { display: flex; flex-wrap: wrap; gap: .4rem; }
.banner-item {
  display: inline-flex; align-items: center; gap: .35rem;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: .25rem .7rem; font-size: .76rem;
  cursor: pointer; transition: all .16s;
}
.banner-item:hover { border-color: var(--salon); background: rgba(79,110,247,.05); }
.banner-item em { font-style: normal; color: var(--text2); }
.banner-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.banner-dot.aula1        { background: var(--aula1); }
.banner-dot.aula2        { background: var(--aula2); }
.banner-dot.cine         { background: var(--cine); }
.banner-dot.conferencias { background: var(--conferencias); }
.banner-dot.ingreso      { background: var(--ingreso); }
.banner-dot.puntodigital1 { background: var(--puntodigital1); }
.banner-dot.puntodigital2 { background: var(--puntodigital2); }
.banner-close { background: none; border: none; color: var(--text3); cursor: pointer; font-size: .85rem; padding: .2rem; border-radius: 5px; flex-shrink: 0; transition: color .15s; align-self: flex-start; }
.banner-close:hover { color: var(--danger); }

/* ── Sidebar logout button ── */
.sidebar-logout {
  padding: .5rem .7rem .8rem;
  flex-shrink: 0;
}
.btn-logout-full {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .55rem; border-radius: 8px; cursor: pointer;
  background: rgba(239,68,68,.1); color: #ef6060;
  border: 1.5px solid rgba(239,68,68,.25);
  font-family: 'Outfit', sans-serif; font-weight: 600; font-size: .8rem;
  transition: all .18s;
}
.btn-logout-full:hover { background: rgba(239,68,68,.2); border-color: rgba(239,68,68,.4); color: #ef4444; }
.btn-logout-full svg { flex-shrink: 0; }

/* En sidebar colapsada (tablet) solo mostrar icono */
@media (max-width: 900px) {
  .sidebar-logout { padding: .4rem .3rem .6rem; }
  .btn-logout-full span { display: none; }
  .btn-logout-full { padding: .5rem; justify-content: center; }
}
/* En drawer abierto mostrar texto */
.sidebar.drawer-open .btn-logout-full span { display: inline; }
.sidebar.drawer-open .btn-logout-full { justify-content: center; }
/* En mobile ocultar sidebar-logout (se usa btn-logout-top) */
@media (max-width: 640px) {
  .sidebar-logout { display: none; }
  .sidebar.drawer-open .sidebar-logout { display: block; }
}

/* ── Detail icon fix ── */
.detail-icon {
  width: 18px; flex-shrink: 0; display: flex;
  align-items: center; justify-content: center;
  color: var(--text3); margin-top: 1px;
}
.detail-icon svg { display: block; }

/* ── Password fields ── */
.pass-wrap { position: relative; }
.pass-wrap input { padding-right: 2.6rem !important; }
.pass-toggle {
  position: absolute; right: .6rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; color: var(--text3);
  padding: .2rem; display: flex; align-items: center; transition: color .16s;
}
.pass-toggle:hover { color: var(--text2); }

/* ── Field error ── */
.field-error {
  background: rgba(239,68,68,.08); border: 1.5px solid rgba(239,68,68,.2);
  color: var(--danger); padding: .5rem .8rem; border-radius: 7px;
  font-size: .78rem; margin-bottom: .85rem;
}

/* ── Change pass button in sidebar ── */
.btn-change-pass {
  background: none; border: none; color: var(--sidebar-accent);
  font-size: .62rem; cursor: pointer; padding: 0; margin-top: .1rem;
  font-family: 'Outfit', sans-serif; text-decoration: underline;
  text-underline-offset: 2px; opacity: .8; transition: opacity .16s;
  display: block;
}
.btn-change-pass:hover { opacity: 1; }
@media (max-width: 900px) {
  .btn-change-pass { display: none; }
  .sidebar.drawer-open .btn-change-pass { display: block; }
}

/* ── Detail panel drawer (mobile) ── */
.detail-panel-header {
  display: flex; align-items: center; justify-content: space-between;
}
.detail-panel-close {
  display: none; background: none; border: none; color: var(--text2);
  font-size: 1rem; cursor: pointer; width: 28px; height: 28px;
  border-radius: 6px; align-items: center; justify-content: center;
  transition: all .15s;
}
.detail-panel-close:hover { background: var(--bg); color: var(--text); }

@media (max-width: 640px) {
  /* Detail panel oculto por defecto, aparece como drawer desde la derecha */
  .detail-panel {
    display: none;
    position: fixed; right: 0; top: 0; bottom: 0; z-index: 260;
    width: 88vw !important; max-width: 340px;
    box-shadow: -4px 0 24px rgba(0,0,0,.2);
    border-left: 1px solid var(--border);
    flex-direction: column;
  }
  .detail-panel.drawer-open {
    display: flex !important;
    animation: detailDrawerIn .22s ease;
  }
  @keyframes detailDrawerIn {
    from { transform: translateX(100%); }
    to   { transform: translateX(0); }
  }
  .detail-panel-close { display: flex; }
  .detail-content { overflow-y: auto; }
}

/* ── Banner hoy — fix mobile ── */
@media (max-width: 640px) {
  .banner-hoy {
    flex-direction: column; gap: .5rem; padding: .65rem .75rem;
  }
  .banner-hoy-title {
    font-size: .8rem; gap: .4rem;
  }
  .banner-hoy-eventos {
    gap: .35rem;
  }
  .banner-item {
    font-size: .72rem; padding: .22rem .6rem;
    max-width: 100%;
  }
  .banner-item em {
    display: none; /* ocultar espacio en mobile para compactar */
  }
  .banner-close {
    position: absolute; top: .5rem; right: .5rem;
  }
  .banner-hoy { position: relative; }
}

/* ── Dashboard ── */
.dash-cards {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: .85rem;
  margin-bottom: 1.4rem;
}
@media (max-width: 600px) { .dash-cards { grid-template-columns: repeat(2, 1fr); } }

.dash-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem 1rem;
  border-left: 4px solid var(--salon); text-align: center;
}
.dash-card.verde  { border-left-color: #20C997; }
.dash-card.azul   { border-left-color: #00B8D9; }
.dash-card.naranja{ border-left-color: #F59E0B; }
.dash-card-num   { font-size: 2rem; font-weight: 800; color: var(--text); line-height: 1; }
.dash-card-label { font-size: .72rem; color: var(--text2); margin-top: .3rem; text-transform: uppercase; letter-spacing: .05em; }

.dash-section { margin-bottom: 1.5rem; }
.dash-section-title {
  font-size: .82rem; font-weight: 700; color: var(--text2);
  text-transform: uppercase; letter-spacing: .07em;
  margin-bottom: .85rem; padding-bottom: .4rem;
  border-bottom: 1px solid var(--border);
}

/* Barras horizontales por espacio */
.dash-bars { display: flex; flex-direction: column; gap: .55rem; }
.dash-bar-row { display: flex; align-items: center; gap: .7rem; }
.dash-bar-label {
  width: 150px; flex-shrink: 0; font-size: .78rem; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dash-bar-track {
  flex: 1; height: 10px; background: var(--bg);
  border-radius: 20px; overflow: hidden;
}
.dash-bar-fill { height: 100%; border-radius: 20px; transition: width .5s ease; }
.dash-bar-val { width: 100px; flex-shrink: 0; font-size: .73rem; color: var(--text2); text-align: right; }

/* Gráfico de columnas mensual */
.dash-col-chart {
  display: flex; align-items: stretch; gap: 3px;
  height: 120px; padding-bottom: 22px; position: relative;
  border-bottom: 1px solid var(--border);
}
.dash-col-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; position: relative;
}
.dash-col-bar-wrap {
  width: 100%; flex: 1; display: flex; align-items: flex-end;
}
.dash-col-bar {
  width: 80%; margin: 0 auto; background: var(--salon);
  border-radius: 3px 3px 0 0; min-height: 2px;
  transition: height .4s ease;
}
.dash-col-val { font-size: .6rem; color: var(--text2); margin-top: 2px; height: 10px; }
.dash-col-mes { font-size: .6rem; color: var(--text2); position: absolute; bottom: -18px; }

/* Tabla dashboard */
.dash-table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.dash-table th {
  background: var(--bg); color: var(--text2); font-size: .7rem;
  text-transform: uppercase; letter-spacing: .05em;
  padding: .5rem .7rem; text-align: left; font-weight: 600;
}
.dash-table td { padding: .5rem .7rem; border-bottom: 1px solid var(--border); color: var(--text); }
.dash-table tr:last-child td { border-bottom: none; }
.dash-table tr:hover td { background: var(--bg); }
.dash-hoy-row td { background: rgba(79,110,247,.06); }

/* Nav Dashboard */
#navDashboard .nav-icon { font-size: .85rem; }

/* ── Generador de informes por período (modal Dashboard) ── */
.dash-informe-bar {
  display: flex; align-items: center; gap: .8rem; flex-wrap: wrap;
  padding: .85rem 1.1rem; border-top: 1px solid var(--border);
  background: var(--bg);
}
.dash-informe-label {
  font-size: .78rem; font-weight: 700; color: var(--text2);
  text-transform: uppercase; letter-spacing: .05em; flex-shrink: 0;
}
.dash-informe-controls {
  display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; flex: 1;
}
.dash-informe-controls select,
.dash-informe-controls input {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: .4rem .6rem; font-size: .8rem;
  color: var(--text); font-family: inherit;
}
.dash-informe-controls .btn-secondary {
  padding: .42rem 1rem; font-size: .8rem; white-space: nowrap;
}

@media (max-width: 640px) {
  .dash-informe-bar { flex-direction: column; align-items: stretch; gap: .5rem; }
  .dash-informe-controls { width: 100%; }
  .dash-informe-controls select,
  .dash-informe-controls input { flex: 1; min-width: 0; }
}

/* ── Repetir / Replicar reserva ── */
.repetir-wrap { border-top: 1px solid var(--border); padding-top: .85rem; margin-top: .3rem; }
.check-repetir {
  display: flex; align-items: center; gap: .5rem;
  font-size: .82rem; font-weight: 600; color: var(--text);
  text-transform: none; letter-spacing: 0; cursor: pointer;
}
.check-repetir input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--salon); cursor: pointer; }

.repetir-opciones { margin-top: .7rem; padding: .75rem .85rem; background: var(--bg); border-radius: 10px; }

.repetir-tabs { display: flex; gap: .4rem; flex-wrap: wrap; }
.repetir-tab {
  background: var(--surface); border: 1.5px solid var(--border); color: var(--text2);
  padding: .38rem .75rem; border-radius: 20px; font-size: .74rem; font-weight: 600;
  cursor: pointer; transition: all .16s; font-family: 'Outfit', sans-serif;
}
.repetir-tab:hover { border-color: var(--salon); color: var(--salon); }
.repetir-tab.active { background: var(--salon); border-color: var(--salon); color: #fff; }

.dias-semana-check {
  display: flex; flex-wrap: wrap; gap: .5rem .7rem;
}
.dias-semana-check label {
  display: flex; align-items: center; gap: .3rem;
  font-size: .78rem; color: var(--text); cursor: pointer;
  text-transform: none; letter-spacing: 0; font-weight: 500;
}
.dias-semana-check input[type="checkbox"] { width: 14px; height: 14px; accent-color: var(--salon); cursor: pointer; }

.repetir-hint {
  font-size: .7rem; color: var(--text2); margin-top: .6rem;
  line-height: 1.4; font-style: italic;
}

/* Responsive: en mobile los tabs y el input de cantidad se acomodan sin romper */
@media (max-width: 640px) {
  .repetir-tabs { gap: .3rem; }
  .repetir-tab { padding: .32rem .6rem; font-size: .7rem; }
  .repetir-opciones { padding: .65rem .7rem; }
  .dias-semana-check { gap: .4rem .55rem; }
}

/* ── Firma del autor (sidebar) ── */
.sidebar-firma {
  padding: .55rem .3rem .7rem;
  font-size: .62rem; color: var(--sidebar-text);
  opacity: .55; text-align: center; line-height: 1.35;
  border-top: 1px solid rgba(255,255,255,.08);
  margin-top: .25rem;
}

/* ── Crear usuario (panel admin) ── */
.admin-nuevo {
  border-top: 1px solid var(--border);
  padding-top: 1rem; margin-bottom: 1.1rem;
}
.admin-nuevo-title {
  font-weight: 700; font-size: .88rem; margin-bottom: .55rem;
}
.admin-nuevo-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 0 .8rem;
}
@media (max-width: 600px) { .admin-nuevo-grid { grid-template-columns: 1fr; } }
.admin-nuevo .field { margin-bottom: .65rem; }
.admin-nuevo .btn-primary { margin-top: .15rem; }

/* ── Almacenamiento (dentro del Dashboard) ── */
.almacen-cargando {
  font-size: .82rem; color: var(--text2); padding: .6rem 0;
}
.almacen-resumen {
  display: flex; align-items: baseline; justify-content: space-between; gap: .6rem;
  flex-wrap: wrap; margin-bottom: .55rem;
}
.almacen-num { display: flex; align-items: baseline; gap: .4rem; }
.almacen-usado { font-size: 1.55rem; font-weight: 800; color: var(--text); line-height: 1; }
.almacen-de { font-size: .78rem; color: var(--text2); }
.almacen-libre { font-size: .78rem; color: var(--success); font-weight: 600; }

.almacen-barra {
  height: 10px; background: var(--bg); border-radius: 20px;
  overflow: hidden; border: 1px solid var(--border);
}
.almacen-barra-fill {
  height: 100%; background: var(--salon); border-radius: 20px;
  transition: width .5s ease;
}
.almacen-barra.alto .almacen-barra-fill { background: var(--warning); }
.almacen-barra.critico .almacen-barra-fill { background: var(--danger); }
.almacen-pct { font-size: .72rem; color: var(--text2); margin: .35rem 0 1rem; }

.almacen-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1rem;
  margin-bottom: 1rem;
}
@media (max-width: 640px) { .almacen-grid { grid-template-columns: 1fr; } }

.almacen-tabla-titulo {
  font-size: .68rem; font-weight: 700; color: var(--text2);
  text-transform: uppercase; letter-spacing: .05em;
  padding-bottom: .35rem; border-bottom: 1px solid var(--border); margin-bottom: .4rem;
}
.almacen-fila {
  display: flex; align-items: baseline; justify-content: space-between; gap: .6rem;
  padding: .34rem 0; border-bottom: 1px dashed var(--border);
  font-size: .78rem;
}
.almacen-fila:last-child { border-bottom: none; }
.almacen-fila-nombre { color: var(--text); display: flex; flex-direction: column; }
.almacen-fila-nombre em {
  font-style: normal; font-size: .68rem; color: var(--text3); margin-top: .08rem;
}
.almacen-fila-bytes { color: var(--text2); font-variant-numeric: tabular-nums; white-space: nowrap; }

.almacen-anio {
  display: flex; align-items: center; gap: .55rem;
  padding: .34rem 0; border-bottom: 1px dashed var(--border); font-size: .78rem;
}
.almacen-anio:last-of-type { border-bottom: none; }
.almacen-anio-nombre { font-weight: 700; min-width: 36px; }
.almacen-anio-total { color: var(--text2); flex: 1; }
.almacen-anio-estado {
  font-size: .62rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
  padding: .16rem .44rem; border-radius: 20px; white-space: nowrap;
}
.almacen-anio-estado.liberable { background: rgba(245,158,11,.12); color: #B45309; }
.almacen-anio-estado.en-uso { background: rgba(34,197,94,.12); color: #15803D; }
.almacen-vacio { font-size: .78rem; color: var(--text2); }
.almacen-nota {
  font-size: .68rem; color: var(--text3); line-height: 1.45;
  margin-top: .55rem; font-style: italic;
}

.almacen-acciones {
  display: flex; gap: .5rem; flex-wrap: wrap;
  padding-top: .9rem; border-top: 1px solid var(--border);
}

/* ── Modal liberar espacio ── */
.aviso-peligro {
  background: rgba(239,68,68,.06); border: 1px solid rgba(239,68,68,.2);
  border-left: 4px solid var(--danger);
  border-radius: 8px; padding: .7rem .85rem;
  font-size: .78rem; color: #991B1B; line-height: 1.5;
}
.aviso-peligro strong { display: block; margin-bottom: .15rem; color: #7F1D1D; }

.lib-detalle { font-size: .74rem; color: var(--text2); margin-top: .35rem; }

.lib-paso {
  display: flex; gap: .7rem; align-items: flex-start;
  margin-top: 1rem; padding: .8rem .85rem;
  background: var(--bg); border-radius: 10px;
}
.lib-paso-num {
  width: 22px; height: 22px; flex-shrink: 0; border-radius: 50%;
  background: var(--sidebar-bg); color: #fff;
  font-size: .72rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.lib-paso-cuerpo { flex: 1; min-width: 0; }
.lib-paso-titulo { font-size: .82rem; font-weight: 700; color: var(--text); }
.lib-paso-texto { font-size: .74rem; color: var(--text2); margin: .15rem 0 .55rem; line-height: 1.45; }
.lib-paso-botones { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.lib-hecho { font-size: .72rem; color: var(--success); font-weight: 700; }

.lib-input {
  width: 100%; background: var(--surface); border: 1.5px solid var(--border);
  border-radius: 8px; padding: .5rem .8rem; font-family: 'Outfit', sans-serif;
  font-size: .9rem; letter-spacing: .12em; color: var(--text); outline: none;
  transition: border-color .16s;
}
.lib-input:focus { border-color: var(--danger); }

#libBtnBorrar:disabled,
.btn-danger:disabled {
  opacity: .45; cursor: not-allowed;
}
