/* Unique Design & Construction — client & office portal (v6). Same tokens as udchub.com. */
:root {
  --gold: #d6a916;
  --gold-bright: #fab702;
  --gold-soft: #f6ecc9;
  --gold-dark: #8a6a06;
  --ink: #161a1d;
  --deep: #202528;
  --cream: #f5f2eb;
  --paper: #ffffff;
  --line: #e2dccf;
  --line-2: #efeae0;
  --muted: #676b6c;
  --success: #2e7d4f;
  --success-soft: #e5f2ea;
  --danger: #b3261e;
  --danger-soft: #fbe9e7;
  --info-soft: #eef3f7;
  --head: 'Dosis', 'Poppins', system-ui, sans-serif;
  --body: 'Poppins', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --shadow: 0 10px 30px rgba(22, 26, 29, 0.07);
  --top: 64px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--body); color: var(--ink); background: var(--cream); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
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.005em; line-height: 1.15; margin: 0; }
h1 { font-size: clamp(30px, 4.4vw, 50px); }
h2 { font-size: clamp(23px, 3vw, 32px); }
h3 { font-size: 20px; }
h4 { font-size: 16.5px; }
p { margin: 0; }
button { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; }
.gold { color: var(--gold-dark); }
.green { color: var(--success); }
.red, .danger-t { color: var(--danger) !important; }
.center { text-align: center; }
.right { text-align: right; }
.pad { padding: 18px; }
.nowrap { white-space: nowrap; }
.strike { text-decoration: line-through; color: var(--muted); }
.row { display: flex; gap: 10px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.row.top { align-items: flex-start; }
.row.end { justify-content: flex-end; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 14px; }
.stack-sm > * + * { margin-top: 8px; }
.stack-lg > * + * { margin-top: 22px; }
.grid { display: grid; gap: 14px; }
.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: 900px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.hide { display: none !important; }
@media (max-width: 760px) { .desk-only { display: none !important; } }
@media (min-width: 761px) { .mob-only { display: none !important; } }

/* Eyebrow */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 10px; border-radius: 999px; background: linear-gradient(90deg, rgba(214,169,22,.18), rgba(214,169,22,.06)); border: 1px solid rgba(214,169,22,.35); color: var(--gold-dark); font-size: 10.5px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; line-height: 1.2; max-width: 100%; }
.eyebrow::before { content: ''; width: 7px; height: 7px; flex: none; background: var(--gold); transform: rotate(45deg); box-shadow: 0 0 0 3px rgba(214,169,22,.18); }
.dark .eyebrow, .dark-grad .eyebrow, .hero .eyebrow { color: var(--gold-bright); background: linear-gradient(90deg, rgba(214,169,22,.22), rgba(214,169,22,.04)); border-color: rgba(250,183,2,.35); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border: 1.5px solid var(--gold); background: var(--gold); color: var(--ink); font: 600 12.5px/1.1 var(--body); letter-spacing: .1em; text-transform: uppercase; cursor: pointer; border-radius: 0; transition: background .15s, color .15s, border-color .15s; text-align: center; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--gold-bright); border-color: var(--gold-bright); color: var(--ink); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[disabled] { background: var(--line); border-color: var(--line); color: var(--muted); cursor: not-allowed; transform: none; }
.btn.outline { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.outline:hover { background: var(--ink); color: #fff; }
.btn.outline.light, .dark .btn.outline { color: #fff; border-color: rgba(255,255,255,.6); }
.dark .btn.outline:hover { background: #fff; color: var(--ink); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink); }
.btn.ghost:hover { background: rgba(22,26,29,.06); }
.dark .btn.ghost { color: #fff; }
.dark .btn.ghost:hover { background: rgba(255,255,255,.1); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.dark:hover { background: var(--deep); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger:hover { background: #8e1d17; }
.btn.block { display: flex; width: 100%; }
.btn.sm { min-height: 34px; padding: 6px 12px; font-size: 11.5px; letter-spacing: .06em; }
.btn.icononly { padding: 6px; min-width: 34px; }
.btn.icononly.sm { min-height: 32px; min-width: 32px; }
.btn .ic { flex: none; }
.link-btn { background: none; border: 0; padding: 0; color: var(--gold-dark); font-weight: 600; font-size: 12.5px; cursor: pointer; }
.link-btn:hover { color: var(--gold); text-decoration: underline; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; flex: none; border: 0; background: transparent; cursor: pointer; color: var(--muted); border-radius: 50%; }
.icon-btn:hover { background: rgba(22,26,29,.06); color: var(--ink); }
.spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; display: inline-block; animation: spin .7s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: flex; gap: 10px; align-items: center; justify-content: center; padding: 50px 20px; color: var(--muted); }

/* Cards */
.card { background: var(--paper); border: 1px solid var(--line); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.card.tight { padding: 14px; }
.card.flat { box-shadow: none; }
.card.click { cursor: pointer; transition: border-color .15s, transform .15s; }
.card.click:hover { border-color: var(--gold); }
.card-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h3, .card-head h4 { margin: 0; }
.dark { background: var(--ink); color: #fff; border-color: var(--ink); }
.dark .muted { color: rgba(255,255,255,.66); }
.dark-grad { background: linear-gradient(115deg, #15191c 0%, #22282b 58%, #5d4a17 100%); color: #fff; border: 0; }
.dark-grad .muted { color: rgba(255,255,255,.7); }
.hr { height: 1px; background: var(--line); margin: 16px 0; border: 0; }

.kv { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 14px; }
.kv:last-child { border-bottom: 0; }
.kv > span:first-child { color: var(--muted); }
.kv > span:last-child { text-align: right; overflow-wrap: anywhere; }
.kv .strong { font-weight: 700; }
.dark .kv { border-color: rgba(255,255,255,.14); }

/* Forms */
label.field, .field { display: block; min-width: 0; }
.field > span:first-child { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 6px; color: var(--ink); }
.req { color: var(--danger); margin-left: 3px; font-weight: 700; }
.input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 0; background: #fff; color: var(--ink); font: 14.5px/1.4 var(--body); outline: none; transition: border-color .15s, box-shadow .15s; -webkit-appearance: none; appearance: none; }
select.input { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
.input.sm { min-height: 36px; padding: 6px 10px; font-size: 13.5px; }
textarea.input { resize: vertical; min-height: 90px; }
.input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(214,169,22,.18); }
.input[readonly] { background: var(--cream); }
.hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.input-wrap { position: relative; display: flex; align-items: stretch; }
.input-wrap > em { display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--line); border-right: 0; background: var(--cream); font-style: normal; font-size: 13px; color: var(--muted); }
.input-wrap .input { flex: 1; }
.input-wrap .eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: none; padding: 8px; cursor: pointer; color: var(--muted); }
.pw .input { padding-right: 42px; }
.meter { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; margin-top: 8px; }
.meter i { height: 5px; background: var(--line); transition: background .2s; }
.meter.s1 i:nth-child(-n+1), .meter.s2 i:nth-child(-n+2) { background: var(--danger); }
.meter.s3 i:nth-child(-n+3), .meter.s4 i:nth-child(-n+4) { background: #d98a0b; }
.meter.s5 i:nth-child(-n+5) { background: #6fa53a; }
.meter.s6 i { background: var(--success); }
.pw-row { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-top: 6px; font-size: 12px; flex-wrap: wrap; }
.pw-label { color: var(--muted); }
.pw-label.weak { color: var(--danger); font-weight: 600; }
.pw-label.fair { color: #b16e00; font-weight: 600; }
.pw-label.good { color: #4d8a26; font-weight: 600; }
.pw-label.strong { color: var(--success); font-weight: 700; }

.choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); background: #fff; cursor: pointer; transition: border-color .15s, background .15s; position: relative; }
.choice:hover { border-color: var(--gold); }
.choice.on { border-color: var(--gold); background: #fffaf0; box-shadow: inset 3px 0 0 var(--gold); }
.choice.disabled { opacity: .62; cursor: default; }
.choice input { margin-top: 4px; accent-color: var(--gold-dark); width: 17px; height: 17px; flex: none; }
.choice b { display: block; font-size: 14px; }
.choice small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.choice .tag { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 600; padding: 3px 8px; background: var(--gold-soft); color: var(--gold-dark); white-space: nowrap; }
.choices { display: grid; gap: 8px; }
.toggle { display: inline-flex; gap: 10px; align-items: center; cursor: pointer; user-select: none; font-size: 14px; }
.toggle input { position: absolute; opacity: 0; pointer-events: none; }
.toggle i { width: 40px; height: 22px; border-radius: 22px; background: var(--line); position: relative; transition: background .15s; flex: none; }
.toggle i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.toggle input:checked + i { background: var(--gold); }
.toggle input:checked + i::after { transform: translateX(18px); }
.toggle input:focus-visible + i { box-shadow: 0 0 0 3px rgba(214,169,22,.3); }
.counter { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); background: #fff; font-size: 14px; }
.counter .ctl { display: flex; align-items: center; gap: 4px; }
.counter button { width: 32px; height: 32px; border: 1px solid var(--line); background: var(--cream); cursor: pointer; font-size: 18px; line-height: 1; }
.counter button:hover:not(:disabled) { border-color: var(--gold); }
.counter button:disabled { opacity: .4; cursor: default; }
.counter b { min-width: 26px; text-align: center; }
.seg { display: inline-flex; border: 1px solid var(--line); background: #fff; }
.seg button { border: 0; background: none; padding: 8px 14px; cursor: pointer; font-size: 13px; font-weight: 500; }
.seg button.on { background: var(--ink); color: #fff; }

/* Alerts, chips, badges */
.alert { padding: 11px 14px; border-left: 3px solid; font-size: 13.5px; }
.alert.error { background: var(--danger-soft); border-color: var(--danger); color: #7c1a14; }
.alert.info { background: var(--info-soft); border-color: #5a7d99; color: #23394a; }
.alert.ok { background: var(--success-soft); border-color: var(--success); color: #1d5435; }
.alert.warn { background: #fff5dc; border-color: var(--gold); color: #5d4600; }
.chip-s { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; font-size: 11.5px; font-weight: 600; background: var(--line-2); color: var(--ink); white-space: nowrap; letter-spacing: .02em; }
.chip-s.gold { background: var(--gold-soft); color: var(--gold-dark); }
.chip-s.green { background: var(--success-soft); color: var(--success); }
.chip-s.red { background: var(--danger-soft); color: var(--danger); }
.chip-s.blue { background: var(--info-soft); color: #2d5674; }
.chip-s.dark { background: var(--ink); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 13px; }
.chip.on { border-color: var(--ink); background: var(--ink); color: #fff; }
.badge { display: inline-flex; align-items: center; justify-content: center; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; margin-left: 6px; }

/* Progress */
.progress-head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.bar { height: 7px; background: var(--line); overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--gold); transition: width .4s; }
.dark .bar, .dark-grad .bar { background: rgba(255,255,255,.16); }
.bar.green > i { background: var(--success); }

/* Topbar & layout */
.topbar { position: sticky; top: 0; z-index: 40; background: var(--ink); color: #fff; height: var(--top); }
.topbar-in { max-width: 1260px; margin: 0 auto; height: 100%; display: flex; align-items: center; gap: 18px; padding: 0 20px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; flex: none; }
.brand:hover { color: #fff; }
.brand img { height: 38px; width: auto; }
.nav { display: flex; gap: 2px; align-items: center; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav a { position: relative; display: inline-flex; align-items: center; gap: 6px; color: rgba(255,255,255,.76); padding: 0 11px; height: var(--top); font-size: 13.5px; font-weight: 500; white-space: nowrap; }
.nav a:hover { color: #fff; }
.nav a.on { color: #fff; }
.nav a.on::after { content: ''; position: absolute; left: 11px; right: 11px; bottom: 0; height: 3px; background: var(--gold); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.me-btn { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 4px; border: 0; background: rgba(255,255,255,.07); color: #fff; cursor: pointer; }
.me-btn:hover { background: rgba(255,255,255,.14); }
.me-btn span { font-size: 13px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.office-bar { background: var(--gold); color: var(--ink); font-size: 13px; padding: 7px 16px; display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; text-align: center; }
.office-bar button { border: 1px solid var(--ink); background: var(--ink); color: #fff; padding: 4px 12px; font-size: 12px; font-weight: 600; cursor: pointer; }
.main { max-width: 1260px; margin: 0 auto; padding: 26px 20px 60px; }
.main.narrow { max-width: 760px; }
.main.mid { max-width: 980px; }
.page-head { margin-bottom: 20px; }
.page-head h2 { margin-top: 4px; }
.page-head p { margin-top: 6px; }
.back { display: flex; width: max-content; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.back:hover { color: var(--ink); }
.layout-2 { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
.layout-side { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 980px) { .layout-2, .layout-side { grid-template-columns: 1fr; } }
.sticky { position: sticky; top: calc(var(--top) + 16px); }
.menu-panel { position: absolute; right: 12px; top: calc(var(--top) - 4px); background: #fff; color: var(--ink); border: 1px solid var(--line); box-shadow: 0 20px 50px rgba(0,0,0,.18); min-width: 230px; z-index: 60; padding: 6px; }
.menu-panel a, .menu-panel button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: none; text-align: left; font-size: 14px; color: var(--ink); cursor: pointer; }
.menu-panel a:hover, .menu-panel button:hover { background: var(--cream); }
.menu-panel .sep { height: 1px; background: var(--line); margin: 5px 0; }
.menu-panel .who { padding: 10px 12px 8px; font-size: 13px; }

/* Mobile tab bar */
.tabbar { display: none; }
@media (max-width: 760px) {
  :root { --top: 56px; }
  .topbar-in { padding: 0 12px; gap: 10px; }
  .brand img { height: 32px; }
  .nav.desk { display: none; }
  .main { padding: 18px 14px 96px; }
  .tabbar { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--ink); padding-bottom: env(safe-area-inset-bottom); border-top: 1px solid rgba(255,255,255,.08); }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 8px 2px 7px; color: rgba(255,255,255,.62); font-size: 10.5px; position: relative; }
  .tabbar a.on { color: var(--gold); }
  .tabbar a .badge { position: absolute; top: 3px; left: 54%; margin: 0; }
  .card { padding: 16px; }
  .me-btn span { display: none; }
}

/* Public landing */
.hero { position: relative; overflow: hidden; color: #fff; background: linear-gradient(115deg, #121518 0%, #1f2427 55%, #5a4815 100%); }
.hero::before { content: ''; position: absolute; inset: 0; background: radial-gradient(800px 380px at 85% 10%, rgba(214,169,22,.22), transparent 60%); }
.hero-in { position: relative; max-width: 1260px; margin: 0 auto; padding: 70px 20px 60px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: 40px; align-items: center; }
.hero h1 { color: #fff; margin: 14px 0 16px; }
.hero h1 em { color: var(--gold); font-style: normal; }
.hero p.lead { color: rgba(255,255,255,.78); font-size: 16px; max-width: 560px; }
.hero .card { color: var(--ink); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: rgba(255,255,255,.12); margin-top: 34px; max-width: 620px; }
.stats div { background: rgba(18,21,24,.6); padding: 14px; }
.stats b { display: block; font-family: var(--head); font-size: 26px; color: var(--gold); }
.stats span { font-size: 11.5px; color: rgba(255,255,255,.7); text-transform: uppercase; letter-spacing: .08em; }
@media (max-width: 900px) { .hero-in { grid-template-columns: 1fr; padding: 40px 16px; } .stats { grid-template-columns: repeat(2, 1fr); } }
.section { max-width: 1260px; margin: 0 auto; padding: 50px 20px; }
.steps-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.steps-row .card b { display: block; font-family: var(--head); font-size: 28px; color: var(--gold); }
@media (max-width: 900px) { .steps-row { grid-template-columns: 1fr 1fr; } }
.footer { background: var(--ink); color: rgba(255,255,255,.7); font-size: 13px; }
.footer .section { padding: 26px 20px; display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; }
.footer a { color: rgba(255,255,255,.85); }
.auth-wrap { min-height: calc(100vh - var(--top)); display: grid; place-items: center; padding: 30px 14px 80px; }
.auth { width: 100%; max-width: 440px; }
.auth .card { padding: 26px; }
.auth h2 { margin: 8px 0 6px; }
.otp { display: flex; gap: 8px; justify-content: center; }
.otp input { width: 46px; height: 54px; text-align: center; font-size: 22px; font-weight: 700; border: 1px solid var(--line); outline: none; }
.otp input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(214,169,22,.18); }

/* Journey (client steps) */
.journey { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0; }
.journey li { position: relative; text-align: center; padding: 0 4px; }
.journey li::after { content: ''; position: absolute; top: 15px; left: calc(50% + 18px); right: calc(-50% + 18px); height: 2px; background: var(--line); }
.journey li:last-child::after { display: none; }
.journey li.done::after { background: var(--gold); }
.journey .dot { width: 32px; height: 32px; margin: 0 auto 8px; border-radius: 50%; border: 2px solid var(--line); background: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 700; color: var(--muted); }
.journey li.done .dot { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.journey li.current .dot { border-color: var(--gold); color: var(--gold-dark); box-shadow: 0 0 0 5px rgba(214,169,22,.18); }
.journey b { display: block; font-size: 12.5px; line-height: 1.25; }
.journey li.locked b { color: var(--muted); font-weight: 500; }
@media (max-width: 640px) { .journey b { font-size: 10.5px; } .journey .dot { width: 26px; height: 26px; font-size: 11px; } .journey li::after { top: 12px; } }

/* Lock gate */
.gate { position: relative; }
.gate.locked > .gate-content { filter: blur(3px); pointer-events: none; user-select: none; opacity: .55; }
.gate-overlay { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px; }
.gate-overlay > div { background: rgba(255,255,255,.95); border: 1px solid var(--line); padding: 22px; max-width: 380px; box-shadow: var(--shadow); }

/* Stat tiles */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.stat { background: #fff; border: 1px solid var(--line); padding: 14px 16px; min-width: 0; }
.stat span { display: block; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.stat b { display: block; font-family: var(--head); font-size: 24px; margin-top: 4px; overflow-wrap: anywhere; }
.stat.gold { border-top: 3px solid var(--gold); }
.stat.green b { color: var(--success); }
.stat.red b { color: var(--danger); }
.stat.click { cursor: pointer; }
.stat.click:hover { border-color: var(--gold); }

/* Avatars */
.avatar { border-radius: 50%; object-fit: cover; flex: none; background: var(--line); }
.avatar.ph { display: inline-grid; place-items: center; background: var(--gold-soft); color: var(--gold-dark); font-weight: 700; }

/* Files */
.files { display: grid; gap: 8px; }
.file { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border: 1px solid var(--line); background: #fff; min-width: 0; }
.file b { display: block; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fthumb { width: 46px; height: 46px; object-fit: cover; flex: none; cursor: pointer; background: var(--cream); }
.fthumb.t { display: grid; place-items: center; font-size: 10px; font-weight: 700; color: var(--gold-dark); background: var(--gold-soft); cursor: default; letter-spacing: .05em; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.gallery img, .gallery video { width: 100%; aspect-ratio: 4/3; object-fit: cover; cursor: zoom-in; background: var(--ink); }
.pages { display: grid; gap: 14px; }
.page-card { border: 1px solid var(--line); background: #fff; }
.page-card img { width: 100%; height: auto; cursor: zoom-in; }
.page-card .cap { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; font-size: 12.5px; border-top: 1px solid var(--line); }
.upload-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 22px; border: 1.5px dashed var(--line); background: #fff; text-align: center; cursor: pointer; color: var(--muted); }
.upload-box:hover, .upload-box.drag { border-color: var(--gold); background: #fffaf0; color: var(--ink); }
.upload-row { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 6px 0; }
.upload-row .bar { flex: 1; }

/* Lightbox & modal */
.lightbox { position: fixed; inset: 0; z-index: 90; background: rgba(10,12,14,.94); display: flex; flex-direction: column; }
.lightbox img { margin: auto; max-width: 100%; max-height: calc(100vh - 60px); object-fit: contain; }
.lb-bar { display: flex; align-items: center; gap: 10px; padding: 8px 12px; color: #fff; font-size: 13px; }
.lb-bar .btn.ghost { color: #fff; }
.modal-bg { position: fixed; inset: 0; z-index: 80; background: rgba(15,18,20,.55); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 14px 20px; overflow-y: auto; }
.modal { width: 100%; max-width: 520px; background: #fff; padding: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.modal.wide { max-width: 820px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
@media (max-width: 560px) { .modal-bg { padding: 0; align-items: flex-end; } .modal { max-height: 92vh; overflow-y: auto; padding: 18px; } }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 100; background: var(--ink); color: #fff; padding: 12px 18px; font-size: 14px; box-shadow: 0 12px 30px rgba(0,0,0,.25); max-width: calc(100vw - 28px); border-left: 4px solid var(--gold); animation: up .2s ease; }
.toast.error { border-left-color: #ff6b5f; }
@keyframes up { from { transform: translate(-50%, 10px); opacity: 0; } }
@media (max-width: 760px) { .toast { bottom: calc(76px + env(safe-area-inset-bottom)); } }

/* Empty state */
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty-ic { width: 56px; height: 56px; margin: 0 auto 10px; border-radius: 50%; background: var(--gold-soft); color: var(--gold-dark); display: grid; place-items: center; }
.empty h4 { color: var(--ink); margin-bottom: 4px; }
.empty .btn { margin-top: 14px; }

/* Tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; margin-bottom: 18px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { position: relative; border: 0; background: none; padding: 11px 14px; font-size: 13.5px; font-weight: 500; color: var(--muted); cursor: pointer; white-space: nowrap; display: inline-flex; align-items: center; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); font-weight: 600; }
.tab.on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; background: var(--gold); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: #fff; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); padding: 10px 12px; background: #faf8f3; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: #fffaf0; }
.table .num { text-align: right; white-space: nowrap; }

/* Lists of rows (projects, inbox) */
.list { display: grid; gap: 8px; }
.list-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; background: #fff; border: 1px solid var(--line); cursor: pointer; min-width: 0; color: var(--ink); }
.list-row:hover { border-color: var(--gold); color: var(--ink); }
.list-row.on { border-color: var(--gold); box-shadow: inset 3px 0 0 var(--gold); }
.list-row b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .side { text-align: right; flex: none; font-size: 12.5px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .input { max-width: 320px; }
.search { position: relative; flex: 1; min-width: 200px; max-width: 360px; }
.search .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search .input { padding-left: 36px; max-width: none; }

/* Milestones */
.ms { display: grid; gap: 10px; }
.ms-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px; background: #fff; border: 1px solid var(--line); }
.ms-item.current { border-color: var(--gold); box-shadow: inset 3px 0 0 var(--gold); }
.ms-num { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; background: var(--line-2); color: var(--muted); }
.ms-item.done .ms-num { background: var(--gold); color: var(--ink); }
.ms-item.current .ms-num { background: var(--ink); color: var(--gold); }
.ms-item b { font-size: 14.5px; }

/* Quotation */
.q-line { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.q-line:last-child { border-bottom: 0; }
.q-line b { display: block; font-size: 14.5px; }
.q-amt { text-align: right; white-space: nowrap; font-weight: 600; }
.q-amt small { display: block; font-weight: 400; font-size: 11.5px; color: var(--muted); }
.q-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 0; margin-top: 4px; border-top: 2px solid var(--ink); }
.q-total b { font-family: var(--head); font-size: 26px; }
.adv-band { background: var(--ink); color: #fff; padding: 14px 16px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.adv-band b { color: var(--gold); font-family: var(--head); font-size: 22px; }
.q-edit-row { display: grid; grid-template-columns: minmax(0, 2.2fr) 110px 100px 90px 120px 34px; gap: 8px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.q-edit-head { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; border-bottom: 1px solid var(--line); }
.q-edit-row .amt { text-align: right; font-weight: 600; padding-top: 10px; white-space: nowrap; }
@media (max-width: 860px) {
  .q-edit-row { grid-template-columns: 1fr 1fr 1fr; }
  .q-edit-row > :first-child { grid-column: 1 / -1; }
  .q-edit-head { display: none; }
}
.stage-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) 90px 130px 120px; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
@media (max-width: 760px) { .stage-row { grid-template-columns: 26px 1fr 80px; } .stage-row > :nth-child(4), .stage-row > :nth-child(5) { grid-column: 2 / -1; } }
.plan-row { display: grid; grid-template-columns: 26px minmax(0, 1.4fr) 150px minmax(0, 1.4fr) auto; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
@media (max-width: 760px) { .plan-row { grid-template-columns: 26px 1fr; } .plan-row > :nth-child(n+3) { grid-column: 2 / -1; } }

/* Estimate box (requirement form) */
.estimate { background: var(--ink); color: #fff; padding: 18px; }
.estimate .line { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.estimate .line span:last-child { white-space: nowrap; }
.estimate .total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; }
.estimate .total b { color: var(--gold); font-family: var(--head); font-size: 24px; }
.estimate .muted { color: rgba(255,255,255,.62); }
.form-step { counter-increment: fs; }
.form-step > h3::before { content: counter(fs) '. '; color: var(--gold-dark); }
.form-steps { counter-reset: fs; }

/* Map */
.map-picker .map { height: 320px; border: 1px solid var(--line); background: #e9e5dc; }
.map-tools { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 6px; }
.map-tools .input { flex: 1; min-width: 180px; }

/* Chat */
.chat { display: flex; flex-direction: column; height: calc(100vh - var(--top) - 120px); min-height: 460px; background: #fff; border: 1px solid var(--line); }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.chat-body { flex: 1; overflow-y: auto; padding: 14px; background: #f6f3ec; }
.chat-empty { text-align: center; color: var(--muted); padding: 40px 20px; display: grid; justify-items: center; gap: 10px; }
.day { text-align: center; margin: 14px 0 10px; }
.day span { display: inline-block; background: rgba(22,26,29,.08); color: var(--muted); font-size: 11px; padding: 3px 10px; border-radius: 10px; }
.msg-row { display: flex; gap: 8px; align-items: flex-end; margin: 6px 0; }
.msg-row.mine { justify-content: flex-end; }
.msg { position: relative; max-width: min(78%, 560px); background: #fff; padding: 8px 11px 6px; border: 1px solid var(--line); font-size: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.msg.mine { background: #fdf3d3; border-color: #f0dfa6; }
.msg-row.auto .msg { background: #eef3f7; border-color: #d8e3eb; }
.msg .who { font-size: 11.5px; font-weight: 600; color: var(--gold-dark); margin-bottom: 2px; }
.msg-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-img { max-width: 260px; max-height: 300px; object-fit: cover; cursor: zoom-in; margin: 2px 0; }
.msg audio { max-width: 240px; height: 38px; }
.msg video { max-width: 260px; }
.msg .meta { font-size: 10.5px; color: var(--muted); text-align: right; margin-top: 3px; display: flex; gap: 5px; justify-content: flex-end; align-items: center; }
.ticks { letter-spacing: -2px; color: var(--muted); font-weight: 700; }
.ticks.seen { color: #2a8bd8; }
.msg .quote { border-left: 3px solid var(--gold); background: rgba(0,0,0,.04); padding: 4px 8px; margin-bottom: 5px; font-size: 12.5px; }
.msg .quote b { display: block; font-size: 11.5px; color: var(--gold-dark); }
.msg .quote span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 380px; }
.msg-file { display: flex; align-items: center; gap: 8px; padding: 6px 4px; color: var(--ink); }
.msg-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; font-weight: 500; }
.dur { font-size: 11px; color: var(--muted); margin-left: 4px; }
.msg-tools { position: absolute; top: -12px; right: 6px; display: none; gap: 2px; background: #fff; border: 1px solid var(--line); box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.msg:hover .msg-tools, .msg:focus-within .msg-tools { display: flex; }
.msg-tools button { border: 0; background: none; padding: 5px 6px; cursor: pointer; color: var(--muted); }
.msg-tools button:hover { color: var(--ink); }
@media (hover: none) { .msg-tools { display: flex; position: static; box-shadow: none; border: 0; background: none; justify-content: flex-end; margin-top: 2px; } }
.reply-bar { display: flex; gap: 10px; align-items: center; padding: 8px 12px; background: #fffaf0; border-top: 1px solid var(--line); font-size: 13px; }
.reply-bar b { display: block; color: var(--gold-dark); font-size: 12px; }
.reply-bar span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.composer { display: flex; align-items: flex-end; gap: 6px; padding: 8px; border-top: 1px solid var(--line); background: #fff; }
.composer textarea { flex: 1; resize: none; border: 1px solid var(--line); padding: 10px 12px; font: 14.5px/1.4 var(--body); min-height: 42px; max-height: 140px; outline: none; }
.composer textarea:focus { border-color: var(--gold); }
.composer .send { width: 42px; height: 42px; border: 0; background: var(--gold); color: var(--ink); cursor: pointer; display: grid; place-items: center; flex: none; }
.composer .send:hover { background: var(--gold-bright); }
.rec { display: flex; align-items: center; gap: 10px; flex: 1; font-size: 14px; padding: 4px 6px; }
.rec .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--danger); animation: blink 1s infinite; }
.rec .btn:first-of-type { margin-left: auto; }
@keyframes blink { 50% { opacity: .3; } }
.tpl-list { display: grid; gap: 8px; margin-top: 10px; max-height: 60vh; overflow-y: auto; }
.tpl { text-align: left; border: 1px solid var(--line); background: #fff; padding: 10px 12px; cursor: pointer; }
.tpl:hover { border-color: var(--gold); }
.tpl b { display: block; font-size: 13.5px; }
.tpl span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.inbox { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 14px; }
.inbox .list { max-height: calc(100vh - var(--top) - 140px); overflow-y: auto; align-content: start; }
@media (max-width: 900px) { .inbox { grid-template-columns: 1fr; } .inbox.open .inbox-list { display: none; } .inbox:not(.open) .inbox-chat { display: none; } }
@media (max-width: 760px) { .chat { height: calc(100vh - var(--top) - 150px); } }

.audio { display: flex; align-items: center; gap: 8px; }
.audio audio { height: 36px; max-width: 280px; }

/* Stars */
.stars { display: inline-flex; gap: 2px; color: var(--line); }
.stars i.on { color: var(--gold); }
.stars i.on svg { fill: currentColor; }
.star-pick button { border: 0; background: none; cursor: pointer; padding: 2px; color: var(--line); }
.star-pick button.on { color: var(--gold); }
.star-pick button.on svg { fill: currentColor; }

/* Timeline */
.tl { list-style: none; margin: 0; padding: 0; }
.tl li { position: relative; padding: 0 0 14px 22px; font-size: 13.5px; }
.tl li::before { content: ''; position: absolute; left: 4px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); }
.tl li::after { content: ''; position: absolute; left: 8px; top: 18px; bottom: 0; width: 1px; background: var(--line); }
.tl li:last-child::after { display: none; }

/* Misc */
.copy { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; border: 0; background: none; padding: 0; font: inherit; color: inherit; }
.copy:hover { color: var(--gold-dark); }
.pay-box { border: 1px solid var(--line); padding: 14px; background: #fff; }
.pay-box h4 { margin-bottom: 8px; }
.wa-code { font-family: ui-monospace, Menlo, monospace; font-size: 22px; letter-spacing: .3em; font-weight: 700; }
.mark-canvas { width: 100%; touch-action: none; border: 1px solid var(--line); cursor: crosshair; background: #fff; }
.sep-label { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; margin: 6px 0; }
.sep-label::before, .sep-label::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.drop-note { font-size: 12px; color: var(--muted); }
.pill-nav { display: flex; gap: 6px; flex-wrap: wrap; }
.side-nav { display: grid; gap: 2px; }
.side-nav button { display: flex; align-items: center; gap: 10px; text-align: left; border: 0; background: none; padding: 10px 12px; cursor: pointer; font-size: 14px; color: var(--muted); }
.side-nav button:hover { background: #fff; color: var(--ink); }
.side-nav button.on { background: #fff; color: var(--ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--gold); }
@media (max-width: 980px) { .side-nav { display: flex; overflow-x: auto; gap: 4px; } .side-nav button { white-space: nowrap; } }
.cat-row { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line-2); }
.cat-row:last-child { border-bottom: 0; }
.cat-row.off { opacity: .6; }
.cat-grid { display: grid; grid-template-columns: minmax(0, 2fr) 120px 120px auto; gap: 8px; align-items: center; }
@media (max-width: 760px) { .cat-grid { grid-template-columns: 1fr 1fr; } .cat-grid > :first-child { grid-column: 1 / -1; } }
.code { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; background: var(--cream); padding: 2px 6px; overflow-wrap: anywhere; }
.locked-note { display: flex; gap: 10px; align-items: center; padding: 14px; background: #faf8f3; border: 1px dashed var(--line); color: var(--muted); font-size: 13.5px; }
.ic { flex: none; vertical-align: middle; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Inside the udchub.com login popup (?embed) */
html.is-embed, html.is-embed body { background: #fff; }
.is-embed .auth-wrap { min-height: 0; padding: 0; display: block; }
.is-embed .auth { max-width: none; }
.is-embed .auth .card { border: 0; box-shadow: none; padding: 26px 24px 20px; }
.stack > b, .stack-sm > b { display: block; }
.layout-2 > *, .layout-side > *, .grid > * { min-width: 0; }
@media (max-width: 560px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat { padding: 10px 12px; }
  .stat b { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .page-head h2 { font-size: 24px; }
  .tab { padding: 10px 10px; }
}
@media (max-width: 760px) {
  .table-wrap:has(.table.cards) { border: 0; background: none; overflow: visible; }
  .table.cards, .table.cards tbody { display: block; }
  .table.cards thead { display: none; }
  .table.cards tr { display: block; background: #fff; border: 1px solid var(--line); padding: 10px 14px; margin-bottom: 8px; }
  .table.cards td { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; padding: 5px 0; border: 0; white-space: normal; text-align: right; }
  .table.cards td::before { content: attr(data-label); color: var(--muted); font-size: 12px; text-align: left; flex: none; }
  .table.cards td.lead { display: block; text-align: left; padding-bottom: 8px; border-bottom: 1px dashed var(--line); margin-bottom: 4px; }
  .table.cards td.lead::before, .table.cards td.acts::before { content: none; }
  .table.cards td.acts { justify-content: flex-end; border-top: 1px dashed var(--line); margin-top: 4px; padding-top: 8px; }
}
.kv b, .q-amt, .stat b { white-space: nowrap; }
.qplan { grid-template-columns: 26px minmax(0, 2fr) 170px 86px 130px 100px 100px; }
@media (max-width: 860px) {
  .qplan { grid-template-columns: 1fr 1fr; }
  .qplan > .ms-num { display: none; }
  .qplan > :nth-child(2), .qplan > :last-child { grid-column: 1 / -1; }
  .qplan > :last-child { justify-content: flex-end; }
}
.perm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 640px) { .perm-grid { grid-template-columns: 1fr; } }
.perm { display: flex; gap: 10px; align-items: flex-start; padding: 9px 11px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-size: 13px; line-height: 1.35; }
.perm.on { border-color: var(--gold); background: #fffaf0; }
.perm input { accent-color: var(--gold-dark); width: 16px; height: 16px; margin-top: 1px; flex: none; }
