/* Portal — same Bhavai palette & chrome as the main site */
:root {
  --wine: #3c0d28;
  --wine-2: #561537;
  --ink: #2a1020;
  --muted: #6c4a5a;
  --gold: #f2c14d;
  --gold-soft: #ffe7a6;
  --gold-text: #8a5d00;
  --red: #c4202a;
  --red-dark: #a0171f;
  --teal: #0e6e6c;
  --teal-dark: #0a5553;
  --pink: #f6d5e4;
  --rose: #f08ab4;
  --paper: #fff8ef;
  --sand: #f6ead8;
  --line: #e7d4c3;
  --cream: #fff6ea;
  --ok: #0e6e6c;
  --err: #a0171f;
  --card: #fff;
  --shadow: 0 10px 28px rgba(42, 16, 32, 0.06);
  --display: "Rozha One", "Tiro Devanagari Hindi", Georgia, serif;
  --brand: "Yatra One", "Rozha One", Georgia, serif;
  --body: Hind, "Noto Sans Devanagari", "Segoe UI", system-ui, sans-serif;
  --radius: 4px;
  --gutter: clamp(1rem, 4vw, 2rem);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 400;
  line-height: 1.15;
  margin: 0;
  color: var(--wine);
}

a { color: var(--wine-2); text-decoration: none; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
::selection { background: var(--gold); color: var(--wine); }

.wrap { width: min(1100px, 100% - 2 * var(--gutter)); margin-inline: auto; }

/* Wine header — matches main site */
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background-color: var(--wine);
  background-image: radial-gradient(rgba(242, 193, 77, 0.09) 1.5px, transparent 1.8px);
  background-size: 22px 22px;
  color: var(--cream);
  border-bottom: 1px solid rgba(242, 193, 77, 0.18);
}
.bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  min-height: 4.25rem;
  padding: .65rem 0;
}
.brand {
  font-family: var(--brand);
  font-size: 1.55rem;
  color: var(--gold);
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { color: var(--gold-soft); text-decoration: none; }
.brand small {
  display: inline-block;
  margin-left: .35rem;
  font-family: var(--body);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--cream);
  vertical-align: middle;
}
nav {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem 1.15rem;
  font-size: .95rem;
  align-items: center;
  justify-content: flex-end;
}
nav a {
  position: relative;
  color: var(--cream);
  font-weight: 500;
  text-decoration: none;
  padding-block: .3rem;
}
nav a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
nav a:hover { color: var(--gold); text-decoration: none; }
nav a:hover::after { transform: scaleX(1); }

.main { flex: 1 0 auto; padding: 2rem 0 3.5rem; }

.hero-card,
.panel,
.stat,
.card {
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.hero-card {
  padding: 1.6rem 1.8rem;
  border-radius: var(--radius);
  margin-bottom: 1.5rem;
  background:
    linear-gradient(135deg, rgba(60, 13, 40, 0.05), transparent 55%),
    var(--card);
  border-top: 3px solid var(--gold);
}
.hero-card h1 {
  margin: 0 0 .45rem;
  font-size: clamp(1.85rem, 3.2vw, 2.6rem);
  color: var(--wine);
}
.hero-card .muted { max-width: 62ch; }

.grid { display: grid; gap: 1rem; }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 800px) {
  .grid.cols-3, .grid.cols-2 { grid-template-columns: 1fr; }
}

.stat, .card, .panel {
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
}
.panel > h1 {
  margin-bottom: .85rem;
  font-size: clamp(1.75rem, 3vw, 2.35rem);
}
.stat strong {
  display: block;
  font-family: var(--display);
  font-size: 1.75rem;
  color: var(--wine);
  line-height: 1.1;
}
.stat span { color: var(--muted); font-size: .95rem; }

label {
  display: block;
  font-size: .92rem;
  font-weight: 600;
  color: var(--wine);
  margin: .75rem 0 .3rem;
}
input, select, textarea {
  width: 100%;
  padding: .72rem .85rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  font: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:hover, select:hover, textarea:hover { border-color: #cdb3a1; }
input:focus, select:focus, textarea:focus {
  border-color: var(--wine);
  box-shadow: 0 0 0 3px rgba(242, 193, 77, 0.45);
  outline: none;
  background: #fff;
}
textarea { min-height: 96px; resize: vertical; }

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-top: 1.25rem;
}

/* Buttons — same language as main site (square, wine/gold/red) */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 2.85rem;
  padding: .65rem 1.15rem;
  border: 1.5px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--wine);
  color: var(--cream);
  font-family: var(--body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}
.btn:hover { background: var(--wine-2); color: var(--cream); text-decoration: none; }
.btn.secondary {
  background: var(--gold);
  color: var(--wine);
}
.btn.secondary:hover { background: var(--gold-soft); color: var(--wine); }
.btn.ghost {
  background: transparent;
  color: var(--wine);
  border-color: var(--wine);
}
.btn.ghost:hover {
  background: var(--wine);
  color: var(--gold);
}
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

.alert {
  padding: .85rem 1rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
  border: 1px solid transparent;
}
.alert.ok {
  background: rgba(14, 110, 108, 0.1);
  color: var(--teal-dark);
  border-color: rgba(14, 110, 108, 0.22);
}
.alert.err {
  background: rgba(196, 32, 42, 0.1);
  color: var(--red-dark);
  border-color: rgba(196, 32, 42, 0.22);
}

.table { width: 100%; border-collapse: collapse; }
.table th, .table td {
  text-align: left;
  padding: .7rem .4rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: .95rem;
}
.table th { color: var(--wine); font-weight: 600; }

.tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.tabs a {
  padding: .45rem .85rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--line);
  background: #fff;
  color: var(--ink);
  text-decoration: none;
}
.tabs a:hover { border-color: var(--wine); text-decoration: none; color: var(--wine); }
.tabs a.active {
  background: var(--wine);
  color: var(--cream);
  border-color: var(--wine);
}

.muted { color: var(--muted); font-size: .95rem; }

.steps { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
.steps span {
  padding: .35rem .75rem;
  border-radius: var(--radius);
  background: var(--sand);
  color: var(--muted);
  font-size: .85rem;
  border: 1px solid var(--line);
}
.steps span.on {
  background: var(--gold);
  color: var(--wine);
  border-color: var(--gold);
  font-weight: 600;
}

#calendar {
  background: #fff;
  border-radius: var(--radius);
  padding: 1rem;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.fc .fc-button-primary {
  background: var(--wine) !important;
  border-color: var(--wine) !important;
}
.fc .fc-button-primary:not(:disabled).fc-button-active,
.fc .fc-button-primary:hover {
  background: var(--wine-2) !important;
  border-color: var(--wine-2) !important;
}
.fc-theme-standard td, .fc-theme-standard th { border-color: var(--line) !important; }
.fc .fc-daygrid-day.fc-day-today { background: rgba(242, 193, 77, 0.18) !important; }

.site-foot {
  padding: clamp(2rem, 4vw, 2.75rem) 0 1.5rem;
  color: rgba(255, 246, 234, 0.78);
  font-size: .95rem;
  background: var(--ink);
  border-top: 0;
}
.site-foot a { color: var(--gold); }
.site-foot a:hover { color: var(--gold-soft); }
.site-foot p { margin: 0; }

.badge {
  display: inline-block;
  padding: .18rem .55rem;
  border-radius: var(--radius);
  background: var(--sand);
  color: var(--wine);
  font-size: .8rem;
  border: 1px solid var(--line);
}
.badge.ok { background: rgba(14, 110, 108, 0.12); color: var(--teal-dark); border-color: transparent; }
.badge.warn { background: var(--gold-soft); color: var(--gold-text); border-color: transparent; }
.badge.err { background: rgba(196, 32, 42, 0.12); color: var(--red-dark); border-color: transparent; }

.demo-fill {
  padding: .9rem 1rem;
  background: var(--sand);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}

.dots {
  height: 10px;
  background: radial-gradient(circle, var(--gold) 2px, transparent 2.6px) 0 50% / 16px 10px repeat-x;
  opacity: .9;
  margin-bottom: 1rem;
}

.list-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .75rem 1rem;
  margin-bottom: 1rem;
  align-items: end;
}
.list-filters.stack { grid-template-columns: 1fr 1fr; }
.list-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .75rem 1.25rem;
  align-items: center;
  margin-top: 1rem;
  padding-top: .85rem;
  border-top: 1px solid var(--line);
}
.list-meta-left {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem 1rem;
  align-items: center;
}
.per-page-form {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: 0;
}
.per-page-form label {
  margin: 0;
  font-size: .85rem;
  font-weight: 500;
  color: var(--muted);
}
.per-page-form select {
  width: auto;
  min-width: 4.25rem;
  padding: .35rem .5rem;
  margin: 0;
}
.pager { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.pager .btn.is-disabled,
.pager a.is-disabled {
  opacity: .35;
  pointer-events: none;
}
.sort-link { color: var(--wine); text-decoration: none; font-weight: 600; }
.sort-link.on { color: var(--red); }
.sort-link:hover { text-decoration: underline; }
.inline-form { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; }
code { font-size: .88em; background: var(--sand); padding: .1rem .35rem; border-radius: 3px; }

@media (max-width: 700px) {
  .bar-inner { flex-direction: column; align-items: flex-start; }
  nav { gap: .45rem .85rem; font-size: .88rem; justify-content: flex-start; }
  .list-filters.stack { grid-template-columns: 1fr; }
}
