:root {
  --bg: #f7f5f0;
  --surface: #ffffff;
  --surface-2: #f1eee6;
  --text: #1d2430;
  --muted: #5d6573;
  --border: #e3ded3;
  --brand: #c2410c;        /* saffron */
  --brand-ink: #ffffff;
  --brand-soft: #fdeee4;
  --deep: #1e3a5f;         /* mountain blue */
  --danger: #b42318;
  --danger-soft: #fdecea;
  --ok: #1a7f37;
  --ok-soft: #e6f4ea;
  --warn: #9a6700;
  --warn-soft: #fff4d6;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 18px rgba(0,0,0,.06);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161c;
    --surface: #1a2028;
    --surface-2: #222a34;
    --text: #e8ebef;
    --muted: #9ea7b3;
    --border: #2d3640;
    --brand: #fb8a4c;
    --brand-ink: #1d0f05;
    --brand-soft: #3a2316;
    --deep: #8fb3e0;
    --danger: #f97066;
    --danger-soft: #3a1d1b;
    --ok: #4ac26b;
    --ok-soft: #173322;
    --warn: #e3b341;
    --warn-soft: #3a2f12;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 18px rgba(0,0,0,.3);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Devanagari", sans-serif; background: var(--bg); color: var(--text); line-height: 1.5; font-size: 15px; }
a { color: var(--brand); }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
.container { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.hidden { display: none !important; }

/* header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.logo { font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 8px; }
.logo-mark { width: 30px; height: 30px; border-radius: 8px; background: var(--brand); color: var(--brand-ink); display: grid; place-items: center; font-size: 1rem; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; }
.nav a, .nav button { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; font: inherit; background: none; border: 0; cursor: pointer; }
.nav a:hover, .nav button:hover { background: var(--surface-2); color: var(--text); }

/* hero */
.hero {
  color: #fff; padding: 56px 0 96px; position: relative; overflow: hidden;
  background: linear-gradient(180deg, #1e3a5f 0%, #2c5282 55%, #c2410c 140%);
}
.hero::after { /* mountain silhouette */
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px;
  background: var(--bg);
  clip-path: polygon(0 70%, 8% 40%, 15% 62%, 24% 18%, 33% 55%, 42% 30%, 50% 60%, 58% 8%, 67% 50%, 76% 25%, 85% 58%, 93% 35%, 100% 55%, 100% 100%, 0 100%);
}
.hero h1 { font-size: clamp(1.8rem, 4.5vw, 2.8rem); }
.hero .hindi { opacity: .85; font-size: 1.05rem; margin-bottom: 6px; }
.hero p { opacity: .9; margin: 0; max-width: 620px; }

/* cards & forms */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
label { display: block; font-size: .8rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
input, select, textarea { width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: transparent; }
input[type="checkbox"] { width: auto; }
.field { margin-bottom: 14px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600; border-radius: 8px; padding: 9px 16px; cursor: pointer; border: 1px solid transparent; background: var(--brand); color: var(--brand-ink); white-space: nowrap; text-decoration: none; }
.btn:hover { filter: brightness(1.07); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-ok { background: var(--ok); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: 5px 10px; font-size: .85rem; }

.alert { padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: .92rem; }
.alert.error { background: var(--danger-soft); color: var(--danger); }
.alert.success { background: var(--ok-soft); color: var(--ok); }

/* search */
.search-card { margin-top: -64px; position: relative; z-index: 2; }
.search-row { display: grid; grid-template-columns: 1.2fr 1fr 1.4fr 110px auto; gap: 12px; align-items: end; }
@media (max-width: 860px) { .search-row { grid-template-columns: 1fr 1fr; } .search-row .btn { grid-column: 1 / -1; } }

/* dham tiles */
.dhams { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin: 24px 0 8px; }
@media (max-width: 900px) { .dhams { grid-template-columns: repeat(2, 1fr); } }
.dham {
  text-align: left; cursor: pointer; font: inherit; color: inherit; padding: 14px; border-radius: var(--radius);
  border: 1px solid var(--border); background: var(--surface); transition: border-color .15s, transform .15s;
}
.dham:hover { transform: translateY(-2px); border-color: var(--brand); }
.dham.active { border-color: var(--brand); background: var(--brand-soft); }
.dham .nm { font-weight: 700; }
.dham .hi { color: var(--muted); font-size: .85rem; }
.dham .ct { font-size: .78rem; color: var(--brand); font-weight: 600; margin-top: 4px; }

/* results layout */
.layout { display: grid; grid-template-columns: 250px 1fr; gap: 24px; padding: 24px 0 48px; align-items: start; }
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; } }
.filters h3 { font-size: .95rem; margin-top: 4px; }
.check { display: flex; align-items: center; gap: 8px; font-size: .9rem; color: var(--text); font-weight: 400; margin-bottom: 6px; cursor: pointer; }
.results-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.results-head select { width: auto; }
.hotels { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.hotel-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; text-decoration: none; color: inherit; transition: transform .15s; }
.hotel-card:hover { transform: translateY(-2px); }
.thumb { aspect-ratio: 16 / 10; background: var(--surface-2); display: grid; place-items: center; font-size: 2.6rem; overflow: hidden; position: relative; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.ribbon { position: absolute; top: 10px; left: 10px; background: var(--brand); color: var(--brand-ink); font-size: .72rem; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.hotel-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.hotel-body h3 { font-size: 1.05rem; margin: 0; }
.loc { font-size: .85rem; color: var(--muted); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { font-size: .74rem; background: var(--surface-2); color: var(--muted); padding: 2px 8px; border-radius: 999px; }
.price-line { margin-top: auto; padding-top: 8px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: baseline; }
.price { font-size: 1.2rem; font-weight: 700; }
.price small { font-size: .75rem; color: var(--muted); font-weight: 500; }
.empty { text-align: center; color: var(--muted); padding: 48px 16px; }

/* hotel page */
.gallery { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: 180px 180px; gap: 8px; border-radius: var(--radius); overflow: hidden; margin: 20px 0; }
.gallery img, .gallery .ph { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; background: var(--surface-2); }
.gallery > :first-child { grid-row: 1 / 3; }
.gallery.n2, .gallery.n3 { grid-template-columns: 2fr 1fr; }
.gallery.n2 > :nth-child(2) { grid-row: 1 / 3; }
.gallery.n4 > :nth-child(4) { grid-column: 2 / 4; }
.gallery.single { grid-template-columns: 1fr; grid-template-rows: 320px; }
.gallery.single > :first-child { grid-row: auto; }
@media (max-width: 640px) {
  .gallery[class] { grid-template-columns: 1fr 1fr; grid-template-rows: 200px 100px; }
  .gallery[class] > * { grid-row: auto; grid-column: auto; }
  .gallery[class] > :first-child { grid-column: 1 / -1; }
  .gallery[class] > :nth-child(n+4) { display: none; }
  .gallery.n2 > :nth-child(2) { grid-column: 1 / -1; }
  .gallery.single { grid-template-rows: 240px; }
}
.ph { display: grid; place-items: center; font-size: 4rem; }
.detail { display: grid; grid-template-columns: 1fr 360px; gap: 24px; padding-bottom: 48px; align-items: start; }
@media (max-width: 900px) { .detail { grid-template-columns: 1fr; } }
.sticky { position: sticky; top: 76px; }
.section-title { font-size: 1.1rem; margin: 24px 0 10px; }
.desc { white-space: pre-line; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600; }
.contact-btns { display: grid; gap: 8px; margin-bottom: 16px; }
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.88); display: grid; place-items: center; z-index: 60; padding: 16px; cursor: zoom-out; }
.lightbox img { max-height: 90vh; max-width: 100%; border-radius: 8px; }
.crumbs { font-size: .85rem; color: var(--muted); padding-top: 16px; }
.crumbs a { color: var(--muted); }

/* admin */
.admin-wrap { padding: 24px 16px 48px; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.stat { padding: 14px 16px; }
.stat .num { font-size: 1.6rem; font-weight: 700; }
.stat .lbl { font-size: .8rem; color: var(--muted); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs button { font: inherit; background: none; border: 0; padding: 10px 14px; cursor: pointer; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--text); border-bottom-color: var(--brand); font-weight: 600; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; align-items: center; }
.toolbar input, .toolbar select { width: auto; flex: 1 1 180px; }
.table-wrap { overflow-x: auto; }
.badge { display: inline-block; font-size: .74rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.badge.live { background: var(--ok-soft); color: var(--ok); }
.badge.draft { background: var(--warn-soft); color: var(--warn); }
.badge.new { background: var(--brand-soft); color: var(--brand); }
.badge.contacted { background: var(--ok-soft); color: var(--ok); }
.badge.closed { background: var(--surface-2); color: var(--muted); }
.mini-thumb { width: 56px; height: 40px; border-radius: 6px; object-fit: cover; background: var(--surface-2); display: grid; place-items: center; font-size: 1.2rem; }
.actions { display: flex; gap: 6px; flex-wrap: wrap; }
.amen-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 2px 12px; }
.room-row { display: grid; grid-template-columns: 1fr 120px 90px auto; gap: 8px; margin-bottom: 8px; align-items: center; }
@media (max-width: 560px) { .room-row { grid-template-columns: 1fr 1fr; } }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.photo-item { border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface); }
.photo-item img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.photo-item .actions { padding: 6px; justify-content: space-between; }
.form-foot { position: sticky; bottom: 0; background: var(--surface); border-top: 1px solid var(--border); padding: 12px 0; margin-top: 8px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.login-wrap { max-width: 380px; margin: 80px auto; }
.footer { color: var(--muted); font-size: .85rem; padding: 32px 0; text-align: center; border-top: 1px solid var(--border); }
fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px 4px; margin: 0 0 16px; }
legend { font-weight: 700; padding: 0 6px; }
