/* Unique Design & Construction — portal styles (same tokens as udchub.com) */
:root {
  --gold: #d6a916;
  --gold-bright: #fab702;
  --gold2: #f0c94d;
  --gold-dark: #9a7608;
  --ink: #161a1d;
  --deep: #202528;
  --cream: #f5f2eb;
  --line: #ded7ca;
  --muted: #6a6e6f;
  --white: #fff;
  --success: #2e7d4f;
  --danger: #b3261e;
  --dark-grad: linear-gradient(110deg, #15191c 0%, #22282b 55%, #604c16 100%);
  --head: 'Dosis', 'Poppins', system-ui, sans-serif;
  --body: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 3px;
  --shadow: 0 10px 30px rgba(22, 26, 29, 0.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--body); color: var(--ink); background: var(--cream); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: var(--gold-dark); text-decoration: none; }
a:hover { color: var(--gold); }
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--head); font-weight: 700; letter-spacing: -0.01em; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(30px, 4.2vw, 50px); }
h2 { font-size: clamp(24px, 3vw, 34px); }
h3 { font-size: 21px; }
h4 { font-size: 17px; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.gold { color: var(--gold); }
.danger { color: var(--danger); }
.success { color: var(--success); }
.center { text-align: center; }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 14px; }
.stack-sm > * + * { margin-top: 8px; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 860px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

/* Eyebrow: gold line + uppercase label (website style) */
.eyebrow { display: inline-flex; align-items: center; gap: 12px; color: var(--gold); font-size: 12px; font-weight: 600; letter-spacing: .22em; text-transform: uppercase; }
.eyebrow::before { content: ''; width: 42px; height: 2px; background: var(--gold); }

/* Buttons — square, uppercase */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border: 1.5px solid var(--gold); background: var(--gold); color: var(--ink); font: 600 13px/1 var(--body); letter-spacing: .12em; text-transform: uppercase; cursor: pointer; border-radius: 0; transition: background .2s, color .2s, transform .1s; text-align: center; }
.btn:hover { background: var(--gold-bright); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:disabled { background: var(--line); border-color: var(--line); color: var(--muted); cursor: not-allowed; }
.btn.outline { background: transparent; color: var(--ink); }
.btn.outline:hover { background: var(--gold); }
.btn.outline.light { color: #fff; }
.btn.outline.light:hover { color: var(--ink); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--gold-dark); padding-inline: 8px; }
.btn.ghost:hover { color: var(--gold); background: transparent; }
.btn.danger { background: transparent; border-color: var(--danger); color: var(--danger); }
.btn.danger:hover { background: var(--danger); color: #fff; }
.btn.block { width: 100%; }
.btn.sm { min-height: 36px; padding: 8px 14px; font-size: 11.5px; }
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Cards & panels */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.card.click { cursor: pointer; transition: border-color .2s, box-shadow .2s; }
.card.click:hover { border-color: var(--gold); box-shadow: var(--shadow); }
.card.tight { padding: 14px 16px; }
.dark { background: var(--dark-grad); color: #fff; border-radius: var(--radius); padding: 26px; }
.dark .muted { color: rgba(255, 255, 255, .7); }
.dark h1, .dark h2, .dark h3 { color: #fff; }
.kv { display: flex; justify-content: space-between; gap: 16px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.kv:last-child { border-bottom: 0; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { font-weight: 500; text-align: right; }
.hr { height: 1px; background: var(--line); margin: 14px 0; }

/* Forms */
label.field { display: block; }
label.field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.input, select.input, textarea.input { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line); background: #fff; font: 400 15px var(--body); color: var(--ink); border-radius: var(--radius); outline: none; transition: border-color .2s, box-shadow .2s; }
textarea.input { min-height: 110px; resize: vertical; }
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(214, 169, 22, .15); }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); background: #fff; border-radius: var(--radius); cursor: pointer; transition: border-color .2s, background .2s; }
.choice input { margin-top: 4px; accent-color: var(--gold); width: 18px; height: 18px; }
.choice.on { border-color: var(--gold); background: rgba(214, 169, 22, .07); }
.choice b { display: block; font-weight: 600; font-size: 14px; }
.choice small { color: var(--muted); font-size: 12.5px; }
.chip { display: inline-flex; align-items: center; padding: 8px 14px; border: 1.5px solid var(--line); background: #fff; cursor: pointer; font: 600 12px var(--body); letter-spacing: .06em; user-select: none; }
.chip.on { background: var(--gold); border-color: var(--gold); }
.counter { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; border: 1px solid var(--line); background: #fff; border-radius: var(--radius); }
.counter .ctl { display: flex; align-items: center; gap: 4px; }
.counter button { width: 36px; height: 36px; border: 1.5px solid var(--gold); background: #fff; font-size: 18px; cursor: pointer; }
.counter button:disabled { border-color: var(--line); color: var(--line); cursor: default; }
.counter b { width: 40px; text-align: center; font-size: 16px; }
.alert { padding: 12px 14px; border-radius: var(--radius); font-size: 14px; border: 1px solid; }
.alert.error { color: var(--danger); background: rgba(179, 38, 30, .06); border-color: rgba(179, 38, 30, .3); }
.alert.info { background: rgba(214, 169, 22, .08); border-color: rgba(214, 169, 22, .35); }
.alert.ok { background: rgba(46, 125, 79, .08); border-color: rgba(46, 125, 79, .3); color: var(--success); }

/* Progress */
.progress-head { display: flex; justify-content: space-between; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.bar { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--gold); border-radius: 4px; transition: width .9s ease; }
.dark .bar { background: rgba(255, 255, 255, .15); }
.bar.ink > i { background: var(--ink); }
.bar.green > i { background: var(--success); }

/* Status chips */
.status { display: inline-block; padding: 3px 10px; font-size: 10.5px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; border-radius: 2px; }
.status.pending { background: rgba(214, 169, 22, .16); color: var(--gold-dark); }
.status.approved, .status.completed { background: rgba(46, 125, 79, .12); color: var(--success); }
.status.rejected { background: rgba(179, 38, 30, .1); color: var(--danger); }
.badge { display: inline-flex; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 10.5px; font-weight: 700; align-items: center; justify-content: center; }

/* Layout */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--ink); border-bottom: 2px solid var(--gold); }
.topbar-in { max-width: 1240px; margin: 0 auto; padding: 0 22px; height: 70px; display: flex; align-items: center; gap: 24px; }
.brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.brand:hover { color: #fff; }
.brand .mark { width: 38px; height: 38px; border: 2px solid var(--gold); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.brand b { display: block; font-family: var(--head); font-size: 17px; letter-spacing: .08em; line-height: 1.1; }
.brand small { display: block; color: var(--gold); font-size: 9.5px; letter-spacing: .3em; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { color: rgba(255, 255, 255, .78); font-size: 12.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; padding: 8px 12px; position: relative; display: inline-flex; align-items: center; gap: 6px; }
.nav a:hover, .nav a.on { color: var(--gold); }
.nav a.on::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -2px; height: 2px; background: var(--gold); }
.main { max-width: 1240px; margin: 0 auto; padding: 28px 22px 60px; }
.main.narrow { max-width: 760px; }
.page-head { margin-bottom: 22px; }
.page-head h1 { font-size: clamp(26px, 3.4vw, 38px); margin-top: 10px; }
.tabbar { display: none; }
@media (max-width: 860px) {
  .nav.desktop { display: none; }
  .topbar-in { height: 60px; padding: 0 16px; }
  .main { padding: 18px 16px 96px; }
  .tabbar { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--ink); border-top: 2px solid var(--gold); padding-bottom: env(safe-area-inset-bottom); }
  .tabbar a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px; color: rgba(255, 255, 255, .6); font-size: 10px; letter-spacing: .04em; position: relative; }
  .tabbar a.on { color: var(--gold); }
  .tabbar a .badge { position: absolute; top: 4px; left: 55%; }
}
.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 22px; align-items: start; }
@media (max-width: 1000px) { .layout-2 { grid-template-columns: 1fr; } }

/* Hero (public landing) */
.hero { position: relative; min-height: 620px; color: #fff; display: flex; align-items: flex-end; background: #161a1d center/cover no-repeat; }
.hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(22,26,29,.25), rgba(22,26,29,.82) 60%, rgba(22,26,29,.96)); }
.hero-in { position: relative; max-width: 1240px; width: 100%; margin: 0 auto; padding: 60px 22px; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; align-items: end; }
.hero h1 { margin: 14px 0 16px; }
.hero p { color: rgba(255, 255, 255, .8); max-width: 560px; }
@media (max-width: 860px) { .hero { min-height: 560px; } .hero-in { grid-template-columns: 1fr; padding: 40px 16px; gap: 22px; } }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); background: var(--ink); color: #fff; }
.stats div { padding: 20px; text-align: center; border-right: 1px solid rgba(255,255,255,.08); }
.stats b { display: block; font-family: var(--head); font-size: 28px; color: var(--gold); }
.stats span { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.7); }
@media (max-width: 560px) { .stats { grid-template-columns: repeat(2, 1fr); } }
.section { max-width: 1240px; margin: 0 auto; padding: 56px 22px; }
@media (max-width: 860px) { .section { padding: 38px 16px; } }
.tile { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: block; color: var(--ink); transition: box-shadow .2s, transform .2s; }
.tile:hover { box-shadow: var(--shadow); transform: translateY(-2px); color: var(--ink); }
.tile img, .tile .ph { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--dark-grad); }
.tile .bar-gold { height: 3px; background: var(--gold); }
.tile .in { padding: 14px 16px 18px; }
.tile .tag { display: inline-block; background: var(--gold); color: var(--ink); font-size: 10px; letter-spacing: .14em; font-weight: 600; padding: 3px 8px; text-transform: uppercase; margin-bottom: 8px; }
.footer { background: var(--ink); color: rgba(255,255,255,.75); }
.footer .section { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 30px; }
.footer a { color: rgba(255,255,255,.85); }
.footer a:hover { color: var(--gold); }
@media (max-width: 860px) { .footer .section { grid-template-columns: 1fr; } }

/* Journey timeline */
.journey { list-style: none; margin: 0; padding: 0; }
.journey li { display: flex; gap: 14px; position: relative; padding-bottom: 18px; cursor: default; }
.journey li.link { cursor: pointer; }
.journey li.link:hover b { color: var(--gold-dark); }
.journey li:not(:last-child)::after { content: ''; position: absolute; left: 15px; top: 32px; bottom: 0; width: 2px; background: var(--line); }
.journey li.done:not(:last-child)::after { background: var(--gold); }
.journey .dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; flex: none; background: var(--line); color: var(--muted); }
.journey li.done .dot { background: var(--gold); color: var(--ink); }
.journey li.current .dot, .journey li.waiting .dot { background: var(--ink); color: var(--gold); }
.journey b { display: block; font-size: 14.5px; }
.journey li.locked b { color: var(--muted); }
.journey small { color: var(--muted); font-size: 12.5px; }

/* Lock gate (blurred until approved) */
.gate { position: relative; }
.gate.locked > .gate-content { filter: blur(9px); pointer-events: none; user-select: none; }
.gate-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(245, 242, 235, .82); z-index: 2; padding: 26px; text-align: center; }
.gate-overlay .lock { width: 62px; height: 62px; border-radius: 50%; background: var(--ink); color: var(--gold); display: grid; place-items: center; margin: 0 auto 14px; }
.gate-overlay h3 { max-width: 460px; margin: 0 auto 6px; }
.gate-overlay p { max-width: 460px; margin: 0 auto 16px; color: var(--muted); }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.gallery img, .gallery .ph { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); cursor: zoom-in; background: var(--dark-grad); }
.file { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); background: #fff; border-radius: var(--radius); }
.file .ic { width: 44px; height: 44px; background: var(--ink); color: var(--gold); display: grid; place-items: center; flex: none; font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.file img.ic { object-fit: cover; }
.file b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Lightbox / modal */
.modal-bg { position: fixed; inset: 0; background: rgba(10, 12, 14, .7); z-index: 100; display: grid; place-items: center; padding: 16px; }
.modal { background: #fff; border-radius: 4px; width: min(560px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 24px; }
.modal h3 { margin-bottom: 12px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.lightbox { position: fixed; inset: 0; z-index: 110; background: #000; display: grid; place-items: center; }
.lightbox img { max-width: 96vw; max-height: 88vh; object-fit: contain; }
.lightbox .bar-top { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; padding: 12px; }

/* Chat */
.chat { display: flex; flex-direction: column; height: calc(100vh - 70px - 56px); min-height: 460px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); }
@media (max-width: 860px) { .chat { height: calc(100vh - 60px - 120px); border-radius: 0; margin: -18px -16px 0; border-left: 0; border-right: 0; } }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; background: var(--cream); display: flex; flex-direction: column; gap: 8px; }
.msg { max-width: min(78%, 460px); padding: 10px 14px; border-radius: 14px 14px 14px 3px; background: #fff; border: 1px solid var(--line); align-self: flex-start; }
.msg.mine { align-self: flex-end; background: var(--ink); color: #fff; border-color: var(--ink); border-radius: 14px 14px 3px 14px; }
.msg .who { font-size: 11px; font-weight: 600; color: var(--gold-dark); margin-bottom: 3px; }
.msg .t { font-size: 10.5px; opacity: .6; text-align: right; margin-top: 4px; }
.msg img { border-radius: 10px; max-width: 260px; cursor: zoom-in; }
.msg.img { padding: 4px; }
.day { align-self: center; font-size: 10.5px; letter-spacing: .14em; color: var(--muted); background: #fff; padding: 2px 10px; text-transform: uppercase; }
.composer { display: flex; gap: 8px; align-items: flex-end; padding: 10px; border-top: 1px solid var(--line); }
.composer textarea { flex: 1; min-height: 46px; max-height: 140px; resize: none; border-radius: 23px; padding: 12px 16px; }
.round { width: 46px; height: 46px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; background: var(--gold); color: var(--ink); flex: none; }
.round.alt { background: transparent; color: var(--gold-dark); }
.round.rec { background: var(--danger); color: #fff; }
.audio { display: flex; align-items: center; gap: 10px; min-width: 200px; }
.audio button { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--gold); cursor: pointer; display: grid; place-items: center; }
.audio .track { flex: 1; height: 4px; background: rgba(128,128,128,.3); border-radius: 2px; overflow: hidden; }
.audio .track i { display: block; height: 100%; background: var(--gold); }
.audio small { font-size: 11px; opacity: .75; }
.recbox { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1.5px solid var(--gold); background: #fff; border-radius: var(--radius); cursor: pointer; user-select: none; -webkit-user-select: none; touch-action: none; }
.recbox.on { border-color: var(--danger); background: rgba(179, 38, 30, .06); }
.recbox .mic { width: 46px; height: 46px; border-radius: 50%; background: var(--gold); display: grid; place-items: center; flex: none; }
.recbox.on .mic { background: var(--danger); color: #fff; }

/* Tables (admin) */
.table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--line); }
.table th { text-align: left; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); padding: 12px 14px; border-bottom: 1px solid var(--line); background: #faf8f3; }
.table td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 14px; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: #fcfaf5; }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 12px 16px; font: 600 12px var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--gold); }
.only-mobile { display: none; }
@media (max-width: 860px) { .only-desktop { display: none !important; } .only-mobile { display: block; } }
.toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 12px 18px; border-left: 3px solid var(--gold); z-index: 200; font-size: 14px; box-shadow: var(--shadow); }
.demo-ribbon { background: var(--gold); color: var(--ink); text-align: center; font-size: 12px; font-weight: 600; padding: 6px; letter-spacing: .06em; }
.otp { display: flex; gap: 8px; }
.otp input { width: 100%; height: 58px; text-align: center; font: 700 24px var(--body); border: 1px solid var(--line); border-radius: var(--radius); }
.otp input:focus { border-color: var(--gold); outline: none; box-shadow: 0 0 0 3px rgba(214, 169, 22, .15); }
.map { width: 100%; height: 280px; background: var(--line); border-radius: var(--radius); }

/* Embedded login (popup on udchub.com): only the login card */
html.is-embed, html.is-embed body { background: #fff; }
.embed .main.narrow { padding: 0; max-width: none; margin: 0; }
.embed .card { border: 0; border-radius: 0; padding: 30px 26px 24px !important; }
.embed h2 { font-size: 26px; }
