/* CORA Records Review - base styles. Same palette/shell approach as the AI
   Hub (app.css there), trimmed to what a single-org tool needs: no per-org
   theming, no multi-section site nav, just masthead + sign out. */

:root {
  color-scheme: light dark;

  --mountain-blue: #002E6D;
  --medium-blue:   #0055B8;
  --sky-blue:      #3D7CC9;
  --light-blue:    #95D4E9;
  --sunrise:       #FFD600;
  --white:         #FFFFFF;
  --ink:           #14243d;

  --brand-primary: var(--mountain-blue);
  --brand-accent:  var(--sunrise);
  --brand-link:    var(--medium-blue);
  --brand-secondary: var(--sky-blue);
  --brand-tint:    var(--light-blue);

  --bg:      #ffffff;
  --surface: #f4f7fb;
  --border:  #d5deea;
  --text:    var(--ink);
  --heading: var(--brand-primary);
  --link:    var(--brand-link);
  --focus:   #b8007a;
  --muted-text: #5A6B85;

  --status-warning:  #a86400;
  --status-good:     #1a7f37;
  --status-critical: #cf222e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg:      #0d1626;
    --surface: #152135;
    --border:  #2a3a54;
    --text:    #e8eef7;
    --heading: var(--light-blue);
    --link:    #8fc0f0;
    --focus:   #ffd600;
    --muted-text: #A9B8CE;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Figtree", "Proxima Nova", Arial, sans-serif;
  line-height: 1.6;
}

h1, h2, h3 { color: var(--heading); line-height: 1.2; }
h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); margin: 0 0 .5rem; }
h2 { font-size: 1.35rem; margin: 1.5rem 0 .5rem; }

a { color: var(--link); }
a:hover { text-decoration: underline; }

a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 3px;
}
.masthead a:focus-visible, .masthead button:focus-visible, .masthead .btn:focus-visible {
  outline-color: #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .4);
}

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand-primary); color: var(--white);
  padding: .6rem 1rem; z-index: 100;
}
.skip-link:focus { left: .5rem; top: .5rem; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 1.5rem .75rem 3rem; }

/* Masthead */
.masthead { background: var(--brand-primary); color: var(--white); }
.masthead__inner {
  padding: .4rem 1.25rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}
.brand { display: inline-flex; align-items: center; color: var(--white); text-decoration: none; justify-self: start; }
.brand:hover { text-decoration: none; }
.brand__logo { height: 2.8rem; width: auto; display: block; flex: 0 0 auto; }
.masthead__title { font-size: 1.15rem; font-weight: 700; text-align: center; white-space: nowrap; }
.masthead__nav { justify-self: end; display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; }
@media (max-width: 720px) {
  .masthead__inner { grid-template-columns: auto 1fr; }
  .masthead__title { display: none; }
}
.masthead__who { color: var(--brand-tint); font-size: .9rem; }

.avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; vertical-align: middle; }
.avatar--initials { display: inline-flex; align-items: center; justify-content: center; background: var(--brand-secondary); color: #fff; font-weight: 700; font-size: .8rem; line-height: 1; }
.masthead .avatar { box-shadow: 0 0 0 2px rgba(255,255,255,.35); }

.btn { display: inline-block; padding: .5rem .9rem; border-radius: .4rem; font-weight: 700; text-decoration: none; cursor: pointer; border: 2px solid transparent; font-size: .9rem; }
.btn--primary { background: var(--brand-link); color: var(--white); }
.btn--primary:hover { background: #00478f; text-decoration: none; }
.btn--ghost { background: transparent; border-color: currentColor; color: var(--white); }
.masthead .btn--ghost { color: var(--white); }
.wrap .btn--ghost { color: var(--link); }
.wrap .btn--ghost:hover { background: var(--surface); text-decoration: none; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

footer.foot { color: var(--muted-text); font-size: .85rem; text-align: center; padding: 1.5rem 0; }

/* Content chrome shared by tickets/upload pages */
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid var(--border); vertical-align: top; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px; margin-bottom: 20px; }

.tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin: 18px 0; }
.tile { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; background: var(--surface); }
.tile .value { font-size: 22px; font-weight: 700; color: var(--heading); }
.tile .label { font-size: 12px; color: var(--muted-text); }

.status-pill { border: none; border-radius: 6px; padding: 4px 8px; font-size: 12px; cursor: pointer; }
.status-not-reviewed  { background: color-mix(in srgb, var(--status-warning) 22%, var(--surface)); }
.status-responsive    { background: color-mix(in srgb, var(--status-good) 22%, var(--surface)); }
.status-not-responsive{ background: var(--border); }
.status-redact         { background: color-mix(in srgb, var(--status-critical) 22%, var(--surface)); }

.gate-warning { background: color-mix(in srgb, var(--status-warning) 15%, var(--surface)); border: 1px solid var(--status-warning); border-radius: 8px; padding: 10px 14px; }

.state-queued  { color: var(--status-warning); }
.state-running { color: var(--link); }
.state-done    { color: var(--status-good); }
.state-failed  { color: var(--status-critical); }
.msg-error { color: var(--status-critical); }
.msg-ok { color: var(--status-good); }

fieldset { border: 1px solid var(--border); border-radius: 8px; padding: 16px; margin-bottom: 24px; }
label { display: block; margin: 10px 0 4px; font-weight: 600; }
