:root {
  color-scheme: light;
  --ink: #17233a;
  --muted: #7c879a;
  --line: #e7ebf2;
  --paper: #fff;
  --canvas: #f4f6fb;
  --green: #168a6a;
  --green-dark: #087354;
  --green-pale: #e5f6ef;
  --blue-pale: #eaf1ff;
  --red: #cf514f;
  --red-pale: #fff0ef;
  --gold: #a56b10;
  --gold-pale: #fff4db;
  --shadow: 0 10px 28px rgba(23, 35, 58, .055);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
html { min-width: 320px; background: var(--canvas); }
body { margin: 0; min-height: 100vh; color: var(--ink); background: var(--canvas); font-size: 15px; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
a { color: inherit; text-decoration: none; }
#app { min-height: 100vh; max-width: 620px; margin: 0 auto; background: var(--canvas); position: relative; overflow-x: hidden; }
.topbar { min-height: 76px; padding: 15px 20px 12px; display: flex; align-items: center; justify-content: space-between; background: rgba(255,255,255,.94); border-bottom: 1px solid rgba(226,231,239,.75); position: sticky; top: 0; z-index: 5; backdrop-filter: blur(12px); }
.topbar h1 { margin: 2px 0 0; font-size: 21px; letter-spacing: -.04em; }
.eyebrow { margin: 0; color: #8b98ab; font-size: 10px; font-weight: 800; letter-spacing: .16em; }
.avatar-button { height: 42px; width: 42px; border: 0; border-radius: 15px; color: #fff; font-weight: 800; background: linear-gradient(145deg, #25a47f, #087659); box-shadow: 0 6px 14px rgba(16,137,103,.19); }
.page-content { padding: 16px 18px calc(105px + env(safe-area-inset-bottom)); }
.welcome-card { min-height: 150px; border-radius: 23px; padding: 22px 19px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: white; background: linear-gradient(125deg, #143f54, #126c61 56%, #1b9a78); box-shadow: 0 14px 30px rgba(19,92,80,.16); overflow: hidden; position: relative; }
.welcome-card::after { content: ""; width: 170px; height: 170px; position: absolute; border: 1px solid rgba(255,255,255,.15); border-radius: 50%; right: -58px; top: -72px; box-shadow: 0 0 0 25px rgba(255,255,255,.04), 0 0 0 52px rgba(255,255,255,.035); }
.welcome-label { margin: 0 0 9px; color: #b8e9d6; font-size: 12px; }
.welcome-card h2 { margin: 0; font-size: 19px; letter-spacing: -.035em; }
.welcome-card p:last-child { margin: 10px 0 0; color: rgba(255,255,255,.72); font-size: 12px; line-height: 1.6; }
.welcome-icon { position: relative; z-index: 1; display: grid; place-items: center; flex: none; height: 48px; width: 48px; border-radius: 17px; background: rgba(255,255,255,.15); color: #d5ffeb; font-size: 25px; }
.summary-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 14px 0 25px; }
.summary-card { min-width: 0; min-height: 76px; border: 1px solid #ebeff5; border-radius: 17px; background: white; box-shadow: 0 4px 13px rgba(23,35,58,.025); display: flex; flex-direction: column; align-items: flex-start; justify-content: center; padding: 12px 14px; text-align: left; }
.summary-card strong { font-size: 22px; line-height: 1.1; letter-spacing: -.04em; }
.summary-card span { margin-top: 5px; font-size: 11px; color: var(--muted); }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin: 0 1px 12px; }
.section-heading h2, .section-heading h3 { margin: 3px 0 0; font-size: 18px; letter-spacing: -.035em; }
.section-heading h3 { font-size: 16px; }
.icon-button { border: 1px solid var(--line); width: 38px; height: 38px; border-radius: 13px; background: #fff; color: #67768d; font-size: 21px; }
.segmented-control { display: grid; grid-template-columns: repeat(3,1fr); padding: 4px; background: #e9edf4; border-radius: 15px; margin-bottom: 13px; }
.segmented-control button { border: 0; min-height: 39px; border-radius: 12px; background: transparent; color: #758198; font-size: 12px; font-weight: 700; }
.segmented-control button.selected { color: var(--ink); background: #fff; box-shadow: 0 3px 9px rgba(32,47,73,.08); }
.segmented-control span { margin-left: 3px; color: #97a1b1; font-size: 10px; }
.task-list { display: flex; flex-direction: column; gap: 10px; }
.task-card { width: 100%; border: 1px solid #e9edf3; border-radius: 18px; padding: 14px 15px; text-align: left; background: #fff; box-shadow: 0 5px 14px rgba(35,50,75,.035); transition: transform .15s ease, box-shadow .15s ease; }
.task-card:active { transform: scale(.985); }
.task-card-top, .task-card-bottom { display: flex; align-items: center; gap: 7px; }
.chevron { margin-left: auto; color: #a6afbd; font-size: 24px; font-weight: 300; line-height: 1; }
.task-title { display: block; margin: 10px 0 13px; max-width: 92%; font-size: 15px; line-height: 1.45; font-weight: 750; }
.task-card-bottom { justify-content: space-between; border-top: 1px solid #f1f3f7; padding-top: 10px; }
.due-date { color: #8994a5; font-size: 11px; }
.card-link { color: var(--green); font-size: 11px; font-weight: 700; }
.status-pill, .overdue-pill { display: inline-flex; align-items: center; height: 23px; padding: 0 8px; border-radius: 7px; font-size: 10px; line-height: 1; font-weight: 750; white-space: nowrap; }
.status-todo { color: #4474b9; background: var(--blue-pale); }
.status-in_progress { color: var(--green-dark); background: var(--green-pale); }
.status-blocked { color: #a36911; background: var(--gold-pale); }
.status-submitted { color: #7254b1; background: #f0eaff; }
.status-done { color: #68788b; background: #edf1f5; }
.overdue-pill { color: var(--red); background: var(--red-pale); }
.empty-state { min-height: 230px; border: 1px dashed #dce3ec; border-radius: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 25px; background: rgba(255,255,255,.6); }
.empty-icon { height: 44px; width: 44px; display: grid; place-items: center; margin-bottom: 12px; border-radius: 15px; background: var(--green-pale); color: var(--green); font-size: 19px; font-weight: 800; }
.empty-state strong { font-size: 14px; }
.empty-state p { margin: 7px 0 16px; color: var(--muted); font-size: 12px; }
.button { min-height: 46px; border: 0; border-radius: 14px; padding: 0 17px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; font-weight: 750; transition: transform .12s ease, opacity .12s ease; }
.button:active:not(:disabled) { transform: scale(.98); }
.button.primary { color: #fff; background: linear-gradient(135deg, #159774, #087657); box-shadow: 0 7px 16px rgba(13,135,99,.18); }
.button.soft { color: #197e64; background: #e5f4ef; }
.button.outline { color: #67758b; background: #fff; border: 1px solid #e0e6ee; }
.button.wide { width: 100%; }
.back-link { border: 0; padding: 3px 0 14px; color: #68788d; background: none; font-size: 12px; font-weight: 650; }
.detail-page { padding-top: 11px; padding-bottom: calc(170px + env(safe-area-inset-bottom)); }
.detail-hero { padding: 15px 17px 18px; border: 1px solid #e7ecf3; border-radius: 20px; background: linear-gradient(150deg, #fff, #f7fbfa); box-shadow: var(--shadow); }
.detail-pills { display: flex; gap: 6px; align-items: center; }
.detail-hero h2 { margin: 13px 0 8px; font-size: 21px; letter-spacing: -.04em; line-height: 1.38; }
.detail-meta { margin: 0; color: #8793a4; font-size: 11px; }
.content-card, .form-card { margin-top: 12px; border: 1px solid #e8edf3; border-radius: 19px; padding: 16px; background: #fff; box-shadow: 0 5px 16px rgba(35,50,75,.025); }
.preserve-text { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; }
.content-card > .preserve-text { margin: 9px 0 0; color: #49566c; font-size: 13px; }
.attachment-list { display: flex; flex-direction: column; gap: 8px; margin-top: 13px; }
.attachment-list.compact-list { margin-top: 10px; }
.attachment-row { min-height: 57px; display: flex; align-items: center; gap: 10px; padding: 7px; border-radius: 13px; background: #f7f9fc; }
.attachment-thumb { width: 42px; height: 42px; object-fit: cover; border-radius: 10px; background: #e6f0ed; cursor: zoom-in; }
.file-icon { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 11px; color: #63789a; background: #eaf0fa; font-size: 18px; }
.file-info { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.file-info strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.file-info small { color: #909bad; font-size: 10px; }
.download-link { flex: none; padding: 7px 9px; color: var(--green); font-size: 11px; font-weight: 750; }
.timeline-section { margin-top: 23px; }
.section-heading.compact { margin-bottom: 10px; }
.timeline-card { display: flex; position: relative; gap: 10px; padding: 13px 13px 13px 9px; border: 1px solid #e8edf3; border-radius: 17px; background: #fff; }
.timeline-dot { width: 8px; height: 8px; flex: none; margin: 5px 0 0 2px; border-radius: 50%; background: #1a9b75; box-shadow: 0 0 0 4px #e0f4ed; }
.timeline-body { min-width: 0; flex: 1; }
.timeline-head, .issue-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.timeline-head strong, .issue-head strong { font-size: 12px; }
.timeline-head time, .issue-head time { flex: none; color: #97a1b0; font-size: 10px; }
.timeline-body > .preserve-text, .issue-card > .preserve-text { margin: 8px 0; color: #505e72; font-size: 12px; }
.review-card { margin-top: 11px; padding: 12px; border-radius: 13px; background: #f6f8fc; }
.review-header { display: flex; align-items: center; justify-content: space-between; }
.review-header > strong { color: var(--green-dark); font-size: 12px; }
.score-total { color: #187d65; font-size: 19px; font-weight: 800; }
.score-total small { margin-left: 3px; font-size: 10px; }
.review-comment { margin: 8px 0 10px; padding: 8px 9px; color: #8a5b12; background: #fff5e3; border-radius: 9px; font-size: 11px; }
.score-list { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; }
.score-row { display: flex; justify-content: space-between; color: #7c889a; font-size: 10px; }
.score-row strong { color: #394960; font-size: 11px; }
.score-row small { color: #9ca6b4; font-size: 9px; font-weight: 500; }
.issue-card { margin-bottom: 9px; padding: 13px; border: 1px solid #f0e7d4; border-radius: 16px; background: #fffdf8; }
.issue-head strong { color: #9c6d1c; }
.issue-files { display: flex; flex-wrap: wrap; gap: 6px; }
.issue-files a { padding: 6px 8px; border-radius: 8px; background: #f3f5f8; color: #5d6c81; font-size: 10px; }
.reply-box { margin-top: 10px; padding: 10px; border-left: 3px solid #199575; border-radius: 0 10px 10px 0; background: #eef8f4; }
.reply-box > span { color: #168365; font-size: 10px; font-weight: 800; }
.reply-box p { margin: 4px 0; color: #415e56; font-size: 12px; }
.reply-box small { color: #92a19c; font-size: 9px; }
.task-chain h3 { margin: 5px 0 9px; font-size: 15px; }
.chain-link { width: 100%; min-height: 44px; display: flex; align-items: center; justify-content: space-between; border: 0; border-top: 1px solid #eef1f5; background: white; text-align: left; font-size: 12px; }
.chain-link span { color: #8995a6; font-size: 10px; }
.bottom-action-space { height: 20px; }
.action-bar { position: fixed; z-index: 10; left: 50%; bottom: calc(62px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: min(100%,620px); display: flex; gap: 8px; padding: 9px 16px; border-top: 1px solid #e7ebf1; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); box-shadow: 0 -7px 20px rgba(28,44,69,.04); }
.action-bar .button { flex: 1; min-width: 0; }
.action-bar:has(.button:nth-child(3)) .button { padding-inline: 9px; font-size: 11px; }
.waiting-review { width: 100%; min-height: 43px; display: flex; justify-content: center; align-items: center; gap: 8px; color: #7658aa; font-size: 12px; font-weight: 700; }
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: #9470d4; box-shadow: 0 0 0 4px #f0eaff; }
.form-page { padding-top: 11px; }
.page-intro { padding: 5px 1px 12px; }
.page-intro h2 { margin: 5px 0; font-size: 24px; letter-spacing: -.045em; }
.page-intro > p:last-child { margin: 5px 0 0; color: #8490a2; font-size: 12px; }
.rework-note { display: flex; gap: 10px; margin: 2px 0 11px; padding: 12px; border: 1px solid #f4e1b9; border-radius: 15px; background: #fff8e9; }
.note-icon { width: 25px; height: 25px; flex: none; display: grid; place-items: center; border-radius: 9px; color: #9d6d1d; background: #ffedc8; }
.rework-note strong { font-size: 11px; color: #875c13; }
.rework-note p { margin: 5px 0 0; color: #86662f; font-size: 11px; }
.field-label { display: block; margin-bottom: 9px; color: #334258; font-size: 12px; font-weight: 800; }
.field-label span { margin-left: 4px; color: #9aa4b3; font-size: 10px; font-weight: 450; }
.input { width: 100%; min-height: 45px; padding: 11px 12px; border: 1px solid #e2e7ef; border-radius: 12px; outline: none; color: var(--ink); background: #fff; font-size: 13px; transition: border .15s ease, box-shadow .15s ease; }
.input:focus { border-color: #6fc1a7; box-shadow: 0 0 0 3px rgba(37,157,117,.11); }
.textarea { min-height: 118px; resize: vertical; line-height: 1.6; }
.character-count { margin: 5px 0 16px; color: #a2abba; text-align: right; font-size: 10px; }
.upload-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 2px; }
.upload-heading .field-label { margin-bottom: 0; }
.attach-button { min-height: 35px; border-radius: 11px; padding: 0 11px; font-size: 11px; white-space: nowrap; }
.upload-empty { min-height: 72px; margin-top: 10px; border: 1px dashed #dfe5ed; border-radius: 13px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; color: #9aa5b4; font-size: 10px; }
.upload-empty span { color: #90a2b7; font-size: 17px; }
.upload-list { display: flex; flex-direction: column; gap: 7px; margin-top: 11px; }
.upload-item { min-width: 0; display: flex; align-items: center; gap: 9px; padding: 7px; border-radius: 13px; background: #f7f9fc; }
.upload-thumb-wrap { width: 40px; height: 40px; flex: none; border-radius: 10px; overflow: hidden; background: #e5ecea; }
.upload-thumb { width: 100%; height: 100%; object-fit: cover; }
.upload-info { min-width: 0; flex: 1; }
.upload-info > strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #445168; font-size: 10px; }
.upload-info small { display: block; margin-top: 4px; color: #919cac; font-size: 9px; }
.upload-actions { display: flex; align-items: center; gap: 3px; }
.remove-file { width: 32px; height: 36px; border: 0; border-radius: 9px; color: #8b96a6; background: transparent; font-size: 20px; }
.text-action { border: 0; background: none; color: var(--green); font-size: 10px; font-weight: 750; }
.progress-track, .bar-track { height: 5px; margin-top: 5px; overflow: hidden; border-radius: 5px; background: #e7ecf2; }
.progress-track span, .bar-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg,#26b68b,#158363); transition: width .16s ease; }
.error-text { color: #c54f4b; font-size: 10px; margin: 4px 0 0; }
.submit-button { margin-top: 17px; min-height: 49px; }
.form-hint { margin: 10px 0; text-align: center; color: #96a1b0; font-size: 10px; }
.profile-card { display: flex; align-items: center; gap: 14px; padding: 21px 18px; border: 1px solid #e5eced; border-radius: 21px; color: white; background: linear-gradient(130deg,#18445a,#1b8870); box-shadow: 0 12px 25px rgba(20,90,79,.13); }
.profile-avatar { width: 53px; height: 53px; flex: none; display: grid; place-items: center; border: 2px solid rgba(255,255,255,.56); border-radius: 19px; background: rgba(255,255,255,.17); font-size: 21px; font-weight: 800; }
.profile-card .eyebrow { color: #b9e9d9; }
.profile-card h2 { margin: 4px 0; font-size: 19px; }
.profile-card p:last-child { margin: 4px 0 0; color: rgba(255,255,255,.73); font-size: 11px; }
.stats-grid { display: grid; grid-template-columns: 1fr 1.2fr 1fr; gap: 8px; margin: 13px 0; }
.stat-tile { min-height: 86px; padding: 13px 12px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid #e8edf3; border-radius: 16px; background: #fff; }
.stat-tile > span { color: #8792a3; font-size: 10px; }
.stat-tile strong { font-size: 23px; line-height: 1; letter-spacing: -.04em; }
.stat-tile strong small { margin-left: 2px; color: #8792a3; font-size: 10px; font-weight: 550; }
.stat-tile.highlight { border-color: #cae8dd; background: linear-gradient(145deg,#f0fbf6,#e7f6ef); }
.stat-tile.highlight strong { color: #168061; }
.dimension-bars { display: flex; flex-direction: column; gap: 13px; padding-top: 4px; }
.dimension-caption { display: flex; justify-content: space-between; margin-bottom: 6px; color: #59667b; font-size: 11px; }
.dimension-caption strong { color: #1c8166; font-size: 11px; }
.bar-track { height: 7px; margin-top: 0; background: #edf1f5; }
.small-empty { padding: 9px 0; color: #97a1b0; text-align: center; font-size: 11px; }
.recent-list { margin-top: -3px; }
.recent-item { width: 100%; min-height: 54px; display: flex; align-items: center; gap: 9px; border: 0; border-top: 1px solid #eff2f6; background: #fff; text-align: left; }
.recent-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #435167; font-size: 11px; font-weight: 700; }
.recent-title small { display: block; margin-top: 4px; color: #9aa4b2; font-size: 9px; font-weight: 450; }
.recent-item > strong { color: #168163; font-size: 13px; }
.recent-item > strong small { margin-left: 2px; font-size: 9px; font-weight: 500; }
.recent-item .chevron { font-size: 19px; }
.bottom-nav { position: fixed; z-index: 9; left: 50%; bottom: 0; transform: translateX(-50%); width: min(100%,620px); min-height: 62px; display: grid; grid-template-columns: 1fr 1fr; padding: 5px 20px calc(5px + env(safe-area-inset-bottom)); border-top: 1px solid #e8ecf2; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
.bottom-nav button { border: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: #98a3b1; background: transparent; }
.bottom-nav button > span { font-size: 18px; line-height: 1.1; }
.bottom-nav button small { font-size: 9px; font-weight: 650; }
.bottom-nav button.active { color: var(--green); }
.inline-alert { position: fixed; z-index: 30; top: 85px; left: 50%; transform: translateX(-50%); width: calc(100% - 30px); max-width: 570px; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 11px 12px 11px 14px; border: 1px solid #f0d0ce; border-radius: 13px; color: #aa4945; background: #fff5f4; box-shadow: 0 8px 18px rgba(87,32,30,.08); font-size: 11px; }
.inline-alert button { width: 28px; height: 28px; flex: none; border: 0; color: #a75b56; background: transparent; font-size: 20px; }
.toast { position: fixed; z-index: 40; bottom: calc(140px + env(safe-area-inset-bottom)); left: 50%; transform: translateX(-50%); max-width: calc(100% - 34px); padding: 11px 16px; border-radius: 12px; color: #fff; background: rgba(31,45,63,.92); box-shadow: 0 8px 20px rgba(30,42,60,.2); font-size: 12px; white-space: nowrap; }
.action-bar ~ .toast { bottom: calc(140px + env(safe-area-inset-bottom)); }
.image-viewer { position: fixed; z-index: 50; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(12,20,32,.92); }
.image-viewer img { max-width: 100%; max-height: 82vh; object-fit: contain; border-radius: 12px; }
.viewer-close { position: absolute; top: calc(16px + env(safe-area-inset-top)); right: 18px; width: 44px; height: 44px; border: 0; border-radius: 15px; color: #fff; background: rgba(255,255,255,.16); font-size: 27px; }
.loading-screen { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; color: #8b96a6; font-size: 12px; }
.loading-card { min-height: 140px; display: flex; align-items: center; justify-content: center; gap: 10px; color: #8793a4; font-size: 12px; }
.spinner { width: 25px; height: 25px; border: 2px solid #dbeee7; border-top-color: #168b6c; border-radius: 50%; animation: spin .8s linear infinite; }
.spinner.small { width: 18px; height: 18px; }
@keyframes spin { to { transform: rotate(360deg); } }
.login-screen { min-height: 100vh; max-width: 460px; margin: 0 auto; padding: max(12vh, 68px) 25px 40px; background: #fff; }
.brand-mark { width: 55px; height: 55px; display: grid; place-items: center; border-radius: 19px; color: #fff; background: linear-gradient(135deg,#20a17c,#087559); box-shadow: 0 10px 20px rgba(16,137,103,.2); font-size: 22px; font-weight: 850; }
.login-screen .eyebrow { margin-top: 29px; color: #168163; }
.login-screen h1 { margin: 8px 0 6px; font-size: 29px; letter-spacing: -.05em; }
.muted { margin: 0 0 32px; color: #8490a2; font-size: 12px; }
.login-screen .field-label { margin-bottom: 8px; }
.login-screen .button { margin-top: 18px; min-height: 49px; }
.login-screen .error-text { margin-top: 13px; text-align: center; font-size: 12px; }
@media (min-width: 600px) {
  #app { box-shadow: 0 0 0 1px rgba(50,65,89,.025); }
  .page-content { padding-right: 22px; padding-left: 22px; }
  .task-title { font-size: 16px; }
}
@media (max-width: 360px) {
  .page-content { padding-right: 14px; padding-left: 14px; }
  .summary-row { gap: 6px; }
  .summary-card { padding: 11px 10px; }
  .stats-grid { gap: 6px; }
  .stat-tile { padding: 11px 9px; }
}
