:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef2f7;
  --ink: #091a33;
  --muted: #657083;
  --line: #dbe2ec;
  --line-strong: #aeb9c8;
  --accent: #f28a1a;
  --accent-2: #d96f08;
  --accent-dark: #0d2747;
  --accent-soft: #fff1df;
  --warning-soft: #fff6db;
  --shadow: 0 18px 46px rgba(9, 26, 51, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #eef3f9 0, #f7f8fb 340px),
    var(--bg);
  color: var(--ink);
  font-family: Inter, Segoe UI, Arial, sans-serif;
  line-height: 1.45;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 78px;
  padding: 0 max(28px, calc((100vw - 1160px) / 2));
  border-bottom: 1px solid rgba(174, 185, 200, 0.55);
  background:
    linear-gradient(90deg, rgba(242, 138, 26, 0.1), rgba(13, 39, 71, 0.03) 42%, rgba(242, 138, 26, 0.08)),
    rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 28px rgba(9, 26, 51, 0.05);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  min-width: 245px;
  color: var(--ink);
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: inline-grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 8px;
  background:
    linear-gradient(135deg, #102b50, #07182c);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 14px 30px rgba(13, 39, 71, 0.22), 0 0 0 1px rgba(242, 138, 26, 0.18);
}

.brand-mark::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 9px;
  height: 4px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 6px 14px rgba(242, 138, 26, 0.32);
}

.brand-mark span {
  position: relative;
  z-index: 1;
  transform: translateY(-3px);
}

.brand-copy {
  display: grid;
  gap: 3px;
}

.brand-copy strong {
  color: var(--accent-dark);
  font-size: 22px;
  line-height: 1.05;
  font-weight: 900;
}

.brand-copy small {
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

nav {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid rgba(219, 226, 236, 0.9);
  border-radius: 999px;
  padding: 5px;
  background: rgba(255, 255, 255, 0.72);
}

nav a {
  border-radius: 999px;
  padding: 9px 14px;
  color: #4f5c6f;
  font-size: 14px;
  font-weight: 760;
  text-decoration: none;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

nav a:hover {
  background: #fff;
  color: var(--accent-dark);
  box-shadow: 0 8px 20px rgba(9, 26, 51, 0.08);
}

main {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 64px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  gap: 28px;
  align-items: stretch;
  margin-bottom: 20px;
}

.hero.compact {
  grid-template-columns: 1fr;
}

.hero-copy {
  min-height: 230px;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(242, 138, 26, 0.14), rgba(255, 255, 255, 0) 52%),
    var(--surface);
  box-shadow: var(--shadow);
}

.brand-hero .hero-copy {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(135deg, rgba(242, 138, 26, 0.25), rgba(13, 39, 71, 0) 48%),
    var(--accent-dark);
}

.brand-hero .hero-copy p,
.brand-hero .eyebrow {
  color: rgba(255, 255, 255, 0.78);
}

.hero-copy h1 {
  max-width: 680px;
  margin: 8px 0 14px;
  font-size: 44px;
  line-height: 1.05;
  letter-spacing: 0;
}

.hero-copy p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.hero-link {
  display: inline-flex;
  margin-top: 18px;
  border-radius: 8px;
  padding: 10px 13px;
  background: #fff;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

.process {
  display: grid;
  gap: 10px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f201d;
  box-shadow: var(--shadow);
}

.process-step {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 10px;
  color: rgba(255, 255, 255, 0.66);
}

.process-step span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  font-size: 13px;
  font-weight: 800;
}

.process-step.active {
  border-color: rgba(90, 217, 176, 0.55);
  background: rgba(90, 217, 176, 0.12);
  color: #fff;
}

.summary-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 16px 18px;
  border: 1px solid #c9ddd5;
  border-radius: 8px;
  background: var(--accent-soft);
}

.required-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 15px 18px;
  border: 1px solid #d8c79c;
  border-radius: 8px;
  background: var(--warning-soft);
}

.required-note strong {
  white-space: nowrap;
}

.required-note p {
  margin: 0;
  color: #5f5336;
}

.summary-band strong {
  white-space: nowrap;
}

.summary-band p {
  margin: 0;
  color: #41504b;
}

.form {
  display: grid;
  gap: 16px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 28px rgba(22, 35, 31, 0.04);
}

.section-head {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.section-head .eyebrow {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid #bcd7cf;
  border-radius: 8px;
  background: var(--accent-soft);
}

.section-head h2 {
  margin: 0;
  font-size: 22px;
}

.section-head p:not(.eyebrow) {
  margin: 4px 0 0;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

label.wide {
  grid-column: 1 / -1;
}

label span {
  color: #2c3b37;
  font-size: 14px;
  font-weight: 720;
}

.required-mark {
  color: #b24b37;
  font-style: normal;
  font-weight: 850;
}

.linked-chat {
  display: flex;
  align-items: center;
  min-height: 46px;
  border: 1px solid #c9ddd5;
  border-radius: 8px;
  padding: 0 13px;
  background: var(--accent-soft);
  color: #31534c;
  font-weight: 720;
}

input,
textarea {
  width: 100%;
  border: 1px solid #bfcbc7;
  border-radius: 8px;
  padding: 12px 13px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

textarea {
  min-height: 112px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: #98a39f;
}

input:focus,
textarea:focus {
  border-color: var(--accent-2);
  outline: 3px solid rgba(29, 122, 104, 0.14);
}

input:required:invalid,
textarea:required:invalid {
  border-color: #d3b56d;
}

.file {
  padding: 22px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(17, 94, 82, 0.06), rgba(255, 255, 255, 0) 60%),
    #fbfcfc;
}

.actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
}

button {
  min-height: 48px;
  border: 0;
  border-radius: 8px;
  padding: 0 22px;
  background: var(--accent);
  color: white;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(17, 94, 82, 0.18);
}

button:hover {
  background: var(--accent-2);
}

.notice,
.empty {
  margin-bottom: 16px;
  padding: 15px 16px;
  border: 1px solid #c9ddd5;
  border-radius: 8px;
  background: var(--accent-soft);
}

.notice.danger {
  border-color: #f1b39b;
  background: #fff0ea;
  color: #8f3219;
}

.notice.warn {
  border-color: #f0d093;
  background: #fff7e8;
  color: #7a4a12;
}

.auth-shell {
  display: grid;
  min-height: calc(100vh - 190px);
  place-items: center;
}

.auth-card {
  display: grid;
  gap: 18px;
  width: min(440px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: var(--shadow);
}

.brand-lock {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand-lock h1 {
  margin: 4px 0 0;
  font-size: 28px;
  line-height: 1.05;
}

.auth-card > p {
  margin: 0;
  color: var(--muted);
}

.list {
  display: grid;
  gap: 14px;
}

.dashboard-total {
  margin-bottom: 16px;
}

.ops-strip {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
  border: 1px solid rgba(242, 138, 26, 0.28);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(90deg, rgba(242, 138, 26, 0.12), rgba(255, 255, 255, 0.82)),
    var(--surface);
}

.ops-strip div {
  min-width: 0;
  border-radius: 8px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.82);
}

.ops-strip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.ops-strip strong {
  display: block;
  margin-top: 5px;
  color: var(--accent-dark);
  font-size: 25px;
  line-height: 1;
}

.period-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}

.period-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(9, 26, 51, 0.05);
}

.period-card > span {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  background: var(--accent-soft);
  color: var(--accent-2);
  font-size: 12px;
  font-weight: 800;
}

.period-card strong {
  display: block;
  margin-top: 18px;
  font-size: 38px;
  line-height: 1;
  color: var(--ink);
}

.period-card p {
  margin: 7px 0 16px;
  color: var(--muted);
}

.check-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.check-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
}

.check-item span {
  display: inline-flex;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 850;
}

.check-item.done span {
  background: #e6f8ef;
  color: #187149;
}

.check-item.todo span {
  background: #fff1df;
  color: var(--accent-2);
}

.check-item strong {
  display: block;
  margin-top: 12px;
  font-size: 16px;
}

.check-item p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.period-card dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.period-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 8px;
}

.period-card dt {
  color: var(--muted);
}

.period-card dd {
  margin: 0;
  font-weight: 800;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
}

.metric-grid div {
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  background:
    linear-gradient(180deg, rgba(242, 138, 26, 0.06), rgba(255, 255, 255, 0) 58%),
    var(--surface);
}

.metric-grid strong {
  display: block;
  font-size: 28px;
  line-height: 1;
}

.metric-grid span {
  display: block;
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
}

.dashboard-card {
  display: grid;
  gap: 18px;
}

.dashboard-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.dashboard-head h2 {
  margin: 4px 0;
}

.dashboard-head p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
}

.status-pill {
  align-self: flex-start;
  border-radius: 999px;
  padding: 7px 10px;
  background: #eaf0ee;
  color: #31413d;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-pill.ok {
  background: var(--accent-soft);
  color: var(--accent);
}

.status-pill.wait {
  background: var(--warning-soft);
  color: #7a5a16;
}

.status-pill.warn {
  background: #fff2cc;
  color: #7a4b00;
}

.status-pill.danger {
  background: #fde5e2;
  color: #9f2519;
}

.muted {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.review-form {
  display: grid;
  gap: 7px;
  width: min(260px, 100%);
}

.review-form input {
  min-height: 34px;
  padding: 8px 10px;
  font-size: 12px;
}

.review-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.review-buttons button {
  min-height: 32px;
  padding: 0 9px;
  border-radius: 7px;
  font-size: 12px;
  box-shadow: none;
}

.activity-list {
  display: grid;
  gap: 10px;
}

.activity-item {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fff;
}

.activity-item time {
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.activity-item strong {
  display: block;
  color: var(--accent-dark);
}

.activity-item p {
  margin: 4px 0 0;
  color: var(--muted);
}

.dashboard-head h2 a,
.text-link,
.metric-grid a {
  color: inherit;
  text-decoration: none;
}

.dashboard-head h2 a:hover,
.text-link:hover,
.metric-grid a:hover {
  color: var(--accent);
}

.progress-line {
  display: grid;
  gap: 8px;
}

.progress-line > div {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e8eeee;
}

.progress-line span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.progress-line p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 11px 10px;
  text-align: left;
  white-space: nowrap;
}

th {
  color: var(--muted);
  font-size: 12px;
}

td a {
  color: var(--accent-dark);
  font-weight: 800;
  text-decoration: none;
}

td a:hover {
  color: var(--accent);
}

td small {
  display: block;
  color: var(--muted);
  max-width: 260px;
  white-space: normal;
}

.project {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(22, 35, 31, 0.04);
}

.project h2 {
  margin: 4px 0;
  font-size: 22px;
}

.project a {
  color: var(--accent);
}

dl {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 18px;
  margin: 0;
}

dt {
  color: var(--muted);
  font-size: 12px;
}

dd {
  margin: 2px 0 0;
  font-weight: 760;
}

code {
  border-radius: 5px;
  padding: 2px 6px;
  background: #eaf0ee;
}

@media (max-width: 880px) {
  .hero {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    padding: 14px 18px;
  }

  main {
    width: min(100% - 24px, 1120px);
    padding-top: 24px;
  }

  .hero-copy {
    padding: 26px;
  }

  .hero-copy h1 {
    font-size: 32px;
  }

  .summary-band,
  .required-note,
  .project {
    align-items: flex-start;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .summary-band strong,
  .required-note strong {
    white-space: normal;
  }

  .grid,
  .metric-grid,
  .ops-strip,
  .check-grid,
  .period-grid,
  dl {
    grid-template-columns: 1fr;
  }

  .section-head {
    grid-template-columns: 1fr;
  }

  .activity-item {
    grid-template-columns: 1fr;
  }
}
