:root {
  color-scheme: dark;
  --bg: #09090b;
  --surface: #111114;
  --card: #18181b;
  --card-soft: #1d1d21;
  --border: #29292e;
  --border-soft: #222226;
  --text: #f4f4f5;
  --muted: #92929b;
  --muted-2: #666670;
  --mint: #10b981;
  --mint-soft: rgba(16, 185, 129, .13);
  --amber: #d6ad62;
  --red: #ef6262;
  --blue: #6f9cf4;
  --violet: #ae8bea;
  --radius: 20px;
  --shadow: 0 18px 60px rgba(0,0,0,.22);
  font-family: 'Avenir Next', Avenir, 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
}
* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { min-height: 100vh; margin: 0; background: var(--bg); color: var(--text); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid rgba(16,185,129,.75); outline-offset: 2px; }
button:disabled { opacity: .6; cursor: wait; }
::selection { background: rgba(16,185,129,.28); color: white; }

.boot-screen { min-height: 100vh; display: grid; place-content: center; justify-items: center; color: var(--muted); gap: 12px; }
.boot-screen p { font: 800 13px 'Avenir Next', Avenir, sans-serif; letter-spacing: .22em; color: var(--text); margin: 0; }
.boot-screen span { font-size: 12px; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 14px; background: linear-gradient(145deg, #1c2724, #101a17); border: 1px solid rgba(16,185,129,.35); color: var(--mint); font: 800 25px 'Avenir Next', Avenir, sans-serif; box-shadow: 0 0 30px rgba(16,185,129,.08); }
.brand-row { display: flex; align-items: center; gap: 12px; }
.brand-name { font: 800 14px 'Avenir Next', Avenir, sans-serif; letter-spacing: .19em; }
.brand-edition { font: 600 8px 'Avenir Next', Avenir, sans-serif; color: var(--muted-2); letter-spacing: .22em; margin-top: 3px; }
.icon { width: 18px; height: 18px; flex: 0 0 auto; }
.eyebrow { color: var(--muted-2); font: 700 9px 'Avenir Next', Avenir, sans-serif; letter-spacing: .17em; }
.muted { color: var(--muted); }
.tiny { font-size: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Secure entry */
.auth-shell { min-height: 100vh; padding: 34px 20px; display: grid; place-items: center; position: relative; overflow: hidden; background: radial-gradient(ellipse at 50% 38%, rgba(16,185,129,.07), transparent 42%), #09090b; }
.auth-glow { position: absolute; width: 480px; height: 480px; border-radius: 50%; border: 1px solid rgba(16,185,129,.06); box-shadow: 0 0 0 55px rgba(16,185,129,.014), 0 0 0 110px rgba(16,185,129,.01); pointer-events: none; }
.auth-card { position: relative; width: min(100%, 440px); padding: 38px; border: 1px solid var(--border); border-radius: 26px; background: rgba(17,17,20,.94); box-shadow: var(--shadow); }
.auth-card .brand-row { margin-bottom: 46px; }
.auth-card .eyebrow { margin-bottom: 13px; color: var(--mint); }
.auth-card h1 { font: 700 clamp(28px, 5vw, 35px)/1.16 'Avenir Next', Avenir, sans-serif; letter-spacing: -.045em; margin: 0 0 13px; }
.auth-copy { color: var(--muted); font-size: 13px; line-height: 1.7; margin: 0 0 28px; }
.auth-form { display: grid; gap: 10px; }
.field-label { display: block; color: #aaaab2; font-size: 10px; font-weight: 700; margin: 0 0 7px; letter-spacing: .035em; }
.auth-form input { margin-bottom: 8px; }
input, select, textarea { width: 100%; min-width: 0; color: var(--text); background: #101014; border: 1px solid var(--border); border-radius: 11px; padding: 12px 13px; font-size: 12px; transition: border-color .18s ease, background .18s ease; }
input::placeholder, textarea::placeholder { color: #60606a; }
input:focus, select:focus, textarea:focus { border-color: rgba(16,185,129,.6); background: #121519; outline: none; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23888892' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 34px; }
input[type="date"], input[type="time"] { color-scheme: dark; }
textarea { resize: vertical; line-height: 1.6; }
.button { min-height: 42px; padding: 0 15px; display: inline-flex; justify-content: center; align-items: center; gap: 9px; border-radius: 11px; border: 1px solid transparent; font-size: 11px; font-weight: 700; cursor: pointer; transition: transform .16s, background .16s, border-color .16s; }
.button:hover { transform: translateY(-1px); }
.button .icon { width: 15px; height: 15px; }
.button-primary { background: var(--mint); color: #04251a; }
.button-primary:hover { background: #34d399; }
.button-secondary { background: #202025; color: #e4e4e7; border-color: var(--border); }
.button-secondary:hover, .button-ghost:hover { background: #29292f; }
.button-ghost { background: transparent; color: var(--muted); border-color: var(--border); }
.button-full { width: 100%; margin-top: 8px; min-height: 47px; }
.form-error { min-height: 15px; margin: 0; color: #ff8585; font-size: 11px; }
.privacy-points { display: flex; gap: 15px; flex-wrap: wrap; padding-top: 22px; margin-top: 16px; border-top: 1px solid var(--border-soft); }
.privacy-points span { display: inline-flex; align-items: center; gap: 5px; font-size: 9px; color: var(--muted); }
.privacy-points .icon { width: 12px; height: 12px; color: var(--mint); }
.auth-footnote { color: #65656e; font-size: 10px; line-height: 1.6; margin: 17px 0 0; }
.auth-bottom { position: absolute; bottom: 24px; color: #55555e; font: 700 8px 'Avenir Next', Avenir, sans-serif; letter-spacing: .2em; }
.auth-bottom span { color: var(--mint); padding: 0 7px; }

/* Application frame */
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 232px minmax(0, 1fr); background: var(--bg); }
.sidebar { height: 100vh; position: sticky; top: 0; display: flex; flex-direction: column; padding: 28px 17px 19px; background: #0d0d10; border-right: 1px solid #202024; }
.sidebar .brand-row { padding: 0 11px; margin-bottom: 52px; }
.sidebar-label { padding: 0 12px 12px; font: 700 8px 'Avenir Next', Avenir, sans-serif; color: #595963; letter-spacing: .18em; }
.side-nav { display: grid; gap: 5px; }
.nav-item { border: 0; background: transparent; width: 100%; min-height: 44px; display: flex; gap: 12px; align-items: center; text-align: left; padding: 0 12px; border-radius: 11px; color: #85858f; font-size: 11px; cursor: pointer; transition: .18s ease; }
.nav-item:hover { color: var(--text); background: #17171b; }
.nav-item.active { color: #e9fff6; background: rgba(16,185,129,.12); box-shadow: inset 2px 0 var(--mint); }
.nav-item.active .icon { color: var(--mint); }
.nav-item .icon { width: 17px; height: 17px; color: #74747e; }
.sidebar-bottom { margin-top: auto; }
.privacy-card { display: flex; align-items: center; gap: 10px; padding: 12px; margin: 0 2px 15px; border: 1px solid #25252a; background: #141417; border-radius: 12px; }
.privacy-card > .icon { color: var(--mint); width: 15px; }
.privacy-card strong, .privacy-card span { display: block; }
.privacy-card strong { font-size: 10px; font-weight: 700; }
.privacy-card span { margin-top: 3px; font-size: 8px; color: var(--muted-2); }
.side-utility { background: transparent; border: 0; color: #7f7f89; display: flex; gap: 10px; align-items: center; min-height: 36px; padding: 0 12px; font-size: 10px; cursor: pointer; width: 100%; border-radius: 8px; }
.side-utility:hover { color: var(--text); background: #18181c; }
.side-utility .icon { width: 14px; height: 14px; }
.main-area { width: 100%; max-width: 1640px; margin: 0 auto; padding: 0 42px 24px; min-width: 0; }
.topbar { min-height: 99px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #1d1d21; margin-bottom: 29px; }
.topbar-kicker { color: #5e5e68; font: 700 8px 'Avenir Next', Avenir, sans-serif; letter-spacing: .16em; margin-bottom: 6px; }
.topbar h1 { font: 700 21px 'Avenir Next', Avenir, sans-serif; letter-spacing: -.04em; margin: 0; }
.topbar-actions { display: flex; align-items: center; gap: 16px; }
.live-clock { color: #c8c8ce; font: 600 12px 'Avenir Next', Avenir, sans-serif; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.avatar-button { width: 34px; height: 34px; border: 1px solid rgba(16,185,129,.3); border-radius: 50%; color: var(--mint); background: rgba(16,185,129,.08); font: 700 12px 'Avenir Next', Avenir, sans-serif; cursor: pointer; }
.icon-button { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 1px solid var(--border); border-radius: 10px; background: #17171b; color: #a3a3ad; cursor: pointer; transition: .18s ease; }
.icon-button:hover { color: var(--text); border-color: #45454e; }
.icon-button .icon { width: 15px; height: 15px; }
.mobile-settings, .mobile-nav { display: none; }
.page-content { width: 100%; max-width: 1200px; margin: 0 auto; }
.app-footer { max-width: 1200px; margin: 33px auto 0; padding-top: 14px; border-top: 1px solid #1b1b1f; display: flex; justify-content: space-between; color: #55555e; font: 700 8px 'Avenir Next', Avenir, sans-serif; letter-spacing: .15em; }
.app-footer span:last-child { display: inline-flex; align-items: center; gap: 8px; }
.app-footer i, .pulse-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 10px rgba(16,185,129,.5); }

/* Shared cards and headings */
.welcome-row, .page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin: 0 0 22px; }
.welcome-row .eyebrow, .page-intro .eyebrow { margin-bottom: 9px; }
.welcome-row h2, .page-intro h2 { margin: 0; font: 700 clamp(21px, 2.4vw, 27px)/1.25 'Avenir Next', Avenir, sans-serif; letter-spacing: -.05em; }
.welcome-row h2 span, .page-intro h2 span { color: var(--mint); }
.welcome-row p, .page-intro p { margin: 7px 0 0; color: var(--muted); font-size: 11px; }
.day-chip, .mini-live, .count-badge, .week-range { display: inline-flex; align-items: center; gap: 8px; color: #9b9ba4; background: #151518; border: 1px solid #28282d; border-radius: 30px; padding: 8px 11px; font: 700 8px 'Avenir Next', Avenir, sans-serif; letter-spacing: .1em; white-space: nowrap; }
.mini-live { font-size: 7px; padding: 7px 9px; color: #8a8a94; }
.bento-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.panel { min-width: 0; border: 1px solid var(--border); background: linear-gradient(145deg, rgba(25,25,29,.98), rgba(20,20,23,.98)); border-radius: var(--radius); padding: 19px; box-shadow: 0 10px 35px rgba(0,0,0,.10); }
.span-2 { grid-column: span 2; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 17px; }
.panel-heading h3, .panel h3 { margin: 5px 0 0; font: 700 13px 'Avenir Next', Avenir, sans-serif; letter-spacing: -.02em; }
.panel-heading > .icon { color: #777780; }
.subtle-link, .text-link { display: inline-flex; align-items: center; gap: 6px; border: 0; background: transparent; color: #a3a3ad; font-size: 10px; cursor: pointer; padding: 4px 0; }
.subtle-link:hover, .text-link:hover { color: var(--mint); }
.subtle-link .icon, .text-link .icon { width: 13px; height: 13px; }
.completion-pill { min-width: 74px; display: grid; justify-items: center; padding: 10px 13px; background: rgba(16,185,129,.08); border: 1px solid rgba(16,185,129,.18); border-radius: 13px; }
.completion-pill strong { color: var(--mint); font: 700 17px 'Avenir Next', Avenir, sans-serif; }
.completion-pill span { margin-top: 3px; color: #7d8d86; font: 700 7px 'Avenir Next', Avenir, sans-serif; letter-spacing: .13em; }

/* Dashboard */
.dashboard-grid { grid-template-rows: auto auto auto; }
.gauge-panel { min-height: 208px; }
.gauge-panel .panel-heading { margin-bottom: 12px; }
.gauge-switch { width: 100%; display: flex; align-items: center; gap: 24px; padding: 5px 7px 7px; text-align: left; border: 0; border-radius: 13px; background: transparent; cursor: pointer; }
.gauge-switch:hover .ring-wrap { transform: scale(1.035); }
.ring-wrap { width: 118px; height: 118px; position: relative; flex: 0 0 auto; transition: transform .2s ease; }
.progress-ring { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ring-track, .ring-value { fill: none; stroke-width: 7; }
.ring-track { stroke: #2b2b30; }
.ring-value { stroke: var(--mint); stroke-linecap: round; transition: stroke-dashoffset .45s ease; }
.ring-value.ring-alert { stroke: var(--red); }
.ring-center { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; }
.ring-center strong { font: 700 25px 'Avenir Next', Avenir, sans-serif; letter-spacing: -.06em; }
.ring-center span { color: var(--muted-2); font: 700 7px 'Avenir Next', Avenir, sans-serif; letter-spacing: .13em; margin-top: 2px; }
.gauge-info h4 { margin: 6px 0; font: 700 15px 'Avenir Next', Avenir, sans-serif; }
.gauge-info p { color: #96969f; margin: 0; font-size: 11px; }
.switch-hint { display: inline-flex; gap: 7px; align-items: center; color: var(--mint); font-size: 9px; margin-top: 15px; }
.switch-hint .icon { width: 12px; height: 12px; }
.gauge-footer { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid #2a2a2f; margin-top: 12px; padding-top: 12px; color: #b4b4bb; font-size: 9px; }
.gauge-footer > span:first-child { display: inline-flex; align-items: center; gap: 7px; }
.legend-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
.legend-dot.mint { background: var(--mint); }
.prayer-next-panel { background: radial-gradient(circle at 88% 8%, rgba(214,173,98,.11), transparent 45%), linear-gradient(145deg, #1b1a19, #151517); }
.prayer-orb { color: var(--amber); font-size: 16px; }
.next-prayer-name { margin-top: 12px; font: 700 22px 'Avenir Next', Avenir, sans-serif; }
.next-prayer-time { color: var(--amber); font: 700 28px 'Avenir Next', Avenir, sans-serif; letter-spacing: -.05em; margin-top: 2px; }
.countdown-label { color: #74747e; font: 700 7px 'Avenir Next', Avenir, sans-serif; letter-spacing: .16em; margin-top: 16px; }
.countdown-value { color: #d6d6db; font: 600 13px 'Avenir Next', Avenir, sans-serif; margin-top: 5px; font-variant-numeric: tabular-nums; }
.prayer-next-panel .text-link { margin-top: 17px; }
.quote-panel { position: relative; overflow: hidden; background: linear-gradient(145deg, rgba(27,26,23,.98), rgba(20,20,22,.98)); }
.quote-mark { position: absolute; top: 6px; right: 19px; color: rgba(214,173,98,.17); font: 700 78px Georgia, serif; line-height: 1; }
.quote-panel .eyebrow { color: var(--amber); position: relative; }
.quote-panel p { position: relative; min-height: 50px; margin: 17px 0 20px; max-width: 340px; color: #d8d5cf; font: 500 13px/1.65 'Avenir Next', Avenir, sans-serif; }
.quote-footer { display: flex; justify-content: space-between; align-items: center; color: #77736d; font: 700 7px 'Avenir Next', Avenir, sans-serif; letter-spacing: .14em; }
.quote-footer .icon { color: var(--amber); width: 14px; }
.task-preview-panel { min-height: 195px; }
.compact-task-list { display: grid; }
.compact-task { min-height: 36px; display: flex; align-items: center; gap: 10px; border-top: 1px solid #29292e; }
.compact-task-title { flex: 1; min-width: 0; display: flex; gap: 9px; align-items: center; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check-button { width: 18px; height: 18px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid #55555f; border-radius: 6px; background: transparent; cursor: pointer; color: #06291e; }
.check-button:hover { border-color: var(--mint); }
.check-button.checked { background: var(--mint); border-color: var(--mint); }
.check-button .icon { width: 13px; height: 13px; }
.tag { flex: 0 0 auto; padding: 4px 6px; border-radius: 5px; font-size: 7px; font-weight: 700; }
.tag-blue { color: #9bb9ff; background: rgba(90,139,232,.13); }
.tag-amber { color: #edc779; background: rgba(214,173,98,.13); }
.tag-violet { color: #c6a9f8; background: rgba(174,139,234,.13); }
.tag-green { color: #7de0b9; background: rgba(16,185,129,.12); }
.tag-neutral { color: #aaaab2; background: #29292e; }
.task-priority { color: #8d8d96; font-size: 8px; }
.priority-haute { color: #ed7777; }
.priority-basse { color: #8b8b94; }
.empty-inline { min-height: 84px; display: flex; align-items: center; gap: 12px; color: var(--muted); }
.empty-inline strong { color: #c8c8ce; font-size: 10px; }
.empty-inline p { margin: 4px 0 0; font-size: 9px; }
.empty-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 10px; background: rgba(16,185,129,.1); color: var(--mint); font-size: 15px; }
.quick-note-panel { min-height: 195px; }
.note-icon { color: var(--amber); font-size: 17px; }
.quick-note-form textarea { border: 0; resize: none; background: #121216; min-height: 73px; padding: 10px; font-size: 10px; }
.form-bottom { display: flex; align-items: center; justify-content: space-between; margin-top: 7px; }
.round-submit { width: 29px; height: 29px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--mint); color: #05261c; cursor: pointer; }
.round-submit .icon { width: 14px; height: 14px; }
.recent-note-line { margin-top: 11px; padding-top: 9px; border-top: 1px solid #2b2b30; color: #777780; font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent-note-line span { color: #c5c5cb; }
.budget-mini-panel { min-height: 195px; }
.budget-mini-panel .panel-heading .icon { color: var(--mint); }
.budget-mini-amount { margin: 18px 0 14px; font: 700 24px 'Avenir Next', Avenir, sans-serif; letter-spacing: -.05em; }
.progress-track { width: 100%; height: 5px; overflow: hidden; border-radius: 20px; background: #2d2d33; }
.progress-fill { height: 100%; border-radius: inherit; background: var(--mint); transition: width .35s ease; }
.fill-alert { background: var(--red); }
.text-alert { color: var(--red) !important; }
.budget-mini-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 11px; color: #92929b; font-size: 8px; }
.budget-mini-foot .text-link { font-size: 8px; }

/* Prayer screen */
.prayer-grid { align-items: start; }
.prayer-schedule-panel { min-height: 430px; }
.prayer-list { display: grid; }
.prayer-row { min-height: 65px; display: grid; grid-template-columns: 34px minmax(75px,1fr) 62px minmax(90px, 120px) 30px; align-items: center; gap: 10px; border-top: 1px solid #2b2b30; transition: background .18s; }
.prayer-row.prayer-current { background: rgba(214,173,98,.045); }
.prayer-row.prayer-done .prayer-main strong { color: #8b8b94; text-decoration: line-through; }
.prayer-symbol { width: 30px; height: 30px; display: grid; place-items: center; background: #25231f; color: var(--amber); border-radius: 9px; font-size: 14px; }
.prayer-main strong, .prayer-main span { display: block; }
.prayer-main strong { font: 700 11px 'Avenir Next', Avenir, sans-serif; }
.prayer-main span { color: #71717b; font-size: 8px; margin-top: 3px; }
.prayer-time { font: 700 12px 'Avenir Next', Avenir, sans-serif; font-variant-numeric: tabular-nums; }
.place-select-wrap select { padding: 8px 25px 8px 8px; font-size: 9px; border-radius: 8px; background-position: right 7px center; }
.prayer-check { width: 27px; height: 27px; display: grid; place-items: center; border: 1px solid #51515b; background: transparent; color: #06291e; border-radius: 8px; cursor: pointer; }
.prayer-check.checked { background: var(--mint); border-color: var(--mint); }
.prayer-check .icon { width: 15px; height: 15px; }
.prayer-footnote { color: #777780; font-size: 9px; line-height: 1.65; padding-top: 15px; margin-top: 10px; border-top: 1px solid #2b2b30; }
.prayer-large-name { font: 700 27px 'Avenir Next', Avenir, sans-serif; margin-top: 20px; }
.prayer-large-time { color: var(--amber); font: 700 34px 'Avenir Next', Avenir, sans-serif; margin-top: 1px; }
.prayer-method-panel .soft-divider { height: 1px; background: var(--border); margin: 20px 0 15px; }
.settings-summary { display: grid; grid-template-columns: 1fr 1.3fr; gap: 9px; margin-bottom: 18px; font-size: 9px; }
.settings-summary span { color: #777780; }
.settings-summary strong { color: #c9c9cf; text-align: right; }

/* Tasks */
.task-create-panel { min-height: 170px; }
.task-form { display: grid; grid-template-columns: 1.7fr 1fr .8fr 1fr auto; align-items: end; gap: 10px; }
.task-form > div { min-width: 0; }
.task-form input, .task-form select { min-height: 40px; }
.add-task-button { min-height: 40px; padding: 0 12px; white-space: nowrap; }
.task-list-panel { min-height: 250px; }
.filter-row { display: flex; gap: 6px; flex-wrap: wrap; margin: -2px 0 13px; }
.filter-chip { padding: 7px 10px; border: 1px solid #333339; border-radius: 7px; color: #9999a2; background: #151519; font-size: 8px; cursor: pointer; }
.filter-chip.selected { color: #aaf0d2; border-color: rgba(16,185,129,.32); background: rgba(16,185,129,.1); }
.task-list { display: grid; }
.task-row { min-height: 57px; display: flex; align-items: center; gap: 11px; border-top: 1px solid #29292e; }
.task-row-content { flex: 1; min-width: 0; }
.task-row-content > strong { display: block; color: #dedee2; font-size: 10px; font-weight: 600; overflow-wrap: anywhere; }
.task-meta { display: flex; align-items: center; gap: 8px; margin-top: 5px; color: #777780; font-size: 8px; }
.task-row.is-completed .task-row-content > strong { color: #797982; text-decoration: line-through; }
.tiny-button { width: 27px; height: 27px; border: 0; background: transparent; }
.tiny-button .icon { width: 13px; height: 13px; }
.danger-hover:hover { color: var(--red); background: rgba(239,98,98,.1); }
.count-badge { padding: 7px 9px; font-size: 8px; letter-spacing: 0; }
.focus-panel { background: radial-gradient(circle at 100% 0%, rgba(16,185,129,.09), transparent 50%), #17171a; }
.focus-panel .eyebrow { color: var(--mint); }
.focus-panel h3 { font-size: 17px; line-height: 1.35; max-width: 220px; margin-top: 12px; }
.focus-panel p { color: var(--muted); font-size: 10px; line-height: 1.65; }
.focus-stat { display: flex; align-items: baseline; gap: 8px; margin-top: 19px; }
.focus-stat strong { font: 700 26px 'Avenir Next', Avenir, sans-serif; color: var(--mint); }
.focus-stat span { color: var(--muted); font-size: 9px; }
.empty-state { min-height: 150px; display: grid; place-content: center; justify-items: center; color: var(--muted); text-align: center; }
.empty-state .empty-icon { margin-bottom: 8px; }
.empty-state h4 { color: #d1d1d6; font-size: 11px; margin: 2px 0 5px; }
.empty-state p { color: var(--muted); font-size: 9px; }

/* Budget */
.budget-grid { align-items: start; }
.budget-hero { background: radial-gradient(circle at 90% 10%, rgba(16,185,129,.09), transparent 43%), linear-gradient(145deg, #1a1a1d, #151518); }
.budget-hero-top { display: flex; justify-content: space-between; align-items: center; gap: 15px; }
.remaining-amount { font: 700 clamp(30px, 4vw, 39px) 'Avenir Next', Avenir, sans-serif; letter-spacing: -.06em; margin-top: 12px; }
.budget-hero-top p { margin: 5px 0 0; color: #85858f; font-size: 10px; }
.budget-orb { width: 88px; height: 88px; flex: 0 0 auto; display: grid; place-content: center; justify-items: center; border-radius: 50%; border: 5px solid rgba(16,185,129,.22); box-shadow: inset 0 0 0 1px rgba(16,185,129,.13), 0 0 28px rgba(16,185,129,.06); }
.budget-orb strong { font: 700 19px 'Avenir Next', Avenir, sans-serif; }
.budget-orb span { color: #777780; font: 700 6px 'Avenir Next', Avenir, sans-serif; letter-spacing: .12em; margin-top: 2px; }
.budget-orb.orb-alert { border-color: rgba(239,98,98,.45); }
.progress-large { height: 7px; margin-top: 23px; }
.budget-foot { display: flex; justify-content: space-between; gap: 10px; align-items: center; color: #a3a3ac; font-size: 9px; margin-top: 12px; }
.budget-foot > span:first-child { display: flex; align-items: center; gap: 7px; }
.alert-banner { color: #ff9a9a; background: rgba(239,98,98,.09); border: 1px solid rgba(239,98,98,.19); border-radius: 9px; padding: 10px; font-size: 9px; line-height: 1.5; margin-top: 15px; }
.stack-form { display: grid; gap: 7px; }
.stack-form input, .stack-form select { margin-bottom: 5px; }
.form-two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.form-three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.category-list { display: grid; gap: 15px; }
.category-item-top { display: flex; justify-content: space-between; gap: 10px; color: #b6b6bd; font-size: 9px; margin-bottom: 7px; }
.category-item-top strong { color: #e5e5e8; font-size: 9px; }
.category-fill { height: 100%; border-radius: inherit; background: #d6ad62; }
.category-color-1 { background: #6f9cf4; }
.category-color-2 { background: #ae8bea; }
.category-color-3 { background: #10b981; }
.category-color-4 { background: #d97979; }
.expense-history-panel { min-height: 150px; }
.expense-list { display: grid; }
.expense-row { min-height: 53px; display: flex; align-items: center; gap: 11px; border-top: 1px solid #29292e; }
.expense-symbol { width: 31px; height: 31px; display: grid; place-items: center; background: #242329; color: var(--amber); border-radius: 9px; font-size: 15px; }
.expense-title { flex: 1; min-width: 0; }
.expense-title strong, .expense-title span { display: block; }
.expense-title strong { font-size: 10px; font-weight: 600; color: #d9d9de; }
.expense-title span { color: #777780; font-size: 8px; margin-top: 4px; }
.expense-amount { color: #dedee3; white-space: nowrap; font: 600 10px 'Avenir Next', Avenir, sans-serif; }

/* Planning */
.week-list { display: grid; }
.week-day { display: grid; grid-template-columns: 48px minmax(0,1fr); gap: 12px; padding: 11px 0; border-top: 1px solid #29292e; }
.week-day-date { display: grid; justify-items: center; align-content: center; gap: 5px; color: #8a8a94; }
.week-day-date strong { font: 700 8px 'Avenir Next', Avenir, sans-serif; text-transform: uppercase; }
.week-day-date span { width: 27px; height: 27px; display: grid; place-items: center; border-radius: 50%; font: 600 11px 'Avenir Next', Avenir, sans-serif; }
.week-day.today .week-day-date span { background: var(--mint); color: #04251a; }
.week-day.today .week-day-date strong { color: var(--mint); }
.week-day-content { display: grid; gap: 6px; }
.schedule-block { min-height: 38px; display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 9px; background: #202329; border: 1px solid rgba(111,156,244,.1); }
.schedule-block.work { background: rgba(214,173,98,.07); border-color: rgba(214,173,98,.14); }
.schedule-block.personal { background: rgba(16,185,129,.06); border-color: rgba(16,185,129,.12); }
.schedule-block.custom-event { background: rgba(174,139,234,.07); border-color: rgba(174,139,234,.14); }
.schedule-dot { width: 6px; height: 6px; flex: 0 0 auto; border-radius: 50%; background: var(--blue); }
.schedule-block.work .schedule-dot { background: var(--amber); }
.schedule-block.personal .schedule-dot { background: var(--mint); }
.schedule-block.custom-event .schedule-dot { background: var(--violet); }
.schedule-block div { flex: 1; min-width: 0; }
.schedule-block strong, .schedule-block span { display: block; }
.schedule-block strong { font-size: 9px; color: #d6d6dc; font-weight: 600; }
.schedule-block span { color: #85858f; font-size: 8px; margin-top: 3px; }
.schedule-block em { color: #7e8aa4; font: 700 7px 'Avenir Next', Avenir, sans-serif; letter-spacing: .1em; }
.week-day.today .schedule-block { box-shadow: inset 2px 0 var(--mint); }
.week-range { font-size: 9px; letter-spacing: 0; }
.rhythm-row { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid #29292e; }
.rhythm-mark { width: 7px; height: 25px; border-radius: 6px; background: var(--blue); }
.work-mark { background: var(--amber); }
.personal-mark { background: var(--mint); }
.rhythm-row strong, .rhythm-row span { display: block; }
.rhythm-row strong { font-size: 9px; }
.rhythm-row div span { color: #85858f; font-size: 8px; margin-top: 3px; }
.weekly-rhythm-panel .muted { line-height: 1.6; margin-top: 15px; }

/* Notes */
.note-compose-form { display: grid; gap: 9px; }
.note-compose-form textarea { min-height: 120px; }
.note-compose-footer { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.note-compose-footer .button { min-height: 38px; }
.notes-tips-panel { background: radial-gradient(circle at 95% 0%, rgba(214,173,98,.10), transparent 52%), #18181b; }
.notes-tips-panel .eyebrow { color: var(--amber); }
.notes-tips-panel h3 { font-size: 17px; line-height: 1.35; margin: 16px 0 10px; }
.notes-tips-panel p { color: var(--muted); font-size: 10px; line-height: 1.65; }
.notes-tip-quote { color: #d6bd8f; border-left: 2px solid var(--amber); padding: 8px 0 8px 11px; margin-top: 18px; font: 500 10px/1.6 'Avenir Next', Avenir, sans-serif; }
.notes-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.note-card { padding: 13px; border: 1px solid #303036; border-radius: 11px; background: #151519; min-width: 0; }
.note-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.note-date { color: #72727c; font-size: 8px; }
.note-card h4 { margin: 5px 0 0; color: #dfdfe4; font: 700 11px 'Avenir Next', Avenir, sans-serif; }
.note-card p { margin: 10px 0 0; color: #a3a3ac; font-size: 9px; line-height: 1.7; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Settings modal and toast */
.modal-backdrop { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 18px; background: rgba(0,0,0,.76); backdrop-filter: blur(9px); }
.settings-modal { width: min(100%, 620px); max-height: min(92vh, 900px); overflow: auto; padding: 24px; border: 1px solid #37373d; border-radius: 20px; background: #141417; box-shadow: 0 30px 100px rgba(0,0,0,.6); }
.modal-heading { display: flex; justify-content: space-between; align-items: center; margin-bottom: 21px; }
.modal-heading h2 { margin: 5px 0 0; font: 700 21px 'Avenir Next', Avenir, sans-serif; }
.settings-section { padding: 16px 0; border-top: 1px solid #2b2b30; }
.settings-section h3 { margin: 0 0 7px; font: 700 12px 'Avenir Next', Avenir, sans-serif; }
.settings-section > p { color: #85858f; font-size: 9px; line-height: 1.6; margin: 0 0 13px; }
.settings-form .form-two-col, .settings-form .form-three-col { margin-top: 12px; }
.adjustments-grid { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 8px; margin-top: 13px; }
.adjustments-grid input { padding: 9px; }
.settings-form > .button { margin-top: 15px; }
.backup-section { margin-top: 18px; }
.backup-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 9px; }
.backup-actions .button { min-height: 36px; font-size: 9px; }
.danger-text-button { border: 0; background: transparent; color: #e27c7c; padding: 12px 0 0; font-size: 9px; cursor: pointer; }
.danger-text-button:hover { color: #ff9696; }
.security-note { display: flex; align-items: center; gap: 8px; color: #7f9188; border: 1px solid rgba(16,185,129,.14); background: rgba(16,185,129,.05); border-radius: 9px; padding: 11px; font-size: 9px; line-height: 1.5; }
.security-note .icon { width: 14px; color: var(--mint); }
.toast-region { position: fixed; z-index: 100; right: 20px; bottom: 20px; display: grid; gap: 8px; pointer-events: none; }
.toast { max-width: min(360px, calc(100vw - 35px)); padding: 12px 15px; background: #222227; border: 1px solid #3b3b42; border-radius: 10px; color: #e9e9ed; box-shadow: 0 12px 35px rgba(0,0,0,.35); font-size: 10px; opacity: 0; transform: translateY(8px); transition: .22s ease; }
.toast-visible { opacity: 1; transform: translateY(0); }
.toast-error { border-color: rgba(239,98,98,.45); color: #ffaaaa; }

@media (max-width: 1100px) {
  .main-area { padding-left: 28px; padding-right: 28px; }
  .app-shell { grid-template-columns: 205px minmax(0,1fr); }
  .task-form { grid-template-columns: 1.5fr 1fr 1fr; }
  .task-form > div:nth-child(4) { grid-column: 2; }
  .add-task-button { grid-column: 3; grid-row: 2; }
  .task-form > div:nth-child(1) { grid-row: span 2; }
}
@media (max-width: 820px) {
  .app-shell { display: block; padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .sidebar { display: none; }
  .main-area { padding: 0 22px 20px; }
  .topbar { min-height: 77px; margin-bottom: 23px; }
  .topbar h1 { font-size: 18px; }
  .topbar-kicker { font-size: 7px; }
  .mobile-settings { display: inline-grid; }
  .avatar-button { display: none; }
  .mobile-nav { position: fixed; z-index: 20; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-around; gap: 2px; padding: 8px 8px calc(8px + env(safe-area-inset-bottom)); background: rgba(15,15,18,.96); border-top: 1px solid #29292f; backdrop-filter: blur(16px); }
  .mobile-nav .nav-item { min-height: 48px; width: auto; flex: 1; flex-direction: column; justify-content: center; gap: 4px; padding: 3px 2px; border-radius: 9px; font-size: 7px; }
  .mobile-nav .nav-item.active { box-shadow: inset 0 2px var(--mint); }
  .mobile-nav .nav-item .icon { width: 17px; height: 17px; }
  .mobile-nav .nav-item span { display: block; }
  .app-footer { margin-top: 24px; }
}
@media (max-width: 650px) {
  .main-area { padding-left: 15px; padding-right: 15px; }
  .topbar { min-height: 70px; margin-bottom: 18px; }
  .topbar h1 { font-size: 16px; }
  .topbar-actions { gap: 9px; }
  .live-clock { font-size: 10px; }
  .welcome-row, .page-intro { align-items: flex-start; margin-bottom: 16px; }
  .welcome-row h2, .page-intro h2 { font-size: 21px; }
  .welcome-row p, .page-intro p { max-width: 265px; font-size: 10px; line-height: 1.5; }
  .day-chip { font-size: 0; padding: 9px; }
  .day-chip .pulse-dot { width: 7px; height: 7px; }
  .completion-pill { min-width: 62px; padding: 8px; }
  .completion-pill strong { font-size: 15px; }
  .bento-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .span-2 { grid-column: span 2; }
  .panel { padding: 14px; border-radius: 16px; }
  .panel-heading { margin-bottom: 13px; }
  .panel-heading h3, .panel h3 { font-size: 12px; }
  .gauge-panel { min-height: 185px; }
  .gauge-switch { gap: 14px; padding: 4px 0; }
  .ring-wrap { width: 99px; height: 99px; }
  .ring-center strong { font-size: 22px; }
  .gauge-info h4 { font-size: 13px; }
  .gauge-info p { font-size: 9px; line-height: 1.5; }
  .switch-hint { font-size: 8px; margin-top: 10px; }
  .gauge-footer { font-size: 8px; }
  .next-prayer-name { font-size: 18px; }
  .next-prayer-time { font-size: 24px; }
  .countdown-value { font-size: 11px; }
  .quote-panel p { font-size: 11px; min-height: 66px; margin: 12px 0; }
  .compact-task-title { font-size: 9px; }
  .compact-task .tag { display: none; }
  .task-priority { display: none; }
  .budget-mini-amount { font-size: 20px; }
  .page-intro .completion-pill { margin-top: 2px; }
  .prayer-row { grid-template-columns: 28px minmax(58px,1fr) 48px minmax(67px, 82px) 27px; gap: 6px; min-height: 60px; }
  .prayer-symbol { width: 26px; height: 26px; font-size: 12px; }
  .prayer-main strong { font-size: 10px; }
  .prayer-time { font-size: 10px; }
  .place-select-wrap select { font-size: 8px; padding-left: 6px; padding-right: 19px; }
  .prayer-check { width: 25px; height: 25px; }
  .prayer-footnote { font-size: 8px; }
  .task-form { grid-template-columns: 1fr 1fr; }
  .task-form > div:nth-child(1) { grid-column: span 2; grid-row: auto; }
  .task-form > div:nth-child(4) { grid-column: auto; }
  .add-task-button { grid-column: span 2; grid-row: auto; }
  .task-form input, .task-form select { min-height: 38px; }
  .task-row { gap: 8px; min-height: 58px; }
  .task-row-content > strong { font-size: 9px; }
  .task-meta { font-size: 7px; gap: 5px; }
  .task-priority { display: none; }
  .filter-row { gap: 4px; }
  .filter-chip { padding: 6px 7px; font-size: 7px; }
  .remaining-amount { font-size: 28px; }
  .budget-orb { width: 70px; height: 70px; border-width: 4px; }
  .budget-orb strong { font-size: 16px; }
  .budget-orb span { font-size: 5px; }
  .budget-foot { font-size: 8px; }
  .form-two-col { gap: 8px; }
  .form-three-col { gap: 6px; }
  .week-day { grid-template-columns: 38px minmax(0,1fr); gap: 8px; }
  .week-day-date span { width: 24px; height: 24px; }
  .schedule-block { padding: 7px; gap: 7px; }
  .schedule-block strong { font-size: 8px; }
  .schedule-block span { font-size: 7px; }
  .schedule-block em { font-size: 6px; }
  .notes-list { grid-template-columns: 1fr; }
  .note-compose-footer { align-items: flex-start; flex-direction: column; }
  .note-compose-footer .button { width: 100%; }
  .settings-modal { padding: 17px; max-height: 94vh; }
  .adjustments-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .backup-actions { display: grid; grid-template-columns: 1fr; }
  .backup-actions .button { width: 100%; }
  .app-footer { font-size: 7px; }
  .toast-region { left: 12px; right: 12px; bottom: calc(82px + env(safe-area-inset-bottom)); }
  .toast { max-width: none; }
}
@media (max-width: 380px) {
  .main-area { padding-left: 11px; padding-right: 11px; }
  .bento-grid { gap: 8px; }
  .panel { padding: 12px; }
  .ring-wrap { width: 88px; height: 88px; }
  .gauge-switch { gap: 10px; }
  .gauge-info p { max-width: 145px; }
  .prayer-row { grid-template-columns: 26px minmax(48px,1fr) 42px minmax(62px, 72px) 25px; gap: 4px; }
}
