@font-face {
  font-family: "TT Norms";
  src: url("/assets/fonts/tt-norms-condensed-regular.otf") format("opentype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "TT Norms";
  src: url("/assets/fonts/tt-norms-condensed-medium.otf") format("opentype");
  font-style: normal;
  font-weight: 500 600;
  font-display: swap;
}

@font-face {
  font-family: "TT Norms";
  src: url("/assets/fonts/tt-norms-condensed-bold.otf") format("opentype");
  font-style: normal;
  font-weight: 700 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #352f2c;
  --muted: #81746e;
  --line: #ded1c9;
  --soft: #f5eee8;
  --panel: #fffdfb;
  --taupe: #9a8981;
  --clay: #b1684a;
  --olive: #73724d;
  --sand: #e4c9b0;
  --green: var(--olive);
  --green-2: var(--clay);
  --green-soft: #efeee5;
  --amber: var(--clay);
  --amber-soft: #f6e8df;
  --red: #9b4138;
  --red-soft: #f6dfd8;
  --shadow: 0 16px 38px rgba(82, 65, 56, 0.08);
  font-family: "TT Norms", "TT Norms Pro", Avenir, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: radial-gradient(circle at 82% 4%, rgba(228,201,176,.38), transparent 30%), #f4efeb; color: var(--ink); font-family: inherit; }
button { font: inherit; }
.app-shell { min-height: 100vh; display: grid; grid-template-columns: 238px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 24px 20px 18px; background: var(--olive); color: white; display: flex; flex-direction: column; }
.brand { display: block; padding: 0 0 27px; }
.brand-logo { position: relative; width: 100%; height: 62px; overflow: hidden; border-radius: 14px; background: #fff; box-shadow: 0 9px 22px rgba(50,48,31,.14); }
.brand-logo img { position: absolute; width: 210px; max-width: none; height: auto; top: -40px; left: -5px; }
.brand > span { display: block; margin: 9px 5px 0; color: rgba(255,255,255,.68); font-size: 9px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.sidebar-footer strong, .sidebar-footer span { display: block; }
.sidebar-footer span { margin-top: 2px; font-size: 11px; color: rgba(255,255,255,.62); }
.nav { display: grid; gap: 7px; }
.nav-item { width: 100%; border: 0; background: transparent; color: rgba(255,255,255,.76); padding: 11px 12px; border-radius: 11px; display: flex; justify-content: space-between; cursor: pointer; text-align: left; }
.nav-item b { min-width: 22px; padding: 2px 7px; border-radius: 999px; background: rgba(255,255,255,.1); font-size: 11px; text-align: center; }
.nav-item:hover { background: rgba(255,255,255,.1); color: white; }
.nav-item.is-active { background: var(--clay); color: white; box-shadow: 0 8px 20px rgba(71,45,34,.16); }
.sidebar-footer { margin-top: auto; display: flex; gap: 10px; align-items: center; padding: 15px 8px 2px; border-top: 1px solid rgba(255,255,255,.12); }
.sidebar-footer strong { font-size: 12px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--sand); color: #4f4e35; font-weight: 700; }
.main { min-width: 0; padding: 34px 42px 60px; }
.topbar { display: flex; justify-content: space-between; gap: 20px; align-items: flex-end; margin-bottom: 27px; }
.eyebrow, .section-kicker { margin: 0 0 5px; color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: 30px; letter-spacing: -.035em; font-weight: 700; }
h2 { margin-bottom: 0; font-size: 18px; }
.topbar-actions { display: flex; gap: 12px; align-items: center; }
.preview-control { display: grid; gap: 3px; }
.preview-control span, .filter-bar label > span { color: var(--muted); font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
select { color: var(--ink); background: #fffdfb; border: 1px solid var(--line); border-radius: 9px; padding: 8px 30px 8px 10px; }
.preview-control select { max-width: 250px; font-size: 11px; }
.project-select { max-width: 480px; border: 0; padding: 0 26px 0 0; background-color: transparent; font-size: 18px; font-weight: 700; }
.project-page-select { margin-top: 1px; font-size: 19px; }
.service-state { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,253,251,.72); color: var(--muted); font-size: 12px; }
.service-state i { display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: var(--taupe); }
.service-state.is-online i { background: var(--olive); box-shadow: 0 0 0 4px rgba(115,114,77,.14); }
.service-state.is-offline { color: var(--red); }
.primary-button { border: 0; border-radius: 10px; padding: 10px 15px; color: white; background: var(--clay); cursor: pointer; box-shadow: 0 7px 18px rgba(177,104,74,.2); }
.section { display: none; }
.section.is-active { display: block; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.metric, .panel, .placeholder-section { background: var(--panel); border: 1px solid rgba(154,137,129,.28); border-radius: 18px; box-shadow: var(--shadow); }
.metric { padding: 18px; }
.metric > span, .metric small { display: block; color: var(--muted); font-size: 12px; }
.metric strong { display: block; margin: 8px 0 6px; font-size: 27px; }
.metric.warning { background: var(--amber-soft); border-color: var(--sand); }
.metric.danger { background: var(--red-soft); border-color: #e5beb4; }
.metric.success { background: var(--green-soft); border-color: #d4d1b8; }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, .8fr); gap: 16px; }
.panel { min-width: 0; padding: 21px; }
.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 20px; }
.text-button { border: 0; background: transparent; color: var(--green); font-weight: 700; font-size: 12px; cursor: pointer; }
.progress-row { display: flex; justify-content: space-between; margin-bottom: 8px; color: var(--muted); font-size: 12px; }
.progress-row strong { color: var(--ink); }
.progress { height: 8px; background: var(--soft); border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--olive), var(--taupe)); border-radius: inherit; }
.project-dates { display: flex; flex-wrap: wrap; gap: 10px 24px; margin: -5px 0 22px; color: var(--muted); font-size: 12px; }
.project-dates b { margin-left: 4px; color: var(--ink); }
.timeline { width: 100%; max-width: 100%; min-width: 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; margin-top: 27px; }
.timeline-step { position: relative; padding-top: 24px; color: var(--muted); font-size: 11px; }
.timeline-step::before { content: ""; position: absolute; left: 7px; right: -7px; top: 7px; height: 2px; background: var(--line); }
.timeline-step:last-child::before { right: calc(100% - 7px); }
.timeline-step i { position: absolute; top: 2px; left: 0; width: 12px; height: 12px; border: 3px solid var(--line); border-radius: 50%; background: white; z-index: 1; }
.timeline-step span, .timeline-step small { display: block; }
.timeline-step small { margin-top: 3px; color: #98a29c; }
.timeline-step.is-done i, .timeline-step.is-current i { border-color: var(--green-2); background: var(--green-2); }
.timeline-step.is-done::before { background: var(--green-2); }
.timeline-step.is-current { color: var(--ink); font-weight: 700; }
.activity { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.activity-icon { flex: 0 0 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--amber-soft); color: var(--amber); font-weight: 800; }
.activity-icon.muted { background: var(--red-soft); color: var(--red); }
.activity strong, .activity p, .activity small { display: block; }
.activity strong { font-size: 13px; }
.activity p { margin: 4px 0; font-size: 12px; color: var(--red); }
.activity small { color: var(--muted); line-height: 1.35; }
.tasks-panel { margin-top: 16px; }
.task-list { border-top: 1px solid var(--line); }
.task-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) 130px 95px; gap: 12px; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--line); }
.task-row:last-child { border-bottom: 0; }
.task-number { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; color: var(--muted); background: var(--soft); font-size: 10px; font-weight: 700; }
.task-copy strong, .task-copy span { display: block; }
.task-copy strong { font-size: 13px; }
.task-copy span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.task-status { justify-self: start; padding: 5px 8px; border-radius: 999px; background: var(--soft); color: #6a5f59; font-size: 10px; }
.task-status.is-overdue { color: var(--red); background: var(--red-soft); }
.status-select { min-width: 135px; font-size: 11px; }
.status-select.is-compact { min-width: 125px; padding-block: 6px; }
.task-row time { color: var(--muted); font-size: 11px; }
.task-row time.overdue { color: var(--red); font-weight: 700; }
.task-more { border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.placeholder-section { padding: 28px; }
.placeholder-section > p { max-width: 660px; margin: 12px 0 0; color: var(--muted); line-height: 1.55; }
.locked-section { padding: 42px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); }
.locked-section h2 { margin-bottom: 12px; font-size: 24px; }
.locked-section p { max-width: 600px; color: var(--muted); line-height: 1.6; }
.gantt-head { display: grid; grid-template-columns: 265px 1fr; gap: 16px; margin-top: 30px; padding: 0 0 10px; color: var(--muted); font-size: 11px; }
.gantt-head > div { display: grid; grid-template-columns: repeat(4, 1fr); }
.gantt-head b { text-align: center; font-weight: 600; }
.gantt { border-top: 1px solid var(--line); }
.gantt-row { display: grid; grid-template-columns: 265px minmax(420px, 1fr); gap: 16px; min-height: 52px; align-items: center; border-bottom: 1px solid var(--line); }
.gantt-copy b, .gantt-copy span { display: block; }
.gantt-copy b { font-size: 12px; }
.gantt-copy span { margin-top: 4px; color: var(--muted); font-size: 10px; }
.gantt-track { position: relative; height: 12px; border-radius: 8px; background-color: var(--soft); background-image: linear-gradient(90deg, transparent 32.5%, #e1d5cd 32.7%, transparent 32.9%, transparent 65%, #e1d5cd 65.2%, transparent 65.4%); }
.gantt-track i { position: absolute; top: 0; height: 12px; min-width: 5px; border-radius: 8px; background: var(--taupe); }
.gantt-track i.status-completed { background: var(--olive); }
.gantt-track i.status-in_progress { background: var(--amber); }
.gantt-track i.is-overdue { background: var(--red); }
.gantt-track em { position: absolute; top: -4px; bottom: -4px; width: 2px; background: #7d2523; border-radius: 2px; }
.filter-bar { display: grid; grid-template-columns: repeat(3, minmax(150px, 230px)); gap: 12px; margin-top: 22px; }
.filter-bar label { display: grid; gap: 5px; }
.task-cards { display: grid; gap: 12px; margin-top: 24px; }
.task-card { padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fffdfa; }
.task-card > div > span { color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .06em; }
.task-card h3 { margin: 4px 0 12px; font-size: 15px; }
.task-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.task-card dl { display: flex; flex-wrap: wrap; gap: 14px 32px; margin: 0 0 12px; }
.task-card dl div { min-width: 120px; }
.task-card dt { color: var(--muted); font-size: 10px; }
.task-card dd { margin: 3px 0 0; font-size: 12px; }
.task-card p { margin: 8px 0 0; color: #655a54; font-size: 12px; line-height: 1.55; }
.task-card.is-summary { background: var(--soft); }
.private-note { font-style: italic; }
.team-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 24px; }
.team-card { display: flex; align-items: center; gap: 12px; padding: 16px; border: 1px solid var(--line); border-radius: 13px; }
.team-card > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: var(--green-soft); color: var(--green); font-weight: 800; }
.team-card strong, .team-card small { display: block; }
.team-card small { margin-top: 3px; color: var(--muted); }
.empty { padding: 18px 0; color: var(--muted); }
.gantt-demo { display: grid; grid-template-columns: 190px 1fr; gap: 22px; margin-top: 28px; border-top: 1px solid var(--line); padding-top: 18px; }
.gantt-labels { display: grid; gap: 14px; font-size: 12px; }
.gantt-chart { display: grid; gap: 14px; padding-top: 3px; background-image: linear-gradient(90deg, transparent 24.8%, var(--line) 25%, transparent 25.2%, transparent 49.8%, var(--line) 50%, transparent 50.2%, transparent 74.8%, var(--line) 75%, transparent 75.2%); }
.gantt-chart i { height: 12px; border-radius: 6px; background: var(--green-2); margin-left: calc(var(--start) * 1%); width: calc(var(--length) * 1%); }

@media (max-width: 980px) {
  .app-shell { grid-template-columns: 84px minmax(0, 1fr); }
  .sidebar { padding-inline: 13px; }
  .brand > span, .nav-item span, .sidebar-footer div { display: none; }
  .brand { padding-inline: 0; }
  .brand-logo { width: 58px; height: 58px; margin: 0 auto; }
  .nav-item { justify-content: center; }
  .sidebar-footer { justify-content: center; }
  .main { padding: 28px 24px 50px; }
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .app-shell { display: block; }
  .sidebar { position: fixed; z-index: 10; top: auto; bottom: 0; left: 0; right: 0; width: auto; height: 66px; padding: 9px 12px; flex-direction: row; align-items: center; }
  .brand, .sidebar-footer { display: none; }
  .nav { width: 100%; grid-template-columns: repeat(5, 1fr); gap: 4px; }
  .nav-item { height: 47px; padding: 8px 4px; font-size: 10px; align-items: center; }
  .nav-item span { display: block; }
  .nav-item b { display: none; }
  .main { padding: 22px 15px 92px; }
  .topbar { align-items: flex-start; }
  .topbar-actions { display: none; }
  h1 { font-size: 25px; }
  .metric-grid, .content-grid { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { padding: 15px; }
  .metric strong { font-size: 23px; }
  .timeline { overflow-x: auto; grid-template-columns: repeat(5, minmax(92px, 1fr)); }
  .task-row { grid-template-columns: 24px minmax(0, 1fr) 65px; }
  .task-status, .status-select { display: none; }
  .gantt-demo { grid-template-columns: 135px minmax(320px, 1fr); overflow-x: auto; }
  .placeholder-section { overflow-x: auto; }
  .gantt-head, .gantt-row { grid-template-columns: 190px minmax(420px, 1fr); }
  .team-grid { grid-template-columns: 1fr; }
  .filter-bar { grid-template-columns: 1fr; }
}
