:root {
  --login-bg: #050505;
  --brand-yellow: #f2c33d;
  --page: #eef3f8;
  --surface: #ffffff;
  --ink: #1f2937;
  --muted: #66717e;
  --blue: #326cad;
  --green: #347d47;
  --danger: #9d4038;
  --border: #39424e;
  --soft-border: #d8dee6;
  --column: 464px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; }
button, input, textarea { min-height: 44px; font: inherit; }
:focus-visible { outline: 3px solid #75a9e2; outline-offset: 2px; }

.login-page { min-height: 100vh; background: var(--login-bg); color: #fff; }
.login-shell {
  display: flex;
  min-height: 100vh;
  width: min(100% - 32px, 980px);
  margin: auto;
  padding: 72px 0 40px;
  flex-direction: column;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 16px; font-style: italic; }
.brand-mark {
  position: relative;
  width: 72px;
  height: 72px;
  overflow: hidden;
  border-radius: 50%;
  background: var(--brand-yellow);
}
.brand-mark::after { content: ""; position: absolute; inset: -8px 27px; background: #1c1f22; transform: rotate(10deg); }
.brand strong { display: block; font-size: 2.6rem; line-height: 0.9; }
.brand small { display: block; margin-top: 8px; font-size: 1.15rem; font-weight: 800; }
.login-card {
  display: grid;
  gap: 10px;
  width: min(100%, 354px);
  padding: 14px;
  border: 1px solid #8c7736;
  border-radius: 16px;
}
.login-card label { font-size: 0.78rem; color: #d8dadd; }
.login-card input, .login-card button { border-radius: 12px; }
.login-card input { border: 1px solid #8c7736; background: #171a1d; color: #fff; padding: 10px 14px; }
.login-card button { border: 0; background: var(--brand-yellow); color: #151515; font-weight: 800; }
.login-card .secondary { border: 1px solid #4d5258; background: #171a1d; color: #fff; }
.form-error { margin: 2px 0 0; color: #ffaaa2; font-size: 0.82rem; }

.review-page { min-height: 100vh; background: var(--page); }
.review-shell { width: min(100% - 24px, var(--column)); margin: 0 auto; padding: 8px 0 56px; }
.queue-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  border: 1px solid var(--soft-border);
  border-bottom: 3px solid var(--blue);
  border-radius: 14px 14px 0 0;
  background: var(--surface);
}
.queue-header h1 { margin: 0; font-size: 1.18rem; line-height: 1.1; }
.queue-header p { margin: 3px 0 0; color: var(--muted); font-size: 0.74rem; font-weight: 700; }
.count-badge { padding: 5px 10px; border: 1px solid #b8d3ea; border-radius: 999px; background: #edf6fd; color: #245d91; font-size: 0.78rem; }
.header-actions { display: grid; justify-items: end; gap: 6px; }
.header-actions button { padding: 4px 9px; border: 1px solid var(--soft-border); border-radius: 8px; background: var(--surface); color: var(--muted); font-size: 0.7rem; font-weight: 700; }
.notice { padding: 18px; text-align: center; color: var(--muted); }
.notice.error { color: var(--danger); }
.report-list { display: grid; gap: 8px; margin-top: 10px; }
.report-card { overflow: hidden; border: 2px solid var(--border); border-radius: 13px; background: var(--surface); }
.report-heading { display: flex; gap: 9px; padding: 10px 10px 4px; }
.team-code { display: grid; place-items: center; width: 47px; height: 37px; border-radius: 11px; background: #414b5c; color: white; font-size: 1.15rem; }
.report-heading h2 { margin: 1px 0 0; font-size: 1rem; line-height: 1.1; }
.report-heading p { margin: 3px 0 0; color: var(--muted); font-size: 0.69rem; font-weight: 700; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; padding: 3px 10px 7px; }
.metric { min-width: 0; padding: 5px 7px; border: 1px solid #e1e5ea; border-radius: 8px; background: #f7f8fa; }
.metric strong, .metric span { display: block; }
.metric strong { font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.metric span { color: var(--muted); font-size: 0.58rem; font-weight: 800; }
.materials { padding: 0 10px 8px; }
.section-label { margin: 0 0 4px; color: #485361; font-size: 0.66rem; font-weight: 800; }
.material-row { display: flex; justify-content: space-between; gap: 10px; padding: 5px 7px; border: 1px solid #e1e5ea; border-radius: 8px; background: #f7f8fa; font-size: 0.72rem; }
.material-row + .material-row { margin-top: 4px; }
.material-row span { color: var(--muted); font-weight: 700; }
.open-report { display: flex; justify-content: space-between; width: calc(100% - 20px); margin: 5px 10px 10px; padding: 10px; border: 1px solid #a9c7e1; border-radius: 9px; background: #edf5fc; color: #285f94; text-align: left; }

.detail-view { margin-top: 10px; }
.detail-card { padding-bottom: 10px; }
.approve-report,
.return-report,
.back-to-reports {
  width: calc(100% - 20px);
  margin: 6px 10px;
  padding: 9px 12px;
  border-radius: 9px;
  font-weight: 800;
}
.approve-report { border: 1px solid #8bb597; background: #eaf5ed; color: #286039; }
.approve-report:disabled,
.return-report:disabled { cursor: not-allowed; opacity: 0.58; }
.detail-label { margin: 10px 10px 5px; font-size: 0.76rem; }
.object-card { margin: 0 8px 9px; overflow: hidden; border: 1px solid #aeb8c3; border-radius: 10px; background: #fbfcfd; }
.object-summary { padding: 9px 10px 5px; }
.object-summary h3 { margin: 0; font-size: 0.9rem; }
.object-summary p { margin: 3px 0 0; color: var(--muted); font-size: 0.7rem; font-weight: 700; }
.object-summary .responsibility { color: #46515e; }
.object-materials { padding-inline: 10px; }
.object-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 0 10px 9px; }
.object-toggle { padding: 7px; border: 1px solid #b9cde0; border-radius: 8px; background: #eef5fb; color: #285f94; font-size: 0.72rem; font-weight: 800; }
.works-panel,
.media-panel { display: grid; gap: 6px; padding: 9px 10px; border-top: 1px solid var(--soft-border); background: #f4f7fa; }
.works-panel h4,
.media-panel h4 { margin: 0 0 2px; font-size: 0.76rem; }
.work-row,
.media-item { padding: 8px; border: 1px solid #d5dce3; border-radius: 8px; background: var(--surface); }
.work-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.work-heading p { margin: 0; font-size: 0.75rem; font-weight: 800; }
.edit-work { min-width: 54px; padding: 4px 8px; border: 1px solid #c5ced7; border-radius: 7px; background: #f7f8fa; color: #46515e; font-size: 0.69rem; font-weight: 800; }
.work-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.work-chips span { padding: 3px 6px; border-radius: 999px; background: #e9edf2; color: #4b5663; font-size: 0.64rem; font-weight: 700; }
.work-editor { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--soft-border); }
.work-editor label { display: grid; gap: 3px; color: var(--muted); font-size: 0.66rem; font-weight: 800; }
.work-editor input { width: 100%; padding: 6px; border: 1px solid #aeb8c3; border-radius: 7px; }
.save-draft { grid-column: 1 / -1; border: 1px solid #8bb597; border-radius: 8px; background: #eaf5ed; color: #286039; font-weight: 800; }
.draft-note { margin: 7px 0 0; color: #80640e; font-size: 0.67rem; font-weight: 800; }
.media-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.media-item small { color: var(--muted); font-size: 0.64rem; }
.media-placeholder { display: grid; min-width: 64px; min-height: 44px; place-items: center; border: 1px dashed #8997a6; border-radius: 7px; background: #edf1f5; color: #46515e; font-size: 0.7rem; font-weight: 800; }
.comment-label { display: grid; gap: 5px; margin: 12px 10px 7px; color: #46515e; font-size: 0.72rem; font-weight: 800; }
.comment-label textarea { min-height: 96px; resize: vertical; padding: 9px; border: 1px solid #aeb8c3; border-radius: 9px; color: var(--ink); }
.return-report { border: 1px solid #d4a8a4; background: #f9eceb; color: var(--danger); }
.decision-note { margin: 5px 10px 8px; color: var(--muted); font-size: 0.67rem; text-align: center; }
.back-to-reports { border: 1px solid #bfc7cf; background: var(--surface); color: #46515e; }

@media (max-width: 380px) {
  .review-shell { width: min(100% - 12px, var(--column)); }
  .metrics { gap: 3px; padding-inline: 6px; }
  .material-row { align-items: start; flex-direction: column; gap: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}
