/* ═══════════════════════════════════════════════════
   SISTEMA RESERVAS — ESTILOS GLOBALES
   Verde/Blanco — Minimalista
═══════════════════════════════════════════════════ */

:root {
  --verde-oscuro:  #1B4332;
  --verde-medio:   #2D6A4F;
  --verde-claro:   #52B788;
  --verde-xclaro:  #74C69D;
  --verde-pale:    #D8F3DC;
  --verde-bg:      #F2FAF5;
  --sidebar-w:     230px;
  --topbar-h:      60px;
  --border-color:  #E9ECEF;
  --text-muted:    #6C757D;
  --shadow-sm:     0 1px 3px rgba(0,0,0,.06);
  --shadow-md:     0 4px 12px rgba(0,0,0,.08);
  --radius:        10px;
  --radius-sm:     6px;
  --sidebar-w-min: 62px;
}

/* ─── RESET & BASE ─────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { overflow-y: scroll; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 14px;
  background: #F4F6F8;
  color: #212529;
  margin: 0;
  min-height: 100vh;
}
a { text-decoration: none; color: inherit; }
h1,h2,h3,h4,h5,h6 { font-weight: 600; }

/* ─── LAYOUT ────────────────────────────────────── */
.app-wrapper { min-height: 100vh; }

/* ─── SIDEBAR ────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--verde-oscuro);
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: width .2s;
}
.sidebar-brand {
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-brand .brand-icon {
  width: 36px; height: 36px;
  background: var(--verde-claro);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.sidebar-brand .brand-text {
  line-height: 1.2;
}
.sidebar-brand .brand-name {
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  white-space: nowrap;
}
.sidebar-brand .brand-sub {
  font-size: 11px;
  color: rgba(255,255,255,.5);
}
.sidebar-nav {
  flex: 1;
  padding: 12px 0;
  overflow-y: auto;
}
.sidebar-nav::-webkit-scrollbar { width: 0; }
.sidebar-section-label {
  padding: 16px 20px 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: rgba(255,255,255,.35);
}
.nav-item-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: rgba(255,255,255,.7);
  font-size: 13.5px;
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all .15s;
  cursor: pointer;
}
.nav-item-link i {
  font-size: 16px;
  flex-shrink: 0;
  width: 20px;
  text-align: center;
}
.nav-item-link:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
}
.nav-item-link.active {
  background: rgba(116,198,157,.15);
  color: var(--verde-xclaro);
  border-left-color: var(--verde-xclaro);
}
.sidebar-footer {
  padding: 12px 20px;
  border-top: 1px solid rgba(255,255,255,.1);
  display: flex;
  align-items: center;
  gap: 10px;
}
.sidebar-footer .user-avatar {
  width: 32px; height: 32px;
  background: var(--verde-medio);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
.sidebar-footer .user-info { line-height: 1.3; }
.sidebar-footer .user-name { font-size: 12.5px; font-weight: 600; color: #fff; }
.sidebar-footer .user-role { font-size: 11px; color: rgba(255,255,255,.45); }

/* ─── TOPBAR ─────────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0;
  left: var(--sidebar-w);
  right: 0;
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 12px;
  z-index: 99;
}
.topbar-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--verde-oscuro);
  flex: 1;
}
.topbar-title small {
  font-size: 12px;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 8px;
}
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.topbar-btn {
  width: 36px; height: 36px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
  transition: all .15s;
}
.topbar-btn:hover { border-color: var(--verde-claro); color: var(--verde-medio); }
.topbar-btn .badge-dot {
  position: absolute;
  top: 5px; right: 5px;
  width: 7px; height: 7px;
  background: #ef4444;
  border-radius: 50%;
  border: 1.5px solid #fff;
}

/* ─── MAIN CONTENT ───────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  margin-top: var(--topbar-h);
  padding: 24px 24px 48px;
  min-height: calc(100vh - var(--topbar-h));
}

/* ─── CARDS ──────────────────────────────────────── */
.card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-header {
  background: transparent;
  border-bottom: 1px solid var(--border-color);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.card-header .card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--verde-oscuro);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}
.card-header .card-title i { color: var(--verde-claro); font-size: 16px; }
.card-body { padding: 18px; }

/* ─── STAT CARDS ─────────────────────────────────── */
.stat-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.stat-card .stat-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.stat-card .stat-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 4px;
}
.stat-card .stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--verde-oscuro);
  line-height: 1;
}
.stat-card .stat-sub {
  font-size: 11.5px;
  color: var(--text-muted);
  margin-top: 4px;
}
.stat-card .stat-sub .up { color: #22c55e; }
.stat-card .stat-sub .down { color: #ef4444; }

.stat-icon.verde-bg   { background: var(--verde-bg);   color: var(--verde-medio); }
.stat-icon.green-bg   { background: #dcfce7;            color: #16a34a; }
.stat-icon.blue-bg    { background: #dbeafe;            color: #2563eb; }
.stat-icon.amber-bg   { background: #fef3c7;            color: #d97706; }
.stat-icon.rose-bg    { background: #ffe4e6;            color: #e11d48; }

/* ─── BADGES OTA ─────────────────────────────────── */
.ota-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-directo { background: var(--verde-pale); color: var(--verde-medio); }
.badge-booking { background: #dbeafe; color: #1e40af; }
.badge-airbnb  { background: #ffe4e6; color: #be123c; }
.badge-expedia { background: #fef9c3; color: #854d0e; }

/* ─── TABLES ─────────────────────────────────────── */
.table-clean th {
  font-size: 11.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color) !important;
  padding: 10px 14px;
  white-space: nowrap;
}
.table-clean td {
  padding: 10px 14px;
  vertical-align: middle;
  border-bottom: 1px solid #f1f3f4;
  font-size: 13.5px;
}
.table-clean tbody tr:last-child td { border-bottom: 0; }
.table-clean tbody tr:hover td { background: var(--verde-bg); }

/* ─── CALENDAR GRID ──────────────────────────────── */
.cal-wrapper { overflow-x: auto; }
.cal-table-wrapper {
  min-width: 900px;
}
.cal-header-row {
  display: flex;
  background: var(--verde-bg);
  border-bottom: 2px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 10;
}
.cal-cabin-label {
  width: 160px;
  flex-shrink: 0;
  padding: 10px 12px;
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  border-right: 1px solid var(--border-color);
}
.cal-days-header {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(31, 1fr);
}
.cal-day-head {
  padding: 8px 0;
  text-align: center;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--texto-suave, #555);
  border-right: 1px solid var(--border-color);
}
.cal-day-head.today {
  background: var(--verde-medio);
  color: #fff;
  font-weight: 800;
}
.cal-day-head.weekend { background: #fafafa; color: #999; }

.cal-body-row {
  display: flex;
  border-bottom: 1px solid var(--border-color);
  min-height: 90px;
}
.cal-body-row:hover { background: #fafffe; }
.cal-cabin-name {
  width: 160px;
  flex-shrink: 0;
  padding: 14px 12px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--verde-oscuro);
  background: #eaf6ee;
  border-right: 1px solid #c3e6cb;
  border-left: 3px solid var(--verde-medio);
  display: flex;
  align-items: flex-start;
  flex-direction: column;
  gap: 3px;
}
.cal-cabin-name small { font-size: 11px; color: #6a9a75; font-weight: 400; }
.cal-cells-container {
  flex: 1;
  position: relative;
  display: grid;
  grid-template-columns: repeat(31, 1fr);
}
.cal-day-bg {
  border-right: 1px solid #f0f0f0;
  min-height: 90px;
}
.cal-day-bg.today-col {
  background: rgba(82,183,136,.10);
  border-left: 2px solid rgba(82,183,136,.40);
}
.cal-day-bg.weekend-col { background: #fafafa; }
.cal-reservations-layer {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
}
.cal-res-block {
  position: absolute;
  top: 14px;
  height: 52px;
  border-radius: 5px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  pointer-events: all;
  cursor: pointer;
  z-index: 2;
  transition: filter .15s, transform .1s;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.cal-res-block:hover {
  filter: brightness(.92);
  transform: translateY(-1px);
  z-index: 5;
}
.cal-res-block.directo { background: var(--verde-medio); color: #fff; }
.cal-res-block.booking { background: #1a56db; color: #fff; }
.cal-res-block.airbnb  { background: #ff385c; color: #fff; }
.cal-res-block.expedia { background: #f5c518; color: #1a1a1a; }

/* calendar legend */
.cal-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
.cal-legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: #444;
}
.cal-legend-dot {
  width: 12px; height: 12px;
  border-radius: 3px;
}

/* ─── FORMS ──────────────────────────────────────── */
.form-label {
  font-size: 12.5px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 5px;
}
.form-control, .form-select {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  padding: 8px 12px;
  transition: border-color .15s, box-shadow .15s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--verde-claro);
  box-shadow: 0 0 0 3px rgba(82,183,136,.15);
  outline: none;
}

/* ─── BUTTONS ────────────────────────────────────── */
.btn-verde {
  background: var(--verde-medio);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: background .15s;
}
.btn-verde:hover { background: var(--verde-oscuro); color: #fff; }
.btn-verde-outline {
  background: transparent;
  color: var(--verde-medio);
  border: 1.5px solid var(--verde-claro);
  border-radius: var(--radius-sm);
  padding: 7px 14px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all .15s;
}
.btn-verde-outline:hover {
  background: var(--verde-bg);
  border-color: var(--verde-medio);
}
.btn-icon {
  width: 32px; height: 32px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .15s;
  font-size: 14px;
}
.btn-icon:hover { border-color: var(--verde-claro); color: var(--verde-medio); background: var(--verde-bg); }
.btn-icon.danger:hover { border-color: #fca5a5; color: #ef4444; background: #fff5f5; }

/* ─── CABIN CARDS ────────────────────────────────── */
.cabin-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .2s;
}
.cabin-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.cabin-card .cabin-img {
  width: 100%;
  height: 160px;
  object-fit: cover;
}
.cabin-card .cabin-body { padding: 14px 16px; }
.cabin-card .cabin-name { font-size: 15px; font-weight: 700; color: var(--verde-oscuro); }
.cabin-card .cabin-tipo { font-size: 11.5px; color: var(--text-muted); margin-bottom: 10px; }
.cabin-card .cabin-stats {
  display: flex;
  gap: 14px;
  font-size: 12.5px;
  color: #555;
  margin-bottom: 12px;
}
.cabin-card .cabin-stats i { color: var(--verde-claro); }
.cabin-card .cabin-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--verde-medio);
}
.cabin-card .cabin-price span { font-size: 12px; font-weight: 400; color: var(--text-muted); }
.cabin-card .cabin-footer {
  padding: 10px 16px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.cabin-amenidades {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-top: 10px;
  margin-top: 10px;
  border-top: 1px solid #f0f0f0;
}
.amenidad-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: #eaf6ee;
  color: #2D6A4F;
  font-size: 13px;
  cursor: default;
  transition: background .15s, transform .1s;
}
.amenidad-icon:hover { background: #c8e6cc; transform: scale(1.1); }

/* ─── STATUS PILL ────────────────────────────────── */
.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.status-pill::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}
/* ─── PAGO BADGES ────────────────────────────────── */
.pago-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}
.pago-pagado      { background: #dcfce7; color: #166534; }
.pago-sinpagar    { background: #fee2e2; color: #991b1b; }
.pago-parcial     { background: #fef9c3; color: #854d0e; }
.pago-reembolsado { background: #e0e7ff; color: #3730a3; }

.status-disponible { background: #dcfce7; color: #16a34a; }
.status-ocupada     { background: #fee2e2; color: #dc2626; }
.status-mantenimiento { background: #fef3c7; color: #d97706; }
.status-confirmada  { background: #dcfce7; color: #16a34a; }
.status-pendiente   { background: #fef3c7; color: #d97706; }
.status-cancelada   { background: #fee2e2; color: #dc2626; }
.status-completada  { background: #f3f4f6; color: #6b7280; }
.status-en_casa     { background: #dbeafe; color: #1e40af; }

/* ─── CHANNEL MANAGER ────────────────────────────── */
.ota-card {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
}
.ota-card .ota-logo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.ota-logo {
  height: 28px;
  display: flex;
  align-items: center;
  font-size: 16px;
  font-weight: 800;
  gap: 6px;
}
.ota-logo.booking { color: #003580; }
.ota-logo.airbnb  { color: #ff385c; }
.ota-logo.expedia { color: #f00; }
.ota-status-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
}
.dot-on  { background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,.2); }
.dot-off { background: #ef4444; }
.dot-warn{ background: #f59e0b; }

/* ─── WHATSAPP CHAT ──────────────────────────────── */
.chat-window {
  background: #e5ddd5;
  border-radius: var(--radius);
  padding: 16px;
  height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.chat-msg {
  max-width: 75%;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13.5px;
  line-height: 1.5;
  position: relative;
}
.chat-msg .chat-time {
  font-size: 10px;
  color: rgba(0,0,0,.4);
  margin-top: 3px;
  text-align: right;
}
.chat-msg.huesped {
  background: #fff;
  align-self: flex-start;
  border-bottom-left-radius: 2px;
}
.chat-msg.asistente {
  background: #dcf8c6;
  align-self: flex-end;
  border-bottom-right-radius: 2px;
}
.chat-msg.sistema {
  background: rgba(0,0,0,.07);
  align-self: center;
  font-size: 11.5px;
  color: #555;
  text-align: center;
}

/* ─── CONFIGURACION ──────────────────────────────── */
.config-section {
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  margin-bottom: 16px;
}
.config-section-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.config-section-header .config-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.config-section-title { font-size: 14px; font-weight: 600; color: var(--verde-oscuro); }
.config-section-sub   { font-size: 12px; color: var(--text-muted); }
.config-section-body  { padding: 18px; }
.api-key-input {
  font-family: 'Courier New', monospace;
  font-size: 12.5px;
  letter-spacing: .03em;
}
.connection-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}
.conn-ok   { background: #dcfce7; color: #166534; }
.conn-err  { background: #fee2e2; color: #991b1b; }
.conn-idle { background: #f3f4f6; color: #6b7280; }

/* ─── OCCUPANCY BAR ──────────────────────────────── */
.occ-bar-wrap { background: var(--border-color); border-radius: 20px; height: 8px; overflow: hidden; }
.occ-bar-fill { height: 100%; border-radius: 20px; background: var(--verde-claro); transition: width .4s; }

/* ─── PROGRESS STEPS ─────────────────────────────── */
.step-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 10px 0;
}
.step-circle {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}
.step-done   { background: var(--verde-pale); color: var(--verde-medio); }
.step-active { background: var(--verde-medio); color: #fff; }
.step-next   { background: var(--border-color); color: #999; }

/* ─── LOGIN PAGE ─────────────────────────────────── */
.login-page {
  min-height: 100vh;
  background: linear-gradient(135deg, #1B4332 0%, #2D6A4F 50%, #52B788 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  background: #fff;
  border-radius: 16px;
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.login-logo {
  width: 50px; height: 50px;
  background: var(--verde-pale);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 24px;
  margin-bottom: 20px;
}

/* ─── MISC ───────────────────────────────────────── */
.divider { height: 1px; background: var(--border-color); margin: 16px 0; }
.badge-sm { font-size: 11px; padding: 3px 7px; font-weight: 600; }
.text-verde { color: var(--verde-medio) !important; }
.bg-verde-pale { background: var(--verde-pale) !important; }
.page-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--verde-oscuro);
  margin: 0 0 2px;
}
.page-sub { font-size: 13px; color: var(--text-muted); margin: 0; }
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  gap: 12px;
  flex-wrap: wrap;
}
.avatar-sm {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--verde-pale);
  color: var(--verde-medio);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}
.tooltip-cal {
  position: fixed;
  background: #1f2937;
  color: #fff;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12.5px;
  pointer-events: none;
  z-index: 9999;
  max-width: 220px;
  line-height: 1.6;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  opacity: 0;
  transition: opacity .15s;
}
.tooltip-cal.show { opacity: 1; }

/* ─── ROLES Y PERMISOS ───────────────────────────── */
.rol-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: 700;
}
.rol-administrador { background: #D8F3DC; color: #1B4332; }
.rol-reservaciones  { background: #dbeafe; color: #1e40af; }
.rol-consultas      { background: #f3f4f6; color: #4B5563; }

/* Nav item bloqueado */
.nav-item-link.nav-locked {
  opacity: .32;
  cursor: not-allowed;
  pointer-events: none;
}
.nav-item-link.nav-locked .nav-lock-icon {
  margin-left: auto;
  font-size: 11px;
  opacity: .7;
}

/* Banner acceso denegado dentro de la página */
.acceso-restringido {
  background: #fef3c7;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13.5px;
  color: #92400e;
  margin-bottom: 16px;
}
.acceso-restringido i { font-size: 18px; flex-shrink: 0; }

/* Topbar rol indicator */
.topbar-rol {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: #374151;
}

/* Flash message */
.flash-msg {
  position: fixed;
  top: 72px;
  left: calc(var(--sidebar-w) + 24px);
  right: 24px;
  z-index: 200;
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow-md);
  animation: slideDown .25s ease;
}
.flash-danger  { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.flash-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
@keyframes slideDown { from { transform:translateY(-14px);opacity:0; } to { transform:translateY(0);opacity:1; } }

/* ─── SIDEBAR COLLAPSE ────────────────────────────── */
.sidebar-toggle {
  width: 24px; height: 24px;
  background: rgba(255,255,255,.1);
  border: none;
  border-radius: 6px;
  color: rgba(255,255,255,.6);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  margin-left: auto;
  flex-shrink: 0;
  padding: 0;
  font-size: 13px;
  transition: background .15s, transform .25s;
}
.sidebar-toggle:hover { background: rgba(255,255,255,.22); color: #fff; }
.sidebar { transition: width .25s ease; }
.topbar  { transition: left .25s ease; }
.main-content { transition: margin-left .25s ease; }

body.sidebar-collapsed .sidebar { width: var(--sidebar-w-min); }
body.sidebar-collapsed .topbar  { left: var(--sidebar-w-min); }
body.sidebar-collapsed .main-content { margin-left: var(--sidebar-w-min); }
body.sidebar-collapsed .sidebar-toggle { transform: rotate(180deg); }

body.sidebar-collapsed .brand-text { display: none; }
body.sidebar-collapsed .sidebar-section-label { display: none; }
body.sidebar-collapsed .nav-item-link span { display: none; }
body.sidebar-collapsed .nav-lock-icon { display: none; }
body.sidebar-collapsed .sidebar-footer .user-info,
body.sidebar-collapsed .sidebar-footer > a { display: none; }
body.sidebar-collapsed .sidebar-brand { justify-content: center; }
body.sidebar-collapsed .sidebar-footer { justify-content: center; padding: 12px 0; }

body.sidebar-collapsed .nav-item-link {
  justify-content: center;
  padding: 11px 0;
  border-left: none;
  gap: 0;
  position: relative;
}
body.sidebar-collapsed .nav-item-link i { width: auto; font-size: 18px; }
body.sidebar-collapsed .nav-item-link.active {
  background: rgba(116,198,157,.2);
  border-left: none;
}

/* Tooltip flotante al hover cuando el sidebar está colapsado */
body.sidebar-collapsed .nav-item-link::after {
  content: attr(data-tooltip);
  position: fixed;
  left: calc(var(--sidebar-w-min) + 10px);
  background: rgba(27,67,50,.95);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 5px 11px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s;
  z-index: 500;
  box-shadow: 0 4px 12px rgba(0,0,0,.25);
  transform: translateY(-50%);
  margin-top: 18px;
}
body.sidebar-collapsed .nav-item-link:hover::after { opacity: 1; }

/* ─── NOTIFICATION DROPDOWN ─────────────────────────── */
.notif-wrap { position: relative; }
.notif-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 340px;
  background: #fff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(0,0,0,.13);
  z-index: 1050;
  display: none;
}
.notif-dropdown.show {
  display: block;
  animation: fadeDown .18s ease;
}
@keyframes fadeDown {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.notif-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.notif-item {
  padding: 11px 14px;
  border-bottom: 1px solid #F1F3F4;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  transition: background .12s;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--verde-bg); }
.notif-item.unread { background: #f0faf4; }
.notif-item.unread:hover { background: #e3f4eb; }
.notif-icon-wrap {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
}
.notif-dot {
  width: 8px; height: 8px;
  background: var(--verde-claro);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 4px;
}
.notif-count {
  background: #ef4444;
  color: #fff;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  margin-left: 5px;
}
.notif-footer {
  padding: 10px 16px;
  text-align: center;
  font-size: 12.5px;
  color: var(--verde-medio);
  font-weight: 600;
  cursor: pointer;
  border-top: 1px solid var(--border-color);
  border-radius: 0 0 var(--radius) var(--radius);
}
.notif-footer:hover { background: var(--verde-bg); }

/* ─── RESPONSIVE ─────────────────────────────────── */
@media (max-width: 768px) {
  :root { --sidebar-w: 60px; }
  .sidebar-brand .brand-text,
  .nav-item-link span,
  .sidebar-footer .user-info { display: none; }
  .nav-item-link { justify-content: center; padding: 12px; }
  .main-content { padding: 16px; }
}
