:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, sans-serif;
  background: #f4f2eb;
  color: #18231c;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-height: 100vh; background: linear-gradient(180deg, #e8eee5 0, #f4f2eb 320px); }
body.has-overlay { overflow: hidden; }
button { font: inherit; }
.shell { width: min(920px, calc(100% - 32px)); margin-inline: auto; }
header { padding: 44px 0 30px; }
.header-inner { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.eyebrow { margin: 0 0 8px; letter-spacing: .16em; font-size: .72rem; font-weight: 750; color: #667469; }
h1 { margin: 0; font-size: clamp(2.6rem, 8vw, 5.4rem); line-height: .95; letter-spacing: -.055em; }
.backend-status { display: flex; align-items: center; gap: 9px; padding: 10px 14px; border: 1px solid #cdd4cc; border-radius: 999px; background: rgba(255,255,255,.65); color: #5f6961; font-size: .86rem; white-space: nowrap; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #9ca49d; box-shadow: 0 0 0 4px rgba(156,164,157,.15); }
.backend-status.is-online .status-dot { background: #278653; box-shadow: 0 0 0 4px rgba(39,134,83,.15); }
.backend-status.is-offline .status-dot { background: #b7453c; box-shadow: 0 0 0 4px rgba(183,69,60,.14); }
main { padding-bottom: 64px; }
.section-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 6px; overflow: visible; border: 1px solid #d7d8d0; border-radius: 18px; background: rgba(255,255,255,.72); scrollbar-width: none; }
.section-nav::-webkit-scrollbar { display: none; }
.nav-button { flex: 0 0 auto; padding: 10px 15px; border: 0; border-radius: 12px; background: transparent; color: #5f6961; cursor: pointer; font-weight: 650; }
.nav-button:hover { background: #edf0ea; color: #27332b; }
.nav-button.is-active { background: #1e3326; color: #fff; box-shadow: 0 5px 15px rgba(30,51,38,.18); }
.more-button, .more-menu { display: none; }
.workspace-section { padding: 28px; border: 1px solid #d7d8d0; border-radius: 24px; background: rgba(255,255,255,.88); box-shadow: 0 18px 55px rgba(34,46,38,.08); }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
h2 { margin: 0; font-size: clamp(2rem, 5vw, 3.1rem); letter-spacing: -.04em; }
.refresh-button, .action-button { border: 1px solid #ccd1ca; border-radius: 999px; background: #fff; color: #27332b; cursor: pointer; transition: transform .15s ease, border-color .15s ease, background .15s ease; }
.refresh-button { padding: 9px 14px; }
.refresh-button:hover, .action-button:hover { border-color: #748177; transform: translateY(-1px); }
button:disabled { cursor: wait; opacity: .55; transform: none; }
.items { display: grid; gap: 14px; }
.today-root { display: block; }
.today-board { display: grid; gap: 22px; }
.today-section { display: grid; gap: 11px; }
.today-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.today-heading h3 { margin: 0; font-size: 1.25rem; }
.today-heading span { min-width: 28px; padding: 4px 8px; border-radius: 999px; background: #e9eee7; color: #516057; text-align: center; font-size: .78rem; font-weight: 750; }
.today-list { display: grid; gap: 10px; }
.today-empty { margin: 0; padding: 22px 18px; border: 1px dashed #cfd5ce; border-radius: 17px; background: #f7f7f3; color: #707b73; }
.today-main-now .item-card { border-color: #b8c8ba; background: #fbfdf9; }
.today-overdue .type-badge { background: #fff0ed; color: #9d382f; }
.today-card h3 { margin-bottom: 0; }
.today-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 14px; }
.item-card { padding: 20px; border: 1px solid #dedfd9; border-radius: 18px; background: #fff; }
.note-card { cursor: pointer; transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.note-card:hover, .note-card:focus-visible { border-color: #a9b3aa; transform: translateY(-2px); box-shadow: 0 12px 28px rgba(34,46,38,.08); outline: none; }
.item-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; color: #778079; font-size: .78rem; }
.type-badge { padding: 5px 9px; border-radius: 999px; background: #edf2eb; color: #3d5947; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
h3 { margin: 16px 0 8px; font-size: 1.28rem; line-height: 1.25; }
.item-description { margin: 0; color: #4e5a51; line-height: 1.55; white-space: pre-wrap; }
.item-preview { display: -webkit-box; max-height: 3.1em; overflow: hidden; -webkit-line-clamp: 2; line-clamp: 2; -webkit-box-orient: vertical; }
.section-path { margin: 14px 0 0; color: #587061; font-size: .86rem; font-weight: 650; }
.action-button { padding: 8px 12px; font-size: .84rem; }
.action-button.is-primary { border-color: #1e3326; background: #1e3326; color: #fff; }
.section-message { margin: 8px 0 0; padding: 18px; border-radius: 14px; background: #f1f3ee; color: #657067; }
.section-message.is-error { background: #fff0ed; color: #9d382f; }
.area-grid { grid-template-columns: repeat(3, 1fr); }
.area-card { display: flex; min-height: 118px; padding: 18px; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 16px; border: 1px solid #d9ddd6; border-radius: 17px; background: #fff; color: #253129; text-align: left; cursor: pointer; }
.area-card:hover { border-color: #728078; transform: translateY(-1px); box-shadow: 0 8px 20px rgba(34,46,38,.07); }
.area-card strong { font-size: 1.05rem; }
.area-card span { color: #7b857d; font-size: .78rem; }
.area-trail { display: flex; flex-wrap: wrap; gap: 8px; margin: -8px 0 18px; }
.area-trail button { padding: 7px 10px; border: 0; border-radius: 9px; background: #edf1eb; color: #496052; cursor: pointer; }
.item-group { display: grid; gap: 12px; }
.item-group + .item-group { margin-top: 14px; }
.group-title { margin: 6px 2px 0; color: #35483b; font-size: 1.02rem; }
.detail-overlay { position: fixed; z-index: 50; inset: 0; overflow-y: auto; padding: 24px; background: rgba(21,31,24,.58); backdrop-filter: blur(5px); }
.detail-panel { position: relative; width: min(780px, 100%); min-height: calc(100vh - 48px); margin: 0 auto; padding: 46px clamp(22px,5vw,54px); border-radius: 26px; background: #fbfaf6; box-shadow: 0 30px 90px rgba(15,25,18,.28); }
.overlay-close { position: absolute; top: 16px; right: 18px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: #e9ede7; color: #34453a; cursor: pointer; font-size: 1.6rem; line-height: 1; }
.detail-header { padding: 0; }
.detail-header h2 { max-width: 680px; margin: 18px 0 12px; font-size: clamp(2.2rem,7vw,4.2rem); line-height: 1.04; }
.detail-location { margin: 0; color: #4f6958; font-weight: 700; }
.detail-description { margin: 32px 0; color: #344039; font-size: 1.08rem; line-height: 1.75; white-space: pre-wrap; }
.detail-meta { display: grid; grid-template-columns: max-content 1fr; gap: 7px 18px; margin: 0 0 28px; padding: 18px; border-radius: 16px; background: #f0f2ed; font-size: .86rem; }
.detail-meta dt { color: #7b857d; }
.detail-meta dd { margin: 0; overflow-wrap: anywhere; color: #35453b; }
.detail-actions, .dialog-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.detail-block { margin-top: 28px; padding-top: 24px; border-top: 1px solid #dfe2dc; }
.detail-block h3 { margin: 0 0 14px; }
.detail-block ul { display: grid; gap: 9px; margin: 0; padding-left: 20px; color: #526057; }
.detail-loading { padding: 40px 0; color: #68736a; }
.edit-form { display: grid; gap: 12px; margin: 0 0 24px; padding: 20px; border: 1px solid #d8ddd6; border-radius: 16px; background: #fff; }
.edit-form input, .edit-form textarea, .move-form select, .reminder-form input { width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid #cbd2ca; border-radius: 11px; background: #fff; color: #253129; font: inherit; }
.edit-form textarea { resize: vertical; line-height: 1.55; }
.move-overlay { position: fixed; z-index: 70; inset: 0; display: grid; place-items: center; padding: 20px; background: rgba(21,31,24,.48); }
.move-dialog { position: relative; z-index: 2; width: min(430px,100%); padding: 24px; border-radius: 20px; background: #fff; box-shadow: 0 25px 70px rgba(15,25,18,.25); }
.move-backdrop { position: absolute; z-index: 1; inset: 0; width: 100%; border: 0; background: transparent; }
.move-form { display: grid; gap: 11px; }
.move-form h3 { margin: 0 0 5px; font-size: 1.45rem; }
.inline-message { min-height: 1.2em; margin: 0; color: #9d382f; font-size: .84rem; }
.inline-message.is-success { color: #237b4b; }
.inline-message.is-error { color: #9d382f; }
.reminder-quick button { cursor: pointer; }
.reminder-quick { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.reminder-quick button { font-size: .8rem; }
.health-items { display: block; }
.health-root { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.health-panel { padding: 18px; border: 1px solid #d9ddd6; border-radius: 17px; background: #fff; }
.health-panel h3 { margin: 0 0 14px; }
.health-summary { display: flex; align-items: center; gap: 12px; grid-column: 1/-1; }
.health-summary h3 { margin: 0; }
.health-summary p { margin: 0 0 0 auto; color: #778079; font-size: .8rem; }
.health-badge { display: inline-flex; padding: 5px 9px; border-radius: 999px; font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.health-ok { background: #e4f3e9; color: #207747; }
.health-degraded,.health-stale,.health-unknown { background: #fff2cf; color: #87620d; }
.health-error { background: #ffe6e1; color: #a13b32; }
.health-service-list { display: grid; gap: 8px; }
.health-service { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid #edf0eb; }
.health-service:last-child { border-bottom: 0; }
.health-service small { display: block; margin-top: 3px; color: #7b857d; }
.health-metric-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.health-metric { padding: 10px; border-radius: 11px; background: #f2f4ef; }
.health-metric strong,.health-metric span { display: block; }
.health-metric strong { font-size: 1.25rem; }
.health-metric span { margin-top: 2px; color: #68736a; font-size: .75rem; }
.health-runtime { display: grid; grid-template-columns: 1fr auto; gap: 8px 14px; margin: 0; font-size: .86rem; }
.health-runtime dt { color: #68736a; }
.health-runtime dd { margin: 0; font-weight: 700; }
.health-inline-metrics { margin: 0 0 12px; color: #59675e; font-size: .84rem; line-height: 1.5; }
.health-activity { display: grid; gap: 7px; margin: 0; padding-left: 18px; color: #59675e; font-size: .82rem; overflow-wrap: anywhere; }
@media (max-width: 640px) {
  header { padding-top: 30px; }
  .header-inner { align-items: flex-start; flex-direction: column; }
  .section-nav { margin-inline: -16px; padding-inline: 16px; border-inline: 0; border-radius: 0; background: transparent; }
  .workspace-section { padding: 20px 14px; border-radius: 20px; }
  .today-board { gap: 26px; }
  .today-heading h3 { font-size: 1.18rem; }
  .section-heading { align-items: flex-end; }
  .item-card { padding: 17px 15px; }
  .item-meta { align-items: flex-start; flex-direction: column; gap: 8px; }
  .area-grid { grid-template-columns: 1fr 1fr; }
  .area-card { min-height: 108px; padding: 15px; }
  .detail-overlay { padding: 0; background: #fbfaf6; }
  .detail-panel { min-height: 100vh; padding: 58px 18px 34px; border-radius: 0; box-shadow: none; }
  .detail-header h2 { font-size: 2.45rem; }
  .detail-description { margin-block: 24px; }
  .detail-meta { grid-template-columns: 1fr; gap: 3px; }
  .detail-meta dd { margin-bottom: 8px; }
  .move-overlay { align-items: end; padding: 0; }
  .move-dialog { width: 100%; padding: 24px 18px 30px; border-radius: 22px 22px 0 0; }
  .health-root { grid-template-columns: 1fr; }
  .health-summary { align-items: flex-start; flex-wrap: wrap; }
  .health-summary p { width: 100%; margin-left: 0; }
}
@media (max-width: 700px) {
  .section-nav {
    position: sticky;
    z-index: 30;
    top: 6px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 3px;
    margin: 0 0 12px;
    padding: 4px;
    overflow: visible;
    border: 1px solid #d7d8d0;
    border-radius: 14px;
    background: rgba(250,250,247,.94);
    box-shadow: 0 6px 20px rgba(34,46,38,.08);
    backdrop-filter: blur(10px);
  }
  .nav-button { width: 100%; padding: 8px 4px; border-radius: 10px; font-size: .76rem; }
  .mobile-secondary { display: none; }
  .more-button { display: block; }
  .more-menu {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    display: grid;
    width: min(210px, calc(100vw - 32px));
    padding: 7px;
    border: 1px solid #d5dad3;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 36px rgba(28,42,33,.18);
  }
  .more-menu button { padding: 10px 12px; border: 0; border-radius: 9px; background: transparent; color: #33443a; text-align: left; font: inherit; cursor: pointer; }
  .more-menu button:hover { background: #edf1eb; }
}
