/* Riserva — estilos compartidos. Paleta azul claro profesional. */
:root {
  --rsv-blue-900: #0c2d57;
  --rsv-blue-800: #103a6e;
  --rsv-blue-700: #1e4e8c;
  --rsv-blue-600: #2563eb;
  --rsv-blue-500: #3b82f6;
  --rsv-blue-400: #60a5fa;
  --rsv-blue-100: #dbeafe;
  --rsv-blue-50:  #eff6ff;
  --rsv-sky: #38bdf8;
  --rsv-text: #10243a;
  --rsv-muted: #5b7794;
  --rsv-bg: #f2f7fd;
  --rsv-card: #ffffff;
  --rsv-border: #dbe7f5;
  --rsv-success: #10b981;
  --rsv-danger: #ef4444;
  --rsv-warning: #f59e0b;
  --rsv-radius: 16px;
  --rsv-shadow: 0 10px 30px rgba(20, 60, 120, .08);
  --rsv-shadow-lg: 0 22px 55px rgba(15, 50, 100, .14);
  --rsv-grad: linear-gradient(135deg, var(--rsv-blue-600), var(--rsv-sky));
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif;
  background: var(--rsv-bg);
  color: var(--rsv-text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--rsv-blue-600); text-decoration: none; }
a:hover { text-decoration: underline; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #c3d6ec; border-radius: 999px; border: 2px solid var(--rsv-bg); }
::-webkit-scrollbar-thumb:hover { background: #9fbede; }

.rsv-container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* Botones */
.rsv-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: none; border-radius: 12px; padding: 12px 22px;
  font-size: .95rem; font-weight: 700; cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease, border-color .2s ease;
  text-decoration: none !important;
  font-family: inherit;
}
.rsv-btn:hover { transform: translateY(-2px); }
.rsv-btn:active { transform: translateY(0); }
.rsv-btn-primary {
  background: var(--rsv-grad);
  color: #fff; box-shadow: 0 6px 20px rgba(37, 99, 235, .3);
}
.rsv-btn-primary:hover { box-shadow: 0 10px 26px rgba(37, 99, 235, .4); }
.rsv-btn-outline {
  background: #fff; color: var(--rsv-blue-600);
  border: 2px solid var(--rsv-blue-100);
}
.rsv-btn-outline:hover { border-color: var(--rsv-blue-400); background: var(--rsv-blue-50); }
.rsv-btn-success { background: linear-gradient(135deg, #10b981, #34d399); color: #fff; box-shadow: 0 6px 20px rgba(16, 185, 129, .28); }
.rsv-btn-danger { background: linear-gradient(135deg, #ef4444, #f87171); color: #fff; box-shadow: 0 6px 20px rgba(239, 68, 68, .25); }
.rsv-btn-sm { padding: 7px 14px; font-size: .82rem; border-radius: 9px; }
.rsv-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* Tarjetas / paneles */
.rsv-card-panel {
  background: var(--rsv-card); border: 1px solid var(--rsv-border);
  border-radius: var(--rsv-radius); box-shadow: var(--rsv-shadow); padding: 24px;
}
.rsv-card-head {
  display: flex; align-items: center; gap: 10px; margin: 0 0 16px;
  font-size: 1.02rem; font-weight: 800; color: var(--rsv-blue-900);
}
.rsv-card-head .ic {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem;
  background: var(--rsv-blue-50); border: 1px solid var(--rsv-blue-100);
}

/* Formularios */
.rsv-label { display: block; font-size: .82rem; font-weight: 700; color: #33536f; margin-bottom: 5px; }
.rsv-input, .rsv-select, .rsv-textarea {
  width: 100%; border: 1.5px solid #cfe0f1; border-radius: 10px;
  padding: 11px 13px; font-size: .95rem; color: var(--rsv-text);
  background: #fbfdff; outline: none; font-family: inherit;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.rsv-input:focus, .rsv-select:focus, .rsv-textarea:focus {
  border-color: var(--rsv-blue-600); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); background: #fff;
}
.rsv-field { margin-bottom: 16px; }
input[type="color"].rsv-color {
  width: 52px; height: 40px; border: 1.5px solid #cfe0f1; border-radius: 10px;
  background: #fbfdff; cursor: pointer; padding: 4px;
}

/* Alertas */
.rsv-alert { border-radius: 12px; padding: 12px 16px; font-size: .9rem; font-weight: 600; margin-bottom: 16px; }
.rsv-alert-success { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }
.rsv-alert-danger { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.rsv-alert-warning { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.rsv-alert-info { background: var(--rsv-blue-50); color: var(--rsv-blue-700); border: 1px solid var(--rsv-blue-100); }

/* Badges */
.rsv-badge { display: inline-flex; align-items: center; gap: 5px; border-radius: 999px; padding: 4px 12px; font-size: .74rem; font-weight: 800; letter-spacing: .3px; }
.rsv-badge-blue { background: var(--rsv-blue-100); color: var(--rsv-blue-700); }
.rsv-badge-green { background: #d1fae5; color: #065f46; }
.rsv-badge-red { background: #fee2e2; color: #991b1b; }
.rsv-badge-amber { background: #fef3c7; color: #92400e; }
.rsv-badge-gray { background: #e5e7eb; color: #374151; }

/* Avatar con iniciales */
.rsv-avatar {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--rsv-grad); color: #fff; font-weight: 900; font-size: .92rem;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .3); letter-spacing: .5px;
}

/* Tablas */
.rsv-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.rsv-table th {
  text-align: left; padding: 11px 14px; color: var(--rsv-muted); font-size: .72rem;
  text-transform: uppercase; letter-spacing: .7px; background: #f7fafe;
  border-bottom: 1px solid var(--rsv-border);
}
.rsv-table th:first-child { border-radius: 10px 0 0 10px; }
.rsv-table th:last-child { border-radius: 0 10px 10px 0; }
.rsv-table td { padding: 13px 14px; border-bottom: 1px solid #ecf3fb; vertical-align: middle; }
.rsv-table tr:last-child td { border-bottom: none; }
.rsv-table tr:hover td { background: var(--rsv-blue-50); }

/* Modal */
.rsv-modal { position: fixed; inset: 0; z-index: 1200; display: none; align-items: center; justify-content: center; padding: 18px; background: rgba(12, 35, 64, .55); backdrop-filter: blur(6px); }
.rsv-modal.show { display: flex; animation: rsvFade .2s ease; }
.rsv-modal-card { width: min(560px, 100%); max-height: 92vh; overflow-y: auto; background: #fff; border-radius: 18px; padding: 26px; box-shadow: 0 25px 70px rgba(10, 30, 60, .25); animation: rsvPop .22s ease; }
.rsv-modal-title { font-size: 1.15rem; font-weight: 800; color: var(--rsv-blue-900); margin: 0 0 16px; }
@keyframes rsvFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes rsvPop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }

/* Layout admin */
.rsv-shell { display: flex; min-height: 100vh; }
.rsv-sidebar {
  width: 256px; flex-shrink: 0;
  background: linear-gradient(180deg, #081f3f 0%, #0c2d57 45%, #123c74 100%);
  color: #dbeafe; padding: 22px 14px; display: flex; flex-direction: column; gap: 3px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.rsv-sidebar::-webkit-scrollbar-thumb { background: rgba(96, 165, 250, .35); border-color: transparent; }
.rsv-sidebar-logo { display: flex; align-items: center; gap: 11px; padding: 2px 8px 18px; }
.rsv-sidebar-logo img { width: 44px; height: 44px; border-radius: 12px; background: #fff; object-fit: contain; padding: 3px; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.rsv-sidebar-logo span { font-size: 1.1rem; font-weight: 900; color: #fff; letter-spacing: -.3px; line-height: 1.2; }
.rsv-nav-section {
  font-size: .64rem; font-weight: 800; letter-spacing: 1.6px; text-transform: uppercase;
  color: rgba(148, 192, 240, .55); padding: 14px 14px 6px;
}
.rsv-nav-link {
  position: relative;
  display: flex; align-items: center; gap: 11px; padding: 10px 13px; border-radius: 11px;
  color: #a8c8ec; font-weight: 600; font-size: .9rem; text-decoration: none !important;
  transition: background .2s ease, color .2s ease;
}
.rsv-nav-link .nav-ic {
  width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(96, 165, 250, .12);
  transition: background .2s ease;
}
.rsv-nav-link .nav-ic svg { width: 17px; height: 17px; stroke: currentColor; }
.rsv-nav-link:hover { background: rgba(96, 165, 250, .14); color: #fff; }
.rsv-nav-link:hover .nav-ic { background: rgba(96, 165, 250, .25); }
.rsv-nav-link.active { background: var(--rsv-grad); color: #fff; box-shadow: 0 6px 18px rgba(37, 99, 235, .4); }
.rsv-nav-link.active::before {
  content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 4px;
  border-radius: 0 4px 4px 0; background: var(--rsv-sky);
}
.rsv-nav-link.active .nav-ic { background: rgba(255, 255, 255, .18); }

.rsv-sidebar-user {
  margin-top: 10px; padding: 12px; border-radius: 13px;
  background: rgba(8, 25, 50, .55); border: 1px solid rgba(96, 165, 250, .16);
  display: flex; align-items: center; gap: 10px;
}
.rsv-sidebar-user .rsv-avatar { width: 36px; height: 36px; font-size: .8rem; border-radius: 10px; }
.rsv-sidebar-user b { display: block; color: #eaf3ff; font-size: .8rem; line-height: 1.25; }
.rsv-sidebar-user span { font-size: .68rem; color: #8db4e0; }

.rsv-main { flex: 1; padding: 26px 32px 40px; min-width: 0; }
.rsv-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  margin-bottom: 26px; flex-wrap: wrap;
  background: rgba(255, 255, 255, .8); backdrop-filter: blur(8px);
  border: 1px solid var(--rsv-border); border-radius: 16px;
  padding: 14px 20px; box-shadow: var(--rsv-shadow);
}
.rsv-page-title { font-size: 1.32rem; font-weight: 900; color: var(--rsv-blue-900); margin: 0; letter-spacing: -.4px; }
.rsv-page-sub { font-size: .78rem; color: var(--rsv-muted); font-weight: 600; }

@media (max-width: 860px) {
  .rsv-shell { flex-direction: column; }
  .rsv-sidebar { width: 100%; height: auto; position: relative; flex-direction: row; flex-wrap: wrap; align-items: center; }
  .rsv-sidebar-logo { padding-bottom: 0; }
  .rsv-nav-section, .rsv-sidebar-user { display: none; }
  .rsv-main { padding: 20px 16px; }
}

/* Grid utilitario */
.rsv-grid { display: grid; gap: 18px; }
.rsv-grid-2 { grid-template-columns: repeat(2, 1fr); }
.rsv-grid-3 { grid-template-columns: repeat(3, 1fr); }
.rsv-grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 960px) { .rsv-grid-3, .rsv-grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .rsv-grid-2, .rsv-grid-3, .rsv-grid-4 { grid-template-columns: 1fr; } }

/* Stat cards */
.rsv-stat {
  position: relative; overflow: hidden;
  background: #fff; border: 1px solid var(--rsv-border); border-radius: 16px;
  padding: 18px 20px; box-shadow: var(--rsv-shadow);
  display: flex; align-items: center; gap: 14px;
  transition: transform .25s ease, box-shadow .25s ease;
}
.rsv-stat:hover { transform: translateY(-3px); box-shadow: var(--rsv-shadow-lg); }
.rsv-stat::after {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--rsv-grad); opacity: .85;
}
.rsv-stat-icon {
  width: 46px; height: 46px; border-radius: 13px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.25rem;
  background: var(--rsv-blue-50); border: 1px solid var(--rsv-blue-100);
}
.rsv-stat-value { font-size: 1.7rem; font-weight: 900; color: var(--rsv-blue-700); line-height: 1.1; }
.rsv-stat-label { font-size: .78rem; color: var(--rsv-muted); font-weight: 600; }

/* Estado vacío */
.rsv-empty { text-align: center; padding: 34px 16px; color: var(--rsv-muted); }
.rsv-empty .big { font-size: 2.2rem; margin-bottom: 8px; }
.rsv-empty p { margin: 0; font-size: .9rem; }

/* Galería de imágenes (admin) */
.rsv-gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.rsv-gallery-item { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--rsv-border); aspect-ratio: 4 / 3; background: var(--rsv-blue-50); }
.rsv-gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.rsv-gallery-item button {
  position: absolute; top: 6px; right: 6px; border: none; cursor: pointer;
  width: 26px; height: 26px; border-radius: 8px; font-size: .8rem; font-weight: 900;
  background: rgba(255, 255, 255, .92); color: var(--rsv-danger);
  box-shadow: 0 3px 10px rgba(0, 0, 0, .2);
}
