:root {
  color-scheme: light;
  --bg: #f4f0e7;
  --surface: #fffdf8;
  --surface-soft: #eee9de;
  --ink: #282c25;
  --ink-2: #5f6258;
  --muted: #898578;
  --line: #e4ddcf;
  --brand: #355543;
  --brand-dark: #263f31;
  --brand-tint: #e6ebdf;
  --mint: #e0e7d9;
  --amber: #986536;
  --amber-tint: #f4e8d5;
  --red: #ad5148;
  --red-tint: #f6e5df;
  --blue: #5d7885;
  --blue-tint: #e5ecee;
  --shadow-sm: 0 4px 18px rgba(49, 48, 37, .035);
  --shadow-md: 0 20px 60px rgba(43, 44, 34, .14);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; color: var(--ink); background: var(--bg); min-height: 100vh; font-size: 14px; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(63, 125, 104, .27); outline-offset: 2px; }
button:disabled { cursor: not-allowed; opacity: .6; }
.hidden { display: none !important; }

/* Shared brand and controls */
.brand-lockup { display: inline-flex; align-items: center; gap: 10px; font-size: 21px; letter-spacing: -.8px; font-weight: 760; color: var(--ink); }
.brand-link { text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; color: white; background: var(--brand); border-radius: 11px; font-size: 25px; font-family: Georgia, serif; font-weight: 600; line-height: 1; padding-bottom: 3px; }
.button { border: 1px solid transparent; border-radius: 10px; display: inline-flex; justify-content: center; align-items: center; gap: 9px; min-height: 40px; padding: 0 15px; font-weight: 650; transition: background .16s ease, border-color .16s ease, transform .16s ease; white-space: nowrap; }
.button:active { transform: translateY(1px); }
.button-primary { color: #fff; background: var(--brand); box-shadow: 0 2px 4px rgba(36, 74, 66, .08); }
.button-primary:hover { background: var(--brand-dark); }
.button-secondary { color: var(--ink); background: #fff; border-color: var(--line); }
.button-secondary:hover { background: var(--surface-soft); }
.button-quiet { background: transparent; color: var(--ink-2); border-color: transparent; }
.button-quiet:hover { background: var(--surface-soft); }
.button-danger { color: var(--red); background: var(--red-tint); border-color: transparent; }
.button-full { width: 100%; }
.icon-button, .tiny-icon-button { position: relative; display: inline-grid; place-items: center; border: 1px solid transparent; background: transparent; color: #65716c; border-radius: 10px; }
.icon-button { width: 39px; height: 39px; font-size: 18px; }
.icon-button:hover, .tiny-icon-button:hover { background: var(--surface-soft); color: var(--brand); }
.tiny-icon-button { width: 28px; height: 28px; font-size: 18px; }
.eyebrow { color: var(--muted); font-weight: 750; font-size: 10px; letter-spacing: 1.45px; line-height: 1.4; }
.text-muted { color: var(--muted); }

/* Authentication */
.login-screen { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 28px; position: relative; overflow: hidden; background: #eef2ef; }
.login-screen::before { content: ""; position: absolute; width: 540px; height: 540px; border: 1px solid #dae3dd; border-radius: 50%; left: -230px; bottom: -300px; box-shadow: 0 0 0 48px rgba(255,255,255,.28), 0 0 0 96px rgba(255,255,255,.17); }
.login-screen::after { content: ""; position: absolute; width: 400px; height: 400px; border: 1px solid #dbe5df; border-radius: 50%; right: -240px; top: -230px; box-shadow: 0 0 0 50px rgba(255,255,255,.2), 0 0 0 100px rgba(255,255,255,.14); }
.login-card { width: min(100%, 430px); padding: 38px 38px 28px; background: rgba(255,255,255,.94); border: 1px solid rgba(255,255,255,.85); border-radius: 22px; box-shadow: 0 22px 70px rgba(33, 54, 44, .09); z-index: 1; }
.login-card .brand-lockup { margin-bottom: 49px; }
.login-heading h1 { font-size: clamp(26px, 4vw, 32px); letter-spacing: -1.2px; margin: 11px 0 9px; line-height: 1.12; }
.login-heading > p:last-child { color: var(--ink-2); line-height: 1.6; margin: 0 0 27px; font-size: 14px; }
.form-stack { display: grid; gap: 16px; }
.form-stack label, .field-label { display: grid; gap: 7px; color: #42504b; font-size: 12px; font-weight: 650; }
.form-stack input, .field-control { width: 100%; min-height: 44px; padding: 0 13px; border: 1px solid #dfe5e1; border-radius: 9px; background: white; color: var(--ink); outline: none; }
.form-stack input:focus, .field-control:focus { border-color: #94b3a4; box-shadow: 0 0 0 3px rgba(67, 128, 102, .1); }
.form-stack .button { margin-top: 3px; min-height: 46px; }
.form-error { color: var(--red); font-size: 12px; min-height: 0; margin: -7px 0 0; }
.login-footnote { display: flex; align-items: center; gap: 8px; padding-top: 24px; margin: 23px 0 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.status-dot { width: 7px; height: 7px; display: inline-block; background: #76a58b; border-radius: 50%; }
.login-side-note { position: absolute; right: 34px; bottom: 28px; color: #89958e; font-size: 12px; letter-spacing: .15px; z-index: 1; }

/* Main layout */
.app-layout { display: flex; min-height: 100vh; min-height: 100dvh; }
.sidebar { width: 246px; flex: 0 0 246px; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 27px 15px 14px; min-height: 100vh; position: relative; z-index: 15; }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; padding: 0 9px; margin-bottom: 43px; }
.sidebar-close { display: none; }
.workspace-label { margin: 0 10px 12px; font-size: 9px; font-weight: 800; color: #9aa49f; letter-spacing: 1.4px; }
.primary-nav { display: grid; gap: 4px; }
.nav-item { display: flex; align-items: center; gap: 12px; min-height: 43px; width: 100%; border: none; background: transparent; border-radius: 9px; color: #66716c; text-align: left; padding: 0 11px; font-size: 13px; font-weight: 560; }
.nav-item:hover { background: #f7f9f8; color: var(--ink); }
.nav-item.active { background: #eaf1ed; color: var(--brand); font-weight: 700; }
.nav-icon { width: 20px; display: inline-grid; place-items: center; font-size: 18px; line-height: 1; }
.icon-sun { font-size: 20px; transform: rotate(-18deg); }
.nav-count { margin-left: auto; font-size: 10px; min-width: 20px; text-align: right; color: #87928c; }
.nav-item.active .nav-count { color: var(--brand); }
.sidebar-divider { height: 1px; background: var(--line); margin: 27px 8px 22px; }
.sidebar-section-heading { display: flex; justify-content: space-between; align-items: center; margin: 0 9px 12px; color: #9aa49f; font-size: 9px; font-weight: 800; letter-spacing: 1.15px; }
.sidebar-mini-card { background: #f7f9f7; border: 1px solid #edf0ed; border-radius: 12px; margin: 0 3px; padding: 15px 14px 13px; }
.mini-card-top { display: flex; gap: 8px; align-items: center; font-size: 11px; color: #69746f; }
.mini-icon { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 7px; background: #e3ece6; color: var(--brand); font-weight: 800; font-size: 13px; }
.mini-card-number { font-size: 23px; font-weight: 740; letter-spacing: -.8px; margin: 13px 0 12px; }
.mini-card-number small { font-size: 10px; color: #87918c; font-weight: 500; letter-spacing: 0; margin-left: 3px; }
.mini-progress { height: 4px; background: #e2e8e3; border-radius: 9px; overflow: hidden; }
.mini-progress span { display: block; height: 100%; width: 0; background: #5c8a71; border-radius: inherit; transition: width .2s; }
.mini-card-foot { display: flex; justify-content: space-between; margin-top: 9px; color: #909993; font-size: 10px; }
.sidebar-bottom { margin-top: auto; padding-top: 19px; }
.profile-button { width: 100%; display: flex; align-items: center; gap: 10px; border: 1px solid transparent; border-radius: 10px; background: transparent; padding: 10px 8px; text-align: left; color: var(--ink); }
.profile-button:hover { background: #f7f9f7; }
.avatar { display: grid; place-items: center; flex: 0 0 33px; width: 33px; height: 33px; border-radius: 10px; background: #e9e6dc; color: #655e4e; font-size: 13px; font-weight: 750; }
.profile-copy { display: grid; gap: 4px; min-width: 0; }
.profile-copy strong { font-size: 11px; font-weight: 720; }
.profile-copy small { color: var(--muted); font-size: 10px; }
.profile-more { margin-left: auto; color: #8a958f; font-size: 20px; }
.sidebar-scrim { display: none; }
.main-panel { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.topbar { height: 76px; flex: 0 0 76px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 37px; background: rgba(255,255,255,.75); border-bottom: 1px solid var(--line); }
.topbar-left, .topbar-actions { display: flex; align-items: center; gap: 13px; min-width: 0; }
.menu-toggle { display: none; }
.breadcrumb { display: flex; gap: 10px; align-items: center; font-size: 12px; color: #a2aaa6; white-space: nowrap; }
.breadcrumb strong { font-weight: 690; color: #3b4943; }
.breadcrumb-sep { color: #c4cbc7; }
.topbar-actions { gap: 15px; }
.today-label { color: #858f89; font-size: 11px; padding-right: 7px; white-space: nowrap; }
.notification-button { font-size: 20px; }
.notification-button i { position: absolute; right: 6px; top: 7px; width: 6px; height: 6px; background: #d7a45e; border-radius: 50%; display: none; }
.notification-button.needs-setup i { display: block; }
.top-add-button { min-height: 38px; padding: 0 13px; font-size: 12px; }
.view-root { width: min(100%, 1420px); margin: 0 auto; padding: 34px 38px 38px; flex: 1; outline: none; }
.app-footer { display: flex; justify-content: space-between; gap: 15px; padding: 0 38px 22px; color: #a0a9a4; font-size: 10px; }
.footer-dot { padding: 0 5px; color: #c1c8c3; }
.mobile-nav { display: none; }

/* Page headings and common surfaces */
.page-heading { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; margin-bottom: 28px; }
.page-heading h1 { font-size: clamp(26px, 2.7vw, 34px); line-height: 1.12; margin: 9px 0 8px; font-weight: 730; letter-spacing: -1.3px; }
.page-heading p { color: #75817b; font-size: 13px; margin: 0; line-height: 1.55; }
.heading-actions { display: flex; gap: 9px; align-items: center; padding-top: 11px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 14px; }
.section-heading h2 { font-size: 14px; font-weight: 730; letter-spacing: -.2px; margin: 0; }
.section-heading p { margin: 5px 0 0; font-size: 11px; color: var(--muted); }
.text-button { border: none; background: transparent; color: var(--brand); font-size: 11px; font-weight: 700; padding: 7px 2px; }
.text-button:hover { color: #427664; }
.surface { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.surface-pad { padding: 20px; }
.kicker { color: #8a958f; font-size: 10px; font-weight: 800; letter-spacing: 1.1px; }
.pill { display: inline-flex; align-items: center; gap: 5px; width: fit-content; border-radius: 20px; padding: 5px 8px; font-size: 10px; line-height: 1; font-weight: 650; background: #f0f3f1; color: #65716b; white-space: nowrap; }
.pill.green { color: #477358; background: #e9f2eb; }
.pill.amber { color: #986723; background: #f9efdf; }
.pill.red { color: #a64743; background: #fae9e7; }
.pill.blue { color: #476a82; background: #eaf0f5; }
.pill.dark { color: #4b5c53; background: #edf0eb; }
.empty-state { display: grid; justify-items: center; text-align: center; padding: 35px 22px; color: var(--muted); }
.empty-illustration { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 15px; color: var(--brand); background: #eaf1ed; font-size: 21px; margin-bottom: 15px; }
.empty-state strong { color: #4b5751; font-size: 13px; margin-bottom: 6px; }
.empty-state p { font-size: 11px; line-height: 1.6; max-width: 250px; margin: 0 0 14px; }

/* Dashboard */
.welcome-strip { display: flex; align-items: center; justify-content: space-between; gap: 25px; margin-bottom: 27px; }
.welcome-copy .eyebrow { margin: 0; }
.welcome-copy h1 { margin: 8px 0 7px; font-size: clamp(27px, 3vw, 36px); letter-spacing: -1.5px; line-height: 1.08; }
.welcome-copy p { margin: 0; color: #79847e; font-size: 13px; }
.welcome-date { display: flex; align-items: center; gap: 13px; padding: 12px 15px; border: 1px solid #e6ebe7; border-radius: 12px; background: #fff; }
.welcome-date .date-number { font-size: 28px; font-weight: 750; letter-spacing: -1.3px; line-height: 1; }
.welcome-date .date-details { display: grid; gap: 4px; color: #64716a; font-size: 11px; }
.welcome-date .date-details b { color: #293630; font-size: 12px; font-weight: 700; }
.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card { min-height: 120px; padding: 18px 19px 16px; position: relative; overflow: hidden; }
.stat-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: #849089; font-size: 11px; }
.stat-icon { display: grid; place-items: center; width: 29px; height: 29px; border-radius: 9px; font-size: 15px; font-weight: 700; }
.stat-icon.green { color: var(--brand); background: #e7f0ea; }
.stat-icon.amber { color: #9a6a29; background: #f8eedf; }
.stat-icon.blue { color: #50748a; background: #eaf0f5; }
.stat-value { font-size: 29px; letter-spacing: -1.3px; font-weight: 760; margin-top: 9px; line-height: 1.1; }
.stat-foot { display: flex; align-items: center; gap: 5px; color: #8c9791; font-size: 10px; margin-top: 5px; }
.stat-foot .accent { color: #588064; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.43fr) minmax(280px, .87fr); gap: 18px; align-items: start; }
.dashboard-column { display: grid; gap: 18px; min-width: 0; }
.task-list { display: grid; }
.task-row { display: flex; gap: 12px; align-items: flex-start; padding: 13px 0; border-bottom: 1px solid #eef1ef; min-width: 0; }
.task-row:last-child { border-bottom: none; padding-bottom: 0; }
.task-row:first-child { padding-top: 2px; }
.task-check { appearance: none; flex: 0 0 19px; height: 19px; width: 19px; border: 1.5px solid #cbd5ce; border-radius: 6px; background: #fff; margin: 1px 0 0; display: grid; place-items: center; cursor: pointer; }
.task-check:checked { background: var(--brand); border-color: var(--brand); }
.task-check:checked::after { content: '✓'; color: white; font-size: 12px; font-weight: 800; }
.task-main { min-width: 0; flex: 1; cursor: pointer; }
.task-title { display: block; color: #303b35; font-size: 12px; font-weight: 650; line-height: 1.45; overflow-wrap: anywhere; }
.task-title.is-done { color: #a2aaa5; text-decoration: line-through; }
.task-subline { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 6px; color: #959e99; font-size: 10px; }
.task-row-actions { opacity: 0; display: flex; gap: 2px; transition: opacity .15s; }
.task-row:hover .task-row-actions, .task-row:focus-within .task-row-actions { opacity: 1; }
.task-row-actions button { border: none; background: transparent; color: #97a19b; width: 24px; height: 24px; border-radius: 6px; }
.task-row-actions button:hover { color: var(--brand); background: #f0f4f1; }
.task-priority { width: 6px; height: 6px; display: inline-block; border-radius: 50%; margin-right: 2px; }
.task-priority.high { background: #c75c54; }
.task-priority.normal { background: #c7a064; }
.task-priority.low { background: #92b29d; }
.today-task-card { padding: 20px 21px 21px; }
.today-task-card .section-heading { margin-bottom: 14px; }
.list-heading-count { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; margin-left: 7px; border-radius: 7px; background: #f0f3f1; color: #737f78; font-size: 10px; font-weight: 700; }
.agenda-card { padding: 20px; }
.agenda-date { display: flex; align-items: center; gap: 12px; margin-bottom: 17px; }
.agenda-date-mark { width: 39px; height: 43px; border: 1px solid #dfe8e1; border-radius: 9px; display: grid; align-content: center; justify-items: center; background: #f2f7f3; color: var(--brand); }
.agenda-date-mark b { font-size: 19px; line-height: 1; }
.agenda-date-mark small { font-size: 8px; font-weight: 800; text-transform: uppercase; margin-top: 3px; }
.agenda-date-text { display: grid; gap: 4px; }
.agenda-date-text strong { font-size: 12px; }
.agenda-date-text span { font-size: 10px; color: #8b9690; }
.agenda-list { display: grid; gap: 11px; }
.agenda-item { display: grid; grid-template-columns: 45px 3px 1fr; gap: 10px; align-items: stretch; min-height: 48px; }
.agenda-time { color: #8b9690; font-size: 10px; padding-top: 2px; }
.agenda-line { width: 3px; border-radius: 3px; background: #a8c2b0; }
.agenda-item:nth-child(3n + 2) .agenda-line { background: #d5b579; }
.agenda-item:nth-child(3n) .agenda-line { background: #a9c2d3; }
.agenda-event { min-width: 0; padding: 1px 0 6px; }
.agenda-event strong { display: block; font-size: 11px; font-weight: 650; line-height: 1.4; overflow-wrap: anywhere; }
.agenda-event small { display: block; color: #939d97; font-size: 10px; margin-top: 4px; }
.agenda-empty { text-align: center; border: 1px dashed #e3e9e5; background: #fafcfb; border-radius: 10px; padding: 21px 10px; color: #7f8b84; }
.agenda-empty span { display: block; font-size: 20px; margin-bottom: 6px; color: #8eaa98; }
.agenda-empty strong { display: block; font-size: 11px; font-weight: 680; color: #5c6961; margin-bottom: 4px; }
.agenda-empty small { font-size: 10px; }
.quick-note-card { padding: 18px 20px; background: #f0f5f1; border: 1px solid #e5ece6; box-shadow: none; }
.quick-note-head { display: flex; align-items: center; gap: 10px; }
.quick-note-icon { display: grid; place-items: center; width: 32px; height: 32px; background: #e1ebe3; border-radius: 9px; color: var(--brand); font-size: 16px; }
.quick-note-head strong { display: block; font-size: 12px; }
.quick-note-head small { display: block; color: #7d8981; font-size: 10px; margin-top: 3px; }
.quick-note-card p { color: #738078; font-size: 11px; line-height: 1.55; margin: 13px 0 10px; }
.quick-note-card .text-button { padding: 0; }

/* Tasks page */
.page-toolbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 17px; }
.filter-tabs { display: flex; align-items: center; gap: 4px; padding: 4px; background: #edf1ee; border-radius: 10px; }
.filter-tab { border: none; background: transparent; color: #738078; border-radius: 7px; padding: 8px 12px; font-size: 11px; font-weight: 650; }
.filter-tab.active { color: #314a3d; background: #fff; box-shadow: 0 1px 3px rgba(30,50,40,.08); }
.search-box { display: flex; align-items: center; gap: 8px; height: 37px; width: min(100%, 245px); padding: 0 11px; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: #8b9690; }
.search-box input { width: 100%; border: none; outline: none; color: var(--ink); background: transparent; font-size: 11px; min-width: 0; }
.search-box input::placeholder { color: #a2aca6; }
.task-page-list { overflow: hidden; }
.task-group { padding: 18px 21px 5px; }
.task-group + .task-group { border-top: 1px solid var(--line); }
.task-group-label { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; color: #79857e; font-size: 10px; font-weight: 800; letter-spacing: .65px; text-transform: uppercase; }
.task-group-label .group-count { background: #f0f3f0; padding: 3px 6px; border-radius: 5px; font-size: 9px; letter-spacing: 0; }
.task-group .task-row { padding: 14px 0; }
.task-group .task-row:first-child { padding-top: 6px; }
.task-group .task-row:last-child { padding-bottom: 15px; }
.task-due { display: inline-flex; align-items: center; gap: 5px; }
.task-page-empty { padding: 10px; }

/* Calendar */
.calendar-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, .72fr); gap: 18px; align-items: start; }
.calendar-surface { padding: 21px; min-width: 0; }
.calendar-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 21px; }
.calendar-month-title { display: grid; gap: 4px; }
.calendar-month-title h2 { margin: 0; font-size: 19px; letter-spacing: -.55px; }
.calendar-month-title small { color: #88938d; font-size: 10px; }
.calendar-nav { display: flex; align-items: center; gap: 5px; }
.calendar-nav button { width: 31px; height: 31px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: #6b7971; font-size: 17px; }
.calendar-nav button:hover { background: #f1f5f2; }
.calendar-nav .today-small { width: auto; padding: 0 9px; font-size: 10px; font-weight: 700; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.calendar-weekday { text-align: center; padding: 0 0 10px; color: #a0aaa4; font-size: 9px; font-weight: 750; text-transform: uppercase; }
.calendar-day { min-width: 0; aspect-ratio: .88; padding: 8px 5px 5px; border: 1px solid transparent; border-radius: 8px; background: transparent; text-align: center; color: #5d6962; position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.calendar-day:hover { border-color: #e5ebe6; background: #f9fbf9; }
.calendar-day.outside { color: #c1c8c3; }
.calendar-day.selected { background: #e8f0eb; border-color: #d6e4d9; color: var(--brand); }
.calendar-day.today .day-number { border: 1px solid #97b6a1; }
.day-number { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 11px; font-weight: 650; flex: 0 0 26px; }
.calendar-day.selected .day-number { background: var(--brand); color: white; border-color: var(--brand); }
.day-dots { display: flex; align-items: center; justify-content: center; gap: 3px; min-height: 5px; }
.day-dot { width: 4px; height: 4px; border-radius: 50%; background: #6e9b7e; }
.day-dot.event { background: #c29b5d; }
.day-dot.task { background: #7f9cb1; }
.calendar-legend { display: flex; align-items: center; gap: 14px; margin-top: 17px; padding-top: 14px; border-top: 1px solid #eef1ef; color: #88938d; font-size: 10px; }
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-item .day-dot { width: 6px; height: 6px; }
.calendar-agenda { padding: 20px; min-height: 300px; }
.selected-date-head { display: flex; align-items: center; gap: 11px; margin-bottom: 19px; }
.selected-date-head .date-square { display: grid; place-items: center; flex: 0 0 43px; height: 47px; border-radius: 10px; background: #edf4ef; color: var(--brand); font-size: 21px; font-weight: 750; letter-spacing: -.8px; }
.selected-date-head h3 { margin: 0 0 4px; font-size: 13px; }
.selected-date-head p { margin: 0; color: #89948e; font-size: 10px; }
.calendar-agenda-list { display: grid; gap: 8px; }
.calendar-agenda-row { display: flex; align-items: flex-start; gap: 9px; padding: 10px; border: 1px solid #edf0ee; border-radius: 9px; background: #fff; }
.calendar-agenda-marker { width: 3px; min-height: 32px; align-self: stretch; border-radius: 4px; background: #9ebca7; }
.calendar-agenda-row.task-entry .calendar-agenda-marker { background: #92adbf; }
.calendar-agenda-row.event-entry .calendar-agenda-marker { background: #d2ad6e; }
.calendar-agenda-copy { min-width: 0; flex: 1; }
.calendar-agenda-copy strong { display: block; font-size: 11px; line-height: 1.45; overflow-wrap: anywhere; }
.calendar-agenda-copy small { display: block; font-size: 9px; color: #929d96; margin-top: 4px; }
.calendar-agenda-row > button { border: 0; background: transparent; color: #9aa49e; font-size: 16px; }
.calendar-side-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.calendar-side-actions .button { font-size: 10px; padding: 0 8px; }

/* Notes */
.notes-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; }
.notes-filter { display: flex; gap: 6px; align-items: center; }
.notes-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: start; }
.note-card { position: relative; min-height: 192px; padding: 18px 18px 15px; border: 1px solid #e6eae6; border-radius: 13px; cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; display: flex; flex-direction: column; overflow: hidden; }
.note-card:hover { transform: translateY(-2px); border-color: #cfdad1; box-shadow: 0 8px 25px rgba(35, 55, 44, .07); }
.note-card.paper { background: #fff; }
.note-card.mint { background: #edf5ee; border-color: #e1ece2; }
.note-card.blue { background: #edf2f7; border-color: #e1e8ef; }
.note-card.sand { background: #f8f2e8; border-color: #f0e7d8; }
.note-card-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; }
.note-card-title { margin: 0 0 9px; font-size: 14px; font-weight: 740; letter-spacing: -.25px; line-height: 1.35; overflow-wrap: anywhere; }
.note-card-preview { color: #727f77; font-size: 11px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.note-card-footer { margin-top: auto; padding-top: 19px; display: flex; justify-content: space-between; align-items: center; gap: 8px; color: #919c95; font-size: 9px; }
.note-pin { color: #8f9a93; font-size: 14px; }
.note-card-actions { display: flex; gap: 3px; opacity: 0; transition: opacity .15s; }
.note-card:hover .note-card-actions, .note-card:focus-within .note-card-actions { opacity: 1; }
.note-card-actions button { border: none; background: rgba(255,255,255,.7); color: #78847c; border-radius: 6px; width: 25px; height: 25px; }
.note-card-actions button:hover { color: var(--brand); }
.note-new-card { min-height: 192px; display: grid; place-items: center; text-align: center; gap: 10px; border: 1px dashed #d5ded7; border-radius: 13px; background: transparent; color: #86938b; }
.note-new-card:hover { background: #f1f5f1; border-color: #9eb9a6; color: var(--brand); }
.note-new-card .plus-circle { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid #d9e4db; background: #fff; font-size: 20px; }
.note-new-card strong { font-size: 12px; font-weight: 700; }
.note-new-card small { font-size: 10px; }
.notes-empty { grid-column: 1 / -1; }

/* Modal, editor, settings */
.modal-layer { position: fixed; inset: 0; display: grid; place-items: center; z-index: 60; padding: 20px; background: rgba(25, 39, 33, .38); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.modal-card { width: min(100%, 540px); max-height: min(90vh, 820px); max-height: min(90dvh, 820px); overflow: auto; background: #fff; border: 1px solid rgba(255,255,255,.8); border-radius: 17px; box-shadow: var(--shadow-md); animation: modal-in .17s ease-out; }
.modal-card.modal-wide { width: min(100%, 660px); }
@keyframes modal-in { from { opacity: .6; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; padding: 23px 24px 18px; border-bottom: 1px solid #eef1ef; }
.modal-heading h2 { margin: 0 0 6px; font-size: 20px; letter-spacing: -.65px; }
.modal-heading p { margin: 0; color: #89948d; font-size: 11px; line-height: 1.5; }
.modal-close { border: none; background: #f5f7f5; color: #7b8780; width: 30px; height: 30px; border-radius: 8px; font-size: 19px; flex: 0 0 30px; }
.modal-close:hover { background: #eaf0eb; color: var(--brand); }
.modal-body { padding: 21px 24px 24px; }
.modal-form { display: grid; gap: 16px; }
.modal-form label, .field-label { display: grid; gap: 7px; color: #48564e; font-size: 11px; font-weight: 680; }
.modal-form input:not([type=checkbox]), .modal-form textarea, .modal-form select, .field-control { width: 100%; min-height: 40px; padding: 10px 11px; border: 1px solid #dfe6e1; border-radius: 8px; background: #fff; color: #293630; outline: none; font-size: 12px; }
.modal-form input:focus, .modal-form textarea:focus, .modal-form select:focus, .field-control:focus { border-color: #98b7a5; box-shadow: 0 0 0 3px rgba(68, 127, 101, .09); }
.modal-form textarea { min-height: 92px; resize: vertical; line-height: 1.6; }
.modal-form input::placeholder, .modal-form textarea::placeholder { color: #a4ada7; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; }
.form-row.three { grid-template-columns: 1fr 1fr 1fr; }
.form-help { color: #8c9790; font-size: 10px; margin: -8px 0 0; line-height: 1.5; }
.form-divider { border-top: 1px solid #edf0ee; margin: 1px 0 0; padding-top: 15px; }
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 3px; }
.form-actions-right { display: flex; justify-content: flex-end; gap: 8px; margin-left: auto; }
.modal-form .button { min-height: 39px; font-size: 11px; }
.check-field { display: flex !important; align-items: center; gap: 9px !important; font-size: 11px !important; cursor: pointer; }
.check-field input { accent-color: var(--brand); width: 15px; height: 15px; }
.color-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.color-choice { border: 2px solid transparent; width: 34px; height: 30px; border-radius: 8px; position: relative; }
.color-choice.paper { background: #f3f5f3; }
.color-choice.mint { background: #dcecdf; }
.color-choice.blue { background: #dce7f1; }
.color-choice.sand { background: #f1e5d0; }
.color-choice.selected { border-color: var(--brand); box-shadow: inset 0 0 0 2px #fff; }
.color-choice.selected::after { content: '✓'; position: absolute; inset: 0; display: grid; place-items: center; color: var(--brand); font-size: 12px; font-weight: 800; }
.settings-list { display: grid; gap: 12px; }
.setting-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; border: 1px solid #e8ede9; border-radius: 11px; padding: 14px; }
.setting-row-copy { min-width: 0; }
.setting-row-copy strong { display: block; font-size: 12px; margin-bottom: 5px; }
.setting-row-copy p { font-size: 10px; line-height: 1.55; margin: 0; color: #839087; max-width: 350px; }
.setting-row .button { font-size: 10px; flex: 0 0 auto; min-height: 35px; padding: 0 11px; }
.settings-hint { padding: 12px 13px; background: #f5f8f5; border-radius: 9px; color: #738079; font-size: 10px; line-height: 1.65; }
.settings-hint strong { color: #49594f; }
.settings-section-title { margin: 5px 0 0; color: #8c9790; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: 1px; }

/* Toasts */
.toast-region { position: fixed; z-index: 90; bottom: 24px; right: 24px; display: grid; gap: 8px; width: min(360px, calc(100vw - 28px)); pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 10px; border: 1px solid #e3eae4; border-radius: 11px; padding: 13px 15px; background: #fff; box-shadow: 0 10px 35px rgba(22, 37, 32, .13); animation: toast-in .2s ease-out; pointer-events: auto; }
.toast-indicator { flex: 0 0 8px; width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: #5c9371; }
.toast.error .toast-indicator { background: #c35851; }
.toast strong { display: block; font-size: 11px; margin-bottom: 3px; }
.toast p { margin: 0; color: #7b8780; font-size: 10px; line-height: 1.45; }
@keyframes toast-in { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 1100px) {
  .sidebar { width: 220px; flex-basis: 220px; }
  .view-root { padding-left: 27px; padding-right: 27px; }
  .topbar { padding-left: 27px; padding-right: 27px; }
  .app-footer { padding-left: 27px; padding-right: 27px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1.1fr) minmax(255px, .85fr); }
  .notes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 850px) {
  .sidebar { width: 245px; flex-basis: 245px; position: fixed; inset: 0 auto 0 0; transform: translateX(-105%); transition: transform .22s ease; box-shadow: none; min-height: 100dvh; }
  .sidebar.is-open { transform: translateX(0); box-shadow: 15px 0 50px rgba(22, 36, 31, .13); }
  .sidebar-close { display: inline-grid; }
  .sidebar-scrim.is-visible { display: block; position: fixed; inset: 0; background: rgba(22, 34, 29, .26); z-index: 14; }
  .menu-toggle { display: inline-grid; }
  .topbar { height: 66px; flex-basis: 66px; padding: 0 22px; }
  .view-root { padding: 28px 22px 35px; }
  .app-footer { padding: 0 22px 80px; }
  .dashboard-grid { grid-template-columns: minmax(0, 1fr); }
  .dashboard-column { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; }
  .calendar-layout { grid-template-columns: minmax(0, 1.2fr) minmax(235px, .8fr); gap: 12px; }
  .calendar-surface, .calendar-agenda { padding: 15px; }
  .calendar-day { padding-left: 1px; padding-right: 1px; }
  .day-number { width: 24px; height: 24px; flex-basis: 24px; }
  .mobile-nav { display: flex; position: fixed; z-index: 12; left: 0; right: 0; bottom: 0; padding: 8px 11px max(8px, env(safe-area-inset-bottom)); height: calc(62px + env(safe-area-inset-bottom)); align-items: center; justify-content: space-around; background: rgba(255,255,255,.96); border-top: 1px solid #e4e9e5; backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
  .mobile-nav-item { display: grid; justify-items: center; gap: 3px; min-width: 53px; border: 0; background: transparent; color: #98a29c; padding: 4px 7px; }
  .mobile-nav-item span { font-size: 20px; line-height: 1.1; }
  .mobile-nav-item small { font-size: 9px; font-weight: 650; }
  .mobile-nav-item.active { color: var(--brand); }
  .mobile-nav-add { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; border: none; color: white; background: var(--brand); font-size: 25px; box-shadow: 0 4px 10px rgba(36, 74, 66, .2); margin-top: -17px; }
}
@media (max-width: 620px) {
  .topbar { padding: 0 15px; gap: 10px; }
  .breadcrumb { gap: 7px; }
  .topbar-actions { gap: 6px; }
  .today-label { display: none; }
  .top-add-button { width: 38px; min-width: 38px; padding: 0; font-size: 18px; gap: 0; }
  .top-add-button span { display: none; }
  .notification-button { width: 34px; }
  .view-root { padding: 24px 15px 27px; }
  .app-footer { padding: 0 15px 80px; font-size: 9px; }
  .app-footer span:last-child { display: none; }
  .welcome-strip { align-items: flex-start; margin-bottom: 23px; }
  .welcome-copy h1 { font-size: 28px; letter-spacing: -1.15px; }
  .welcome-copy p { max-width: 250px; font-size: 12px; }
  .welcome-date { padding: 9px 10px; gap: 8px; margin-top: 7px; }
  .welcome-date .date-number { font-size: 23px; }
  .welcome-date .date-details { font-size: 9px; }
  .welcome-date .date-details b { font-size: 10px; }
  .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 17px; }
  .stat-card { min-height: 104px; padding: 12px 10px; }
  .stat-top { align-items: flex-start; font-size: 9px; line-height: 1.3; gap: 4px; }
  .stat-icon { width: 24px; height: 24px; flex: 0 0 24px; font-size: 12px; }
  .stat-value { font-size: 25px; margin-top: 12px; }
  .stat-foot { font-size: 8px; line-height: 1.3; }
  .dashboard-column { grid-template-columns: minmax(0, 1fr); gap: 15px; }
  .dashboard-grid { gap: 15px; }
  .today-task-card, .agenda-card { padding: 16px; }
  .page-heading { display: block; margin-bottom: 23px; }
  .page-heading h1 { font-size: 29px; }
  .heading-actions { padding-top: 17px; }
  .page-toolbar { align-items: stretch; }
  .filter-tabs { max-width: 100%; overflow-x: auto; }
  .filter-tab { padding: 8px 9px; white-space: nowrap; }
  .search-box { width: 100%; }
  .task-group { padding-left: 14px; padding-right: 14px; }
  .task-row-actions { opacity: 1; }
  .calendar-layout { grid-template-columns: minmax(0, 1fr); }
  .calendar-surface { padding: 16px 12px; }
  .calendar-toolbar { margin-bottom: 16px; }
  .calendar-month-title h2 { font-size: 17px; }
  .calendar-day { aspect-ratio: .78; gap: 3px; padding-top: 6px; }
  .calendar-weekday { font-size: 8px; padding-bottom: 7px; }
  .day-number { width: 23px; height: 23px; flex-basis: 23px; font-size: 10px; }
  .calendar-agenda { min-height: auto; }
  .calendar-legend { gap: 10px; }
  .notes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .note-card, .note-new-card { min-height: 175px; padding: 13px; }
  .note-card-title { font-size: 12px; }
  .note-card-preview { font-size: 10px; -webkit-line-clamp: 4; }
  .note-card-top { margin-bottom: 12px; }
  .note-card-footer { padding-top: 13px; }
  .note-card-actions { opacity: 1; }
  .modal-layer { place-items: end center; padding: 8px; }
  .modal-card, .modal-card.modal-wide { width: 100%; max-height: 92dvh; border-radius: 17px 17px 12px 12px; }
  .modal-header { padding: 20px 18px 15px; }
  .modal-heading h2 { font-size: 18px; }
  .modal-body { padding: 18px; }
  .form-row, .form-row.three { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .setting-row { align-items: flex-start; padding: 12px; }
  .setting-row .button { white-space: normal; min-width: 95px; }
  .login-card { padding: 29px 24px 22px; }
  .login-card .brand-lockup { margin-bottom: 37px; }
  .login-side-note { right: 20px; bottom: 15px; font-size: 10px; }
  .toast-region { right: 14px; bottom: calc(73px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}


/* ================================================================
   KLAR — PREMIUM MINIMAL THEME
   Warm ivory, deep forest green, quiet borders and restrained depth.
   UI-only overrides: application behaviour and data handling untouched.
   ================================================================ */
:root {
  color-scheme: light;
  --bg: #f4f0e7;
  --surface: #fffdf8;
  --surface-soft: #eee9de;
  --ink: #282c25;
  --ink-2: #5f6258;
  --muted: #898578;
  --line: #e4ddcf;
  --brand: #355543;
  --brand-dark: #263f31;
  --brand-tint: #e6ebdf;
  --mint: #e0e7d9;
  --amber: #986536;
  --amber-tint: #f4e8d5;
  --red: #ad5148;
  --red-tint: #f6e5df;
  --blue: #5d7885;
  --blue-tint: #e5ecee;
  --shadow-sm: 0 4px 18px rgba(49, 48, 37, .035);
  --shadow-md: 0 20px 60px rgba(43, 44, 34, .14);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html, body { background: var(--bg); }
body { color: var(--ink); }
button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid rgba(53, 85, 67, .22);
  outline-offset: 2px;
}

/* Quiet brand details */
.brand-lockup { gap: 11px; color: var(--ink); letter-spacing: -.65px; font-weight: 760; }
.brand-mark { background: var(--brand); border-radius: 11px; box-shadow: 0 3px 8px rgba(53, 85, 67, .12); }
.eyebrow, .kicker { color: #8d8778; letter-spacing: 1.45px; }
.text-muted { color: var(--muted); }

/* Login screen */
.login-screen { background: var(--bg); }
.login-screen::before, .login-screen::after { opacity: .32; border-color: #d9d1c1; box-shadow: none; }
.login-card {
  background: var(--surface);
  border: 1px solid #e7dfd0;
  border-radius: 22px;
  box-shadow: 0 18px 56px rgba(55, 53, 39, .07);
}
.login-heading h1 { color: var(--ink); letter-spacing: -1.35px; }
.login-heading > p:last-child { color: var(--ink-2); }
.form-stack label, .field-label { color: #52564b; }
.form-stack input, .field-control {
  border-color: #e0d9ca;
  border-radius: 11px;
  background: #fffefa;
}
.form-stack input:focus, .field-control:focus {
  border-color: #9aab94;
  box-shadow: 0 0 0 3px rgba(53, 85, 67, .08);
}
.login-footnote { border-top-color: var(--line); }
.status-dot { background: #729477; }
.login-side-note { color: #898373; }

/* Main frame */
.sidebar {
  background: #faf7f0;
  border-right-color: #e5dece;
}
.sidebar-top { margin-bottom: 40px; }
.workspace-label, .sidebar-section-heading { color: #979080; }
.nav-item {
  min-height: 44px;
  border-radius: 11px;
  color: #696b60;
  transition: background .16s ease, color .16s ease;
}
.nav-item:hover { background: #f0ece2; color: var(--ink); }
.nav-item.active {
  color: var(--brand);
  background: #e7ebdf;
  box-shadow: inset 2px 0 0 #6e8a70;
}
.nav-count { color: #969082; }
.sidebar-divider { background: #e7dfd1; }
.sidebar-mini-card {
  background: #f4f0e6;
  border-color: #e9e1d3;
  border-radius: 15px;
}
.mini-icon { background: #e4e9dc; color: var(--brand); }
.mini-progress { background: #e3ded1; }
.mini-progress span { background: #66856b; }
.profile-button:hover { background: #f0ece2; }
.avatar { background: #e5e3d4; color: #425241; }
.topbar {
  background: rgba(249, 246, 238, .94);
  border-bottom-color: #e5dece;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}
.breadcrumb { color: #999182; }
.breadcrumb strong { color: #3a4035; }
.breadcrumb-sep { color: #c5bdad; }
.today-label { color: #827d70; }
.icon-button, .tiny-icon-button { color: #6c7064; border-radius: 11px; }
.icon-button:hover, .tiny-icon-button:hover { background: #efeadf; color: var(--brand); }
.view-root { padding-top: 38px; }
.app-footer { color: #9a9385; }
.footer-dot { color: #c8c0b1; }

/* Buttons and common surfaces */
.button { border-radius: 11px; font-weight: 660; }
.button-primary {
  background: var(--brand);
  box-shadow: 0 3px 8px rgba(53, 85, 67, .10);
}
.button-primary:hover { background: var(--brand-dark); }
.button-secondary { background: #fffdf8; border-color: #e3dccd; }
.button-secondary:hover { background: #f4f0e7; border-color: #d8cfbd; }
.button-quiet { color: #64675c; }
.button-quiet:hover { background: #f0ece2; }
.button-danger { color: #9f4941; background: #f6e5df; }
.surface {
  background: var(--surface);
  border-color: #e5decf;
  border-radius: 17px;
  box-shadow: 0 4px 17px rgba(55, 53, 39, .028);
}
.kicker { color: #8d8778; }
.page-heading h1, .welcome-copy h1 { color: #262b24; letter-spacing: -1.4px; }
.page-heading p, .welcome-copy p { color: #777568; }
.section-heading h2 { color: #2d332b; }
.section-heading p { color: #8b8679; }
.text-button { color: var(--brand); }
.text-button:hover { color: #526f56; }
.pill { background: #efebe2; color: #65665c; }
.pill.green { color: #426348; background: #e7ecdf; }
.pill.amber { color: #8f622f; background: #f4e8d5; }
.pill.red { color: #a04d43; background: #f6e5df; }
.pill.blue { color: #4f6f7a; background: #e5ecee; }
.pill.dark { color: #4d5548; background: #e9e7dc; }
.empty-illustration { color: var(--brand); background: #e8ecdf; border-radius: 16px; }
.empty-state strong { color: #44483d; }

/* Today dashboard */
.welcome-strip { margin-bottom: 30px; }
.welcome-copy h1 { font-weight: 710; }
.welcome-date {
  background: #fffdf8;
  border-color: #e4ddce;
  border-radius: 15px;
  box-shadow: 0 3px 12px rgba(55, 53, 39, .025);
}
.welcome-date .date-details { color: #777468; }
.welcome-date .date-details b { color: #343a30; }
.stat-card { min-height: 126px; }
.stat-top { color: #8a8578; }
.stat-icon { border-radius: 10px; }
.stat-icon.green { color: #426348; background: #e7ecdf; }
.stat-icon.amber { color: #916331; background: #f4e8d5; }
.stat-icon.blue { color: #4f6f7a; background: #e5ecee; }
.stat-value { color: #2a3028; }
.stat-foot { color: #938e81; }
.stat-foot .accent { color: #58775c; }
.task-row { border-bottom-color: #eee8dc; }
.task-check { border-color: #cfc7b7; background: #fffdf8; border-radius: 6px; }
.task-check:checked { background: var(--brand); border-color: var(--brand); }
.task-title { color: #343a31; font-size: 12.5px; }
.task-title.is-done { color: #a6a192; }
.task-subline { color: #938d80; }
.task-row-actions button { color: #989182; border-radius: 7px; }
.task-row-actions button:hover { color: var(--brand); background: #f1ede3; }
.list-heading-count { background: #efebe2; color: #6c6b60; border-radius: 8px; }
.agenda-date-mark { border-color: #e0e4d7; background: #edf0e5; color: var(--brand); border-radius: 11px; }
.agenda-date-text span, .agenda-time, .agenda-event small { color: #918b7e; }
.agenda-line { background: #91a58d; }
.agenda-item:nth-child(3n + 2) .agenda-line { background: #c9a878; }
.agenda-item:nth-child(3n) .agenda-line { background: #92a9af; }
.agenda-empty { background: #faf8f1; border-color: #e6dfd1; color: #827d70; border-radius: 12px; }
.agenda-empty span { color: #799278; }
.agenda-empty strong { color: #4a5145; }
.quick-note-card { background: #edf0e5; border-color: #e1e6d8; }
.quick-note-icon { background: #dfe6d7; color: var(--brand); border-radius: 10px; }
.quick-note-head small, .quick-note-card p { color: #727567; }

/* Tasks and filters */
.filter-tabs { background: #eae5da; border-radius: 11px; }
.filter-tab { color: #737366; border-radius: 8px; }
.filter-tab.active { color: #304b37; background: #fffdf8; box-shadow: 0 1px 4px rgba(42, 44, 34, .07); }
.search-box { background: #fffdf8; border-color: #e4ddcf; border-radius: 11px; color: #8d877a; }
.search-box input { color: var(--ink); }
.search-box input::placeholder { color: #a49e90; }
.task-group + .task-group { border-top-color: #e9e2d6; }
.task-group-label { color: #868173; }
.task-group-label .group-count { background: #eee9de; color: #777466; }

/* Calendar */
.calendar-surface, .calendar-agenda { background: var(--surface); }
.calendar-month-title h2 { color: #30352c; letter-spacing: -.6px; }
.calendar-month-title small, .calendar-weekday { color: #928c7d; }
.calendar-nav button { background: #fffdf8; border-color: #e3dccd; color: #686d61; border-radius: 9px; }
.calendar-nav button:hover { background: #f0ece2; }
.calendar-day { color: #65685c; border-radius: 10px; }
.calendar-day:hover { border-color: #e0d9cb; background: #f8f5ed; }
.calendar-day.outside { color: #c2bbad; }
.calendar-day.selected { background: #e7ebdf; border-color: #d9dfd0; color: var(--brand); }
.calendar-day.today .day-number { border-color: #8ba184; }
.calendar-day.selected .day-number { background: var(--brand); color: #fffdf8; border-color: var(--brand); }
.day-dot { background: #789276; }
.day-dot.event { background: #c09b66; }
.day-dot.task { background: #7f9ca4; }
.calendar-legend { border-top-color: #eee8dc; color: #8c8678; }
.selected-date-head .date-square { background: #e9ede1; color: var(--brand); border-radius: 12px; }
.selected-date-head p { color: #8b8578; }
.calendar-agenda-row { border-color: #ebe4d8; border-radius: 11px; background: #fffdf8; }
.calendar-agenda-marker { background: #8da188; }
.calendar-agenda-row.task-entry .calendar-agenda-marker { background: #8ba3a7; }
.calendar-agenda-row.event-entry .calendar-agenda-marker { background: #c6a16a; }
.calendar-agenda-copy small { color: #928c7f; }

/* Notes */
.note-card { border-color: #e5ddcf; border-radius: 15px; box-shadow: 0 4px 14px rgba(53, 49, 35, .025); }
.note-card:hover { border-color: #c9d0bf; box-shadow: 0 10px 24px rgba(53, 49, 35, .065); }
.note-card.paper { background: #fffdf8; }
.note-card.mint { background: #edf0e5; border-color: #e1e6d8; }
.note-card.blue { background: #eaf0ef; border-color: #dce5e2; }
.note-card.sand { background: #f5ecdd; border-color: #eadfcb; }
.note-card-title { color: #34382f; }
.note-card-preview { color: #747467; }
.note-card-footer { color: #969080; }
.note-card-actions button { background: rgba(255, 253, 248, .88); color: #76786b; border-radius: 7px; }
.note-card-actions button:hover { color: var(--brand); }
.note-new-card { border-color: #d9d2c3; border-radius: 15px; color: #888374; }
.note-new-card:hover { background: #efede3; border-color: #aebda7; color: var(--brand); }
.note-new-card .plus-circle { border-color: #e0d9ca; background: #fffdf8; color: var(--brand); }

/* Modal forms, settings, toast messages */
.modal-layer { background: rgba(43, 43, 33, .32); }
.modal-card { background: #fffdf8; border-color: #e8e0d2; border-radius: 20px; }
.modal-header { border-bottom-color: #eee8dc; }
.modal-heading h2 { color: #2e342b; }
.modal-heading p { color: #8a8577; }
.modal-close { background: #f0ece2; color: #727365; border-radius: 9px; }
.modal-close:hover { background: #e6ebdf; color: var(--brand); }
.modal-form label, .field-label { color: #53574a; }
.modal-form input:not([type=checkbox]), .modal-form textarea, .modal-form select, .field-control {
  background: #fffefa;
  border-color: #e1dacb;
  border-radius: 10px;
  color: #2d332a;
}
.modal-form input:focus, .modal-form textarea:focus, .modal-form select:focus, .field-control:focus {
  border-color: #9aab94;
  box-shadow: 0 0 0 3px rgba(53, 85, 67, .075);
}
.modal-form input::placeholder, .modal-form textarea::placeholder { color: #a39d8e; }
.form-help { color: #918b7e; }
.form-divider { border-top-color: #eee8dc; }
.color-choice.paper { background: #f2eee4; }
.color-choice.mint { background: #e0e7d9; }
.color-choice.blue { background: #e0e9e8; }
.color-choice.sand { background: #f0e3cf; }
.color-choice.selected { border-color: var(--brand); }
.settings-list { gap: 10px; }
.setting-row { border-color: #e7e0d3; border-radius: 13px; }
.setting-row-copy p { color: #817c70; }
.settings-hint { background: #f1f0e7; color: #747567; }
.settings-hint strong { color: #424d3f; }
.settings-section-title { color: #8a8577; }
.toast {
  background: #fffdf8;
  border-color: #e6dfd2;
  border-radius: 13px;
  box-shadow: 0 12px 32px rgba(43, 43, 33, .11);
}
.toast p { color: #77776b; }
.toast-indicator { background: #638567; }

/* iPhone bottom navigation */
@media (max-width: 850px) {
  .mobile-nav {
    background: rgba(250, 247, 240, .96);
    border-top-color: #e4ddcf;
    box-shadow: 0 -6px 24px rgba(54, 51, 38, .035);
  }
  .mobile-nav-item { color: #989182; }
  .mobile-nav-item.active { color: var(--brand); }
  .mobile-nav-add {
    background: var(--brand);
    border-radius: 15px;
    box-shadow: 0 5px 13px rgba(53, 85, 67, .19);
  }
  .sidebar.is-open { box-shadow: 16px 0 48px rgba(43, 43, 33, .12); }
  .sidebar-scrim.is-visible { background: rgba(42, 43, 34, .22); }
}
@media (max-width: 620px) {
  .view-root { padding-top: 26px; }
  .welcome-copy h1 { font-size: 29px; }
  .welcome-date { background: #fffdf8; }
  .stat-card { border-radius: 14px; }
  .topbar { background: rgba(249, 246, 238, .97); }
  .calendar-surface, .calendar-agenda { border-radius: 15px; }
  .modal-layer { background: rgba(43, 43, 33, .28); }
}

/* ================================================================
   KLAR — PREMIUM DASHBOARD (faithful to the new visual concept)
   ================================================================ */
:root {
  --bg: #f4f0e7;
  --surface: #fffdf8;
  --surface-soft: #eee9de;
  --ink: #25372c;
  --ink-2: #667164;
  --muted: #858575;
  --line: #e5dece;
  --brand: #294c3b;
  --brand-dark: #203d30;
  --brand-tint: #e4eadd;
  --mint: #dfe7d8;
  --amber: #8a6d44;
  --amber-tint: #f0e5d4;
  --shadow-sm: 0 5px 22px rgba(55, 53, 39, .035);
}
html, body { background: var(--bg); }
body { color: var(--ink); }
.brand-mark { display: grid; place-items: center; background: #294c3b; border-radius: 11px; box-shadow: none; }
.brand-glyph { display: block; color: #fffdf8; font: 800 20px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; transform: rotate(-8deg); margin-top: -2px; }
.brand-lockup { gap: 10px; color: var(--ink); font-weight: 780; letter-spacing: -.8px; }
.topbar-brand { display: none; text-decoration: none; }
.topbar { background: rgba(249, 246, 238, .96); border-bottom-color: var(--line); }
.view-root { max-width: 1320px; padding-top: 32px; }
.surface { background: var(--surface); border: 1px solid var(--line); border-radius: 19px; box-shadow: var(--shadow-sm); }
.button-primary { background: var(--brand); box-shadow: 0 5px 13px rgba(41, 76, 59, .12); }
.button-primary:hover { background: var(--brand-dark); }
.button-secondary { background: var(--surface); border-color: var(--line); }
.button-secondary:hover { background: #f1ede3; border-color: #d9d0bf; }
.text-button { color: var(--brand); font-weight: 720; }

/* Large, calm opening headline */
.hero-intro { margin: 7px 0 27px; padding: 5px 0 0; }
.hero-date { margin: 0 0 16px; font-size: 10px; letter-spacing: 1.3px; color: #7d8575; font-weight: 800; }
.hero-copy h1 { display: grid; gap: 0; margin: 0; max-width: 720px; color: #25372c; font-size: clamp(38px, 4.2vw, 54px); line-height: .98; letter-spacing: -2.2px; font-weight: 760; }
.hero-copy h1 span + span { color: #48624b; }
.hero-copy > p:last-child { margin: 15px 0 0; color: #73776a; font-size: 14px; line-height: 1.5; }

/* Only two useful summaries, matching the concept */
.stats-grid.dashboard-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.dashboard-stats .stat-card { min-height: 132px; padding: 19px 21px 17px; border-radius: 18px; }
.dashboard-stats .stat-top { color: #7e8174; font-size: 12px; align-items: center; }
.dashboard-stats .stat-icon { width: 33px; height: 33px; border-radius: 11px; font-size: 16px; }
.dashboard-stats .stat-icon.green { color: #426448; background: #e5eadf; }
.dashboard-stats .stat-icon.amber { color: #8a6d44; background: #f1e6d5; }
.dashboard-stats .stat-value { margin-top: 8px; color: #25372c; font-size: 34px; line-height: 1; letter-spacing: -1.25px; }
.dashboard-stats .stat-foot { margin-top: 8px; color: #8c8c7e; font-size: 10px; }

/* Dashboard card grid */
.dashboard-grid-premium { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(280px, .85fr); gap: 16px; align-items: stretch; }
.dashboard-grid-premium > .today-task-card,
.dashboard-grid-premium > .agenda-card { padding: 21px; }
.dashboard-grid-premium .section-heading { margin-bottom: 14px; align-items: center; }
.dashboard-grid-premium .section-heading h2 { margin: 0; color: #29382d; font-size: 17px; letter-spacing: -.5px; }
.dashboard-grid-premium .section-heading p { color: #858577; font-size: 11px; margin-top: 5px; }
.dashboard-grid-premium .section-heading .text-button { font-size: 10px; white-space: nowrap; }
.dashboard-task-list .task-row { display: grid; grid-template-columns: minmax(0, 1fr) 27px; align-items: center; gap: 13px; min-height: 73px; padding: 13px 0; border-bottom-color: #eee8dc; }
.dashboard-task-list .task-row:first-child { padding-top: 10px; }
.dashboard-task-list .task-row:last-child { padding-bottom: 10px; }
.dashboard-task-list .task-check { grid-column: 2; grid-row: 1; width: 23px; height: 23px; border: 1.5px solid #c5cdbd; border-radius: 50%; margin: 0; background: #fffdf8; }
.dashboard-task-list .task-check:checked { background: var(--brand); border-color: var(--brand); }
.dashboard-task-list .task-main { grid-column: 1; grid-row: 1; min-width: 0; }
.dashboard-task-list .task-title { color: #2e3c31; font-size: 13px; font-weight: 680; line-height: 1.4; }
.dashboard-task-list .task-subline { margin-top: 6px; color: #8a8c7e; font-size: 10px; gap: 6px; }
.dashboard-task-list .task-row-actions { display: none; }
.dashboard-list-more { padding-top: 10px; }
.dashboard-list-more .text-button { font-size: 11px; }
.dashboard-grid-premium .agenda-card { display: flex; flex-direction: column; }
.dashboard-grid-premium .agenda-date { padding: 13px; margin: 0 0 13px; background: #f7f4eb; border-radius: 14px; gap: 12px; }
.dashboard-grid-premium .agenda-date-mark { width: 43px; height: 46px; border: 1px solid #dfe4d7; background: #e6eadf; border-radius: 12px; }
.dashboard-grid-premium .agenda-date-mark b { font-size: 20px; }
.dashboard-grid-premium .agenda-date-text strong { color: #364638; font-size: 12px; }
.dashboard-grid-premium .agenda-date-text span { color: #878878; font-size: 10px; }
.dashboard-grid-premium .agenda-item { padding: 12px 0; }
.dashboard-grid-premium .agenda-time { color: #7c8172; font-size: 10px; min-width: 44px; }
.dashboard-grid-premium .agenda-line { width: 3px; border-radius: 9px; background: #91a18a; }
.dashboard-grid-premium .agenda-event strong { color: #344336; font-size: 12px; }
.dashboard-grid-premium .agenda-event small { color: #8b8b7d; font-size: 10px; }
.dashboard-grid-premium .agenda-empty { background: #faf8f1; border-color: #e6dfd1; border-radius: 14px; padding: 22px 14px; }
.dashboard-grid-premium .agenda-empty-action { margin-top: 10px; }
.dashboard-grid-premium .quick-note-card { padding: 19px 21px; background: #e7ebdf; border-color: #dfe5d7; border-radius: 18px; }
.dashboard-grid-premium .quick-note-head { gap: 11px; }
.dashboard-grid-premium .quick-note-icon { width: 39px; height: 39px; border-radius: 12px; background: #d8e0d0; color: var(--brand); font-size: 17px; }
.dashboard-grid-premium .quick-note-head strong { color: #304333; font-size: 12px; }
.dashboard-grid-premium .quick-note-head small { color: #7d8475; font-size: 10px; }
.dashboard-grid-premium .quick-note-card p { color: #687363; font-size: 11px; line-height: 1.6; margin: 12px 0; }
.dashboard-grid-premium .quick-note-card .text-button { font-size: 10px; }
.dashboard-create-card { display: flex; flex-wrap: wrap; align-items: center; gap: 13px; padding: 18px; background: #fffdf8; border-radius: 18px; }
.create-card-mark { display: grid; place-items: center; flex: 0 0 42px; width: 42px; height: 42px; background: #e4eadf; color: #294c3b; border-radius: 13px; font-size: 26px; font-weight: 400; }
.dashboard-create-card > div:nth-child(2) { min-width: 0; flex: 1; }
.dashboard-create-card h2 { margin: 0; color: #2d3d30; font-size: 13px; letter-spacing: -.2px; }
.dashboard-create-card p { margin: 5px 0 0; color: #858577; font-size: 10px; line-height: 1.5; }
.dashboard-create-button { min-height: 47px; width: 100%; justify-content: center; border-radius: 13px; font-size: 12px; margin-top: 2px; }

/* Keep the other views in the same visual language */
.page-heading h1 { color: #25372c; letter-spacing: -1.35px; }
.page-heading p { color: #79796d; }
.task-page-list, .calendar-surface, .calendar-agenda { border-radius: 18px; }
.note-card, .note-new-card { border-radius: 17px; }
.modal-card { background: #fffdf8; border-color: #e5dece; }

@media (min-width: 851px) {
  .topbar-brand { display: none; }
}
@media (max-width: 850px) {
  .view-root { padding: 29px 22px 95px; }
  .topbar-brand { display: inline-flex; }
  .topbar-brand .brand-mark { width: 34px; height: 34px; }
  .topbar-left { gap: 11px; }
  .dashboard-grid-premium { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .dashboard-stats .stat-card { min-height: 124px; }
}
@media (max-width: 620px) {
  .topbar { height: 62px; flex-basis: 62px; padding: 0 17px; }
  .topbar-left { gap: 0; }
  .menu-toggle { display: none; }
  .breadcrumb { display: none; }
  .topbar-brand { display: inline-flex; font-size: 20px; }
  .topbar-brand .brand-mark { width: 33px; height: 33px; border-radius: 11px; }
  .topbar-actions { gap: 5px; }
  .notification-button { width: 36px; height: 36px; }
  .top-add-button { width: 39px; min-width: 39px; height: 39px; border-radius: 12px; }
  .view-root { padding: 28px 17px 96px; }
  .hero-intro { margin: 8px 0 24px; }
  .hero-date { margin-bottom: 15px; font-size: 9px; letter-spacing: 1.1px; }
  .hero-copy h1 { font-size: clamp(35px, 9vw, 43px); line-height: .99; letter-spacing: -1.65px; }
  .hero-copy > p:last-child { margin-top: 12px; font-size: 12px; }
  .stats-grid.dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
  .dashboard-stats .stat-card { min-height: 119px; padding: 14px 13px 13px; border-radius: 17px; }
  .dashboard-stats .stat-top { align-items: flex-start; gap: 6px; font-size: 10px; line-height: 1.35; }
  .dashboard-stats .stat-icon { width: 27px; height: 27px; flex: 0 0 27px; border-radius: 9px; font-size: 13px; }
  .dashboard-stats .stat-value { font-size: 29px; margin-top: 10px; }
  .dashboard-stats .stat-foot { font-size: 9px; margin-top: 7px; }
  .dashboard-grid-premium { display: flex; flex-direction: column; gap: 13px; }
  .dashboard-grid-premium > .today-task-card,
  .dashboard-grid-premium > .agenda-card { padding: 17px 16px; width: 100%; }
  .dashboard-grid-premium .section-heading { gap: 8px; }
  .dashboard-grid-premium .section-heading h2 { font-size: 16px; }
  .dashboard-grid-premium .section-heading p { font-size: 10px; }
  .dashboard-grid-premium .section-heading .text-button { font-size: 9px; }
  .dashboard-task-list .task-row { min-height: 68px; }
  .dashboard-task-list .task-title { font-size: 12px; }
  .dashboard-task-list .task-subline { font-size: 9px; }
  .dashboard-create-card { order: 2; width: 100%; padding: 15px; gap: 11px; }
  .dashboard-create-card .create-card-mark { flex-basis: 39px; width: 39px; height: 39px; }
  .dashboard-create-card h2 { font-size: 12px; }
  .dashboard-create-button { min-height: 48px; margin-top: 2px; }
  .dashboard-grid-premium > .agenda-card { order: 3; }
  .dashboard-grid-premium > .quick-note-card { order: 4; width: 100%; }
  .dashboard-grid-premium .quick-note-card { padding: 17px; }
  .app-footer { padding-bottom: calc(83px + env(safe-area-inset-bottom)); }
}
