/* Clint OS — shared look for chief, folder, bills, work, login */
:root {
  color-scheme: dark;
  --bg: #0b0d10; --panel: #161a1f; --panel-2: #1f242b; --line: #2a3038;
  --text: #eef3f8; --muted: #95a1ae; --faint: #5f6b78;
  --accent: #43b5ff; --accent-2: #74c8ff; --accent-soft: rgba(67,181,255,.14);
  --danger: #e26d5a; --danger-soft: rgba(226,109,90,.13);
  --warn: #e0a84e; --warn-soft: rgba(224,168,78,.13);
  --ok: #8fbf7f; --ok-soft: rgba(143,191,127,.14);
  --display: 'Oswald', 'Arial Narrow', sans-serif;
  --head: 'Oswald', 'Arial Narrow', sans-serif;
  --sans: 'Poppins', system-ui, -apple-system, sans-serif;
  --r: 16px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--bg); -webkit-text-size-adjust: 100%; }
body { max-width: 640px; min-height: 100vh; margin: 0 auto; padding-bottom: calc(40px + env(safe-area-inset-bottom)); background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 16px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
button, input, select { font: inherit; color: inherit; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: calc(12px + env(safe-area-inset-top)) 16px 12px; background: rgba(11,13,16,.88); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.avatar { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; box-shadow: 0 0 0 2px var(--bg), 0 0 0 3.5px var(--accent); flex-shrink: 0; }
.brand-name { font-family: var(--display); font-size: 24px; font-weight: 700; text-transform: uppercase; color: var(--accent); letter-spacing: .03em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-meta { color: var(--muted); font-size: 13px; text-align: right; white-space: nowrap; }
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 40px; padding: 0 14px 0 10px; margin-left: -6px; border-radius: 999px; color: var(--accent-2); font-size: 15px; font-weight: 500; }
.back:active { background: var(--accent-soft); }

/* Hero */
.hero { padding: 26px 20px 6px; }
.hero-kicker { color: var(--muted); font-size: 13px; font-weight: 500; }
.hero-title { font-family: var(--display); font-size: 34px; font-weight: 700; text-transform: uppercase; color: var(--accent); line-height: 1.15; letter-spacing: .02em; margin-top: 2px; }
.hero-icon { display: grid; place-items: center; width: 72px; height: 72px; margin-bottom: 14px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); font-size: 38px; }
.hero.center { text-align: center; }
.hero.center .hero-icon { margin-inline: auto; }

/* Sections + cards */
.sec { margin: 22px 16px 0; }
.sec-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 0 4px 10px; }
.sec-t { font-family: var(--head); text-transform: uppercase; letter-spacing: .05em; font-size: 20px; font-weight: 600; }
.sec-n { color: var(--muted); font-size: 13px; font-weight: 500; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.card + .card { margin-top: 10px; }

/* Rows */
.row { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 12px 14px 12px 16px; border-top: 1px solid var(--line); }
.row:first-child { border-top: 0; }
.row-main { flex: 1; min-width: 0; }
.row-title { font-size: 16px; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
.row-sub { color: var(--muted); font-size: 14px; margin-top: 3px; line-height: 1.4; overflow-wrap: anywhere; }
.row-sub.accent { color: var(--accent-2); }
.row form { display: inline-flex; flex-shrink: 0; }
.empty { padding: 18px 16px; color: var(--muted); font-size: 15px; }

/* Buttons */
.check { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1.5px solid var(--faint); background: transparent; color: transparent; font-size: 18px; font-weight: 700; transition: all .15s; }
.check:hover, .check:active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.check.on { border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.icon-btn { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent; color: var(--faint); font-size: 17px; }
.icon-btn:active, .icon-btn:hover { background: var(--danger-soft); color: var(--danger); }
.pill { min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); font-size: 14px; font-weight: 500; }
.pill:active { border-color: var(--accent); }
.btn { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 48px; padding: 0 18px; border: 0; border-radius: 12px; background: var(--accent); color: #06121c; font-size: 16px; font-weight: 600; white-space: nowrap; }
.btn:active { background: var(--accent-2); }
.btn.block { width: 100%; }

/* Forms */
.compose { padding: 12px; }
.compose + .row { border-top: 1px solid var(--line); }
.field { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--text); font-size: 16px; }
.field::placeholder { color: var(--faint); }
.field:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select.field { appearance: none; -webkit-appearance: none; padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
input[type=date].field { min-height: 48px; }
.f-row { display: flex; gap: 8px; }
.f-row > .field { flex: 1; min-width: 0; }
.f-stack { display: grid; gap: 8px; }
.f-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.f-grid .span { grid-column: 1 / -1; }

/* Collapsible */
.fold-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 58px; padding: 0 16px; cursor: pointer; user-select: none; }
.fold-t { font-family: var(--head); text-transform: uppercase; letter-spacing: .04em; font-size: 18px; font-weight: 600; }
.fold-ic { color: var(--accent-2); font-size: 13px; font-weight: 600; }
.fold-b { display: none; border-top: 1px solid var(--line); }

/* Headlines / alerts */
.alert { position: relative; padding: 14px 16px 14px 18px; border-top: 1px solid var(--line); }
.alert:first-child { border-top: 0; }
.alert::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 0 3px 3px 0; background: var(--danger); }
.alert.medium::before { background: var(--warn); }
.alert.low::before { background: var(--faint); }
.alert-title { font-size: 16px; font-weight: 600; }
.alert-detail { color: var(--muted); font-size: 14px; margin-top: 3px; }
.card.hot { border-color: rgba(226,109,90,.35); background: linear-gradient(180deg, rgba(226,109,90,.08), transparent 60%), var(--panel); }

/* Done list */
.done .row { min-height: 48px; }
.done .row-title { color: var(--faint); text-decoration: line-through; font-weight: 400; }

/* App grid (My Life) */
.apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.app { position: relative; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 10px; min-height: 104px; padding: 14px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); transition: transform .12s, border-color .12s; }
.app:active { transform: scale(.97); border-color: var(--accent); }
.app-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--panel-2); font-size: 22px; }
.app-name { font-size: 14px; font-weight: 600; line-height: 1.25; }
.badge { position: absolute; top: 10px; right: 10px; min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--danger); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.badge.soft { background: var(--warn); color: #06121c; }

/* Link list */
.links .row { min-height: 58px; }
.links .row-title { font-weight: 600; }
.chev { color: var(--faint); font-size: 20px; flex-shrink: 0; }
.links a.row:active { background: var(--panel-2); }
.lead-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-2); font-size: 16px; flex-shrink: 0; }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.stats.three { grid-template-columns: repeat(3, 1fr); }
.stat { padding: 14px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); }
.stat-v { font-family: var(--head); text-transform: uppercase; letter-spacing: .04em; font-size: 26px; font-weight: 600; }
.stats.three .stat-v { font-size: 19px; }
.stat-v.neg { color: var(--danger); }
.stat-v.pos { color: var(--ok); }
.stat-l { color: var(--muted); font-size: 12px; font-weight: 500; margin-top: 2px; }

/* Money + bills */
.amt { font-weight: 600; font-size: 16px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.amt.neg { color: var(--danger); }
.amt.pos { color: var(--ok); }
.row.paid .row-title { text-decoration: line-through; color: var(--faint); }
.row.paid .amt { color: var(--faint); }
.row.soon { background: linear-gradient(90deg, var(--danger-soft), transparent 70%); }
.tag { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--warn-soft); color: var(--warn); font-size: 11px; font-weight: 600; vertical-align: 2px; }
.soon-t { color: var(--danger); font-weight: 600; }
.acts { display: flex; align-items: center; gap: 2px; flex-shrink: 0; }
.faded { opacity: .55; }

/* Work */
.photo { position: relative; border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.photo img { display: block; width: 100%; }
.photo-btn { position: absolute; right: 10px; bottom: 10px; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border-radius: 999px; background: rgba(11,13,16,.82); backdrop-filter: blur(8px); border: 1px solid var(--line); font-size: 14px; font-weight: 500; cursor: pointer; }
.photo-add { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; height: 180px; border: 1.5px dashed var(--faint); border-radius: var(--r); background: var(--panel); color: var(--muted); font-size: 14px; cursor: pointer; }
.photo-add b { font-size: 36px; font-weight: 300; color: var(--accent); line-height: 1; }
.date-chip { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 12px; background: var(--panel-2); flex-shrink: 0; line-height: 1.05; }
.date-chip .m { color: var(--muted); font-size: 11px; font-weight: 600; text-transform: uppercase; }
.date-chip .d { font-family: var(--head); text-transform: uppercase; letter-spacing: .04em; font-size: 20px; font-weight: 600; }
.row.today { background: var(--accent-soft); }
.row.today .date-chip { background: var(--accent); color: #06121c; }
.row.today .date-chip .m { color: #06121c; }
.today-tag { color: var(--accent-2); font-size: 12px; font-weight: 700; margin-left: 6px; }

/* Login */
.login { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 24px 20px; }
.login-card { width: 100%; max-width: 360px; padding: 28px 22px 22px; border-radius: 22px; background: var(--panel); border: 1px solid var(--line); text-align: center; }
.login .avatar { width: 72px; height: 72px; margin-bottom: 14px; }
.login-t { font-family: var(--display); font-size: 30px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--accent); }
.login-s { color: var(--muted); font-size: 14px; margin: 4px 0 22px; }
.error { margin-bottom: 12px; padding: 10px 12px; border-radius: 10px; background: var(--danger-soft); color: var(--danger); font-size: 14px; }

@media (max-width: 370px) { .apps { grid-template-columns: repeat(2, 1fr); } .stats.three .stat-v { font-size: 16px; } .hero-title { font-size: 28px; } }
@media (min-width: 560px) { .apps { grid-template-columns: repeat(4, 1fr); } }
