:root {
  --bg: #f8f4ed;
  --surface: #ffffff;
  --surface-2: #fffaf3;
  --text: #211915;
  --muted: #746a64;
  --line: #e9e0d7;
  --brand: #d8752e;
  --brand-dark: #ad531d;
  --brand-soft: #fff0e4;
  --gold: #b47a24;
  --gold-soft: #f8edda;
  --green: #2d7a55;
  --green-soft: #e5f4ec;
  --blue: #356e9d;
  --blue-soft: #e6f0f8;
  --danger: #b43c3c;
  --danger-soft: #fbe8e8;
  --shadow: 0 14px 40px rgba(52, 31, 18, 0.08);
  --shadow-sm: 0 6px 22px rgba(52, 31, 18, 0.06);
  --radius: 18px;
  --radius-sm: 12px;
  --sidebar: 270px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

.app-shell { min-height: 100vh; }
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(380px, 1.08fr) minmax(420px, .92fr);
}
.auth-visual {
  position: relative;
  overflow: hidden;
  padding: 54px;
  background:
    radial-gradient(circle at 15% 18%, rgba(255,255,255,.16), transparent 26%),
    radial-gradient(circle at 88% 80%, rgba(255,210,134,.15), transparent 30%),
    linear-gradient(145deg, #702313, #9c3b23 58%, #bc7228);
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.auth-visual::before,
.auth-visual::after {
  content: '';
  position: absolute;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
}
.auth-visual::before { width: 480px; height: 480px; right: -180px; top: -150px; }
.auth-visual::after { width: 640px; height: 640px; left: -310px; bottom: -410px; }
.brand-lockup { position: relative; z-index: 2; display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 52px; height: 52px; border-radius: 16px;
  background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22);
  display: grid; place-items: center; box-shadow: inset 0 1px 0 rgba(255,255,255,.2);
}
.brand-mark svg { width: 34px; height: 34px; }
.brand-name { font-family: Georgia, 'Times New Roman', serif; font-size: 25px; font-weight: 700; letter-spacing: -.2px; }
.brand-sub { font-size: 12px; opacity: .78; letter-spacing: 1.6px; text-transform: uppercase; }
.visual-copy { position: relative; z-index: 2; max-width: 590px; margin: 80px 0 50px; }
.eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase; }
.eyebrow.light { color: rgba(255,255,255,.82); }
.visual-copy h1 { margin: 14px 0 18px; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(42px, 5vw, 72px); line-height: 1.02; letter-spacing: -1.6px; }
.visual-copy p { max-width: 530px; margin: 0; font-size: 17px; line-height: 1.75; color: rgba(255,255,255,.8); }
.visual-stats { position: relative; z-index: 2; display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.visual-stat { padding: 17px; border-radius: 16px; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(8px); }
.visual-stat strong { display: block; font-size: 21px; margin-bottom: 4px; }
.visual-stat span { font-size: 12px; color: rgba(255,255,255,.72); }
.auth-panel { padding: 44px clamp(28px, 5vw, 76px); background: var(--surface-2); display: flex; align-items: center; overflow-y: auto; }
.auth-card { width: 100%; max-width: 580px; margin: auto; }
.auth-mobile-brand { display: none; margin-bottom: 34px; color: var(--brand); }
.auth-heading { margin-bottom: 28px; }
.auth-heading h2 { margin: 7px 0 8px; font-family: Georgia, 'Times New Roman', serif; font-size: 34px; }
.auth-heading p { margin: 0; color: var(--muted); line-height: 1.65; }
.auth-actions { display: grid; gap: 12px; }
.auth-footer { margin-top: 26px; font-size: 13px; color: var(--muted); text-align: center; }
.demo-card { margin-top: 26px; padding: 16px; border: 1px dashed #d9c7b8; border-radius: 14px; background: #fffdf9; }
.demo-card strong { display: block; margin-bottom: 5px; }
.demo-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.55; }

.btn {
  appearance: none; border: 0; border-radius: 12px; min-height: 46px;
  padding: 11px 17px; display: inline-flex; justify-content: center; align-items: center; gap: 8px;
  font-weight: 700; transition: .18s ease; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary { background: var(--brand); color: white; box-shadow: 0 8px 22px rgba(216,117,46,.25); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.btn-secondary:hover { border-color: #ceb9a8; }
.btn-soft { background: var(--brand-soft); color: var(--brand); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-danger { background: var(--danger-soft); color: var(--danger); }
.btn-sm { min-height: 36px; padding: 7px 11px; font-size: 13px; border-radius: 10px; }
.btn-icon { width: 42px; min-width: 42px; padding: 0; }
.btn svg, .icon svg { width: 18px; height: 18px; }
.link-button { border: 0; padding: 0; background: transparent; color: var(--brand); font-weight: 700; }

.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 17px; }
.form-grid .full { grid-column: 1 / -1; }
.field { display: grid; gap: 7px; }
.field label { font-size: 13px; font-weight: 700; color: #493d37; }
.field small { color: var(--muted); line-height: 1.45; }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 11px; background: white; color: var(--text);
  padding: 12px 13px; outline: none; min-height: 46px; transition: .18s ease;
}
.textarea { min-height: 108px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: #b66e58; box-shadow: 0 0 0 3px rgba(216,117,46,.12); }
.input-group { display: flex; }
.input-prefix { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--line); border-right: 0; border-radius: 11px 0 0 11px; background: #faf7f2; color: var(--muted); }
.input-group .input { border-radius: 0 11px 11px 0; }
.check-row { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; color: var(--muted); line-height: 1.5; }
.check-row input { margin-top: 3px; accent-color: var(--brand); }
.form-actions { margin-top: 24px; display: flex; gap: 11px; justify-content: flex-end; flex-wrap: wrap; }
.form-section { padding: 23px; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.form-section + .form-section { margin-top: 18px; }
.form-section-head { margin-bottom: 20px; display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.form-section-head h3 { margin: 0 0 5px; font-size: 18px; }
.form-section-head p { margin: 0; color: var(--muted); font-size: 13px; }
.divider { height: 1px; background: var(--line); margin: 22px 0; }

.otp-row { display: flex; gap: 10px; justify-content: center; margin: 24px 0; }
.otp-input { width: 51px; height: 57px; text-align: center; font-size: 24px; font-weight: 700; border: 1px solid var(--line); border-radius: 12px; outline: none; }
.otp-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(216,117,46,.12); }

.plan-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
.plan-card { position: relative; padding: 23px; border: 1px solid var(--line); border-radius: var(--radius); background: white; cursor: pointer; transition: .18s ease; }
.plan-card:hover, .plan-card.selected { border-color: var(--brand); box-shadow: var(--shadow-sm); }
.plan-card.selected::after { content: '✓'; position: absolute; right: 16px; top: 16px; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: white; font-weight: 700; }
.plan-card .plan-name { font-size: 19px; font-weight: 800; }
.plan-card .plan-price { margin: 11px 0 16px; font-size: 30px; font-weight: 800; }
.plan-card .plan-price span { font-size: 13px; font-weight: 500; color: var(--muted); }
.plan-features { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; font-size: 13px; color: var(--muted); }
.plan-features li { display: flex; gap: 8px; }
.plan-features li::before { content: '✓'; color: var(--green); font-weight: 800; }

.stepper { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; overflow-x: auto; padding-bottom: 5px; }
.step { display: flex; align-items: center; gap: 8px; color: #9a8f88; font-size: 12px; font-weight: 700; white-space: nowrap; }
.step::before { content: attr(data-step); width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; border: 1px solid #d7cbc2; background: white; }
.step.active { color: var(--brand); }
.step.active::before, .step.done::before { color: white; border-color: var(--brand); background: var(--brand); }
.step.done::before { content: '✓'; }
.step-line { width: 28px; height: 1px; background: #d7cbc2; flex: 0 0 auto; }
.success-wrap { text-align: center; padding: 20px 0; }
.success-icon { margin: 0 auto 18px; width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); }
.success-icon svg { width: 40px; height: 40px; }
.success-wrap h2 { font-family: Georgia, 'Times New Roman', serif; font-size: 31px; margin: 0 0 9px; }
.success-wrap > p { margin: 0 auto 22px; color: var(--muted); max-width: 500px; line-height: 1.6; }
.info-box { text-align: left; background: var(--gold-soft); border: 1px solid #ead6b2; padding: 16px; border-radius: 14px; margin: 20px 0; }
.info-box strong { display: block; margin-bottom: 5px; }
.info-box p { margin: 0; font-size: 13px; color: #6b5430; line-height: 1.55; }

.dashboard-layout { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) minmax(0,1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 50; padding: 22px 16px; background: #171717; color: white; overflow-y: auto; }
.sidebar .brand-lockup { padding: 2px 10px 22px; }
.sidebar .brand-mark { width: 44px; height: 44px; border-radius: 14px; }
.sidebar .brand-name { font-size: 20px; }
.sidebar .brand-sub { font-size: 9px; }
.nav-label { padding: 14px 12px 7px; color: rgba(255,255,255,.38); font-size: 10px; font-weight: 800; letter-spacing: 1.5px; text-transform: uppercase; }
.nav-list { display: grid; gap: 3px; }
.nav-link { display: flex; align-items: center; gap: 11px; padding: 11px 12px; color: rgba(255,255,255,.68); border-radius: 11px; font-size: 13px; font-weight: 600; transition: .16s ease; }
.nav-link:hover { background: rgba(255,255,255,.06); color: white; }
.nav-link.active { background: linear-gradient(120deg, rgba(185,91,55,.31), rgba(255,255,255,.06)); color: white; box-shadow: inset 3px 0 0 #d98952; }
.nav-link .icon { display: inline-flex; opacity: .9; }
.nav-link .count { margin-left: auto; min-width: 22px; height: 22px; border-radius: 12px; display: grid; place-items: center; background: rgba(255,255,255,.1); font-size: 10px; }
.sidebar-footer { margin: 18px 4px 0; padding: 14px; border-radius: 14px; background: rgba(255,255,255,.06); }
.sidebar-footer strong { display: block; font-size: 13px; }
.sidebar-footer span { display: block; margin: 4px 0 10px; font-size: 11px; color: rgba(255,255,255,.55); }
.sidebar-footer .progress { background: rgba(255,255,255,.12); }
.sidebar-footer .progress > span { background: #db915c; }
.main-shell { grid-column: 2; min-width: 0; }
.topbar { height: 76px; position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 28px; background: rgba(247,244,238,.9); backdrop-filter: blur(13px); border-bottom: 1px solid rgba(223,214,205,.72); }
.topbar-left { display: flex; align-items: center; gap: 13px; min-width: 0; }
.menu-toggle { display: none; }
.page-title { min-width: 0; }
.page-title h1 { margin: 0; font-family: Georgia, 'Times New Roman', serif; font-size: 24px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.page-title p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 9px; }
.icon-button { position: relative; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 12px; display: grid; place-items: center; background: white; color: var(--text); }
.icon-button .dot { position: absolute; width: 8px; height: 8px; right: 8px; top: 8px; border-radius: 50%; background: var(--danger); border: 2px solid white; }
.avatar { width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(145deg,#e38b4c,#b9581e); color: white; font-weight: 800; }
.content { padding: 28px; max-width: 1560px; margin: 0 auto; }
.mobile-overlay { display: none; }

.hero-card { position: relative; overflow: hidden; padding: 28px; border-radius: 22px; background: linear-gradient(125deg, #1b1b1b 0%, #3a2b21 58%, #d8752e 125%); color: white; box-shadow: 0 16px 36px rgba(36,27,21,.18); }
.hero-card::after { content: ''; position: absolute; width: 300px; height: 300px; border-radius: 50%; right: -100px; top: -130px; border: 45px solid rgba(255,255,255,.06); }
.hero-content { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 22px; }
.hero-copy h2 { margin: 5px 0 7px; font-family: Georgia, 'Times New Roman', serif; font-size: 29px; }
.hero-copy p { margin: 0; color: rgba(255,255,255,.78); }
.hero-temple { display: flex; align-items: center; gap: 13px; min-width: 250px; padding: 15px; border-radius: 16px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.17); }
.temple-thumb { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; background: rgba(255,255,255,.13); }
.temple-thumb svg { width: 34px; height: 34px; }
.hero-temple strong { display: block; }
.hero-temple span { display: block; margin-top: 3px; font-size: 12px; color: rgba(255,255,255,.7); }

.stats-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; margin-top: 18px; }
.stat-card { padding: 19px; background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.stat-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.stat-icon { width: 41px; height: 41px; border-radius: 12px; display: grid; place-items: center; }
.stat-icon.brand { color: var(--brand); background: var(--brand-soft); }
.stat-icon.green { color: var(--green); background: var(--green-soft); }
.stat-icon.blue { color: var(--blue); background: var(--blue-soft); }
.stat-icon.gold { color: var(--gold); background: var(--gold-soft); }
.stat-icon svg { width: 20px; height: 20px; }
.trend { font-size: 11px; font-weight: 700; color: var(--green); background: var(--green-soft); padding: 5px 8px; border-radius: 10px; }
.stat-value { font-size: 29px; font-weight: 800; letter-spacing: -.6px; }
.stat-label { margin-top: 3px; color: var(--muted); font-size: 12px; }

.grid-2 { display: grid; grid-template-columns: minmax(0,1.55fr) minmax(300px,.85fr); gap: 18px; margin-top: 18px; }
.grid-equal { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px; margin-top: 18px; }
.card { background: white; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card-head { padding: 20px 21px 14px; display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.card-head h3 { margin: 0 0 4px; font-size: 17px; }
.card-head p { margin: 0; color: var(--muted); font-size: 12px; }
.card-body { padding: 0 21px 21px; }
.quick-actions { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.quick-action { border: 1px solid var(--line); background: #fffdf9; border-radius: 14px; padding: 15px 12px; text-align: left; transition: .17s ease; }
.quick-action:hover { transform: translateY(-2px); border-color: #d5b8a7; box-shadow: var(--shadow-sm); }
.quick-action .stat-icon { margin-bottom: 11px; }
.quick-action strong { display: block; font-size: 13px; }
.quick-action span { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }

.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 620px; }
th, td { padding: 13px 14px; border-bottom: 1px solid #eee7e1; text-align: left; font-size: 12px; }
th { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .8px; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fffcf8; }
.name-cell { display: flex; align-items: center; gap: 10px; }
.mini-avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); font-weight: 800; }
.status { display: inline-flex; align-items: center; padding: 5px 9px; border-radius: 14px; font-size: 10px; font-weight: 800; text-transform: capitalize; }
.status.confirmed, .status.completed, .status.active, .status.verified { background: var(--green-soft); color: var(--green); }
.status.pending { background: var(--gold-soft); color: #936319; }
.status.cancelled, .status.inactive, .status.rejected { background: var(--danger-soft); color: var(--danger); }
.status.draft { background: #ece9f7; color: #66559d; }

.schedule-list, .alert-list { display: grid; gap: 10px; }
.schedule-item { display: grid; grid-template-columns: 56px 1fr; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; }
.schedule-time { color: var(--brand); font-weight: 800; font-size: 12px; }
.schedule-item strong { display: block; font-size: 13px; }
.schedule-item span { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.alert-item { display: flex; gap: 11px; padding: 12px; border-radius: 13px; background: #fffaf2; border: 1px solid #efe1cc; }
.alert-item .icon { color: var(--gold); }
.alert-item strong { display: block; font-size: 12px; }
.alert-item span { display: block; margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.45; }

.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.page-head h2 { margin: 0 0 6px; font-family: Georgia, 'Times New Roman', serif; font-size: 27px; }
.page-head p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }
.filters { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; }
.search-box { position: relative; min-width: 240px; }
.search-box .input { padding-left: 39px; }
.search-box .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); display: flex; }

.module-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; }
.module-card { position: relative; padding: 18px; border: 1px solid var(--line); border-radius: 16px; background: white; box-shadow: var(--shadow-sm); transition: .17s ease; }
.module-card:hover { transform: translateY(-2px); border-color: #d5b8a7; }
.module-card-top { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 16px; }
.module-icon { width: 43px; height: 43px; border-radius: 13px; display: grid; place-items: center; color: var(--brand); background: var(--brand-soft); }
.module-icon svg { width: 21px; height: 21px; }
.module-card h3 { margin: 0 0 5px; font-size: 15px; }
.module-card p { margin: 0 0 17px; color: var(--muted); font-size: 11px; min-height: 32px; line-height: 1.45; }
.module-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.completion { font-size: 11px; color: var(--muted); }
.progress { height: 7px; border-radius: 8px; background: #eee8e2; overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,var(--brand),#c67a45); }

.kpi-row { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 13px; margin-bottom: 18px; }
.kpi-mini { padding: 16px; background: white; border: 1px solid var(--line); border-radius: 14px; }
.kpi-mini span { color: var(--muted); font-size: 11px; }
.kpi-mini strong { display: block; margin-top: 6px; font-size: 21px; }

.empty-state { padding: 54px 20px; text-align: center; }
.empty-state .empty-icon { width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center; margin: 0 auto 15px; background: var(--brand-soft); color: var(--brand); }
.empty-state h3 { margin: 0 0 7px; }
.empty-state p { max-width: 380px; margin: 0 auto 18px; color: var(--muted); font-size: 13px; line-height: 1.55; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(25,17,13,.58); backdrop-filter: blur(5px); }
.modal { width: min(680px,100%); max-height: calc(100vh - 40px); overflow-y: auto; border-radius: 20px; background: white; box-shadow: 0 25px 80px rgba(0,0,0,.22); }
.modal-head { position: sticky; top: 0; z-index: 2; padding: 20px 22px; display: flex; justify-content: space-between; align-items: center; background: white; border-bottom: 1px solid var(--line); }
.modal-head h3 { margin: 0; font-size: 19px; }
.modal-body { padding: 22px; }

.toggle { position: relative; width: 42px; height: 24px; display: inline-block; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle span { position: absolute; inset: 0; background: #cfc7c0; border-radius: 20px; transition: .2s; }
.toggle span::before { content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: white; border-radius: 50%; transition: .2s; box-shadow: 0 2px 5px rgba(0,0,0,.15); }
.toggle input:checked + span { background: var(--brand); }
.toggle input:checked + span::before { transform: translateX(18px); }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-row strong { display: block; font-size: 13px; }
.setting-row p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }

.upload-zone { padding: 28px; border: 1px dashed #ccb8aa; border-radius: 15px; text-align: center; background: #fffcf8; }
.upload-zone .icon { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; margin: 0 auto 10px; background: var(--brand-soft); color: var(--brand); }
.upload-zone strong { display: block; }
.upload-zone p { margin: 4px 0 15px; color: var(--muted); font-size: 12px; }
.gallery-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; margin-top: 16px; }
.gallery-item { position: relative; aspect-ratio: 4/3; border-radius: 13px; overflow: hidden; background: #eee7df; }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item button { position: absolute; top: 7px; right: 7px; width: 28px; height: 28px; border: 0; border-radius: 9px; background: rgba(35,24,19,.72); color: white; }

.profile-card { display: grid; grid-template-columns: 170px 1fr; gap: 24px; padding: 24px; }
.profile-photo { width: 150px; height: 150px; border-radius: 28px; display: grid; place-items: center; background: linear-gradient(145deg,#e38b4c,#b9581e); color: white; font-size: 48px; font-weight: 800; }
.detail-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 15px; }
.detail { padding: 13px 0; border-bottom: 1px solid var(--line); }
.detail span { display: block; color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .7px; }
.detail strong { display: block; margin-top: 5px; font-size: 13px; }

.toast-region { position: fixed; z-index: 200; right: 20px; bottom: 20px; display: grid; gap: 10px; }
.toast { min-width: 280px; max-width: 390px; padding: 14px 16px; border-radius: 13px; background: #261a15; color: white; box-shadow: 0 14px 40px rgba(0,0,0,.2); animation: toast-in .22s ease; }
.toast strong { display: block; font-size: 13px; }
.toast span { display: block; margin-top: 3px; color: rgba(255,255,255,.68); font-size: 11px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

.install-banner { display: flex; align-items: center; justify-content: space-between; gap: 13px; margin-bottom: 18px; padding: 14px 16px; background: #fff4df; border: 1px solid #ecd3a7; border-radius: 14px; }
.install-banner strong { display: block; font-size: 13px; }
.install-banner span { display: block; margin-top: 3px; color: #78603a; font-size: 11px; }

@media (max-width: 1180px) {
  :root { --sidebar: 235px; }
  .stats-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .module-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .quick-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
  .auth-panel { min-height: 100vh; padding: 34px 24px; }
  .auth-mobile-brand { display: flex; }
  .dashboard-layout { display: block; }
  .sidebar { transform: translateX(-105%); transition: transform .22s ease; box-shadow: 20px 0 60px rgba(0,0,0,.18); }
  .sidebar.open { transform: translateX(0); }
  .main-shell { grid-column: auto; }
  .menu-toggle { display: grid; }
  .mobile-overlay { position: fixed; inset: 0; z-index: 45; background: rgba(22,15,12,.5); }
  .mobile-overlay.show { display: block; }
  .topbar { padding: 0 18px; }
  .content { padding: 20px 18px 80px; }
  .module-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .kpi-row { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 650px) {
  .form-grid, .plan-grid, .grid-equal, .detail-grid { grid-template-columns: 1fr; }
  .stats-grid, .module-grid { grid-template-columns: 1fr; }
  .hero-content { display: block; }
  .hero-temple { margin-top: 18px; min-width: 0; }
  .hero-card { padding: 22px; }
  .hero-copy h2 { font-size: 25px; }
  .quick-actions { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .page-head { display: block; }
  .page-head .filters, .page-head > .btn { margin-top: 14px; }
  .search-box { width: 100%; min-width: 0; }
  .topbar-actions .btn span { display: none; }
  .page-title p { display: none; }
  .page-title h1 { font-size: 20px; }
  .profile-card { grid-template-columns: 1fr; }
  .profile-photo { width: 110px; height: 110px; border-radius: 22px; font-size: 34px; }
  .gallery-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .install-banner { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 420px) {
  .auth-panel { padding: 26px 18px; }
  .auth-heading h2 { font-size: 29px; }
  .otp-row { gap: 6px; }
  .otp-input { width: 42px; height: 50px; font-size: 20px; }
  .content { padding-left: 14px; padding-right: 14px; }
  .topbar { padding: 0 13px; }
  .quick-actions { grid-template-columns: 1fr; }
  .kpi-row { grid-template-columns: 1fr; }
  .topbar-actions .icon-button:nth-child(2) { display: none; }
}


/* Temple City identity */
.brand-mark { overflow: hidden; }
.brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.brand-lockup.is-dark .brand-mark { background: #fff8ef; border-color: rgba(255,255,255,.22); }
.brand-lockup.is-light .brand-mark { background: #fff8ef; border: 1px solid #eadbca; }
.brand-lockup.is-light .brand-name { color: #171717; }
.brand-lockup.is-light .brand-sub { color: #b45b22; opacity: 1; }
.auth-logo-large { width: min(330px, 68vw); display: block; margin: 0 auto 18px; filter: drop-shadow(0 12px 35px rgba(0,0,0,.14)); }
.logo-panel { text-align: center; margin-bottom: 24px; }
.logo-panel p { color: var(--muted); margin: 0; }

.form-error { color: var(--danger); font-size: 12px; margin-top: 8px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--line); background: #fffdf9; border-radius: 999px; padding: 8px 12px; font-size: 12px; color: var(--muted); }
.chip.active { color: var(--brand-dark); border-color: #e4a578; background: var(--brand-soft); font-weight: 700; }
.metric-note { color: var(--muted); font-size: 11px; line-height: 1.45; }
.notice { padding: 13px 15px; border-radius: 13px; background: #f3f7fb; border: 1px solid #dbe6ef; color: #3d5c75; font-size: 12px; line-height: 1.55; }
.notice.warning { background: #fff6e8; border-color: #efd9b4; color: #795a2c; }
.row-actions { display: flex; gap: 7px; align-items: center; }
.split-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.list-stack { display: grid; gap: 10px; }
.list-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: #fffdf9; }
.list-card strong { display: block; font-size: 13px; }
.list-card p { margin: 4px 0 0; font-size: 11px; color: var(--muted); }
.file-preview { margin-top: 9px; font-size: 11px; color: var(--green); }
.install-help { padding: 16px; border-radius: 14px; background: #fffaf2; border: 1px solid #efdfc8; }
.install-help ol { margin: 9px 0 0 18px; padding: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.auth-card.narrow { max-width: 500px; }
.auth-card.wide { max-width: 720px; }
.muted { color: var(--muted); }
.hidden { display: none !important; }
.footer-note { margin-top: 24px; text-align: center; color: var(--muted); font-size: 11px; line-height: 1.6; }
.loading-screen { min-height: 100vh; display: grid; place-items: center; background: #fffaf3; }
.loading-screen img { width: 200px; animation: breathe 1.3s ease-in-out infinite alternate; }
@keyframes breathe { from { opacity: .65; transform: scale(.985); } to { opacity: 1; transform: scale(1); } }

@media (max-width:650px) {
  .auth-logo-large { width: 230px; }
  .list-card { align-items: flex-start; flex-direction: column; }
}
