:root {
  color-scheme: light;
  --navy: #0b3444;
  --petrol: #0d6670;
  --mint: #dff4ef;
  --ink: #10272f;
  --muted: #61727a;
  --paper: #f3f6f5;
  --line: #d7dfdc;
  --danger: #a62b2b;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); }
.shell { max-width: 760px; margin: 0 auto; padding: calc(22px + env(safe-area-inset-top)) 18px 42px; }
header, .section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
header { margin-bottom: 22px; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; color: var(--navy); font-size: 30px; letter-spacing: -.03em; }
h2 { margin-bottom: 8px; font-size: 19px; }
.eyebrow { margin-bottom: 4px; color: var(--petrol); font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.card, .metric { background: #fff; border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 8px 28px rgba(11,52,68,.06); }
.card { padding: 20px; margin-bottom: 16px; }
.summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.metric { padding: 16px; }
.metric span { display: block; min-height: 34px; color: var(--muted); font-size: 12px; }
.metric strong { display: block; color: var(--navy); font-size: 28px; }
.pill { padding: 7px 10px; border-radius: 99px; font-size: 12px; font-weight: 700; }
.pill.ok { background: var(--mint); color: #135d4a; }
.pill.pending { background: #fff2d7; color: #805b10; }
input { width: 100%; padding: 13px; border: 1px solid var(--line); border-radius: 12px; font: inherit; }
input[type="file"]::file-selector-button { margin-right: 10px; border: 0; border-radius: 9px; padding: 9px 11px; background: var(--mint); color: var(--navy); font: inherit; font-weight: 750; }
button { border: 0; border-radius: 12px; padding: 12px 15px; background: var(--petrol); color: #fff; font: inherit; font-weight: 750; }
button.secondary { background: var(--navy); }
button:disabled { opacity: .45; }
.login form { display: grid; grid-template-columns: 1fr; gap: 8px; }
.login label { color: var(--muted); font-size: 13px; font-weight: 700; }
.actions { display: flex; gap: 10px; }
.logout-form { display: flex; justify-content: flex-end; margin: -8px 0 12px; }
.text-button { padding: 6px 2px; background: transparent; color: var(--petrol); font-size: 12px; }
.result { overflow: auto; margin: 14px 0 0; padding: 12px; border-radius: 12px; background: #0d2832; color: #dff4ef; font-size: 12px; white-space: pre-wrap; }
.top-gap { margin-top: 14px; }
.hint { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.install-help { border-color: #e4c16b; background: #fffaf0; }
.install-help ol { margin: 12px 0 0; padding-left: 22px; }
.install-help li + li { margin-top: 7px; }
.list { margin-top: 12px; }
.batch { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.batch small { display: block; color: var(--muted); word-break: break-all; }
.batch a { color: var(--petrol); font-weight: 750; }
.login-flow {
  position: fixed; inset: 0; z-index: 1000; overflow: auto;
  padding: max(18px, env(safe-area-inset-top)) 14px max(18px, env(safe-area-inset-bottom));
  background: rgba(7, 35, 47, .82); backdrop-filter: blur(5px);
}
.login-flow[hidden] { display: none; }
.login-flow-card {
  width: min(620px, 100%); margin: 0 auto; padding: 20px;
  border-radius: 20px; background: #fff; box-shadow: 0 18px 50px rgba(0,0,0,.3);
}
#iys-login-frame {
  width: 100%; min-height: min(660px, 72vh); border: 0; border-radius: 14px;
  background: #eef5f4;
}
#iys-login-frame[hidden] { display: none; }
@media (max-width: 560px) {
  .summary { grid-template-columns: 1fr; }
  .metric { display: flex; justify-content: space-between; align-items: center; }
  .metric span { min-height: 0; }
  .actions { flex-direction: column; }
  .login-flow-card { padding: 16px; }
  #iys-login-frame { min-height: 68vh; }
}
