:root {
  color-scheme: dark;
  --bg: #07111c;
  --panel: #0c1927;
  --panel-strong: #102238;
  --line: rgba(174, 205, 230, .16);
  --text: #f2f7fb;
  --muted: #9eb2c4;
  --cyan: #65e3dc;
  --blue: #69aefe;
  --green: #74e5a5;
  --amber: #f4c96a;
  --red: #ff8f9b;
  font-family: Inter, ui-sans-serif, system-ui, sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; background: var(--bg); color: var(--text); line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.topbar { min-height: 68px; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 0 max(24px, calc((100vw - 1180px) / 2)); border-bottom: 1px solid var(--line); background: rgba(7, 17, 28, .94); }
.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand > span, .login-brand > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 8px; background: var(--cyan); color: #06101b; font-weight: 950; }
.user-area { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 14px; }
.user-area form { margin: 0; }
.user-area button { min-height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: var(--text); cursor: pointer; }
.page { width: min(1180px, calc(100% - 40px)); margin: auto; padding: 58px 0 72px; }
.intro { max-width: 780px; margin-bottom: 28px; }
.eyebrow { margin: 0 0 10px; color: var(--cyan); font-size: 12px; font-weight: 900; letter-spacing: .1em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 16px; font-size: clamp(38px, 6vw, 68px); line-height: .98; letter-spacing: 0; }
.intro > p:last-child, .project-hero p, .project-card > p, .status-note p { color: var(--muted); }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 20px; }
.stats article { padding: 16px; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; }
.stats span { display: block; margin-bottom: 4px; color: var(--muted); font-size: 12px; text-transform: uppercase; }
.stats strong { font-size: 28px; }
.project-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.project-card { min-height: 370px; display: flex; flex-direction: column; padding: 22px; border: 1px solid var(--line); background: var(--panel); border-radius: 8px; }
.card-head { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 18px; }
.category, .status { padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; color: var(--muted); font-size: 11px; font-weight: 850; text-transform: uppercase; }
.status { color: var(--cyan); }
.project-card h2 { margin-bottom: 8px; font-size: 24px; }
.progress { height: 7px; margin-top: auto; overflow: hidden; border-radius: 6px; background: rgba(255,255,255,.07); }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--cyan), var(--blue)); }
.progress-meta { display: flex; justify-content: space-between; gap: 10px; margin-top: 8px; color: var(--muted); font-size: 12px; }
.mini-tasks { min-height: 86px; margin: 17px 0; padding: 0; list-style: none; color: var(--muted); font-size: 13px; }
.mini-tasks li { margin-bottom: 7px; padding-left: 15px; position: relative; }
.mini-tasks li::before { content: ""; position: absolute; left: 0; top: .48em; width: 6px; height: 6px; border-radius: 50%; background: var(--blue); }
.mini-tasks .blocked::before { background: var(--red); }
.mini-tasks .progress::before { background: var(--amber); }
.card-link { min-height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; background: var(--panel-strong); font-weight: 850; }
.back-link { display: inline-block; margin-bottom: 28px; color: var(--muted); }
.project-hero { display: flex; justify-content: space-between; align-items: end; gap: 30px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.project-hero > div:first-child { max-width: 760px; }
.project-score { min-width: 170px; padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); text-align: right; }
.project-score strong { display: block; font-size: 38px; }
.project-score span { color: var(--muted); font-size: 13px; }
.status-note, .task-section { margin-top: 34px; }
.status-note { padding: 22px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.task-section h2 { margin-bottom: 14px; }
.task-list { display: grid; gap: 8px; }
.task { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 12px; padding: 14px 16px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); }
.task > span { width: 9px; height: 9px; border-radius: 50%; background: var(--blue); }
.task.done > span { background: var(--green); }
.task.progress > span { background: var(--amber); }
.task.blocked > span { background: var(--red); }
.task p { margin: 0; }
.task.done p { color: var(--muted); text-decoration: line-through; }
.task small { color: var(--muted); }
.updated { margin-top: 34px; color: var(--muted); font-size: 12px; }
.login-body { display: grid; place-items: center; padding: 24px; }
.login-shell { width: min(440px, 100%); }
.login-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.login-brand strong, .login-brand small { display: block; }
.login-brand small { color: var(--muted); }
.login-panel { padding: 28px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.login-panel h1 { font-size: 42px; }
.login-panel > p:not(.eyebrow) { color: var(--muted); }
.login-panel form { display: grid; gap: 15px; margin-top: 22px; }
.login-panel label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 750; }
.login-panel input { width: 100%; min-height: 46px; padding: 0 12px; border: 1px solid var(--line); border-radius: 7px; background: #06101a; color: var(--text); }
.primary { min-height: 46px; border: 0; border-radius: 7px; background: var(--text); color: var(--bg); font-weight: 900; cursor: pointer; }
.error { margin: 16px 0; padding: 11px; border: 1px solid rgba(255,143,155,.4); border-radius: 7px; background: rgba(255,143,155,.08); color: #ffc5cb; }

@media (max-width: 920px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .project-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .topbar { padding: 12px 16px; align-items: flex-start; }
  .user-area { align-items: flex-end; flex-direction: column; gap: 6px; }
  .page { width: min(100% - 28px, 1180px); padding-top: 40px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .project-grid { grid-template-columns: 1fr; }
  .project-hero { align-items: stretch; flex-direction: column; }
  .project-score { text-align: left; }
  .task { grid-template-columns: 12px 1fr; }
  .task small { grid-column: 2; }
}

