/* Yamie Karat Flow — shell styles. Brand: burgundy #6B2D38, champagne gold #C9A86A, ivory #F5EEE9. */
:root {
  --burgundy: #6B2D38; --burgundy-d: #4a1e27; --gold: #C9A86A; --gold-ink: #3a1820;
  --ivory: #F5EEE9; --ink: #2b1d20; --muted: #6e6266; --line: #eadfd8; --card: #fff;
  --red: #A4321F; --red-bg: #FDE8E4; --green: #2E7044; --green-bg: #E2F1E6;
  --shadow: 0 1px 3px rgba(60, 20, 30, .08);
  --nav-h: 72px;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: var(--ink); background: var(--ivory); -webkit-tap-highlight-color: transparent; }
button, input, select { font: inherit; color: inherit; }
a { color: var(--burgundy); }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ── app frame ── */
#app { min-height: 100%; display: flex; flex-direction: column; max-width: 560px; margin: 0 auto; background: var(--ivory); position: relative; }
.view { flex: 1; padding: 20px 20px calc(var(--nav-h) + 24px); display: flex; flex-direction: column; gap: 18px; }
.nav { position: fixed; bottom: 0; left: 0; right: 0; height: var(--nav-h); background: #fff; border-top: 1px solid var(--line); display: flex; justify-content: center; z-index: 10; padding-bottom: env(safe-area-inset-bottom); }
.nav-in { display: flex; justify-content: space-around; width: 100%; max-width: 560px; }
.ni { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 64px; font-size: 11px; font-weight: 500; color: var(--muted); text-decoration: none; }
.ni.on { color: var(--burgundy); font-weight: 700; }
.badge { position: absolute; top: 10px; left: 50%; margin-left: 4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #C0392B; color: #fff; font-size: 10px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.offline { position: sticky; top: 0; z-index: 11; background: #3a1820; color: #fff; font-size: 13px; text-align: center; padding: 8px; }

/* ── common pieces ── */
.card { background: var(--card); border-radius: 16px; box-shadow: var(--shadow); }
.h1 { font-size: 24px; font-weight: 700; margin: 0; }
.h2 { font-size: 16px; font-weight: 700; margin: 0; }
.sub { font-size: 13px; color: var(--muted); }
.chip { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.btn { height: 52px; border-radius: 14px; border: 0; background: var(--burgundy); color: #fff; font-weight: 600; font-size: 16px; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; text-decoration: none; width: 100%; }
.btn:disabled { opacity: .6; cursor: default; }
.btn.line { background: #fff; color: var(--burgundy); border: 1.5px solid var(--burgundy); }
.btn.gold { background: var(--gold); color: var(--gold-ink); border-radius: 999px; height: 56px; font-size: 17px; font-weight: 700; }
.err { color: var(--red); font-size: 14px; font-weight: 500; min-height: 20px; }
.empty { text-align: center; padding: 28px 16px; color: var(--muted); font-size: 14px; }
.empty-t { font-size: 16px; font-weight: 600; color: var(--ink); margin-bottom: 4px; }
.skel { background: linear-gradient(90deg, #efe6e1 25%, #f7f1ed 50%, #efe6e1 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 8px; color: transparent !important; }
@keyframes sk { to { background-position: -200% 0; } }
.topbar { display: flex; align-items: center; gap: 8px; margin: -8px -8px 0; }
.iconbtn { width: 44px; height: 44px; border: 0; background: none; display: flex; align-items: center; justify-content: center; border-radius: 50%; cursor: pointer; color: var(--ink); text-decoration: none; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: #5c5054; }
.input { height: 52px; border: 1.5px solid #d9cdc8; border-radius: 12px; padding: 0 14px; font-size: 16px; background: #fff; width: 100%; }
.input:focus { outline: 2px solid var(--burgundy); outline-offset: 1px; border-color: var(--burgundy); }

/* ── login ── */
.login { min-height: 100vh; background: var(--burgundy); color: var(--ivory); display: flex; flex-direction: column; padding: 72px 28px 32px; }
.brand { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.brand .y { font-size: 20px; letter-spacing: 10px; padding-left: 10px; font-weight: 500; margin-top: 6px; }
.brand .k { font-size: 34px; letter-spacing: 3px; font-weight: 700; line-height: 1; }
.brand .t { font-size: 12px; letter-spacing: 2px; color: #E6D2B0; }
.login form { margin-top: 48px; display: flex; flex-direction: column; gap: 12px; }
.login label { font-size: 13px; font-weight: 500; color: #F0DFC2; }
.lf { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px; background: #fff; border-radius: 14px; }
.lf input { border: 0; outline: 0; flex: 1; font-size: 16px; font-weight: 500; color: var(--ink); background: transparent; min-width: 0; }
.lf:focus-within { outline: 3px solid var(--gold); }
.login .err { color: #FFD9CF; text-align: center; }
.login .help { align-self: center; font-size: 14px; color: var(--ivory); padding: 12px; }
.login .foot { margin-top: auto; text-align: center; font-size: 12px; color: #E6D2B0; }

/* ── home ── */
.hello { display: flex; align-items: center; gap: 12px; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: #E8D3B0; color: var(--burgundy); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; flex-shrink: 0; }
.bellbtn { position: relative; width: 48px; height: 48px; border-radius: 50%; background: #fff; display: flex; align-items: center; justify-content: center; color: var(--burgundy); text-decoration: none; }
.bellbtn .dot { position: absolute; top: 9px; right: 10px; width: 10px; height: 10px; border-radius: 50%; background: #C0392B; border: 2px solid #fff; }
.ws { background: var(--burgundy); border-radius: 20px; padding: 18px; color: #fff; display: flex; flex-direction: column; gap: 14px; }
.ws-t { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 600; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kpi { background: var(--ivory); border-radius: 14px; padding: 12px 6px; text-align: center; text-decoration: none; color: var(--ink); }
.kpi b { display: block; font-size: 26px; color: var(--burgundy); }
.kpi span { font-size: 12px; font-weight: 500; display: block; }
.kpi small { font-size: 10px; color: var(--muted); display: block; margin-top: 2px; }
.qas { display: flex; gap: 10px; }
.qa { flex: 1; height: 88px; background: #fff; border-radius: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-decoration: none; color: var(--ink); font-size: 13px; font-weight: 600; text-align: center; padding: 0 4px; }
.row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; color: var(--ink); }
.row + .row { border-top: 1px solid #f0e6e0; }
.row .ic { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.row .tx { flex: 1; min-width: 0; }
.row .tt { font-size: 14px; font-weight: 600; }
.row .ts { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.secthead { display: flex; justify-content: space-between; align-items: baseline; }
.secthead a { font-size: 13px; font-weight: 600; text-decoration: none; }

/* ── apps ── */
.mod { display: flex; align-items: center; gap: 14px; padding: 16px; background: #fff; border-radius: 18px; box-shadow: var(--shadow); text-decoration: none; color: var(--ink); }
.mod .ic { width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.mod .n { font-size: 16px; font-weight: 600; }

/* ── search & alerts ── */
.searchbox { display: flex; align-items: center; gap: 10px; height: 52px; padding: 0 14px; background: #fff; border-radius: 14px; box-shadow: var(--shadow); }
.searchbox input { border: 0; outline: 0; flex: 1; font-size: 16px; background: transparent; min-width: 0; }
.searchbox:focus-within { outline: 2px solid var(--burgundy); }
.chips { display: flex; gap: 8px; overflow-x: auto; }
.fchip { height: 36px; padding: 0 14px; border-radius: 999px; border: 1.5px solid #d9cdc8; background: #fff; font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.fchip.on { background: var(--burgundy); border-color: var(--burgundy); color: #fff; }
.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.row .ic { position: relative; }
.alert.unread .ic::after { content: ""; position: absolute; top: -3px; right: -3px; width: 10px; height: 10px; border-radius: 50%; background: #C0392B; border: 2px solid #fff; }

/* ── profile ── */
.pcard { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px 16px; }
.pcard .avatar { width: 72px; height: 72px; font-size: 28px; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; font-size: 14px; }
.kv + .kv { border-top: 1px solid #f0e6e0; }
.kv span:first-child { color: var(--muted); }
.kv span:last-child { font-weight: 600; text-align: right; }

@media (min-width: 900px) {
  #app { box-shadow: 0 0 0 1px var(--line); }
}
