/* Shree Banashankari admin panel. Black, gold and silver from the visiting card,
   frosted-glass panels over a soft gold/silver colour mesh (same look as the website). */
@font-face { font-family: "Cinzel"; src: url("fonts/Cinzel-Variable.ttf") format("truetype"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Manrope"; src: url("fonts/Manrope-Variable.ttf") format("truetype"); font-weight: 200 800; font-display: swap; }

:root {
  --ink: #0b0b0c; --ink-2: #151517; --ink-3: #222226; --ink-4: #34343a;
  --gold: #c69a3c; --gold-2: #e2c27a; --gold-3: #8f6a1d; --gold-soft: #f8efdb; --gold-300: #f8cf4d; --gold-200: #ffe27a;
  --silver: #c9ccd1; --silver-2: #e3e5e8; --muted: #6b6b73; --line: rgba(201,204,209,.55); --bg: #faf7f0; --white: #fff;
  --green: #15803d; --green-soft: #e7f6ec; --red: #b91c1c; --red-soft: #fdeceb; --blue: #1d4ed8; --blue-soft: #e8eefc; --amber: #b45309; --amber-soft: #fdf3e2;
  --wa: #1fa855; --radius: 18px; --radius-sm: 12px;
  --shadow: 0 14px 36px -18px rgba(10,10,10,.28);
  --grad: linear-gradient(135deg, #a87b26 0%, #d2a748 24%, #f2dc9e 48%, #c99a3c 72%, #a87b26 100%);
  --grad-text: linear-gradient(135deg, #f2dc9e 0%, #d2a748 40%, #c99a3c 70%, #f2dc9e 100%);
  /* frosted white glass */
  --glass-bg: linear-gradient(160deg, rgba(255,255,255,.86) 0%, rgba(255,255,255,.64) 100%);
  --glass-border: rgba(255,255,255,.85);
  --glass-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 0 0 1px var(--line), var(--shadow);
  --glass-blur: blur(18px) saturate(150%);
  /* dark smoked glass (sidebar, dark stat, login) */
  --glass-dark-bg: linear-gradient(160deg, rgba(255,255,255,.07) 0%, rgba(255,255,255,.02) 55%, rgba(198,154,60,.12) 100%), rgba(11,11,12,.86);
  --glass-dark-border: rgba(198,154,60,.35);
  --glass-dark-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 0 0 1px rgba(198,154,60,.18), 0 24px 60px -32px rgba(0,0,0,.85);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font: 14.5px/1.55 "Manrope", system-ui, sans-serif; color: var(--ink); min-height: 100vh;
  background:
    radial-gradient(55vw 38vw at 88% -8%, rgba(248,207,77,.30), transparent 62%),
    radial-gradient(48vw 40vw at -12% 38%, rgba(201,204,209,.55), transparent 60%),
    radial-gradient(60vw 48vw at 72% 108%, rgba(255,226,122,.32), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}
/* Blurred gold orbs behind the glass so it has something to refract */
body::before, body::after { content: ""; position: fixed; z-index: -1; border-radius: 50%; filter: blur(70px); pointer-events: none; }
body::before { width: 44vw; height: 44vw; max-width: 640px; max-height: 640px; left: 6%; top: -22%; background: rgba(212,160,23,.22); }
body::after { width: 38vw; height: 38vw; max-width: 540px; max-height: 540px; right: -12%; bottom: -28%; background: rgba(248,207,77,.18); }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
h1 { font: 700 1.55rem "Cinzel", Georgia, serif; letter-spacing: .01em; }
code { background: rgba(255,255,255,.7); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; font-size: .92em; }
.ic { flex-shrink: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.mono { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .02em; }
.center { text-align: center; justify-content: center; }
.pre { white-space: pre-wrap; margin: .3rem 0 0; }
.link { color: var(--gold-3); font-weight: 700; text-decoration: none; font-size: .85rem; }

/* ---------- glass helpers ---------- */
.glass, .card, .stat, .tile, .photo, .flash, .dropzone, .toast-card {
  background: var(--glass-bg); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow);
}
.glass-dark, .stat-dark {
  background: var(--glass-dark-bg); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-dark-border); box-shadow: var(--glass-dark-shadow); color: #fff;
}

/* ---------- shell ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 262px; flex-shrink: 0; color: var(--silver); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 40;
  background: var(--glass-dark-bg); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--glass-dark-border); box-shadow: inset -1px 0 0 rgba(255,255,255,.05), 12px 0 40px -30px rgba(0,0,0,.6);
}
.sidebar-head { display: flex; align-items: center; border-bottom: 1px solid rgba(198,154,60,.25); padding-right: 10px; }
.brand { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 18px 20px; text-decoration: none; }
.brand img { height: 40px; width: auto; border-radius: 8px; box-shadow: 0 0 0 1px rgba(198,154,60,.5); }
.brand b { display: block; font: 800 .86rem "Cinzel", serif; letter-spacing: .12em; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand small { display: block; font-size: .62rem; letter-spacing: .28em; text-transform: uppercase; color: #8b8b93; }
.icon-btn.sidebar-close { display: none; color: var(--silver); }
.icon-btn.sidebar-close:hover { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.12); color: #fff; }
.sidebar nav { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 10px 12px 16px; scrollbar-width: thin; scrollbar-color: #444 transparent; }
.nav-group { margin: 16px 10px 6px; font-size: .64rem; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; color: #77777f; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 11px; color: #c9ccd1; text-decoration: none; font-weight: 600; font-size: .9rem; border: 1px solid transparent; transition: background .15s, color .15s, border-color .15s; }
.nav-link:hover { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.08); color: var(--gold-2); }
.nav-link.active { background: var(--grad); color: var(--ink); font-weight: 800; border-color: transparent; box-shadow: 0 8px 20px -10px rgba(198,154,60,.9), inset 0 1px 0 rgba(255,255,255,.55); }
.nav-link span { flex: 1; }
.nav-link .count { font-style: normal; font-size: .7rem; font-weight: 800; padding: 1px 8px; border-radius: 99px; background: var(--grad); color: var(--ink); }
.nav-link.active .count { background: var(--ink); color: var(--gold-2); }
.sidebar-foot { border-top: 1px solid rgba(198,154,60,.25); padding: 14px 16px; background: rgba(0,0,0,.18); }
.who { margin: 0 0 10px; color: #fff; font-weight: 700; font-size: .85rem; }
.who small { display: block; color: #8b8b93; font-weight: 500; font-size: .75rem; overflow: hidden; text-overflow: ellipsis; }
.sidebar-foot .row { gap: 8px; flex-wrap: nowrap; }
.sidebar-foot .row > * { flex: 1; min-width: 0; }
.sidebar-foot form .btn { width: 100%; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px; padding: 12px 28px;
  background: rgba(250,247,240,.7); -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid rgba(255,255,255,.85); box-shadow: 0 1px 0 var(--line);
}
.topbar-title { margin: 0; font-weight: 700; flex: 1; color: var(--muted); font-size: .9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.icon-btn.menu-btn { display: none; }
.content { padding: 26px 28px 60px; width: 100%; max-width: 1480px; }
.backdrop { display: none; }

/* ---------- headings ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head > div { min-width: 0; }
.page-head p { margin: 4px 0 0; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-size: .85rem; font-weight: 600; margin-bottom: 4px; }
.back:hover { color: var(--gold-3); }
.card-title { font: 700 1rem "Cinzel", serif; margin-bottom: 14px; }
.sub-title { font-weight: 800; font-size: .85rem; margin: 16px 0 6px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head .card-title { margin: 0; }

/* ---------- cards & layout ---------- */
.card { border-radius: var(--radius); padding: 20px; }
.card.empty { text-align: center; padding: 40px 20px; color: var(--muted); }
.card.empty .btn { margin-top: 8px; }
.table-card { padding: 0; overflow: hidden; }
.table-card .card-head { padding: 18px 20px 0; }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 10px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row .input { flex: 1; min-width: 200px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin: 14px 0; }
.span-full { grid-column: 1 / -1; }
.grid-main { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 18px; margin-bottom: 18px; align-items: start; }
.narrow { max-width: 420px; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.label { font-weight: 700; font-size: .82rem; color: #3a3a40; }
.req { color: var(--red); }
.help { margin: 0; font-size: .78rem; color: var(--muted); }
.input {
  width: 100%; font: inherit; color: var(--ink); border: 1px solid rgba(201,204,209,.9); border-radius: 10px; padding: 9px 12px;
  background: rgba(255,255,255,.72); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.input::placeholder { color: #a7abb2; }
.input:focus { outline: none; background: rgba(255,255,255,.96); border-color: var(--gold); box-shadow: 0 0 0 3px rgba(198,154,60,.22); }
.input:disabled { background: var(--silver-2); }
textarea.input { resize: vertical; min-height: 44px; }
.input.mono { font: 13px/1.6 ui-monospace, Consolas, monospace; }
.input-sm { padding: 6px 10px; font-size: .85rem; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b6b73' stroke-width='2'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px; }
.input-prefix { display: flex; align-items: stretch; }
.input-prefix span { display: flex; align-items: center; padding: 0 10px; background: rgba(241,239,233,.9); border: 1px solid rgba(201,204,209,.9); border-right: 0; border-radius: 10px 0 0 10px; color: var(--muted); font-size: .82rem; white-space: nowrap; }
.input-prefix .input { border-radius: 0 10px 10px 0; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; }
.check { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid rgba(255,255,255,.9); background: rgba(255,255,255,.55); box-shadow: 0 0 0 1px var(--line); border-radius: 99px; font-size: .85rem; cursor: pointer; }
.check:has(input:checked) { box-shadow: 0 0 0 1px var(--gold); background: var(--gold-soft); }
.field-check { justify-content: center; }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; font-size: .88rem; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .slider { position: relative; width: 40px; height: 22px; border-radius: 99px; background: #d4d2cc; transition: background .15s; flex-shrink: 0; }
.switch .slider::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.25); transition: transform .15s; }
.switch input:checked + .slider { background: var(--grad); }
.switch input:checked + .slider::after { transform: translateX(18px); }
.switch input:focus-visible + .slider { box-shadow: 0 0 0 3px rgba(198,154,60,.35); }
.switch.small .slider { width: 34px; height: 19px; }
.switch.small .slider::after { width: 13px; height: 13px; }
.switch.small input:checked + .slider::after { transform: translateX(15px); }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.form-actions.sticky {
  position: sticky; bottom: 0; z-index: 5; padding: 12px 16px; margin: 0 -4px; border-radius: 14px;
  background: rgba(250,247,240,.72); -webkit-backdrop-filter: blur(14px) saturate(150%); backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid rgba(255,255,255,.85); box-shadow: 0 0 0 1px var(--line), 0 -10px 30px -20px rgba(0,0,0,.25);
}

.image-field { display: flex; gap: 14px; align-items: flex-start; }
.img-preview { width: 150px; height: 100px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); background: rgba(241,239,233,.9); flex-shrink: 0; }
.img-preview.empty { display: flex; align-items: center; justify-content: center; color: #b3b0a8; }
.image-inputs { flex: 1; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.file-btn { position: relative; overflow: hidden; align-self: flex-start; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.upload-box { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 16px; border: 2px dashed rgba(198,154,60,.6); border-radius: 14px; box-shadow: none; text-align: center; color: #57534e; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.is-over { border-color: var(--gold); background: var(--gold-soft); }
.dropzone .ic { color: var(--gold-3); }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-names { font-size: .8rem; font-weight: 700; color: var(--gold-3); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 16px; border-radius: 10px; border: 1px solid transparent; font: 700 .87rem "Manrope", sans-serif; text-decoration: none; cursor: pointer; white-space: nowrap; transition: transform .1s, background .15s, border-color .15s, box-shadow .15s, filter .15s; }
.btn:active { transform: translateY(1px); }
.btn-gold { background: var(--grad); color: var(--ink); box-shadow: 0 8px 20px -10px rgba(143,106,29,.9), inset 0 1px 0 rgba(255,255,255,.55); }
.btn-gold:hover { filter: brightness(1.05); }
.btn-dark { background: rgba(34,34,38,.9); color: var(--gold-2); border-color: rgba(255,255,255,.12); }
.btn-dark:hover { background: var(--ink-4); }
.btn-light { background: rgba(255,255,255,.6); -webkit-backdrop-filter: blur(12px) saturate(140%); backdrop-filter: blur(12px) saturate(140%); color: var(--ink); border-color: rgba(255,255,255,.9); box-shadow: 0 0 0 1px var(--line), inset 0 1px 0 rgba(255,255,255,.9); }
.btn-light:hover { box-shadow: 0 0 0 1px var(--gold), inset 0 1px 0 rgba(255,255,255,.9); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: rgba(255,255,255,.55); color: var(--ink); }
.btn-danger { background: var(--red-soft); color: var(--red); }
.btn-whatsapp { background: var(--wa); color: #fff; }
.btn-whatsapp-light { background: #e9f8ef; color: #127a3c; border-color: #bfe8cf; }
.btn-whatsapp-light:hover { border-color: var(--wa); }
.btn-sm { padding: 6px 12px; font-size: .8rem; }
.btn-xs { padding: 4px 9px; font-size: .74rem; border-radius: 8px; }
.btn-block { width: 100%; }
.danger { color: var(--red) !important; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 9px; border: 1px solid transparent; background: transparent; color: #57534e; cursor: pointer; text-decoration: none; }
.icon-btn:hover { background: rgba(255,255,255,.7); border-color: var(--line); color: var(--ink); }
.icon-btn.danger:hover { background: var(--red-soft); }

/* ---------- tables ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; background: rgba(255,255,255,.45); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 14px; border-bottom: 1px solid rgba(201,204,209,.35); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: rgba(255,255,255,.55); }
.table tr.is-off td { opacity: .55; }
.table tr.clickable { cursor: pointer; }
.table a { text-decoration: none; }
.table .muted { font-size: .8rem; }
.w-grip { width: 36px; } .w-thumb { width: 86px; } .w-toggle { width: 80px; } .w-actions { width: 130px; }
.actions { white-space: nowrap; text-align: right; }
.actions form { display: inline; }
.thumb { width: 72px; height: 48px; object-fit: cover; border-radius: 8px; border: 1px solid rgba(255,255,255,.9); box-shadow: 0 0 0 1px var(--line); }
.thumb.empty { display: inline-flex; align-items: center; justify-content: center; background: rgba(241,239,233,.9); color: #b3b0a8; }
.grip { cursor: grab; color: #a8a29e; touch-action: none; }
.grip:active { cursor: grabbing; }
.dragging { opacity: .55; background: var(--gold-soft) !important; }
.drag-ghost-row td { background: var(--gold-soft); }

/* ---------- toolbar, tabs, pager ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .input { width: auto; }
.toolbar .push { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
.search { position: relative; flex: 1; min-width: 220px; max-width: 420px; }
.search .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search .input { width: 100%; padding-left: 34px; }
.tabs { display: flex; gap: 4px; margin-bottom: 14px; overflow-x: auto; border-bottom: 1px solid var(--line); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 9px 14px; text-decoration: none; font-weight: 700; font-size: .87rem; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tab em { font-style: normal; font-size: .72rem; background: rgba(255,255,255,.7); box-shadow: 0 0 0 1px var(--line); padding: 1px 7px; border-radius: 99px; margin-left: 4px; }
.tab.active { color: var(--ink); border-color: var(--gold); }
.tab.active em { background: var(--grad); box-shadow: none; }
.pager { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 16px; flex-wrap: wrap; }

/* ---------- badges, tags, alerts ---------- */
.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: .72rem; font-weight: 800; letter-spacing: .03em; vertical-align: middle; font-family: "Manrope", sans-serif; }
.badge-pending, .badge-new { background: var(--amber-soft); color: var(--amber); }
.badge-confirmed, .badge-won { background: var(--green-soft); color: var(--green); }
.badge-rejected, .badge-lost { background: var(--red-soft); color: var(--red); }
.badge-completed, .badge-quoted { background: var(--blue-soft); color: var(--blue); }
.badge-contacted { background: #f1efe9; color: #44403c; }
.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; font-size: .7rem; font-weight: 800; background: rgba(241,239,233,.95); color: #44403c; }
.tag-gold { background: var(--gold-soft); color: var(--gold-3); }
.tag-red { background: var(--red-soft); color: var(--red); }
.alert { padding: 11px 14px; border-radius: 12px; margin: 0 0 16px; font-weight: 600; font-size: .88rem; -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.alert a { font-weight: 800; }
.alert-error { background: rgba(253,236,235,.85); color: var(--red); border: 1px solid #f6c9c6; }
.alert-info { background: rgba(232,238,252,.85); color: #1e3a8a; border: 1px solid #c9d6f8; }
.flash { position: relative; padding: 12px 40px 12px 16px; border-radius: 14px; margin-bottom: 18px; font-weight: 700; }
.flash-success { color: var(--green); border-color: #bfe8cf; box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 0 0 1px rgba(21,128,61,.25), var(--shadow); }
.flash-error { color: var(--red); border-color: #f6c9c6; box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 0 0 1px rgba(185,28,28,.3), var(--shadow); }
.flash-info { color: #1e3a8a; border-color: #c9d6f8; box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 0 0 1px rgba(29,78,216,.25), var(--shadow); }
.flash-x { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: 0; background: none; font-size: 1.3rem; cursor: pointer; color: inherit; opacity: .6; }

/* ---------- dashboard ---------- */
.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 16px; border-radius: var(--radius); text-decoration: none; transition: box-shadow .15s, transform .15s; }
.stat:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 0 0 1px var(--gold), 0 18px 36px -18px rgba(198,154,60,.55); }
.stat-label { font-size: .7rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding-right: 24px; }
.stat strong { font: 700 1.9rem "Cinzel", serif; }
.stat small { color: var(--muted); font-size: .76rem; }
.stat-icon { position: absolute; top: 14px; right: 14px; color: var(--gold-3); }
.stat-dark .stat-label { color: var(--gold-2); }
.stat-dark .stat-icon { color: var(--gold-2); }
.stat-dark small { color: #a8a8b0; }
.stat-dark:hover { box-shadow: var(--glass-dark-shadow), 0 0 0 1px var(--gold); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 190px; padding-top: 10px; }
.bar { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; }
.bar span { width: 100%; max-width: 30px; background: var(--grad); border-radius: 6px 6px 2px 2px; min-height: 3px; box-shadow: 0 6px 14px -8px rgba(198,154,60,.9); }
.bar span.zero { background: rgba(201,204,209,.6); box-shadow: none; }
.bar small { font-size: .68rem; color: var(--muted); }
.kv { list-style: none; margin: 0; padding: 0; }
.kv li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid rgba(201,204,209,.35); font-size: .88rem; }
.kv li:last-child { border-bottom: 0; }
.kv a { font-weight: 800; text-decoration: none; color: var(--gold-3); }
.trips { list-style: none; margin: 0; padding: 0; }
.trips li a { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid rgba(201,204,209,.35); text-decoration: none; font-size: .86rem; }
.trips small { color: var(--muted); }
.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; flex-direction: column; gap: 2px; padding: 10px 0; border-bottom: 1px solid rgba(201,204,209,.35); }
.list li:last-child { border-bottom: 0; }

/* ---------- booking detail ---------- */
.details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 0; }
.details div { padding: 9px 0; border-bottom: 1px solid rgba(201,204,209,.35); min-width: 0; }
.details dt { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.details dd { margin: 2px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 2px solid rgba(198,154,60,.4); }
.timeline li { position: relative; padding: 0 0 14px 12px; }
.timeline li::before { content: ""; position: absolute; left: -25px; top: 5px; width: 12px; height: 12px; border-radius: 50%; background: var(--gold); border: 2px solid #fff; }
.timeline span { display: block; }
.timeline p { margin: 3px 0 0; }
.seg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.seg-item { position: relative; }
.seg-item input { position: absolute; opacity: 0; }
.seg-item span { display: block; text-align: center; padding: 9px; border: 1px solid rgba(201,204,209,.9); background: rgba(255,255,255,.55); border-radius: 10px; font-weight: 700; cursor: pointer; font-size: .86rem; }
.seg-item input:focus-visible + span { box-shadow: 0 0 0 3px rgba(198,154,60,.3); }
.seg-pending input:checked + span { background: var(--amber-soft); border-color: var(--amber); color: var(--amber); }
.seg-confirmed input:checked + span { background: var(--green-soft); border-color: var(--green); color: var(--green); }
.seg-rejected input:checked + span { background: var(--red-soft); border-color: var(--red); color: var(--red); }
.seg-completed input:checked + span { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); }
.enquiry.is-read { opacity: .75; }
details summary { cursor: pointer; margin-top: 6px; }

/* ---------- photos & gallery ---------- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.photo { position: relative; margin: 0; border-radius: 14px; overflow: hidden; }
.photo.is-primary { box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 0 0 2px var(--gold), var(--shadow); }
.photo img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.photo figcaption { display: flex; gap: 6px; padding: 8px; flex-wrap: wrap; }
.photo .grip, .gallery-img .grip { position: absolute; top: 6px; left: 6px; z-index: 2; display: inline-flex; padding: 4px; border-radius: 7px; background: rgba(255,255,255,.85); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #44403c; }
.photo-tag { position: absolute; top: 8px; right: 8px; z-index: 2; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; margin-top: 18px; }
.gallery-item { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.gallery-item.is-off { opacity: .6; }
.gallery-img { position: relative; border-radius: 10px; overflow: hidden; }
.gallery-img img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

/* ---------- tiles ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 14px; border-radius: 14px; text-decoration: none; transition: box-shadow .15s, transform .15s; }
.tile:hover { transform: translateY(-2px); box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 0 0 1px var(--gold), var(--shadow); }
.tile em { font-style: normal; font-size: .78rem; font-weight: 800; color: var(--gold-3); margin-top: auto; }

/* ---------- login ---------- */
.login-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px;
  background:
    radial-gradient(60vw 40vw at 80% -10%, rgba(212,160,23,.28), transparent 60%),
    radial-gradient(50vw 40vw at -10% 100%, rgba(248,207,77,.16), transparent 60%),
    radial-gradient(ellipse at top, #1f1a0c, var(--ink) 60%);
}
.login-page::before { background: rgba(212,160,23,.28); left: -10%; top: -10%; }
.login-page::after { background: rgba(248,207,77,.16); right: -8%; bottom: -14%; }
.login-box { width: 100%; max-width: 420px; }
.login-brand { text-align: center; margin-bottom: 18px; }
.login-brand img { height: 84px; width: auto; margin: 0 auto; border-radius: 14px; box-shadow: 0 0 0 1px rgba(198,154,60,.5), 0 20px 50px -20px rgba(0,0,0,.8); }
.login-brand p { margin: 10px 0 0; color: var(--gold-2); font-size: .7rem; letter-spacing: .32em; text-transform: uppercase; }
.login-card { display: flex; flex-direction: column; gap: 14px; padding: 28px; background: linear-gradient(160deg, rgba(255,255,255,.92) 0%, rgba(255,255,255,.78) 100%); box-shadow: inset 0 1px 0 rgba(255,255,255,.95), 0 0 0 1px rgba(198,154,60,.45), 0 30px 80px -30px rgba(0,0,0,.8); }
.login-card h1 { font-size: 1.4rem; }
.login-card .muted { margin: -8px 0 4px; }
.login-card .alert { margin: 0; }
.login-foot { text-align: center; margin-top: 14px; }
.login-foot a { color: #a8a8b0; text-decoration: none; font-size: .85rem; }
.login-foot a:hover { color: var(--gold-2); }
.error-code { font: 800 3rem "Cinzel", serif; margin: 0; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- toast ---------- */
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 100; padding: 10px 16px; border-radius: 12px; background: rgba(11,11,12,.88); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: #fff; font-weight: 700; font-size: .85rem; border: 1px solid rgba(198,154,60,.35); box-shadow: 0 10px 30px -10px rgba(0,0,0,.5); opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s; max-width: calc(100vw - 40px); }
.toast.show { opacity: 1; transform: none; }
.toast.error { background: rgba(185,28,28,.92); border-color: transparent; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .sidebar { position: fixed; left: 0; top: 0; width: min(300px, 86vw); transform: translateX(-100%); transition: transform .22s ease; box-shadow: 0 0 60px rgba(0,0,0,.5); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open { overflow: hidden; }
  body.nav-open .backdrop { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0,0,0,.45); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
  .icon-btn.sidebar-close, .icon-btn.menu-btn { display: inline-flex; }
  .grid-main { grid-template-columns: 1fr; }
  .content { padding: 18px 16px 60px; }
  .topbar { padding: 10px 14px; }
}
@media (max-width: 640px) {
  .grid-2, .grid-3, .details { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { padding: 14px; }
  .stat strong { font-size: 1.5rem; }
  .hide-sm { display: none; }
  .image-field { flex-direction: column; }
  .img-preview { width: 100%; height: 160px; }
  h1 { font-size: 1.3rem; }
  .content { padding: 14px 12px 70px; }
  .card { padding: 16px; }
  .page-head { gap: 10px; }
  .page-head > .btn, .page-head > form, .page-head > form .btn { width: 100%; }
  .toolbar .search { max-width: none; min-width: 100%; }
  .toolbar .input { flex: 1 1 140px; width: auto; }
  .toolbar .search .input { width: 100%; }
  .toolbar .btn { flex: 1 1 auto; }
  .toolbar .push { margin-left: 0; width: 100%; }
  .form-actions .btn { flex: 1 1 auto; }
  .form-actions.sticky { margin: 0; padding: 10px; }
  .bars { height: 150px; gap: 3px; }
  .bar small { font-size: .6rem; }
  .photo-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
  .gallery-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .tiles { grid-template-columns: 1fr; }
  .w-actions { width: auto; }
  .seg { grid-template-columns: 1fr 1fr; }
  .row .input { min-width: 100%; }

  /* Tables turn into stacked cards; admin.js copies the column headings into data-label. */
  .table thead { display: none; }
  .table, .table tbody { display: block; width: 100%; }
  .table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); align-items: center; }
  .table tbody tr:last-child { border-bottom: 0; }
  .table td { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; row-gap: 2px; padding: 3px 0; border: 0; grid-column: 1; min-width: 0; overflow-wrap: anywhere; }
  .table td > * { min-width: 0; }
  .table td[data-label]:not(.actions, .grip, [data-label=""], :has(> .thumb))::before { content: attr(data-label); flex: 0 0 72px; font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); line-height: 1.6; }
  /* block children (sub-lines such as category or phone) go on their own line, aligned with the value */
  .table td[data-label]:not(.actions, .grip, [data-label=""], :has(> .thumb)) > div { flex: 0 0 calc(100% - 82px); margin-left: 82px; }
  .table td.actions { grid-column: 2; grid-row: 1 / span 20; align-self: start; display: flex; flex-direction: column; gap: 4px; text-align: right; }
  .table td.grip { grid-column: 2; grid-row: 1; justify-self: end; padding-bottom: 6px; }
  .table tr:has(td.grip) td.actions { grid-row: 2 / span 20; }
  .table td:has(> .thumb) { padding-bottom: 6px; }
  .thumb { width: 100%; max-width: 220px; height: 120px; }
  .table td[colspan] { grid-column: 1 / -1; display: block; text-align: center; }
  .table td.center { justify-content: center; }
}
@media (max-width: 400px) {
  .stats { grid-template-columns: 1fr 1fr; }
  .btn { padding: 9px 12px; }
  h1 { font-size: 1.15rem; }
}
@media (prefers-reduced-motion: reduce) {
  .sidebar, .btn, .stat, .tile, .toast { transition: none; }
}
