/* Shared Chase Ops polish. Darker surfaces, same orange and blue, no new logo. */
:root {
  --bg-deep: #03050b;
  --bg: #070b14;
  --bg-card: #0c121c;
  --border: #1c2838;
  --border-strong: #31445f;
  --text: #f4f7fb;
  --text-muted: #c5d2e4;
  --text-dim: #9aadc4;
}

body, .app {
  background:
    radial-gradient(ellipse 80% 36% at 0% -10%, rgba(255, 120, 20, 0.22), transparent 50%),
    radial-gradient(ellipse 60% 32% at 100% 0%, rgba(80, 180, 255, 0.16), transparent 46%),
    var(--bg-deep);
}

html:has(.login-body) {
  overflow-x: hidden;
}

.login-body {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  margin: 0;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  padding: calc(20px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px));
  background-color: #070708;
  overflow-x: hidden;
}

.login-hero-photo {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% 36%;
  pointer-events: none !important;
}

.login-hero-shade {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none !important;
  background:
    linear-gradient(180deg, rgba(7, 7, 8, 0.28) 0%, rgba(7, 7, 8, 0.12) 34%, rgba(7, 7, 8, 0.55) 100%),
    radial-gradient(ellipse 70% 50% at 60% 18%, rgba(246, 81, 0, 0.28), transparent 55%);
}

.login-badge {
  width: min(250px, 70vw);
  aspect-ratio: 1;
  height: auto;
  margin: 0 auto 14px;
  border-radius: 50%;
  background: #07080d;
  border: 2px solid rgba(246, 81, 0, 0.7);
  box-shadow:
    0 0 0 1px rgba(246, 81, 0, 0.35),
    0 0 14px rgba(246, 81, 0, 0.9),
    0 0 32px rgba(246, 81, 0, 0.45);
  display: grid;
  place-items: center;
  padding: 14%;
  box-sizing: border-box;
  overflow: hidden;
}

.login-logo {
  display: block;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  max-height: 100%;
  margin: 0;
  object-fit: contain;
  object-position: center center;
  filter: none;
  pointer-events: none;
}

.pw-wrap {
  position: relative;
  display: block;
}

.pw-wrap input {
  width: 100%;
  padding-right: 4.5rem;
}

.pw-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #ffb15a;
  display: grid;
  place-items: center;
}

.pw-toggle svg {
  width: 22px;
  height: 22px;
  display: block;
}

.password-rules {
  list-style: none;
  margin: 0;
  padding: 0;
  text-align: left;
}

.password-rules li[data-ok="false"] { color: #ffb4a8; }
.password-rules li[data-ok="true"] { color: #9dffc8; }

.form-ok { color: #9dffc8; margin: 0; }

.match-note[data-ok="false"] { color: #ffb4a8; }
.match-note[data-ok="true"] { color: #9dffc8; }

.login-card, #login-screen {
  width: min(420px, 100%);
  margin: 0 auto;
  padding: 28px 22px 24px;
  border-radius: 18px;
  background: rgba(8, 12, 20, 0.92);
  border: 1px solid var(--border-strong);
  box-shadow: 0 0 0 1px rgba(80, 180, 255, 0.18), 0 18px 50px rgba(0, 0, 0, 0.45);
}

#login-screen {
  position: fixed;
  inset: 0;
  z-index: 40;
  width: auto;
  max-width: none;
  border: 0;
  border-radius: 0;
  display: grid;
  place-items: center;
  padding: 24px 16px calc(24px + env(safe-area-inset-bottom, 0px));
}

#login-screen[hidden], .app[hidden] { display: none !important; }

#login-screen .login-card { box-shadow: 0 0 24px rgba(255, 120, 20, 0.18); }

.primary, .text-btn.solid, .checkin-submit, .tab.is-active {
  box-shadow: 0 0 16px rgba(255, 120, 20, 0.45);
}

button, .tab, .text-btn, .map-fit-btn, .primary {
  min-height: 44px;
}

button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid #8fd4ff;
  outline-offset: 2px;
}

.tabbar {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.panel-head h2, .login-card h1, #login-screen h1 {
  letter-spacing: 0.02em;
}

.fine, .checkin-fine, .refresh-note, .map-legend {
  color: var(--text-dim);
}

.welcome-line {
  margin: 0 0 8px;
  font-family: var(--display, "Barlow Condensed", sans-serif);
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #fff;
  text-shadow: 0 0 12px rgba(80, 180, 255, 0.45);
}

/* One darker surface for the root board, phone tabs, check-in, and admin. */
.dashboard,
.wrap,
.app,
.panel,
.checkin-card,
.checkin-panel,
.alert-item,
.alert-card,
.alert-state,
.chat-browser,
.chat-log,
.admin-card,
.login-card {
  background-color: var(--bg-card);
  border-color: var(--border);
}

.panel,
.checkin-card,
.alert-item,
.alert-card,
.chat-browser,
.admin-card {
  box-shadow: none;
}

.feed-banner,
.app-bar,
.topbar {
  background: rgba(3, 5, 11, 0.92);
  border-color: var(--border);
}

.nav-pill,
.tab {
  min-height: 44px;
  color: var(--text-muted);
  background: transparent;
  box-shadow: none;
}

.nav-pill.active,
.tab.is-active,
.tab[aria-selected="true"] {
  color: #fff;
  box-shadow: 0 0 16px rgba(255, 120, 20, 0.45);
}

.tabbar {
  background: #05070d;
  border-top: 1px solid var(--border-strong);
}

input,
textarea,
select {
  background: #080d16;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  min-height: 44px;
}

.panel-head h2,
.alerts-title,
.checkin-panel h2,
.admin-card h2,
h1, h2 {
  color: #fff;
}

.form-error { color: #ffb4a8; }

#account-settings,
#pin-unlock {
  margin-top: 16px;
}

#account-settings form,
#pin-unlock {
  display: grid;
  gap: 10px;
}

#account-settings .checkin-field,
#pin-unlock .checkin-field {
  display: grid;
  gap: 4px;
}

#account-settings input,
#pin-unlock input {
  width: 100%;
}

@media (max-width: 720px) {
  .welcome-line { font-size: 1.05rem; }
  .panel { margin-inline: 0; }
}

[hidden] { display: none !important; }

/* Login is a stacked form even when the board stylesheet replaces check-in CSS. */
body.login-body .login-card form,
#app-login-form {
  display: grid;
  gap: 14px;
  width: min(420px, 100%);
  box-sizing: border-box;
}

body.login-body .field,
#app-login-form .checkin-field {
  display: grid;
  gap: 6px;
  width: 100%;
  margin: 0;
}

body.login-body .field > span,
#app-login-form .checkin-field {
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

body.login-body input,
#app-login-form input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  min-height: 48px;
}

body.login-body .brand-kicker,
body.login-body #login-title,
body.login-body #login-lead {
  text-align: center;
}

body.login-body .brand-kicker {
  margin: 0 0 10px;
  color: #f4f4f5;
  letter-spacing: 0.06em;
  text-transform: none;
  font-size: 1.15rem;
  font-weight: 700;
}

body.login-body .login-card {
  position: relative;
  z-index: 2;
  box-sizing: border-box;
  width: min(420px, 100%);
  background: rgba(22, 22, 26, 0.92);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45), 0 0 32px rgba(246, 81, 0, 0.28);
}

body.login-body .field,
body.login-body .field > span,
body.login-body #login-error {
  text-align: left;
}

body.login-body .primary,
#app-login-form button[type="submit"] {
  display: block;
  width: 100%;
  min-height: 52px;
  margin: 0;
  border: 0;
  border-radius: 12px;
  background: #f65100;
  color: #ffffff;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 0 16px rgba(255, 120, 20, 0.45);
}

/* Greeting sits on its own line. Brand and clock stay in the bar. */
.welcome-line {
  display: block;
  margin: 0;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 12px 0;
  font-size: 1.05rem;
  line-height: 1.25;
  max-width: 100%;
  overflow-wrap: anywhere;
}

.app-bar {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  column-gap: 8px;
  row-gap: 0;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  padding-top: 8px;
}

.app-brand { display: contents; }

.app-logo {
  grid-row: 1 / span 2;
  grid-column: 1;
  width: 44px;
  height: 44px;
}

.app-kicker {
  grid-row: 1;
  grid-column: 2;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.08em;
  font-size: 11px;
}

.app-brand h1 {
  grid-row: 2;
  grid-column: 2;
  min-width: 0;
  font-size: clamp(15px, 4.2vw, 22px);
  line-height: 1.05;
  letter-spacing: 0.01em;
  overflow-wrap: anywhere;
}

.app-clock {
  grid-row: 1;
  grid-column: 3;
  justify-self: end;
  font-size: 12px;
  white-space: nowrap;
}

.topbar, .brand, .brand-text, .app, .stage, .panel {
  min-width: 0;
  max-width: 100%;
}

.brand-text h1, .brand-sub {
  overflow-wrap: anywhere;
}

@media (max-width: 520px) {
  .brand-logo { height: 44px; }
  .topbar { gap: 8px; padding-inline: 10px; }
  .chase-map { height: clamp(220px, 42vh, 360px); }
  .map-bar, .map-actions, .panel-tools, .filter-row {
    flex-wrap: wrap;
    min-width: 0;
  }
}

.watch-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: pointer;
  list-style: none;
}

.watch-panel > summary::-webkit-details-marker { display: none; }

#pin-unlock {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
}

#pin-unlock .checkin-field { display: grid; gap: 4px; }
#pin-unlock input,
#pin-unlock button { width: 100%; box-sizing: border-box; }

.status-pick {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.status-pick-btn { min-height: 44px; }

.account-disclosure { margin-top: 16px; }
.account-disclosure > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  cursor: pointer;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.account-disclosure form { display: grid; gap: 10px; margin-top: 10px; }
.account-disclosure .checkin-field { display: grid; gap: 4px; }
.account-disclosure input,
.account-disclosure button { width: 100%; box-sizing: border-box; }

.checkin-panel > h2[hidden],
.checkin-panel > .action-kicker[hidden],
#signin-form[hidden] { display: none !important; }
