@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700&family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0..1,0&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── MATERIAL SYMBOLS ───────────────────────────────────── */
.ms {
  font-family: 'Material Symbols Outlined';
  font-weight: normal;
  font-style: normal;
  font-size: 20px;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  -webkit-font-smoothing: antialiased;
  user-select: none;
  flex-shrink: 0;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.ms-fill {
  font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

:root {
  --bg: #FFFFFF;
  --surface: #F2F2F2;
  --dark: #323232;
  --sidebar-bg: #333333;
  --nav-active: #818181;
  --text: #000000;
  --text-muted: #818181;
  --border: #E0E0E0;
  --gold: #C9A96E;
  --stat-yellow: #FAEDA7;
  --stat-blue: #C6D7F7;
  --stat-green: #C7F4D2;
  --radius-card: 12px;
  --radius-input: 8px;
  --radius-pill: 1000px;
  --font: 'Inter Tight', system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

html, body { height: 100%; }

body {
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* ── LOGIN ─────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  background: var(--bg);
  border-radius: var(--radius-card);
  width: 546px;
  padding: 80px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.login-logo {
  display: flex;
  justify-content: center;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-field label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.form-field input {
  height: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  padding: 0 16px;
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color 0.15s;
}

.form-field input:focus {
  border-color: var(--dark);
}

.form-field input::placeholder {
  color: #BBBBBB;
}

.btn-primary {
  height: 50px;
  background: var(--dark);
  color: #FFFFFF;
  border: none;
  border-radius: var(--radius-pill);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
  width: 100%;
}

.btn-primary:hover { background: #1a1a1a; }

.btn-outlined {
  height: 50px;
  background: transparent;
  color: var(--dark);
  border: 1.5px solid var(--dark);
  border-radius: var(--radius-pill);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  padding: 0 24px;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-outlined:hover { background: var(--dark); color: #fff; }

/* ── APP SHELL ──────────────────────────────────────────── */
.app-shell {
  display: flex;
  height: 100vh;
  padding: 24px;
  gap: 24px;
  background: var(--bg);
  overflow: hidden;
}

/* ── SIDEBAR ────────────────────────────────────────────── */
.sidebar {
  width: 260px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-radius: var(--radius-card);
  display: flex;
  flex-direction: column;
  padding: 40px 0;
  overflow-y: auto;
  gap: 32px;
}

.sidebar-profile {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
}

.sidebar-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--nav-active);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.sidebar-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sidebar-avatar-initial {
  font-size: 16px;
  font-weight: 600;
  color: #fff;
}

.sidebar-user-name {
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
}

.sidebar-user-role {
  font-size: 12px;
  color: rgba(255,255,255,0.5);
}

.sidebar-logo {
  padding: 0 24px;
  display: flex;
  justify-content: center;
}

.sidebar-divider {
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 0 24px;
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.35);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0 24px;
  margin-bottom: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 44px;
  padding: 0 24px;
  text-decoration: none;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  font-weight: 400;
  border-radius: 0;
  transition: background 0.15s, color 0.15s;
  cursor: pointer;
}

.nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: #fff;
}

.nav-item.active {
  background: var(--nav-active);
  color: #FFFFFF;
  font-weight: 500;
}

.nav-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,0.1);
}

.nav-item.active .nav-icon {
  background: rgba(255,255,255,0.2);
}

.nav-icon .ms {
  font-size: 18px;
  color: currentColor;
}

/* ── MAIN CONTENT ───────────────────────────────────────── */
.main-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
  overflow-y: auto;
  padding-right: 4px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.topbar-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}

.btn-icon-outline {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #333333;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}
.btn-icon-outline:hover { background: var(--surface); }
.btn-icon-outline .ms { font-size: 26px; color: #333333; }

.page-title {
  font-size: 32px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.5px;
}

.page-title span {
  color: var(--text-muted);
}

.page-date {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 6px;
  font-size: 14px;
}

/* ── STATS CARDS ────────────────────────────────────────── */
.stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.stat-card {
  border-radius: var(--radius-card);
  padding: 40px;
  height: 118px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.stat-card.yellow { background: var(--stat-yellow); }
.stat-card.blue   { background: var(--stat-blue); }
.stat-card.green  { background: var(--stat-green); }

.stat-icon {
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon svg {
  width: 48px;
  height: 48px;
  stroke: var(--dark);
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.stat-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--dark);
}

.stat-value {
  font-size: 13px;
  font-weight: 400;
  color: var(--dark);
  opacity: 0.65;
  margin-top: 2px;
}

/* ── CHARTS ─────────────────────────────────────────────── */
.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.chart-panel {
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 32px;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.chart-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.chart-placeholder {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* ── TRIPS TABLE ────────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-title {
  font-size: 18px;
  font-weight: 600;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
}

.data-table td {
  padding: 12px;
  font-size: 14px;
  border-bottom: 1px solid var(--surface);
  vertical-align: middle;
}

.data-table tr:last-child td { border-bottom: none; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  font-weight: 500;
}

.badge-confirmed { background: #C7F4D2; color: #1A6631; }
.badge-pending   { background: #FAEDA7; color: #7A6010; }
.badge-cancelled { background: #FFD6D6; color: #991B1B; }

/* ── FORM SECTIONS (Nueva Reserva) ─────────────────────── */
.form-section {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.form-section-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.form-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.form-col-span-2 { grid-column: span 2; }

.field-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.field-input {
  height: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  padding: 0 16px;
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color 0.15s;
  width: 100%;
}

.field-input:focus { border-color: var(--dark); }
.field-input::placeholder { color: #BBBBBB; }

.field-select {
  height: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  padding: 0 16px;
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  outline: none;
  width: 100%;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23818181' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

.field-textarea {
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  padding: 12px 16px;
  font-family: var(--font);
  font-size: 15px;
  color: var(--text);
  background: var(--bg);
  outline: none;
  width: 100%;
  resize: vertical;
  min-height: 80px;
}

.field-textarea:focus { border-color: var(--dark); }

/* Passenger counter */
.pax-counter {
  display: flex;
  align-items: center;
  height: 48px;
  border: 1px solid var(--border);
  border-radius: var(--radius-input);
  overflow: hidden;
}

.pax-btn {
  width: 48px;
  height: 100%;
  background: var(--surface);
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: var(--text);
  flex-shrink: 0;
  transition: background 0.15s;
}

.pax-btn:hover { background: var(--border); }

.pax-value {
  flex: 1;
  text-align: center;
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

/* Precio section */
.precio-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.precio-breakdown {
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.precio-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text);
}

.precio-row.total {
  font-size: 18px;
  font-weight: 700;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.precio-row .label { color: var(--text-muted); }
.precio-row .value { font-weight: 500; }

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 8px;
}

.btn-cancel {
  height: 50px;
  background: transparent;
  color: var(--text-muted);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  padding: 0 32px;
  transition: border-color 0.15s, color 0.15s;
}

.btn-cancel:hover { border-color: var(--dark); color: var(--dark); }

/* ── ACTION BUTTONS ─────────────────────────────────────── */
.btn-action {
  height: 30px;
  padding: 0 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  flex-shrink: 0;
  transition: filter 0.12s;
  white-space: nowrap;
}

.btn-action:hover { filter: brightness(0.88); }
.btn-action .ms { font-size: 16px; }

.btn-view   { background: #4A90D9; color: #fff; }
.btn-edit   { background: #5BAD6F; color: #fff; }
.btn-delete { background: #D94A4A; color: #fff; }

.actions-cell { display: flex; gap: 4px; align-items: center; }

/* ── TOOLBAR ─────────────────────────────────────────────── */
.table-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface);
  border-radius: var(--radius-card);
  padding: 10px 16px;
  flex-wrap: wrap;
}

.toolbar-btn {
  height: 34px;
  padding: 0 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: var(--font);
  font-size: 13px;
  color: var(--dark);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background 0.12s, border-color 0.12s;
  white-space: nowrap;
}

.toolbar-btn:hover { background: #EBEBEB; }
.toolbar-btn.primary { background: var(--dark); color: #fff; border-color: var(--dark); }
.toolbar-btn.primary:hover { background: #1a1a1a; }
.toolbar-btn .ms { font-size: 18px; }

.toolbar-sep { width: 1px; height: 24px; background: var(--border); margin: 0 2px; }

/* Row checkbox */
.row-check { width: 16px; height: 16px; cursor: pointer; accent-color: var(--dark); }

/* Column config modal */
.col-config-list { display: flex; flex-direction: column; gap: 8px; max-height: 400px; overflow-y: auto; }
.col-config-item { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--surface); }
.col-config-item:last-child { border-bottom: none; }
.col-config-item input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--dark); flex-shrink: 0; }
.col-config-item .col-name { font-size: 13px; color: var(--text-muted); width: 180px; flex-shrink: 0; }
.col-config-item input[type="text"] { flex: 1; height: 32px; border: 1px solid var(--border); border-radius: 6px; padding: 0 10px; font-size: 13px; font-family: var(--font); outline: none; }
.col-config-item input[type="text"]:focus { border-color: var(--dark); }

/* ── MODAL ──────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
}

.modal {
  background: var(--bg);
  border-radius: var(--radius-card);
  width: 560px;
  max-width: 100%;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 40px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

.modal-title { font-size: 20px; font-weight: 600; color: var(--text); }

.modal-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.modal-field-full { grid-column: span 2; }

.modal-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 22px;
}

.modal-check input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--dark); }
.modal-check label { font-size: 14px; cursor: pointer; }

.modal-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding-top: 8px;
}

/* ── SCROLLBAR ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
