:root {
  color-scheme: dark;
  --bg: #0b1111;
  --bg-2: #101817;
  --panel: rgba(255, 255, 255, 0.06);
  --panel-strong: rgba(255, 255, 255, 0.09);
  --field: rgba(7, 13, 13, 0.74);
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.18);
  --text: #f2f7ef;
  --muted: rgba(242, 247, 239, 0.68);
  --soft: rgba(242, 247, 239, 0.48);
  --green: #8fd58b;
  --amber: #d58b1d;
  --blue: #5ca8ff;
  --violet: #b8a1ff;
  --cyan: #8fe2df;
  --red: #f87268;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.34);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    linear-gradient(140deg, rgba(24, 48, 42, 0.7), rgba(8, 12, 12, 0.82) 38%, rgba(25, 31, 36, 0.78)),
    radial-gradient(circle at 18% 8%, rgba(143, 213, 139, 0.16), transparent 28%),
    radial-gradient(circle at 84% 18%, rgba(213, 139, 29, 0.13), transparent 24%),
    var(--bg);
}

body {
  min-height: 100vh;
}

button,
input {
  font: inherit;
}

textarea {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  width: min(1220px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 20px 20px 112px;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.back-button,
.icon-button,
.glass-tab,
.card-button,
.feedback-card,
.search-choice,
.segment,
.row-button,
.list-card--button,
.note-card,
.row-main--button,
.inline-title,
.speaker-name--button,
.pill-button {
  appearance: none;
  border: 0;
  cursor: pointer;
}

.back-button,
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.icon-button--compact {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

.icon-button.is-favorite {
  color: var(--amber);
}

.topbar__copy {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--amber);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 8px;
  font-size: clamp(30px, 5vw, 48px);
  line-height: 1.05;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 10px;
  font-size: 24px;
  line-height: 1.14;
}

h3 {
  margin-bottom: 6px;
  font-size: 16px;
}

.lead,
.muted {
  color: var(--muted);
  line-height: 1.48;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.card-button,
.feedback-card,
.info-card,
.list-card,
.room-card,
.active-widget,
.status-card {
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.card-button {
  display: flex;
  min-height: 172px;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 18px;
  text-align: left;
  transition: transform 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.feedback-card,
.search-choice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  width: 100%;
  margin-top: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  color: inherit;
  text-align: left;
}

.feedback-card__main,
.search-choice__main {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.search-choice-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.callsign-result {
  margin: 12px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
}

.callsign-result.is-active,
.note-card--active {
  border-color: rgba(143, 213, 139, 0.42);
  background: rgba(143, 213, 139, 0.12);
}

.search-links {
  margin: 12px 0;
}

.filter-panel {
  display: grid;
  gap: 10px;
  margin: 16px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(0, 0, 0, 0.16);
}

.range-picker {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin: 16px 0;
}

.card-button:hover,
.row-button:hover,
.pill-button:hover,
.glass-tab:hover {
  transform: translateY(-1px);
  border-color: var(--line-strong);
  background: var(--panel-strong);
}

.card-button--wide {
  grid-column: 1 / -1;
  min-height: 128px;
}

.card-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--accent, var(--green));
  font-size: 20px;
}

.card-label,
.metric-label,
.row-kicker,
.mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.card-label {
  color: var(--accent, var(--green));
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-value {
  font-size: 30px;
  font-weight: 800;
}

.card-subtitle {
  margin: auto 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.active-widget-wrap {
  padding: 10px 0 20px;
}

.active-widget {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px;
  text-align: left;
}

.account-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 44%);
  gap: 22px;
  align-items: center;
  margin-top: 12px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.account-panel__copy {
  min-width: 0;
}

.account-form,
.account-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.account-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-width: 0;
  width: 100%;
}

.account-form .pill-button {
  min-height: 46px;
  padding-inline: 18px;
  white-space: nowrap;
}

.account-status {
  margin: 10px 0 0;
  color: var(--green);
  font-size: 13px;
  font-weight: 700;
}

.account-status--error {
  color: var(--red);
}

.active-widget__main {
  flex: 1;
  min-width: 0;
}

.active-widget__label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 800;
}

.toolbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin: 16px 0;
}

.segmented-control {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  margin: 16px 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.055);
}

.segment {
  min-height: 38px;
  border-radius: 14px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.segment.is-active {
  background: rgba(255, 255, 255, 0.14);
  color: var(--text);
}

.search-field,
.select-field {
  min-width: 0;
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border-radius: 18px;
  border: 1px solid var(--line);
  color: var(--text);
  background: var(--field);
  outline: none;
}

.search-field:focus,
.select-field:focus {
  border-color: rgba(143, 213, 139, 0.48);
}

.pill-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel);
  font-weight: 800;
}

.pill-button--danger {
  background: rgba(248, 114, 104, 0.18);
  border-color: rgba(248, 114, 104, 0.34);
}

.list {
  display: grid;
  gap: 10px;
}

.list-card--button {
  color: inherit;
  cursor: pointer;
}

.row-button,
.list-card {
  width: 100%;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel);
  text-align: left;
}

.row-button {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 12px;
}

.callsign-card {
  align-items: stretch;
}

.row-main--button {
  display: grid;
  min-width: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.row-flag {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  font-size: 23px;
}

.row-main {
  min-width: 0;
}

.row-title {
  overflow: hidden;
  margin: 0 0 4px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.row-subtitle,
.row-kicker {
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  text-overflow: ellipsis;
}

.row-kicker {
  color: var(--green);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 5px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.badge--live {
  background: rgba(143, 213, 139, 0.9);
  color: #0c1312;
}

.badge--new {
  background: rgba(213, 139, 29, 0.92);
  color: #111;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 10px;
}

.room-hero {
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(143, 213, 139, 0.22);
  background:
    linear-gradient(145deg, rgba(143, 213, 139, 0.12), transparent 46%),
    var(--panel);
}

.speaker-line {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
}

.speaker-actions,
.row-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.speaker-flag {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  font-size: 28px;
}

.speaker-name {
  margin: 0;
  font-size: clamp(24px, 5vw, 34px);
  font-weight: 900;
}

.speaker-name--button,
.inline-title {
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.inline-title {
  display: block;
  overflow: hidden;
  width: 100%;
  margin: 0 0 4px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.meta-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 14px;
}

.metric {
  min-width: 0;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid var(--line);
}

.metric-label {
  display: block;
  margin-bottom: 5px;
  color: var(--soft);
  font-size: 11px;
  text-transform: uppercase;
}

.metric-value {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 800;
}

.status-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 0;
  padding: 14px;
}

.note-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  margin: 12px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  color: inherit;
  text-align: left;
}

.note-card__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--amber);
  font-weight: 900;
}

.note-card__main {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.empty {
  padding: 28px 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 20px;
  color: var(--muted);
  text-align: center;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 5, 5, 0.72);
  backdrop-filter: blur(16px);
}

.modal {
  width: min(560px, 100%);
  padding: 18px;
  border: 1px solid var(--line-strong);
  border-radius: 24px;
  background: rgba(15, 23, 22, 0.96);
  box-shadow: var(--shadow);
}

.modal--wide {
  width: min(760px, 100%);
  max-height: min(86vh, 860px);
  overflow: auto;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.note-form {
  display: grid;
  gap: 12px;
}

.note-field {
  min-height: 150px;
  width: 100%;
  resize: vertical;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  color: var(--text);
  background: var(--field);
  outline: none;
}

.note-field:focus {
  border-color: rgba(143, 213, 139, 0.48);
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.callsign-detail__header {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
}

.detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr);
  gap: 12px;
  margin-bottom: 12px;
}

.detail-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
}

.detail-line {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 10px;
  margin-top: 9px;
}

.detail-line span {
  color: var(--soft);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 800;
}

.detail-line strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.external-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.pill-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.detail-link {
  margin-top: 12px;
}

.about-text {
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.55;
}

.about-text h1 {
  color: var(--text);
}

.about-text h2 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
}

.about-text strong {
  color: var(--text);
}

.credit-card {
  display: grid;
  gap: 12px;
}

.credit-card__header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.credit-card .pill-link {
  justify-self: start;
  margin-top: 2px;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, minmax(58px, 1fr));
  gap: 4px;
  width: min(620px, calc(100vw - 28px));
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(39, 48, 48, 0.72);
  box-shadow: var(--shadow);
  transform: translateX(-50%);
  backdrop-filter: blur(20px);
}

.legal-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  margin: 24px auto 8px;
  color: var(--soft);
  font-size: 12px;
}

.legal-footer button {
  appearance: none;
  border: 0;
  padding: 4px 2px;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.legal-footer button:hover {
  color: var(--text);
}

.glass-tab {
  display: grid;
  place-items: center;
  gap: 3px;
  min-width: 0;
  min-height: 58px;
  border-radius: 999px;
  background: transparent;
  border: 1px solid transparent;
}

.glass-tab.is-active {
  border-color: rgba(255, 255, 255, 0.22);
  background:
    linear-gradient(150deg, rgba(255, 255, 255, 0.24), rgba(143, 213, 139, 0.13)),
    rgba(255, 255, 255, 0.07);
}

.glass-tab__icon {
  font-size: 18px;
  line-height: 1;
}

.glass-tab__label {
  overflow: hidden;
  max-width: 54px;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 800;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0;
}

.switch {
  width: 44px;
  height: 26px;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.switch::before {
  content: "";
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.16s ease;
}

.toggle-row input {
  position: absolute;
  opacity: 0;
}

.toggle-row input:checked + .switch {
  background: var(--green);
}

.toggle-row input:checked + .switch::before {
  transform: translateX(18px);
}

@media (max-width: 1120px) {
  .account-panel {
    grid-template-columns: 1fr;
  }

  .account-form,
  .account-actions {
    justify-content: stretch;
    width: 100%;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 18px 14px 108px;
  }

  .dashboard-grid,
  .toolbar,
  .meta-grid {
    grid-template-columns: 1fr;
  }

  .card-button {
    min-height: 134px;
  }

  .row-button {
    grid-template-columns: auto 1fr;
  }

  .note-card,
  .detail-grid {
    grid-template-columns: 1fr;
  }

  .row-button > .badge,
  .row-button > .icon-button,
  .row-button > .row-actions {
    grid-column: 2;
    justify-self: start;
  }

  .speaker-line {
    grid-template-columns: auto 1fr;
  }

  .speaker-line .badge {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .speaker-actions {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .status-card,
  .status-actions,
  .account-panel,
  .account-form,
  .account-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .status-actions,
  .account-form,
  .account-actions {
    width: 100%;
  }

  .account-panel {
    display: flex;
  }

  .account-form {
    display: grid;
    grid-template-columns: 1fr;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }
}
