@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700;800&family=Noto+Sans+SC:wght@400;500;600;700;800&display=swap');

:root {
  --ink: #102a43;
  --ink-soft: #526779;
  --muted: #8b9aa8;
  --line: #e4eaee;
  --line-strong: #d3dde4;
  --paper: #ffffff;
  --canvas: #f7f9fa;
  --mint: #d9f5ec;
  --mint-strong: #18735d;
  --blue-soft: #e5effb;
  --blue: #3674b7;
  --orange-soft: #fff0df;
  --orange: #c16b23;
  --shadow: 0 18px 50px rgba(28, 52, 68, 0.06);
}

* { box-sizing: border-box; }
html { background: var(--canvas); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: 'Manrope', 'Noto Sans SC', sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; }
.topbar {
  height: 76px;
  padding: 0 5.6vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 32px; height: 32px; display: grid; place-items: center; background: var(--ink); color: white; font-size: 14px; font-weight: 800; border-radius: 8px; }
.brand-copy { display: grid; gap: 3px; }
.brand-copy strong { letter-spacing: .12em; font-size: 12px; }
.brand-copy small { color: var(--muted); font-size: 11px; }
.topbar-actions { display: flex; align-items: center; gap: 18px; }
.workspace-status { display: inline-flex; align-items: center; gap: 7px; color: var(--ink-soft); font-size: 12px; }
.workspace-status i, .state-badge i { display: block; width: 7px; height: 7px; border-radius: 50%; background: #48b891; }
.icon-button { width: 30px; height: 30px; display: grid; place-items: center; border: 0; background: transparent; color: var(--ink-soft); font-size: 23px; line-height: 1; border-radius: 6px; }
.icon-button:hover { background: #f0f4f6; color: var(--ink); }
.icon-button.small { width: 24px; height: 24px; font-size: 18px; }
.user-avatar { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; background: #f4dfd1; color: #8d542e; font-weight: 700; font-size: 13px; }

main { max-width: 1440px; margin: 0 auto; padding: 64px 5.6vw 60px; }
.intro-section { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 42px; }
.eyebrow, .section-kicker, .side-heading span { color: var(--muted); font-family: 'DM Mono', monospace; font-size: 10px; letter-spacing: .13em; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.eyebrow-line { width: 28px; height: 1px; background: #d47938; }
h1 { margin: 0; max-width: 680px; font-size: clamp(34px, 4.2vw, 58px); line-height: 1.13; letter-spacing: -.035em; font-weight: 800; }
h1 em { color: #d47938; font-style: normal; }
.intro-copy { margin: 16px 0 0; color: var(--ink-soft); font-size: 14px; line-height: 1.8; }
.intro-meta { min-width: 180px; padding-bottom: 5px; color: var(--muted); font-size: 12px; text-align: right; }
.intro-meta strong { margin-left: 9px; color: var(--ink-soft); font-size: 12px; font-weight: 600; }
.meta-dot { margin: 0 8px; color: #d47938; }

.project-bar { min-height: 88px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 22px; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); }
.project-identity, .project-fields { display: flex; align-items: center; }
.project-identity { gap: 14px; min-width: 280px; }
.project-icon { width: 35px; height: 35px; display: grid; place-items: center; color: #d47938; background: var(--orange-soft); border-radius: 8px; font-size: 19px; font-weight: 700; transform: rotate(-12deg); }
.project-identity label, .project-field label, .field-label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 10px; letter-spacing: .02em; }
.project-identity input { width: 245px; border: 0; outline: 0; color: var(--ink); font-size: 14px; font-weight: 700; background: transparent; }
.project-fields { gap: 28px; }
.project-field { padding-right: 28px; border-right: 1px solid var(--line); }
.project-field input { width: 112px; border: 0; outline: 0; color: var(--ink); font-size: 13px; font-weight: 700; background: transparent; }
.state-badge { display: inline-flex; align-items: center; gap: 7px; color: var(--mint-strong); font-size: 12px; font-weight: 700; }
.button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; border-radius: 6px; font-size: 12px; font-weight: 700; white-space: nowrap; transition: .2s ease; }
.button span { font-size: 16px; line-height: 0; }
.button-dark { padding: 0 17px; background: var(--ink); color: #fff; }
.button-dark:hover { background: #1e4667; transform: translateY(-1px); }
.button-primary { padding: 0 14px; background: var(--mint); color: var(--mint-strong); }
.button-primary:hover { background: #c2eddf; }
.button:disabled { cursor: default; opacity: .65; }
.button-quiet { padding: 0 4px; color: var(--ink-soft); background: transparent; }
.button-quiet:hover { color: var(--orange); }

.workspace-layout { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 52px; margin-top: 52px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.section-kicker { margin-bottom: 9px; }
.section-kicker span { color: #d47938; }
h2 { margin: 0; font-size: 25px; letter-spacing: -.02em; }
.section-actions { display: flex; align-items: center; gap: 18px; }
.filter-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.tabs { display: flex; gap: 20px; }
.tab { padding: 8px 0; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted); font-size: 12px; }
.tab b { margin-left: 4px; color: #b0bbc2; font-size: 10px; font-weight: 600; }
.tab.is-active { border-bottom-color: #d47938; color: var(--ink); font-weight: 700; }
.tab.is-active b { color: #d47938; }
.search-box { width: 212px; height: 34px; display: flex; align-items: center; gap: 7px; padding: 0 10px; border-bottom: 1px solid var(--line-strong); color: var(--muted); }
.search-box span { font-size: 20px; transform: rotate(-15deg); }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 11px; }
.search-box input::placeholder { color: #a6b1b8; }

.table-wrap { overflow: hidden; background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow); }
.table-head, .request-row { display: grid; grid-template-columns: minmax(210px, 2fr) minmax(100px, 1fr) minmax(82px, .82fr) minmax(108px, .95fr) minmax(82px, .74fr) minmax(82px, .74fr) minmax(120px, 1.1fr) 32px; align-items: center; column-gap: 12px; padding: 0 17px; }
.table-head { min-height: 40px; border-bottom: 1px solid var(--line); background: #fbfcfc; color: var(--muted); font-size: 10px; }
.request-row { position: relative; min-height: 74px; border-bottom: 1px solid var(--line); }
.request-row:hover { background: #fcfefd; }
.request-row.is-hidden { display: none; }
.cell { min-width: 0; }
.cell-label { display: none; }
.field-input, .field-select { width: 100%; min-width: 0; height: 33px; padding: 0 8px; border: 1px solid transparent; border-radius: 4px; outline: 0; background: transparent; color: var(--ink); font-size: 11px; }
.field-input:focus, .field-select:focus { border-color: #a5d9cc; background: #fff; box-shadow: 0 0 0 2px rgba(165, 217, 204, .18); }
.request-main { display: flex; align-items: center; gap: 10px; }
.row-number { flex: none; color: #b3bdc4; font-family: 'DM Mono', monospace; font-size: 10px; }
.request-main .field-input { padding-left: 0; font-size: 12px; font-weight: 700; }
.field-select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, #92a1ac 50%), linear-gradient(135deg, #92a1ac 50%, transparent 50%); background-position: calc(100% - 11px) 14px, calc(100% - 7px) 14px; background-size: 4px 4px, 4px 4px; background-repeat: no-repeat; padding-right: 17px; }
.priority-pill { width: 100%; height: 25px; display: inline-flex; align-items: center; justify-content: center; border-radius: 4px; font-size: 10px; font-weight: 700; }
.priority-high { color: #b4582b; background: #fce8dc; }
.priority-medium { color: #9b6a20; background: #fff0ce; }
.priority-low { color: #387365; background: #e0f1e9; }
.status-select { color: var(--mint-strong); font-weight: 700; }
.delete-row { width: 25px; height: 25px; display: grid; place-items: center; border: 0; background: transparent; color: #aab6be; font-size: 20px; border-radius: 4px; }
.delete-row:hover { background: #fff0ed; color: #c45e4e; }
.add-row { width: 100%; height: 48px; border: 0; background: var(--paper); color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.add-row span { margin-right: 5px; color: #d47938; font-size: 19px; vertical-align: -2px; }
.add-row:hover { background: #fbfdfc; color: var(--mint-strong); }
.table-footer { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 2px 0; color: var(--muted); font-size: 10px; }
.table-footer > span:first-child { display: inline-flex; align-items: center; gap: 7px; }
.save-dot { width: 6px; height: 6px; display: inline-block; border-radius: 50%; background: #45ae8e; }

.side-column { border-left: 1px solid var(--line); padding-left: 26px; }
.summary-section, .stats-section, .deadline-section { padding: 0 0 25px; border-bottom: 1px solid var(--line); }
.stats-section, .deadline-section { padding-top: 25px; }
.side-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 23px; }
.progress-number { display: flex; align-items: baseline; gap: 2px; }
.progress-number strong { font-size: 48px; line-height: .95; letter-spacing: -.05em; }
.progress-number span { color: #d47938; font-size: 17px; font-weight: 800; }
.muted-copy { margin: 7px 0 17px; color: var(--muted); font-size: 11px; }
.progress-track { height: 5px; overflow: hidden; background: #e9eef0; }
.progress-track span { display: block; height: 100%; width: 33%; background: #45ae8e; transition: width .25s ease; }
.progress-meta { display: flex; justify-content: space-between; margin-top: 9px; color: var(--muted); font-size: 10px; }
.progress-meta b { color: var(--ink-soft); font-weight: 700; }
.stat-list { display: grid; gap: 17px; }
.stat-item { display: flex; align-items: center; gap: 12px; }
.stat-icon { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 7px; font-size: 15px; font-weight: 800; }
.stat-icon.blue { color: var(--blue); background: var(--blue-soft); }
.stat-icon.orange { color: var(--orange); background: var(--orange-soft); }
.stat-icon.green { color: var(--mint-strong); background: var(--mint); }
.stat-item div { display: grid; gap: 3px; }
.stat-item strong { font-size: 17px; line-height: 1; }
.stat-item small { color: var(--muted); font-size: 10px; }
.deadline-row { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px; }
.deadline-row strong { font-size: 26px; letter-spacing: -.04em; }
.deadline-row > span:nth-child(2) { color: var(--ink-soft); font-size: 11px; }
.deadline-date { width: 100%; margin-top: 7px; color: var(--muted); font-family: 'DM Mono', monospace; font-size: 10px; }
.deadline-line { height: 2px; margin-top: 14px; background: #f0e9df; }
.deadline-line span { display: block; width: 64%; height: 100%; background: #d47938; }
.local-note { display: flex; gap: 8px; padding-top: 20px; color: #9aa7ad; font-size: 10px; line-height: 1.7; }
.local-note span { color: #d47938; font-size: 13px; }
.local-note p { margin: 0; }

.toast { position: fixed; left: 50%; bottom: 30px; z-index: 4; padding: 11px 15px; border-radius: 6px; background: var(--ink); color: #fff; font-size: 12px; box-shadow: 0 8px 24px rgba(16, 42, 67, .18); opacity: 0; transform: translate(-50%, 12px); pointer-events: none; transition: .25s ease; }
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

.customer-mode .workspace-layout { grid-template-columns: minmax(0, 1fr); }
.customer-mode .side-column, .customer-mode #share-button, .customer-mode .export-button { display: none; }
.customer-mode .table-footer > span:last-child { display: none; }

@media (max-width: 1100px) {
  main { padding-left: 4vw; padding-right: 4vw; }
  .topbar { padding-left: 4vw; padding-right: 4vw; }
  .project-bar { align-items: flex-start; flex-direction: column; }
  .project-fields { width: 100%; justify-content: space-between; }
  .project-field { flex: 1; }
  .workspace-layout { gap: 30px; grid-template-columns: minmax(0, 1fr) 215px; }
  .table-wrap { overflow-x: auto; }
  .table-head, .request-row { min-width: 895px; }
}
@media (max-width: 760px) {
  .topbar { height: 66px; }
  .workspace-status { display: none; }
  main { padding: 42px 18px 40px; }
  .intro-section { display: block; margin-bottom: 30px; }
  h1 { font-size: 37px; }
  .intro-copy { max-width: 310px; font-size: 13px; }
  .intro-meta { margin-top: 18px; text-align: left; }
  .project-bar { padding: 16px; }
  .project-identity { min-width: 0; width: 100%; }
  .project-identity input { width: 100%; }
  .project-fields { flex-wrap: wrap; gap: 18px; }
  .project-field { flex: 0 0 calc(50% - 9px); padding: 0; border: 0; }
  .project-fields .button { width: 100%; }
  .workspace-layout { display: block; margin-top: 38px; }
  .section-heading { align-items: flex-start; }
  .section-actions { flex-direction: column-reverse; align-items: flex-end; gap: 8px; }
  .filter-row { display: block; }
  .tabs { margin-bottom: 12px; gap: 18px; }
  .search-box { width: 100%; }
  .table-wrap { overflow: visible; border: 0; box-shadow: none; background: transparent; }
  .table-head { display: none; }
  .request-list { display: grid; gap: 10px; }
  .request-row { min-width: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 16px; background: var(--paper); border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(28, 52, 68, .04); }
  .request-main { grid-column: 1 / -1; padding-right: 20px; }
  .request-row .cell { display: grid; gap: 4px; }
  .request-row .cell-label { display: block; color: var(--muted); font-size: 10px; }
  .request-row .field-input, .request-row .field-select { height: 30px; padding-left: 0; border-bottom: 1px solid var(--line); border-radius: 0; }
  .request-row .request-main .field-input { border-bottom: 0; font-size: 13px; }
  .request-row .priority-cell, .request-row .notes-cell { grid-column: 1 / -1; }
  .request-row .priority-pill { width: fit-content; padding: 0 12px; }
  .delete-row { position: absolute; top: 11px; right: 10px; }
  .add-row { margin-top: 10px; border: 1px dashed var(--line-strong); background: transparent; }
  .table-footer { align-items: flex-start; flex-direction: column; gap: 7px; padding-top: 14px; }
  .side-column { margin-top: 40px; padding: 0; border-left: 0; }
  .side-column section { padding-top: 25px; }
  .summary-section { border-top: 1px solid var(--line); }
}
