:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #14213d;
  background: #f4f7fb;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 320px; }
button, input, textarea { font: inherit; }
button, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.5rem;
  border: 0;
  border-radius: .45rem;
  padding: .55rem .85rem;
  cursor: pointer;
  background: #075985;
  color: #fff;
  font-weight: 650;
  text-decoration: none;
}
button:hover, .button:hover { background: #064c70; }
button.quiet { background: #e5eef5; color: #0f3f5b; }
button.quiet:hover { background: #d3e3ef; }
button.danger { background: #b42318; }
button.danger:hover { background: #8f1b12; }
input, textarea {
  width: 100%;
  border: 1px solid #a8bdce;
  border-radius: .4rem;
  padding: .55rem .65rem;
  background: #fff;
  color: #14213d;
}
textarea { resize: vertical; }
label { display: block; margin: 1rem 0 .35rem; font-weight: 650; }
small, .muted { color: #50667a; font-size: .9rem; }
code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
pre { overflow: auto; padding: .7rem; background: #eff5fa; border-radius: .35rem; }

.shell { max-width: 1150px; margin: 0 auto; padding: 2.25rem 1.25rem 4rem; }
.masthead { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.5rem; }
.eyebrow { color: #075985; font-size: .8rem; font-weight: 750; letter-spacing: .12em; margin: 0 0 .35rem; text-transform: uppercase; }
h1, h2, h3 { margin: 0; line-height: 1.16; }
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
.lede { margin: .65rem 0 0; color: #50667a; max-width: 45rem; }
.session-actions { display: flex; align-items: center; gap: .65rem; }

.panel, .notice { background: #fff; border: 1px solid #dbe6ee; border-radius: .7rem; box-shadow: 0 4px 16px rgb(26 57 78 / 6%); }
.panel { padding: 1.25rem; margin-top: 1.25rem; }
.notice { padding: .85rem 1rem; margin-bottom: 1rem; }
.notice[data-kind="success"] { border-color: #76c893; background: #f0fdf4; color: #166534; }
.notice[data-kind="warning"] { border-color: #f2c46d; background: #fffbeb; color: #92400e; }
.notice[data-kind="error"] { border-color: #f5a5a0; background: #fff1f0; color: #9f1239; }
.login-panel { max-width: 34rem; }
.login-panel p { color: #50667a; }
.workflow-note { border-left: 4px solid #0ea5a4; }
.workflow-note ol { padding-left: 1.25rem; margin-bottom: .6rem; }
.workflow-note p { color: #50667a; margin-bottom: 0; }
.layout { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(260px, .9fr); gap: 1.25rem; }
.documentation-panel dl { margin: 1rem 0; }
.documentation-panel dt { color: #075985; font-weight: 700; margin-top: .7rem; }
.documentation-panel dd { margin: .2rem 0; color: #50667a; }
.optional { color: #50667a; font-weight: 400; }
.panel-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: start; }
.panel-heading p { margin: .4rem 0 0; }
.camera-list { display: grid; gap: .8rem; margin-top: 1rem; }
.camera-card { padding: 1rem; border: 1px solid #dbe6ee; border-radius: .5rem; }
.camera-card h3 { display: flex; gap: .5rem; align-items: center; }
.camera-metadata { display: grid; grid-template-columns: minmax(8rem, 13rem) 1fr; gap: .45rem .8rem; margin: .9rem 0; }
.camera-metadata dt { color: #50667a; }
.camera-metadata dd { margin: 0; overflow-wrap: anywhere; }
.mapping summary { cursor: pointer; color: #075985; font-weight: 650; }
.mapping p { margin: .65rem 0 0; color: #50667a; }
.camera-actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1rem; }
.state { padding: .18rem .45rem; border-radius: 999px; font-size: .75rem; font-weight: 750; text-transform: uppercase; }
.state-pending { background: #fff4d6; color: #854d0e; }
.state-active { background: #dcfce7; color: #166534; }
.state-disabled { background: #fee2e2; color: #991b1b; }
.audit-list { overflow-x: auto; margin-top: 1rem; }
table { border-collapse: collapse; width: 100%; min-width: 600px; font-size: .9rem; }
th, td { padding: .55rem .45rem; border-bottom: 1px solid #dbe6ee; text-align: left; vertical-align: top; }
th { color: #50667a; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }

dialog { width: min(680px, calc(100vw - 2rem)); border: 0; border-radius: .7rem; box-shadow: 0 24px 70px rgb(0 0 0 / 30%); padding: 1.5rem; color: #14213d; }
dialog::backdrop { background: rgb(10 30 45 / 55%); }
.dialog-close { display: flex; justify-content: flex-end; margin: -1rem -1rem -.4rem; }
.dialog-close button { min-height: 2rem; background: transparent; color: #50667a; font-size: 1.6rem; padding: .2rem .65rem; }
.warning { padding: .75rem; border-left: 3px solid #d97706; background: #fffbeb; color: #854d0e; }
.copy-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; align-items: start; }
.copy-row textarea { overflow-wrap: anywhere; }

@media (max-width: 700px) {
  .shell { padding: 1.25rem .8rem 2.5rem; }
  .masthead, .panel-heading { flex-direction: column; }
  .layout { grid-template-columns: 1fr; }
  .camera-metadata { grid-template-columns: 1fr; gap: .15rem; }
  .camera-metadata dd { margin-bottom: .55rem; }
  .copy-row { grid-template-columns: 1fr; }
}
