
:root {
  color-scheme: light;
  --ink: #202c26;
  --muted: #777f77;
  --paper: #f5f3ed;
  --card: #fffefa;
  --line: #e5e1d7;
  --green: #244b3f;
  --green-deep: #1b3a31;
  --green-soft: #e2eee7;
  --clay: #bd684a;
  --gold: #d2ad5e;
  --font-body: "Avenir Next", "PingFang SC", "Hiragino Sans GB", sans-serif;
  --font-display: "Iowan Old Style", "Songti SC", "Noto Serif CJK SC", serif;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 3px solid #d7bd7a;
  outline-offset: 3px;
}

.app-shell { min-height: 100vh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 4;
  display: flex;
  width: 248px;
  flex-direction: column;
  padding: 28px 20px 18px;
  background:
    radial-gradient(ellipse at 10% 90%, rgb(89 122 95 / 24%), transparent 45%),
    var(--green-deep);
  color: #f7f4e9;
}

.brand-lockup { display: flex; align-items: center; gap: 12px; padding: 1px 5px 42px; }
.brand-mark {
  display: grid;
  width: 43px;
  height: 43px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 30%);
  border-radius: 50%;
  color: #f3d898;
  font-family: var(--font-display);
  font-size: 23px;
  font-style: italic;
}
.brand-lockup strong { display: block; font-size: 14px; font-weight: 600; letter-spacing: .04em; }
.brand-lockup small { display: block; margin-top: 5px; color: #a9b8a9; font-size: 9px; letter-spacing: .17em; }
.side-label { margin: 0 10px 13px; color: #8fa295; font-size: 10px; letter-spacing: .16em; }
.side-nav { display: grid; gap: 6px; }
.side-link {
  display: flex;
  min-height: 43px;
  align-items: center;
  gap: 11px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: #bdc9be;
  cursor: pointer;
  text-align: left;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.side-link:hover { background: rgb(255 255 255 / 7%); color: white; }
.side-link.active { border-color: rgb(255 255 255 / 10%); background: rgb(255 255 255 / 11%); color: white; }
.side-link.active svg { color: #e6ca83; }
.side-link span:nth-child(2) { flex: 1; }
.side-count { color: #8fa295; font-size: 11px; }
.sidebar-bottom { margin-top: auto; }
.sync-card {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 2px 19px;
  padding: 12px 10px;
  border: 1px solid rgb(255 255 255 / 12%);
  border-radius: 8px;
  background: rgb(255 255 255 / 5%);
}
.sync-icon { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 7px; background: rgb(213 187 121 / 16%); color: #e6ca83; }
.sync-card div { min-width: 0; flex: 1; }
.sync-card strong { display: block; font-size: 10px; font-weight: 550; }
.sync-card small { display: block; margin-top: 4px; overflow: hidden; color: #9eafa1; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.sync-dot { width: 6px; height: 6px; border-radius: 50%; background: #99c1a2; box-shadow: 0 0 0 3px rgb(153 193 162 / 12%); }
.sidebar-account { display: flex; align-items: center; gap: 10px; padding-top: 15px; border-top: 1px solid rgb(255 255 255 / 13%); }
.account-avatar { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 50%; background: #d8bd7c; color: #283b31; font-size: 12px; font-weight: 700; }
.account-name { flex: 1; overflow: hidden; color: #c5d0c6; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.main-panel { min-height: 100vh; margin-left: 248px; }
.topbar {
  display: flex;
  min-height: 63px;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 5vw, 74px);
  border-bottom: 1px solid var(--line);
  background: rgb(255 254 250 / 76%);
}
.breadcrumb { display: flex; align-items: center; gap: 10px; color: #8b9087; font-size: 11px; }
.breadcrumb-slash { color: #c5c4bc; }
.breadcrumb strong { color: #3b4940; font-weight: 600; }
.topbar-right { display: flex; align-items: center; gap: 20px; }
.private-pill { display: flex; align-items: center; gap: 6px; color: #668071; font-size: 10px; }
.private-pill svg { color: #567c64; }
.text-button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; background: none; color: #788178; cursor: pointer; font-size: 11px; }
.text-button:hover { color: var(--green); }
.logout-button { padding: 5px 0; }
.content-wrap { width: min(1240px, 100%); margin: 0 auto; padding: 49px clamp(24px, 5vw, 74px) 42px; }

.hero { position: relative; display: flex; min-height: 205px; align-items: flex-start; justify-content: space-between; padding: 4px 0 34px; }
.hero-copy { max-width: 590px; }
.eyebrow { margin: 0 0 13px; color: #8a917f; font-size: 9px; font-weight: 600; letter-spacing: .17em; }
.eyebrow span { padding: 0 5px; color: #c1a45e; }
.hero h1 { margin: 0; color: #26382f; font-family: var(--font-display); font-size: clamp(34px, 4vw, 48px); font-weight: 500; letter-spacing: -.04em; line-height: 1.18; }
.hero h1 em { color: var(--green); font-weight: 500; }
.hero-subtitle { max-width: 510px; margin: 15px 0 0; color: #7a8179; font-size: 12px; line-height: 1.8; }
.hero-stamp { position: absolute; top: 7px; right: 195px; display: flex; width: 78px; height: 78px; flex-direction: column; align-items: center; justify-content: center; border: 1px solid #d6cba9; border-radius: 50%; color: #a69057; transform: rotate(-12deg); }
.hero-stamp span { font-family: var(--font-display); font-size: 28px; font-style: italic; line-height: 1; }
.hero-stamp small { margin-top: 3px; font-size: 6px; letter-spacing: .16em; line-height: 1.25; text-align: center; }
.hero-index { display: flex; min-width: 152px; flex-direction: column; align-items: flex-end; padding-top: 10px; color: #858b80; }
.hero-index span { font-size: 10px; letter-spacing: .08em; }
.hero-index strong { margin: 0 0 1px; color: var(--green); font-family: var(--font-display); font-size: 60px; font-weight: 400; letter-spacing: -.06em; line-height: 1.1; }
.hero-index small { color: #98998e; font-size: 9px; }

.stats-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin-bottom: 50px; }
.stat-card { min-height: 116px; padding: 15px 18px 13px; border: 1px solid var(--line); border-radius: 7px; background: rgb(255 254 250 / 82%); }
.stat-card.stat-featured { border-color: #315c4b; background: var(--green); color: #f5f2e8; }
.stat-top { display: flex; align-items: center; justify-content: space-between; color: #879087; font-size: 10px; }
.stat-featured .stat-top { color: #c4d2c4; }
.stat-card > strong { display: block; margin-top: 5px; font-family: var(--font-display); font-size: 32px; font-weight: 450; letter-spacing: -.04em; line-height: 1.1; }
.stat-card > small { color: #969a91; font-size: 9px; }
.stat-featured > small { color: #b6c5b8; }
.stat-featured .stat-top svg { color: #e2c879; }

.projects-section { padding-bottom: 10px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.section-heading .eyebrow { margin-bottom: 9px; }
.section-heading h2 { margin: 0; color: #293930; font-family: var(--font-display); font-size: 26px; font-weight: 500; letter-spacing: -.03em; }
.section-heading h2 span { display: inline-block; margin-left: 5px; color: #a2a397; font-family: var(--font-body); font-size: 11px; font-weight: 500; vertical-align: 4px; }
.section-tools { display: flex; align-items: center; gap: 8px; }
.search-box { display: flex; width: 210px; height: 37px; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid #dedbd1; border-radius: 5px; background: #fffefa; color: #9a9d93; }
.search-box:focus-within { border-color: #9aab9e; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 10px; }
.search-box input::placeholder { color: #a3a59d; }
.search-clear, .icon-button { display: grid; flex: 0 0 auto; place-items: center; border: 0; background: none; color: #8f968e; cursor: pointer; }
.search-clear { padding: 2px; }
.filter-button { display: inline-flex; height: 37px; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid #dedbd1; border-radius: 5px; background: #fffefa; color: #6e776e; cursor: pointer; font-size: 10px; }
.filter-button:hover { border-color: #b9c5ba; color: var(--green); }
.filter-tabs { display: flex; gap: 21px; margin: 23px 0 13px; border-bottom: 1px solid #dfdcd2; }
.filter-tab { position: relative; padding: 0 0 11px; border: 0; background: none; color: #93968d; cursor: pointer; font-size: 10px; }
.filter-tab:hover, .filter-tab.selected { color: var(--green); }
.filter-tab.selected { font-weight: 650; }
.filter-tab.selected::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; background: var(--green); content: ""; }
.notice { margin: 12px 0; color: #4a715a; font-size: 11px; }
.notice-error { color: #9a4a3d; }
.project-list { display: grid; gap: 10px; }
.project-card { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 15px; padding: 20px 21px 18px 17px; border: 1px solid var(--line); border-radius: 7px; background: var(--card); transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.project-card:hover { border-color: #c9d2c8; box-shadow: 0 8px 22px rgb(41 54 45 / 4%); transform: translateY(-1px); }
.project-card-index { padding-top: 2px; color: #b4b3a9; font-family: var(--font-display); font-size: 17px; }
.project-main { min-width: 0; }
.project-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.project-title-row h3 { margin: 0; color: #2a392f; font-family: var(--font-display); font-size: 19px; font-weight: 500; letter-spacing: -.02em; }
.project-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; }
.status-tag, .priority-tag { display: inline-flex; min-height: 20px; align-items: center; padding: 2px 7px; border-radius: 3px; font-size: 9px; line-height: 1; }
.status-active { background: #e5f0e8; color: #477257; }
.status-on_hold { background: #f4eedf; color: #9a7833; }
.status-completed { background: #e8ebe5; color: #727b70; }
.status-archived { background: #f1e5df; color: #97624e; }
.priority-tag { background: #f0eee7; color: #777b70; }
.priority-high { background: #f4e6dd; color: #aa593d; }
.priority-low { color: #92948a; }
.edit-button { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 5px; padding: 4px 0; border: 0; background: none; color: #7b8a7b; cursor: pointer; font-size: 10px; }
.edit-button:hover { color: var(--clay); }
.project-progress { display: grid; grid-template-columns: 59px minmax(60px, 1fr); align-items: center; gap: 12px; margin-top: 15px; }
.progress-copy { display: flex; align-items: center; justify-content: space-between; color: #989b91; font-size: 9px; }
.progress-copy strong { color: #56675a; font-size: 9px; font-weight: 600; }
.progress-track { height: 5px; overflow: hidden; border-radius: 99px; background: #ecebe4; }
.progress-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #5a8067, #a6b38c); transition: width .3s ease; }
.project-details { display: grid; grid-template-columns: minmax(150px, .7fr) minmax(220px, 1.3fr); gap: 22px; margin-top: 16px; padding-top: 13px; border-top: 1px solid #efede6; }
.detail-item { display: grid; align-content: start; gap: 4px; min-width: 0; }
.detail-label { display: flex; align-items: center; gap: 5px; color: #9a9b91; font-size: 9px; }
.detail-label svg { color: #a8a88f; }
.detail-item strong { overflow: hidden; color: #4b5a4e; font-size: 10px; font-weight: 550; text-overflow: ellipsis; white-space: nowrap; }
.detail-item small { overflow: hidden; color: #a1a197; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.detail-item small.overdue { color: #b36146; }
.detail-item .note-preview { color: #999b93; }
.empty-state { display: flex; min-height: 285px; flex-direction: column; align-items: center; justify-content: center; padding: 35px 18px; border: 1px dashed #d8d5ca; border-radius: 7px; background: rgb(255 254 250 / 50%); text-align: center; }
.empty-illustration { display: grid; width: 58px; height: 58px; place-items: center; margin-bottom: 15px; border: 1px solid #ddd8c9; border-radius: 50%; color: #748c78; }
.empty-state .eyebrow { margin-bottom: 7px; }
.empty-state h3 { margin: 0; color: #36483b; font-family: var(--font-display); font-size: 21px; font-weight: 500; }
.empty-state > p:last-child { max-width: 390px; margin: 9px 0 0; color: #8d9186; font-size: 11px; line-height: 1.7; }
.page-footer { display: flex; justify-content: space-between; margin-top: 17px; color: #a0a196; font-size: 9px; }

.icon-button { width: 31px; height: 31px; border: 1px solid #e5e2d9; border-radius: 5px; }
.icon-button:hover { border-color: #b8c6b9; color: var(--green); }
.icon-button.light { width: 26px; height: 26px; border-color: rgb(255 255 255 / 17%); color: #b9c8bb; }
.icon-button.light:hover { color: #fff; }
.dialog-backdrop { position: fixed; inset: 0; z-index: 10; display: grid; place-items: center; overflow-y: auto; padding: 24px; background: rgb(20 34 27 / 55%); backdrop-filter: blur(3px); }
.edit-dialog { width: min(540px, 100%); max-height: min(90vh, 760px); overflow-y: auto; padding: 25px 28px 22px; border: 1px solid #e6e1d5; border-radius: 9px; background: #fffefa; box-shadow: 0 28px 85px rgb(14 31 21 / 24%); animation: dialog-in .2s ease-out; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(8px) scale(.99); } to { opacity: 1; transform: none; } }
.dialog-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.dialog-header .eyebrow { margin-bottom: 7px; }
.dialog-header h2 { margin: 0; color: #2b3b31; font-family: var(--font-display); font-size: 25px; font-weight: 500; }
.folder-origin { overflow-wrap: anywhere; margin: 10px 0 20px; color: #9a9c92; font-size: 9px; }
.editor-form { display: grid; gap: 15px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field label { display: flex; justify-content: space-between; color: #68736a; font-size: 10px; font-weight: 550; }
.field label strong { color: #436751; }
.field input:not([type="range"]), .field select, .field textarea { width: 100%; border: 1px solid #dedbd1; border-radius: 5px; outline: 0; background: #fffefa; color: #344238; font-size: 11px; }
.field input:not([type="range"]), .field select { height: 38px; padding: 0 10px; }
.field textarea { min-height: 88px; resize: vertical; padding: 10px; line-height: 1.6; }
.field input::placeholder, .field textarea::placeholder { color: #b1b1a8; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #8da294; }
.field input[type="range"] { width: 100%; accent-color: #527762; }
.range-value { justify-self: end; margin-top: -7px; color: #7c887c; font-size: 9px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; padding-top: 4px; }
.button { display: inline-flex; min-height: 39px; align-items: center; justify-content: center; gap: 8px; padding: 0 15px; border: 1px solid transparent; border-radius: 5px; cursor: pointer; font-size: 11px; font-weight: 600; transition: background .15s ease, transform .15s ease; }
.button:disabled { cursor: wait; opacity: .65; }
.button-dark { background: var(--green); color: white; }
.button-dark:hover:not(:disabled) { background: #19392e; transform: translateY(-1px); }
.button-quiet { border-color: #dedbd2; background: #fffefa; color: #70786f; }
.button-quiet:hover { background: #f6f4ee; }
.button-full { width: 100%; }
.form-error { margin: 0; color: #a24e40; font-size: 10px; }

.auth-page { display: grid; min-height: 100vh; place-items: center; padding: 24px; background:
  radial-gradient(ellipse at 50% 5%, rgb(210 192 140 / 20%), transparent 38%),
  linear-gradient(135deg, #f7f5ee, #eeeee5); }
.auth-card { width: min(420px, 100%); padding: 38px 38px 27px; border: 1px solid #e4e0d5; border-radius: 9px; background: #fffefa; box-shadow: 0 24px 75px rgb(42 57 44 / 9%); }
.auth-card .brand-mark { width: 48px; height: 48px; margin-bottom: 23px; border-color: #b6c1b3; color: var(--green); }
.auth-card .eyebrow { margin-bottom: 9px; }
.auth-card h1 { margin: 0; color: #2a3b31; font-family: var(--font-display); font-size: 30px; font-weight: 500; letter-spacing: -.03em; }
.auth-copy { margin: 11px 0 20px; color: #7e867d; font-size: 11px; line-height: 1.8; }
.password-form { display: grid; gap: 9px; }
.password-form label { margin-top: 2px; color: #657168; font-size: 10px; font-weight: 550; }
.password-input-wrap { display: flex; height: 42px; align-items: center; gap: 9px; padding: 0 11px; border: 1px solid #dfddd3; border-radius: 5px; color: #9ca398; }
.password-input-wrap:focus-within { border-color: #8da294; }
.password-input-wrap input { width: 100%; border: 0; outline: 0; background: transparent; color: #344238; font-size: 11px; }
.password-input-wrap input::placeholder { color: #b1b1a8; }
.password-form .button { margin-top: 7px; }
.auth-footnote { margin: 18px 0 0; color: #a1a398; font-size: 9px; text-align: center; }
.auth-page-blank { background: #f5f3ed; }
.auth-form-blank { width: min(360px, 100%); }
.auth-input-blank { display: block; width: 100%; height: 48px; padding: 0 14px; border: 1px solid #d8d5cb; border-radius: 4px; background: rgb(255 254 250 / 40%); color: var(--ink); font-size: 14px; transition: border-color .16s ease; }
.auth-input-blank:focus { border-color: #a6b4a7; }
.auth-input-blank.auth-rejected { border-color: #bd684a; }

@media (max-width: 1020px) {
  .sidebar { width: 211px; padding-inline: 14px; }
  .main-panel { margin-left: 211px; }
  .hero-stamp { right: 165px; }
  .content-wrap { padding-inline: 32px; }
  .topbar { padding-inline: 32px; }
}

@media (max-width: 760px) {
  .sidebar { position: static; width: auto; min-height: 0; padding: 12px 18px; }
  .brand-lockup { padding: 0; }
  .brand-mark { width: 35px; height: 35px; font-size: 19px; }
  .brand-lockup strong { font-size: 12px; }
  .brand-lockup small { margin-top: 3px; font-size: 8px; }
  .side-label, .side-nav, .sidebar-bottom { display: none; }
  .main-panel { margin-left: 0; }
  .topbar { min-height: 49px; padding-inline: 18px; }
  .breadcrumb { font-size: 10px; }
  .private-pill { font-size: 0; }
  .private-pill svg { width: 16px; height: 16px; }
  .topbar-right { gap: 12px; }
  .content-wrap { padding: 30px 18px 28px; }
  .hero { min-height: auto; padding-bottom: 25px; }
  .hero h1 { font-size: clamp(32px, 9vw, 41px); }
  .hero-subtitle { max-width: 85%; font-size: 10px; }
  .hero-stamp { top: 0; right: 0; width: 58px; height: 58px; }
  .hero-stamp span { font-size: 21px; }
  .hero-stamp small { font-size: 5px; }
  .hero-index { display: none; }
  .stats-grid { gap: 7px; margin-bottom: 34px; }
  .stat-card { min-height: 98px; padding: 11px 10px 9px; }
  .stat-top { font-size: 8px; }
  .stat-top svg { width: 14px; height: 14px; }
  .stat-card > strong { margin-top: 8px; font-size: 27px; }
  .stat-card > small { display: block; overflow: hidden; margin-top: 2px; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .section-heading h2 { font-size: 23px; }
  .section-tools { width: 100%; }
  .search-box { width: 100%; flex: 1; }
  .filter-button { flex: 0 0 auto; }
  .filter-tabs { gap: 16px; overflow-x: auto; margin-top: 19px; }
  .filter-tab { flex: 0 0 auto; font-size: 9px; }
  .project-card { grid-template-columns: 25px minmax(0, 1fr); gap: 9px; padding: 15px 12px 14px 10px; }
  .project-card-index { font-size: 14px; }
  .project-title-row { gap: 7px; }
  .project-title-row h3 { font-size: 16px; }
  .edit-button { max-width: 66px; gap: 2px; font-size: 8px; }
  .edit-button svg { width: 13px; height: 13px; }
  .project-progress { grid-template-columns: 50px minmax(50px, 1fr); gap: 8px; margin-top: 13px; }
  .project-details { grid-template-columns: minmax(105px, .8fr) minmax(0, 1.2fr); gap: 11px; margin-top: 12px; padding-top: 11px; }
  .detail-item strong { font-size: 9px; }
  .detail-item small { font-size: 8px; }
  .page-footer { font-size: 8px; }
  .edit-dialog { padding: 20px 17px 17px; }
  .form-grid { gap: 9px; }
}

@media (max-width: 390px) {
  .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .stat-card { padding-inline: 7px; }
  .stat-top { gap: 4px; }
  .stat-top svg { display: none; }
  .filter-tabs { gap: 13px; }
  .dialog-backdrop { padding: 10px; }
  .form-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
