:root {
  color-scheme: light only;
  --blue: #163a5f;
  --blue-deep: #102e4d;
  --amber: #f2b544;
  --bg: #f5f8fa;
  --panel: #fbfdfe;
  --bg-2: #dce9f0;
  --active: #c8dde8;
  --border: #b7cdd9;
  --text-2: #4e6678;
  --error: #9c3f35;
  --success: #276749;
  --radius: 6px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Golos Text', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--blue);
}
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.muted { color: var(--text-2); }

.center-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 2rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 14px 40px rgba(16, 46, 77, .08);
}
.auth-card h1 { margin: 1.25rem 0 .5rem; font-size: 1.45rem; text-align: center; }
.auth-intro { margin: 0 0 1.5rem; text-align: center; line-height: 1.5; font-size: .9rem; }
.brand { display: flex; align-items: center; gap: .7rem; font-size: 1.1rem; font-weight: 700; }
.brand-centered { justify-content: center; }
.header-mark { width: 31px; height: 31px; }

.field { margin-bottom: 1rem; }
.field label { display: block; margin-bottom: .35rem; font-size: .9rem; font-weight: 600; }
.field input {
  width: 100%;
  padding: .7rem .8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--blue);
}
.field input:focus { border-color: var(--blue); outline: 3px solid var(--amber); outline-offset: 1px; }

.btn {
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: .6rem 1.15rem;
  font-weight: 600;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--amber); border-color: var(--amber); color: var(--blue); }
.btn-outline-light { color: #fff; border-color: rgba(255,255,255,.5); background: transparent; }
.btn-outline-light:hover { background: var(--amber); border-color: var(--amber); color: var(--blue); }
.btn-block { width: 100%; }
.btn-large { padding: .8rem 1.2rem; }
.btn-icon { border: 0; background: transparent; color: var(--text-2); font-size: 1.6rem; line-height: 1; padding: .3rem; }
.btn-icon:hover { color: var(--error); }

.message { line-height: 1.45; font-size: .9rem; }
.error { color: var(--error); font-weight: 600; }

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: .65rem max(1.25rem, calc((100vw - 1180px) / 2));
  background: var(--blue);
  color: #fff;
}
.account { display: flex; align-items: center; gap: 1rem; font-size: .9rem; }
.app-main { width: min(1180px, calc(100% - 2.5rem)); margin: 0 auto; padding: 3rem 0; }
.page-heading { max-width: 750px; margin-bottom: 2rem; }
.page-heading h1 { margin: .25rem 0 .75rem; font-size: clamp(1.7rem, 4vw, 2.45rem); line-height: 1.2; color: var(--blue-deep); }
.page-heading > p:last-child { margin: 0; color: var(--text-2); line-height: 1.65; }
.eyebrow { margin: 0; color: var(--text-2); font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(300px, .85fr); gap: 1.25rem; align-items: start; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; }
.panel h2 { margin: 0 0 1.25rem; font-size: 1.1rem; }

.dropzone {
  display: flex;
  min-height: 225px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: .65rem;
  padding: 1.5rem;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  background: var(--bg);
  text-align: center;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.dropzone:hover, .dropzone.dragging { border-color: var(--blue); background: var(--bg-2); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dropzone strong { font-size: .98rem; }
.dropzone .muted { font-size: .85rem; }
.upload-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 1.8rem; font-weight: 500; }
.selected-file { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin: 1rem 0; padding: .8rem 1rem; background: var(--bg-2); border-radius: var(--radius); }
.selected-file strong, .selected-file span { display: block; overflow-wrap: anywhere; }
.selected-file span { margin-top: .2rem; font-size: .8rem; }
.processing { display: flex; align-items: center; gap: 1rem; margin-top: 1.25rem; padding: 1rem; background: var(--bg-2); border-radius: var(--radius); }
.processing p { margin: .25rem 0 0; font-size: .82rem; line-height: 1.45; }
.spinner { display: inline-block; flex: 0 0 auto; width: 28px; height: 28px; border: 3px solid var(--active); border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.result { margin-top: 1.25rem; padding: 1rem; border-left: 4px solid var(--success); background: #edf7f1; color: var(--success); }
.result p { margin: .35rem 0; }
.result span { font-size: .8rem; overflow-wrap: anywhere; }

.report-list { list-style: none; margin: 0; padding: 0; }
.report-list li { display: flex; gap: .8rem; margin-bottom: 1.2rem; }
.report-list li > span { display: grid; place-items: center; flex: 0 0 auto; width: 27px; height: 27px; border-radius: 50%; background: var(--bg-2); font-size: .8rem; font-weight: 700; }
.report-list p { margin: .3rem 0 0; color: var(--text-2); font-size: .85rem; line-height: 1.5; }
.privacy-note { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.privacy-note p { margin: .4rem 0 0; color: var(--text-2); font-size: .85rem; line-height: 1.55; }

@media (max-width: 800px) {
  .layout { grid-template-columns: 1fr; }
  .app-main { padding: 2rem 0; }
  .account { width: 100%; justify-content: space-between; }
}
@media (max-width: 480px) {
  .app-main { width: min(100% - 1.5rem, 1180px); }
  .panel, .auth-card { padding: 1.15rem; }
  .dropzone { min-height: 190px; }
}
@media (prefers-reduced-motion: reduce) {
  .spinner { animation-duration: 1.6s; }
  .btn, .dropzone { transition: none; }
}
