@import url("https://fonts.googleapis.com/css2?family=Ubuntu:wght@400;700&display=swap");

:root {
  color-scheme: light;
  --bg: #eef3f6;
  --ink: #172033;
  --muted: #667085;
  --panel: #ffffff;
  --line: #d7e1ea;
  --side: #111a24;
  --teal: #167d74;
  --teal-dark: #0d625b;
  --soft: #e4f5ee;
  --red: #c44536;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Ubuntu, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input {
  font: inherit;
}

.login-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(238, 243, 246, 0.92)),
    var(--bg);
}

.login-card {
  display: grid;
  width: min(438px, 100%);
  gap: 14px;
  border: 1px solid rgba(215, 225, 234, 0.95);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  padding: 28px;
  box-shadow: 0 24px 70px rgba(17, 26, 36, 0.13);
}

.login-mark,
.brand-mark {
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--teal);
  color: #ffffff;
  font-weight: 700;
}

.login-mark {
  width: 54px;
  height: 54px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  font-size: 13px;
}

.login-error {
  display: none;
  margin: 0;
  border: 1px solid #f2c2bb;
  border-radius: 8px;
  background: #fde8e4;
  color: var(--red);
  padding: 9px 11px;
  font-size: 13px;
}

.login-error.is-visible {
  display: block;
}

.shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.is-hidden {
  display: none;
}

.side {
  background: var(--side);
  color: #f8fafc;
  padding: 24px 20px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 36px;
}

.brand span {
  display: block;
  margin-top: 3px;
  color: #aeb8c7;
  font-size: 13px;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav a {
  color: #cbd5e1;
  text-decoration: none;
  padding: 11px 12px;
  border-radius: 8px;
  font-weight: 700;
}

.nav a.active,
.nav a:hover {
  background: #243044;
  color: #ffffff;
}

.workspace {
  min-width: 0;
  padding: 24px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.eyebrow,
.lead,
.panel p,
.status span,
label,
td span,
.archive-list span {
  color: var(--muted);
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: 36px;
  line-height: 1.08;
}

h2 {
  margin-bottom: 6px;
  font-size: 22px;
}

h3 {
  margin-bottom: 7px;
}

.lead {
  max-width: 840px;
  margin-bottom: 0;
  line-height: 1.55;
}

label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 700;
}

input,
button {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 0 11px;
}

button,
.small-button {
  border-color: var(--teal);
  background: var(--teal);
  color: #ffffff;
  font-weight: 700;
  cursor: pointer;
}

.small-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border-radius: 8px;
  padding: 0 11px;
  text-decoration: none;
  font-size: 12px;
}

.small-button.secondary {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.logout-button {
  height: 28px;
  margin-top: 10px;
  border-color: #e3ebf2;
  background: #f6f9fb;
  color: #475569;
  padding: 0 10px;
  font-size: 12px;
}

.status {
  display: grid;
  min-width: 116px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px 14px;
}

.status strong {
  margin-top: 5px;
  color: var(--teal);
  font-size: 20px;
}

.panel {
  min-width: 0;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px;
  box-shadow: 0 12px 30px rgba(31, 41, 55, 0.045);
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  margin-bottom: 18px;
}

.panel-head p {
  max-width: 820px;
  margin-bottom: 0;
}

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

.summary-grid {
  margin-bottom: 12px;
}

.summary-grid article,
.project-card,
.archive-list article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
  padding: 14px;
}

.summary-grid span,
.project-card span {
  display: block;
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.summary-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
}

.summary-grid p,
.project-card p,
.archive-list p {
  margin-bottom: 0;
  line-height: 1.45;
}

.project-card h3 {
  margin-top: 7px;
  font-size: 20px;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.project-card.wide {
  margin-top: 14px;
}

.factory-frame {
  width: 100%;
  min-height: min(820px, calc(100vh - 190px));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 920px;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

th {
  background: #f8fafc;
  color: #667085;
  font-size: 11px;
  text-transform: uppercase;
}

td strong,
td span {
  display: block;
}

.score {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--teal);
  padding: 4px 8px;
  font-weight: 700;
}

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

.sticker-grid img {
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  object-fit: contain;
  padding: 8px;
}

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

.archive-list strong {
  display: block;
  margin-bottom: 4px;
}

.archive-list span {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

@media (max-width: 980px) {
  .summary-grid,
  .project-grid,
  .sticker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .shell,
  .summary-grid,
  .project-grid,
  .sticker-grid {
    grid-template-columns: 1fr;
  }

  .workspace,
  .side {
    padding: 20px;
  }

  .topbar,
  .panel-head {
    display: block;
  }

  .status {
    margin-top: 14px;
  }

  h1 {
    font-size: 30px;
  }
}
