/* NC AIA Team Resources - shell styles
   Brand: coral #EF4133 / #FC6261, teal #2D7D9A / #336672, charcoal #3A3A3C,
   yellow #F5D62B, green #18A850, sky blue #66CCE3 */

:root {
  --teal: #2D7D9A;
  --teal-dark: #336672;
  --coral: #EF4133;
  --coral-soft: #FC6261;
  --charcoal: #3A3A3C;
  --green: #18A850;
  --yellow: #F5D62B;
  --sky: #66CCE3;
  --bg: #F4F6F7;
  --card: #FFFFFF;
  --line: #DDE3E6;
  --muted: #6B7275;
  --radius: 14px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--charcoal);
  font: 16px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}

.topbar {
  background: var(--teal);
  color: #fff;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  border-bottom: 4px solid var(--coral);
}
.brand { display: flex; align-items: center; gap: 12px; max-width: 560px; margin: 0 auto; }
.brand-mark { border-radius: 9px; background: #fff; }
.brand-name { font-weight: 700; font-size: 17px; line-height: 1.2; }
.brand-sub { font-size: 13px; opacity: .85; }

.wrap { max-width: 560px; margin: 0 auto; padding: 16px; display: grid; gap: 14px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.card h1 { margin: 0 0 6px; font-size: 22px; }
.card h2 { margin: 0; font-size: 17px; }
.card p { margin: 0 0 12px; }

.muted { color: var(--muted); }
.small { font-size: 14px; }

.gsi-slot { min-height: 48px; display: flex; align-items: center; justify-content: center; margin: 16px 0 4px; }

.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin: 14px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.stack { display: grid; gap: 10px; }
label { font-weight: 600; font-size: 15px; }
input {
  font: inherit;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  width: 100%;
  background: #fff;
}
input:focus { outline: 3px solid rgba(45, 125, 154, .25); border-color: var(--teal); }
#code-input { letter-spacing: 6px; font-size: 22px; text-align: center; }

.btn {
  font: inherit; font-weight: 600;
  border: 0; border-radius: 10px;
  padding: 12px 16px;
  background: var(--teal); color: #fff;
  cursor: pointer;
  min-height: 46px;
}
.btn:active { background: var(--teal-dark); }
.btn[disabled] { opacity: .6; cursor: default; }
.btn-secondary { background: #fff; color: var(--teal); border: 1.5px solid var(--teal); }
.btn-small { min-height: 34px; padding: 6px 12px; font-size: 14px; }
.btn.is-busy { position: relative; color: transparent; }
.btn.is-busy::after {
  content: ""; position: absolute; inset: 0; margin: auto;
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.5); border-top-color: #fff;
  animation: spin .7s linear infinite;
}
.btn-secondary.is-busy::after { border-color: rgba(45,125,154,.3); border-top-color: var(--teal); }
@keyframes spin { to { transform: rotate(360deg); } }

.link-btn { background: none; border: 0; color: var(--teal); font: inherit; text-decoration: underline; padding: 4px; cursor: pointer; justify-self: start; }

.banner { border-radius: 10px; padding: 12px 14px; font-size: 15px; }
.banner.error { background: #FDECEA; color: #8A1F16; border: 1px solid #F5C2BD; }
.banner.info { background: #E8F4F8; color: #1F5568; border: 1px solid #BFE0EA; }
.banner.ok { background: #E7F6EC; color: #11652F; border: 1px solid #BDE5C9; }

.tip { border-left: 5px solid var(--yellow); }
.tip p { margin: 6px 0 0; }

.diag-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.diag dl { margin: 8px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; font-size: 13px; }
.diag dt { color: var(--muted); }
.diag dd { margin: 0; word-break: break-word; }

.visually-hidden { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
[hidden] { display: none !important; }
