@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Manrope:wght@400;600;700;800&display=swap');

:root { --ink: #202c29; --muted: #6d7b76; --line: #e0e7e2; --green: #245c49; --mint: #e4f2e7; --coral: #a64e3e; --rose: #fae9e3; --surface: #f7f9f6; }
:root[data-theme="light"] { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; --ink: #edf2ee; --muted: #b2bfb7; --line: #414a45; --green: #88c9a5; --mint: #263e31; --coral: #eeab98; --rose: #45312c; --surface: #171a19; }
:root[data-theme="dark"] .topbar, :root[data-theme="dark"] .habit-select .mud-input-outlined, :root[data-theme="dark"] .month-nav, :root[data-theme="dark"] .metrics, :root[data-theme="dark"] .calendar .day:not(.blank), :root[data-theme="dark"] .art-grid span { background: #232826; }
:root[data-theme="dark"] .calendar .day:not(.blank) { border-color: var(--line); }
:root[data-theme="dark"] .calendar .day.today { border-color: var(--green); }
:root[data-theme="dark"] .eyebrow, :root[data-theme="dark"] .toolbar-actions .mud-button-root, :root[data-theme="dark"] .metric-note, :root[data-theme="dark"] .weekday, :root[data-theme="dark"] .entry .mud-icon-button, :root[data-theme="dark"] .art-caption { color: var(--muted); }
:root[data-theme="dark"] .day-count.avoided, :root[data-theme="dark"] .entry-symbol.avoided, :root[data-theme="dark"] .entry-status.avoided { color: #88c9a5; }
:root[data-theme="dark"] .login-art { background: #26332b; }
:root[data-theme="dark"] .art-grid span:nth-child(2), :root[data-theme="dark"] .art-grid span:nth-child(6), :root[data-theme="dark"] .art-grid span:nth-child(7) { background: #517f60; }
:root[data-theme="dark"] .art-grid span:nth-child(4), :root[data-theme="dark"] .art-grid span:nth-child(9) { background: #a36b59; }
:root[data-theme="dark"] .dashboard .mud-button-filled-primary, :root[data-theme="dark"] .login-page .mud-button-filled-primary, :root[data-theme="dark"] .mud-dialog .mud-button-filled-primary { color: #17251d; }
:root[data-theme="dark"] #blazor-error-ui { background: #45312c; color: var(--ink); }
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--surface); font-family: 'DM Sans', sans-serif; }
button, input { font-family: inherit; }
h1, h2, p { margin: 0; }
h1, h2, .brand { font-family: Manrope, sans-serif; }
#blazor-error-ui { display: none; position: fixed; bottom: 0; left: 0; width: 100%; padding: 1rem; background: #ffe4d7; z-index: 9999; }
.topbar { background: white; border-bottom: 1px solid var(--line); }
.topbar-inner { height: 72px; max-width: 1440px; padding: 0 48px; margin: auto; display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font-size: 19px; font-weight: 800; }
.brand-light { font-weight: 400; }
.brand-mark { display: grid; place-items: center; background: var(--green); color: #fff; border-radius: 6px; height: 35px; width: 35px; font-size: 19px; }
.account { display: flex; align-items: center; gap: 15px; color: var(--muted); font-size: 14px; }
.dashboard { max-width: 1440px; margin: auto; padding: 48px 48px 80px; }
.page-heading, .month-heading, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.page-heading h1 { font-size: 32px; font-weight: 800; margin: 6px 0; }
.page-heading p { color: var(--muted); font-size: 15px; }
.eyebrow { color: #72817a; font-size: 10px; font-weight: 700; letter-spacing: 0; }
.accent-dot { color: #e87a58; }
.dashboard .mud-button-filled-primary, .login-page .mud-button-filled-primary, .mud-dialog .mud-button-filled-primary { background: var(--green); color: #fff; }
.dashboard .mud-button-root, .login-page .mud-button-root { text-transform: none; font-weight: 700; }
.toolbar { margin-top: 37px; padding: 17px 0; display: flex; align-items: end; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.habit-select { width: 250px; max-width: 100%; }
.field-caption { display: block; font-size: 10px; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.habit-select .mud-input-control { margin: 0; }
.habit-select .mud-input-outlined { background: white; }
.toolbar-actions { display: flex; flex-wrap: wrap; gap: 2px; }
.toolbar-actions .mud-button-root { color: #53655d; }
.month-heading { margin: 38px 0 20px; }
.month-heading h2, .section-heading h2 { font-size: 21px; font-weight: 800; margin-top: 5px; }
.month-nav { display: flex; align-items: center; background: white; border: 1px solid var(--line); border-radius: 6px; }
.month-nav .mud-button-root { color: var(--ink); min-width: 52px; }
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); background: white; border: 1px solid var(--line); border-radius: 6px; }
.metric { min-width: 0; padding: 22px 24px 20px; display: flex; flex-direction: column; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.metric:nth-child(4n), .metric:last-child { border-right: 0; }
.metric:nth-child(n+5) { border-bottom: 0; }
.metric-label { font-size: 10px; font-weight: 700; color: var(--muted); }
.metric strong { font-family: Manrope, sans-serif; font-size: 29px; line-height: 1.25; margin: 10px 0 5px; overflow-wrap: anywhere; }
.metric-note { color: #87948e; font-size: 12px; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 46px; margin-top: 45px; }
.section-heading { margin-bottom: 18px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--muted); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; }
.dot.avoided { background: #4a926a; }.dot.consumed { background: #db846e; }
.calendar { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.weekday { color: #8a9890; font-size: 10px; font-weight: 700; text-align: center; padding: 8px 0; }
.day { min-width: 0; aspect-ratio: 1.3; background: white; border: 1px solid #e8ede8; border-radius: 4px; padding: 9px; display: flex; flex-direction: column; justify-content: space-between; }
.day.blank { background: transparent; border-color: transparent; }
.day.today { border-color: #599071; }
.day-number { font-size: 12px; font-weight: 700; }
.day-indicators { display: flex; flex-wrap: wrap; gap: 3px; }
.day-count { min-width: 20px; text-align: center; font-size: 10px; line-height: 20px; border-radius: 3px; font-weight: 700; }
.day-count.avoided, .entry-symbol.avoided { background: var(--mint); color: #337954; }
.day-count.consumed, .entry-symbol.consumed { background: var(--rose); color: var(--coral); }
.entry-total { font-size: 12px; color: var(--muted); }
.entries { border-top: 1px solid var(--line); }
.entry { display: flex; align-items: center; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.entry-symbol { flex: 0 0 36px; width: 36px; height: 36px; border-radius: 5px; display: grid; place-items: center; }
.entry-details { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.entry-details strong { font-size: 14px; overflow-wrap: anywhere; }.entry-details span { color: var(--muted); font-size: 12px; }
.entry-status { font-size: 11px; font-weight: 700; }.entry-status.avoided { color: #337954; }.entry-status.consumed { color: var(--coral); }
.entry .mud-icon-button { padding: 5px; color: #77877e; }
.empty-block, .activity-empty, .state-page { text-align: center; color: var(--muted); padding: 60px 20px; }
.empty-block h2 { color: var(--ink); font-size: 20px; margin: 12px 0 5px; }.empty-block p, .activity-empty p { margin-bottom: 18px; }
.state-page { max-width: 580px; margin: 80px auto; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.loading-month { padding: 45px; display: flex; align-items: center; gap: 12px; color: var(--muted); }.setup-alert { margin-top: 24px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }.dialog-field { margin-bottom: 16px; }
.login-page { max-width: 1440px; margin: 0 auto; padding: 80px 48px; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; min-height: 600px; }
.login-copy h1 { font-size: 46px; line-height: 1.12; max-width: 600px; margin: 18px 0; }.login-copy p { color: var(--muted); font-size: 17px; margin-bottom: 28px; }
.login-art { background: #e4eee6; min-height: 400px; padding: 50px; display: flex; flex-direction: column; justify-content: center; align-items: center; }
.art-grid { display: grid; grid-template-columns: repeat(3, 70px); gap: 10px; transform: rotate(-8deg); }.art-grid span { width: 70px; height: 70px; background: #fff; border-radius: 5px; }.art-grid span:nth-child(2), .art-grid span:nth-child(6), .art-grid span:nth-child(7) { background: #99c7a6; }.art-grid span:nth-child(4), .art-grid span:nth-child(9) { background: #e6a692; }.art-caption { margin-top: 45px; font-size: 10px; font-weight: 700; color: #547767; }
.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; }
@media (max-width: 950px) { .content-grid { grid-template-columns: 1fr; gap: 35px; }.login-page { gap: 30px; }.login-copy h1 { font-size: 36px; } }
@media (max-width: 650px) { .metrics .metric:nth-child(n) { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }.metrics .metric:nth-child(even), .metrics .metric:last-child { border-right: 0; }.metrics .metric:last-child { border-bottom: 0; } }
@media (max-width: 650px) { .topbar-inner { padding: 0 20px; height: 64px; }.account span { display: none; }.dashboard { padding: 32px 20px 60px; }.page-heading { align-items: flex-start; flex-direction: column; }.page-heading h1 { font-size: 26px; }.toolbar { align-items: stretch; flex-direction: column; }.habit-select { width: 100%; }.toolbar-actions { margin-left: -8px; }.metrics { grid-template-columns: repeat(2, 1fr); }.metric { padding: 17px; border-bottom: 1px solid var(--line); }.metric:nth-child(2) { border-right: 0; }.metric:nth-child(n+3) { border-bottom: 0; }.metric strong { font-size: 24px; }.month-heading { margin-top: 30px; }.day { padding: 5px; aspect-ratio: 0.9; }.day-count { line-height: 17px; min-width: 17px; }.legend { gap: 8px; }.entry { gap: 6px; }.entry-status { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }.entry-symbol { flex-basis: 30px; width: 30px; height: 30px; }.login-page { min-height: 0; grid-template-columns: 1fr; padding: 55px 20px; }.login-copy h1 { font-size: 34px; }.login-art { min-height: 280px; }.art-grid { grid-template-columns: repeat(3, 48px); }.art-grid span { width: 48px; height: 48px; }.form-grid { gap: 10px; } }