@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@300;400;500&display=swap");

:root {
  --bg: #090d0f;
  --panel: #12181b;
  --panel-2: #1a2228;
  --panel-3: #0d1215;
  --line: rgba(255, 255, 255, 0.08);
  --text: #e8e2d8;
  --muted: #777380;
  --orange: #ff9406;
  --orange-glow: rgba(255, 148, 6, 0.22);
  --blue: #27aae1;
  --green: #3cb93c;
  --green-glow: rgba(60, 185, 60, 0.22);
  --storm: #f5ae6c;
  --storm-deep: #a45625;
  --storm-text: #130c02;
  --red: #cc1225;
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
  --body-font: "Barlow Condensed", "Avenir Next", sans-serif;
  --header-font: "Barlow Condensed", "Avenir Next", sans-serif;
  --row-control-height: 56px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--orange) 18%, transparent), transparent 28%),
    radial-gradient(circle at 14% 22%, color-mix(in srgb, var(--blue) 14%, transparent), transparent 24%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 82%, #101419) 0%, color-mix(in srgb, var(--bg) 92%, #020304) 100%);
  font-family: var(--body-font);
  letter-spacing: 0;
}

body.theme-light {
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--orange) 12%, transparent), transparent 28%),
    radial-gradient(circle at 14% 22%, color-mix(in srgb, var(--blue) 10%, transparent), transparent 24%),
    linear-gradient(180deg, color-mix(in srgb, var(--bg) 86%, #ffffff) 0%, color-mix(in srgb, var(--bg) 92%, #e8e0d2) 100%);
  --shadow: 0 16px 48px rgba(23, 17, 10, 0.1);
  --orange-glow: rgba(255, 148, 6, 0.044);
  --green-glow: rgba(60, 185, 60, 0.044);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  width: min(1500px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 18px 0 44px;
}

.meeting-top {
  display: grid;
  grid-template-columns: minmax(280px, 0.7fr) minmax(520px, 1.3fr);
  gap: 12px;
  align-items: stretch;
}

.title-block,
.timer-strip,
.controls-bar,
.meeting-sheet,
.config-panel,
.phase-pill {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.008)), var(--panel);
  box-shadow: var(--shadow);
}

.title-block {
  padding: 18px;
  display: grid;
  gap: 10px;
}

.title-block-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.meeting-logo {
  max-width: min(100%, 100px);
  max-height: 58px;
  object-fit: contain;
}

.team-display {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.theme-toggle {
  width: 40px;
  padding: 0;
}

.eyebrow,
.field span,
.timer-strip span,
.row-note span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2.6rem, 5vw, 4.8rem);
  font-weight: 500;
  line-height: 0.88;
  text-transform: uppercase;
  font-family: var(--header-font);
}

h2 {
  font-size: 1.85rem;
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
  font-family: var(--header-font);
}

.timer-strip {
  display: grid;
  grid-template-columns: minmax(220px, 0.9fr) minmax(380px, 1.3fr) auto;
  gap: 10px;
  align-items: center;
  padding: 14px;
}

.clock-controls {
  display: grid;
  gap: 6px;
  align-self: center;
  align-items: center;
}

.clock-button,
#reset-clock {
  width: 40px;
  min-width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
}

.clock-button i,
#reset-clock i {
  font-size: 0.92rem;
}

.timer-strip div {
  display: grid;
  gap: 3px;
}

.timer-strip strong {
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1;
  text-transform: uppercase;
}

.meeting-meta {
  align-self: stretch;
  padding-right: 8px;
}

.score-card {
  display: grid;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.score-top,
.score-bottom {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: start;
}

.score-top > div,
.score-bottom > div {
  align-content: start;
}

.score-top strong {
  font-size: 2.2rem;
  line-height: 0.9;
}

.score-top small,
.score-bottom small {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 400;
}

#achieved-percent {
  transition: color 0.4s ease;
}

.band-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: color 0.4s ease;
}

.score-label-row {
  display: inline-flex;
  align-items: center;
  min-height: 1rem;
}

.band-track {
  position: relative;
  height: 5px;
  border-radius: 3px;
  overflow: visible;
  background: linear-gradient(
    to right,
    #cc1225 0% 64%,
    #ff7100 64% 75%,
    #ff9406 75% 86%,
    #3cb93c 86% 99.4%,
    #27aae1 99.4% 100%
  );
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.4);
}

.band-needle {
  position: absolute;
  top: 50%;
  left: 0%;
  width: 3px;
  height: 18px;
  border-radius: 2px;
  background: #fff;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.2);
  transition: left 0.5s cubic-bezier(0.34, 1.4, 0.64, 1);
}

.score-bottom strong {
  font-size: 1rem;
}

.primary,
.secondary,
.ghost,
.icon-button,
.tab,
.yes-no button,
.parking-button {
  min-height: 40px;
  border-radius: 10px;
  border: 1px solid transparent;
  padding: 9px 14px;
  font-weight: 500;
  text-transform: uppercase;
  transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.primary {
  color: #0a0500;
  background: var(--orange);
  box-shadow: 0 6px 20px var(--orange-glow), 0 2px 6px rgba(255, 148, 6, 0.12);
}

.primary:hover {
  background: #ffaa1a;
  box-shadow: 0 8px 28px rgba(255, 148, 6, 0.32), 0 2px 8px rgba(255, 148, 6, 0.18);
}

.primary.is-confirmed,
.secondary.is-confirmed,
.ghost.is-confirmed {
  color: #041204;
  background: var(--green);
  border-color: rgba(60, 185, 60, 0.7);
  box-shadow: 0 0 0 1px rgba(60, 185, 60, 0.3), 0 0 18px var(--green-glow);
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.avatar-chip {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background:
    radial-gradient(circle at top, rgba(255, 255, 255, 0.18), transparent 58%),
    linear-gradient(180deg, rgba(39, 170, 225, 0.18), rgba(255, 148, 6, 0.22));
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 500;
  text-transform: uppercase;
  background-size: cover;
  background-position: center;
}

.avatar-chip.has-photo {
  color: transparent;
}

.agent-header {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}

.row-title-meta {
  display: inline-flex;
  align-items: center;
  align-self: center;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

.dashboard-shell {
  display: grid;
  gap: 14px;
}

.dashboard-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) repeat(3, minmax(160px, 0.72fr)) auto;
  gap: 12px;
  align-items: end;
  padding: 16px;
}

.dashboard-view-toggle,
.dashboard-metric-toggle {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.dashboard-view-button,
.dashboard-metric-button {
  min-height: 38px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.02);
  color: var(--text);
  text-transform: uppercase;
}

.dashboard-view-button.is-active,
.dashboard-metric-button.is-active {
  border-color: rgba(255, 148, 6, 0.5);
  background: rgba(255, 148, 6, 0.14);
  box-shadow: 0 0 0 1px rgba(255, 148, 6, 0.12), 0 8px 20px rgba(255, 148, 6, 0.12);
}

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

.summary-card,
.dashboard-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.008)), var(--panel);
  box-shadow: var(--shadow);
}

.summary-card {
  display: grid;
  gap: 6px;
  padding: 14px;
}

.summary-card span,
.summary-card small,
.dashboard-meta,
.performance-copy small,
.performance-side small,
.blocker-row small,
.dashboard-empty {
  color: var(--muted);
}

.summary-card strong {
  font-size: 1.55rem;
  line-height: 1;
  text-transform: uppercase;
}

.dashboard-panel {
  padding: 16px;
}

.dashboard-panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
}

.dashboard-panel-title {
  display: grid;
  gap: 12px;
}

.dashboard-graph-filters {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.dashboard-graph-field {
  min-width: 180px;
}

.dashboard-graph-field span {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.dashboard-graph-field select,
.dashboard-toolbar select,
#meeting-date {
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(35, 39, 44, 0.98), rgba(20, 22, 24, 0.98));
  color: var(--text);
  border-radius: 14px;
  padding: 10px 40px 10px 14px;
  font-family: var(--font-heading, "Barlow Condensed", "Avenir Next", sans-serif);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  background-image:
    linear-gradient(180deg, rgba(35, 39, 44, 0.98), rgba(20, 22, 24, 0.98)),
    linear-gradient(135deg, transparent 50%, #4e97ed 50%),
    linear-gradient(45deg, #267ae0 50%, transparent 50%);
  background-repeat: no-repeat;
  background-size: auto, 10px 10px, 10px 10px;
  background-position: 0 0, calc(100% - 24px) 52%, calc(100% - 18px) 52%;
}

.dashboard-graph-field select:focus,
.dashboard-toolbar select:focus,
#meeting-date:focus {
  outline: none;
  border-color: rgba(78, 151, 237, 0.55);
  box-shadow: 0 0 0 1px rgba(38, 122, 224, 0.18), 0 10px 24px rgba(38, 122, 224, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

#meeting-date {
  letter-spacing: 0.04em;
  min-height: 42px;
}

#meeting-date::-webkit-calendar-picker-indicator {
  opacity: 1;
  cursor: pointer;
  filter: brightness(0) saturate(100%) invert(76%) sepia(39%) saturate(3625%) hue-rotate(188deg) brightness(96%) contrast(96%);
}

.dashboard-metric-toggle {
  margin-top: 16px;
}

.dashboard-graph-panel.is-collapsed .graph-stage,
.dashboard-graph-panel.is-collapsed .dashboard-metric-toggle {
  display: none;
}

.graph-stage {
  position: relative;
  min-height: 320px;
  margin-top: 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 14px;
  background:
    radial-gradient(circle at top right, rgba(255, 148, 6, 0.08), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  overflow: hidden;
}

.dashboard-graph {
  width: 100%;
  height: 320px;
}

.dashboard-graph-empty {
  display: none;
  position: absolute;
  inset: 0;
  place-items: center;
  padding: 24px;
  text-align: center;
  color: var(--muted);
}

.dashboard-graph-empty.is-visible {
  display: grid;
}

.graph-grid line {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}

.graph-grid text,
.graph-point text {
  fill: rgba(232, 226, 216, 0.62);
  font-family: "Barlow Condensed", "Avenir Next", sans-serif;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.graph-point circle {
  transition: fill 0.15s ease, transform 0.15s ease;
}

.graph-line {
  fill: none;
  stroke: var(--graph-accent, var(--orange));
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

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

.dashboard-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.dashboard-placeholder {
  display: grid;
  place-items: center;
  min-height: 196px;
  margin-top: 12px;
  border: 1px dashed rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background:
    radial-gradient(circle at top, rgba(245, 174, 108, 0.08), transparent 56%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01));
  text-align: center;
}

.dashboard-placeholder span {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.performance-card,
.blocker-row {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}

.performance-card.is-band-red .performance-copy strong,
.summary-card.is-band-red strong {
  color: #ffb8c0;
}

.performance-card.is-band-red .performance-pill,
.summary-card.is-band-red .summary-pill {
  color: #ffb8c0;
  border-color: rgba(204, 18, 37, 0.44);
  background: rgba(204, 18, 37, 0.14);
}

.performance-card.is-band-orange .performance-copy strong,
.summary-card.is-band-orange strong {
  color: #ffd3a0;
}

.performance-card.is-band-orange .performance-pill,
.summary-card.is-band-orange .summary-pill {
  color: #ffd3a0;
  border-color: rgba(255, 148, 6, 0.44);
  background: rgba(255, 148, 6, 0.14);
}

.performance-card.is-band-green .performance-copy strong,
.summary-card.is-band-green strong {
  color: #bff0c9;
}

.performance-card.is-band-green .performance-pill,
.summary-card.is-band-green .summary-pill {
  color: #bff0c9;
  border-color: rgba(60, 185, 60, 0.44);
  background: rgba(60, 185, 60, 0.14);
}

.performance-card.is-band-yellow .performance-copy strong,
.summary-card.is-band-yellow strong {
  color: #ffe0b1;
}

.performance-card.is-band-yellow .performance-pill,
.summary-card.is-band-yellow .summary-pill {
  color: #ffe0b1;
  border-color: rgba(245, 174, 108, 0.44);
  background: rgba(245, 174, 108, 0.16);
}

.performance-card.is-band-blue .performance-copy strong,
.summary-card.is-band-blue strong {
  color: #bfe9ff;
}

.performance-card.is-band-blue .performance-pill,
.summary-card.is-band-blue .summary-pill {
  color: #bfe9ff;
  border-color: rgba(39, 170, 225, 0.44);
  background: rgba(39, 170, 225, 0.14);
}

.performance-copy,
.performance-side {
  display: grid;
  gap: 4px;
}

.performance-side {
  justify-items: end;
}

.performance-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(255, 148, 6, 0.32);
  border-radius: 999px;
  background: rgba(255, 148, 6, 0.1);
  color: var(--text);
  font-weight: 500;
}

.summary-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid rgba(255, 148, 6, 0.32);
  border-radius: 999px;
  background: rgba(255, 148, 6, 0.1);
}

.performance-avatar {
  width: 52px;
  height: 68px;
  border-radius: 18px;
  background-position: center top;
  justify-self: center;
  align-self: center;
}

.performance-avatar--empty {
  color: transparent;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.blocker-row {
  grid-template-columns: minmax(0, 1fr) auto;
}

.blocker-placeholder {
  min-height: 112px;
  margin-bottom: 12px;
}

.is-hidden {
  display: none !important;
}

@media (max-width: 1080px) {
  .dashboard-toolbar,
  .dashboard-summary,
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
}

.secondary,
.ghost,
.tab,
.parking-button {
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--line);
}

.secondary:hover,
.tab:hover:not(.is-active) {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.14);
}

.ghost,
.icon-button {
  color: var(--muted);
  background: transparent;
  border-color: var(--line);
}

.ghost:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
}

.icon-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  padding: 0;
}

.icon-button:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.18);
}

.tabs {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}

.tab.is-active {
  color: #0a0500;
  background: var(--orange);
  border-color: transparent;
  box-shadow: 0 4px 14px var(--orange-glow);
}

.tab-panel {
  display: none;
}

.tab-panel.is-active {
  display: block;
}

.phase-rail {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.phase-pill {
  min-height: 62px;
  padding: 10px;
  box-shadow: none;
}

.phase-pill span {
  color: var(--blue);
  font-weight: 500;
}

.phase-pill strong {
  display: block;
  margin-top: 3px;
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 0.95;
  text-transform: uppercase;
}

.phase-pill.is-active {
  border-color: rgba(255, 148, 6, 0.55);
  box-shadow: inset 0 0 0 1px rgba(255, 148, 6, 0.22), 0 0 18px rgba(255, 148, 6, 0.07);
}

.controls-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
  padding: 12px;
}

.field,
.row-note {
  display: grid;
  gap: 5px;
}

.field-date input,
.field-time input {
  min-height: 48px;
  border-color: color-mix(in srgb, var(--line) 72%, transparent);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0.018)),
    color-mix(in srgb, var(--panel-3) 82%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.field-select select {
  min-height: 48px;
}

.week-field {
  min-width: 220px;
}

input,
select,
textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px;
  color: var(--text);
  background: rgba(0, 0, 0, 0.3);
  padding: 8px 10px;
  resize: none;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: rgba(255, 148, 6, 0.5);
  box-shadow: 0 0 0 2px rgba(255, 148, 6, 0.1);
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 32px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

input[type="date"],
input[type="time"] {
  color-scheme: dark;
}

body.theme-light input[type="date"],
body.theme-light input[type="time"] {
  color-scheme: light;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="time"]::-webkit-calendar-picker-indicator {
  filter: brightness(0) saturate(100%) invert(100%);
  opacity: 0.96;
  cursor: pointer;
}

body.theme-light input[type="date"]::-webkit-calendar-picker-indicator,
body.theme-light input[type="time"]::-webkit-calendar-picker-indicator {
  filter: brightness(0) saturate(100%) invert(13%) sepia(8%) saturate(963%) hue-rotate(346deg) brightness(96%) contrast(92%);
}

input[type="date"]::-webkit-datetime-edit,
input[type="time"]::-webkit-datetime-edit {
  color: var(--text);
}

input[type="date"]::-webkit-datetime-edit-fields-wrapper,
input[type="time"]::-webkit-datetime-edit-fields-wrapper {
  letter-spacing: 0.06em;
}

input[type="date"]::-webkit-datetime-edit-text,
input[type="time"]::-webkit-datetime-edit-text {
  color: color-mix(in srgb, var(--text) 62%, transparent);
}

textarea {
  line-height: 1.05;
}

.save-state {
  margin-left: auto;
  align-self: center;
  color: var(--muted);
  font-weight: 500;
  text-transform: uppercase;
}

.auth-warning {
  display: none;
  align-items: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid rgba(204, 18, 37, 0.4);
  border-radius: 8px;
  background: rgba(204, 18, 37, 0.08);
  color: #f28a92;
  font-size: 0.82rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-warning.is-visible {
  display: flex;
}

.auth-warning i {
  color: var(--red);
  font-size: 0.9rem;
}

.auth-warning strong {
  color: #f28a92;
}

.save-state.is-saved {
  color: var(--green);
}

.save-state.is-saved::after {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-left: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green-glow);
}

.meeting-sheet {
  overflow: hidden;
}

.sheet-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.tiny-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tiny-stats span {
  min-width: 70px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  text-align: center;
  text-transform: uppercase;
}

.track-list {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.agent-section {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel-2);
}

.agent-header {
  display: grid;
  grid-template-columns: 38px 60px minmax(0, 1fr) 38px;
  gap: 14px;
  align-items: center;
  padding: 12px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.02));
}

.agent-section.is-present .agent-header {
  box-shadow: inset 4px 0 0 var(--green);
}

.agent-section.is-absent .agent-header {
  box-shadow: inset 4px 0 0 var(--orange);
}

.attendance-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  justify-self: center;
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  font-size: 0.72rem;
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.2);
  transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.attendance-toggle.is-present {
  background: var(--green);
  border-color: rgba(60, 185, 60, 0.5);
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.2), 0 0 12px var(--green-glow);
}

.attendance-toggle.is-absent {
  background: var(--orange);
  border-color: rgba(255, 148, 6, 0.58);
  box-shadow: inset 0 0 0 3px rgba(0, 0, 0, 0.2), 0 0 12px var(--orange-glow);
}

.agent-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px;
  align-items: center;
  min-width: 0;
}

.agent-avatar {
  width: 56px;
  height: 56px;
  font-size: 1rem;
  justify-self: center;
  align-self: center;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.24);
}

.agent-heading span {
  color: var(--muted);
  font-weight: 400;
  text-transform: uppercase;
}

.agent-name {
  font-size: 1.25rem;
  font-weight: 500;
  text-transform: uppercase;
  font-family: var(--header-font);
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.add-agent-mio {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
  padding: 0;
  font-weight: 500;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.add-agent-mio:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.16);
}

.add-agent-mio i {
  font-size: 0.9rem;
}

.agent-rows {
  display: grid;
}

.empty-agent {
  padding: 18px 48px;
  color: var(--muted);
  font-weight: 400;
  text-transform: uppercase;
}

.mio-row {
  display: grid;
  grid-template-columns:
    minmax(135px, 0.55fr)
    minmax(320px, 1.25fr)
    40px
    118px
    minmax(170px, 0.75fr)
    minmax(170px, 0.75fr)
    minmax(170px, 0.75fr)
    110px;
  gap: 8px;
  align-items: center;
  min-height: 118px;
  padding: 12px 12px 12px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.025), rgba(255, 255, 255, 0.01));
}

.mio-row:nth-child(even) {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.018), rgba(0, 0, 0, 0.04));
}

.mio-row.is-storm {
  color: var(--storm-text);
  background: linear-gradient(135deg, var(--storm), #ff9406);
}

.mio-row.is-storm-flash {
  animation: storm-flash 850ms ease;
}

.mio-row.is-no {
  box-shadow: inset 4px 0 0 var(--red);
}

.mio-row.is-yes {
  box-shadow: inset 4px 0 0 var(--green);
}

.mio-row.is-absent {
  opacity: 0.7;
}

.storm-toggle,
.delete-row-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  justify-self: center;
  align-self: center;
  margin-block: auto;
  border: 2px solid rgba(60, 44, 6, 0.28);
  border-radius: 50%;
  color: #261b05;
  background: var(--storm);
  font-size: 0.7rem;
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.28);
  transition: box-shadow 0.15s ease;
}

.delete-row-button {
  color: color-mix(in srgb, var(--muted) 84%, var(--text));
  background: rgba(255, 255, 255, 0.035);
  border-color: rgba(255, 255, 255, 0.09);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.025), 0 0 0 1px rgba(0, 0, 0, 0.16);
  opacity: 0.58;
}

.delete-row-button:hover {
  color: #ffb8c0;
  border-color: rgba(204, 18, 37, 0.34);
  background: rgba(204, 18, 37, 0.1);
  opacity: 0.9;
}

.storm-toggle.is-active {
  background: var(--storm);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.18), 0 0 12px rgba(245, 174, 108, 0.55);
}

.row-quick-actions {
  display: grid;
  align-items: center;
  justify-content: center;
  justify-items: center;
  gap: 5px;
  align-self: center;
  height: var(--row-control-height);
  min-height: var(--row-control-height);
}

.outcome-input {
  font-size: 1.08rem;
  font-weight: 500;
  text-transform: uppercase;
  font-family: var(--header-font);
  min-height: var(--row-control-height);
  height: var(--row-control-height);
}

.type-select {
  width: 100%;
  padding-right: 32px;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 12px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.commitment-input {
  min-height: var(--row-control-height);
  height: var(--row-control-height);
  border-color: transparent;
  background: rgba(0, 0, 0, 0.18);
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.18;
  overflow: hidden;
  padding-top: 14px;
  padding-bottom: 12px;
  resize: none;
}

.yes-no {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  align-self: center;
  align-items: stretch;
  height: var(--row-control-height);
  min-height: var(--row-control-height);
}

.yes-no button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--row-control-height);
  height: var(--row-control-height);
  background: rgba(0, 0, 0, 0.22);
  border-color: rgba(255, 255, 255, 0.09);
  color: var(--text);
}

.yes-no button.is-active[data-result="yes"] {
  color: #041204;
  background: var(--green);
  border-color: rgba(60, 185, 60, 0.6);
  box-shadow: 0 0 12px var(--green-glow);
}

.yes-no button.is-active[data-result="no"] {
  color: #fff;
  background: var(--red);
  border-color: rgba(204, 18, 37, 0.7);
  box-shadow: 0 0 12px rgba(204, 18, 37, 0.2);
}

.mio-row.is-storm .yes-no button.is-active[data-result="yes"] {
  color: #eaf6ff;
  background: var(--blue);
  border-color: rgba(39, 170, 225, 0.7);
}

.mio-row.is-storm .yes-no button.is-active[data-result="no"] {
  color: #fff4f1;
  background: #b03a31;
  border-color: rgba(176, 58, 49, 0.7);
}

.mio-row.is-storm input,
.mio-row.is-storm select,
.mio-row.is-storm textarea,
.mio-row.is-storm .yes-no button,
.mio-row.is-storm .parking-button,
.mio-row.is-storm .delete-row-button {
  color: var(--storm-text);
  background: rgba(0, 0, 0, 0.09);
  border-color: rgba(23, 17, 6, 0.18);
}

.mio-row.is-storm .row-note span {
  color: rgba(23, 17, 6, 0.6);
}

.row-note textarea {
  min-height: var(--row-control-height);
  height: var(--row-control-height);
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.22;
  padding-top: 17px;
  padding-bottom: 8px;
}

.row-note {
  display: grid;
  align-content: center;
  align-self: center;
  position: relative;
  min-height: var(--row-control-height);
}

.mio-row .row-note span {
  position: absolute;
  top: -22px;
  left: 0;
  right: 0;
  text-align: center;
}

.parking-button.has-parking {
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--text);
}

.parking-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  align-self: center;
  min-height: var(--row-control-height);
  height: var(--row-control-height);
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
}

.parking-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 20;
  width: min(420px, calc(100vw - 28px));
  height: 100vh;
  padding: 24px;
  border-left: 1px solid var(--line);
  background: var(--panel-3);
  box-shadow: -24px 0 80px rgba(0, 0, 0, 0.55);
  transform: translateX(calc(100% - 18px));
  transition: transform 180ms ease;
}

.parking-drawer::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 18px;
  height: 100%;
  background: rgba(255, 255, 255, 0.14);
}

.parking-drawer.is-open {
  transform: translateX(0);
}

.parking-drawer h2 {
  margin-bottom: 16px;
  font-weight: 500;
}

.parking-drawer textarea {
  min-height: 220px;
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.2;
}

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

body.theme-light .band-track {
  box-shadow: 0 0 8px rgba(23, 17, 10, 0.08);
}

body.theme-light .band-needle {
  box-shadow: 0 0 6px rgba(23, 17, 10, 0.11), 0 0 0 1px rgba(255, 255, 255, 0.2);
}

body.theme-light .time-format-toggle {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 24px rgba(23, 17, 10, 0.044);
}

body.theme-light .time-format-toggle:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 28px rgba(23, 17, 10, 0.056);
}

body.theme-light .parking-drawer {
  box-shadow: -24px 0 80px rgba(23, 17, 10, 0.11);
}

.color-field input[type="color"] {
  width: 100%;
  min-height: 44px;
  padding: 4px;
}

@keyframes storm-flash {
  0% {
    box-shadow: inset 4px 0 0 var(--orange), 0 0 0 rgba(255, 255, 255, 0);
    filter: brightness(1);
  }

  25% {
    box-shadow: inset 4px 0 0 var(--orange), 0 0 34px rgba(255, 255, 255, 0.42);
    filter: brightness(1.12);
  }

  55% {
    box-shadow: inset 4px 0 0 var(--orange), 0 0 16px rgba(255, 255, 255, 0.18);
    filter: brightness(0.98);
  }

  100% {
    box-shadow: inset 4px 0 0 var(--orange), 0 0 0 rgba(255, 255, 255, 0);
    filter: brightness(1);
  }
}

.drawer-close {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 14px;
  right: 14px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  font-size: 0.9rem;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.drawer-close:hover {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.2);
}

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

.config-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
}

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

.toggle-field {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
}

.toggle-field.is-subtle {
  font-size: 0.88rem;
  color: var(--muted);
}

.is-hidden {
  display: none !important;
}

.toggle-field input {
  width: 18px;
  height: 18px;
  margin: 0;
}

.icon-square-button {
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-square-button.is-active {
  border-color: color-mix(in srgb, var(--accent) 58%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 38%, transparent);
  color: var(--accent);
}

.field-detail {
  color: var(--muted);
  font-size: 0.84rem;
}

.time-format-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 2px;
}

.time-format-toggle {
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid color-mix(in srgb, var(--orange) 44%, var(--line));
  border-radius: 999px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--orange) 18%, transparent), color-mix(in srgb, var(--orange) 6%, transparent)),
    color-mix(in srgb, var(--panel) 84%, transparent);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 24px rgba(0, 0, 0, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.time-format-toggle:hover {
  transform: translateY(-1px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 28px rgba(0, 0, 0, 0.28);
}

.time-format-toggle.is-24h {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--blue) 16%, transparent), color-mix(in srgb, var(--blue) 6%, transparent)),
    color-mix(in srgb, var(--panel) 84%, transparent);
  border-color: color-mix(in srgb, var(--blue) 44%, var(--line));
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.user-form {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 10px;
  align-items: end;
}

.user-list {
  display: grid;
  gap: 8px;
}

.user-chip {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  cursor: grab;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.user-chip.is-dragging {
  opacity: 0.45;
}

.user-chip.is-drop-target {
  border-color: rgba(255, 148, 6, 0.6);
  box-shadow: inset 0 0 0 1px rgba(255, 148, 6, 0.22);
}

.user-chip.is-active-viewer {
  border-color: color-mix(in srgb, var(--orange) 42%, var(--line));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--orange) 16%, transparent);
}

.drag-handle {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 1rem;
  text-align: center;
  user-select: none;
}

.user-chip-copy {
  display: grid;
  gap: 2px;
}

.user-chip span {
  color: var(--muted);
}

.user-chip-copy input {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.16);
}

.user-chip-copy select {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(0, 0, 0, 0.16);
}

.user-edit-name {
  font-weight: 500;
  text-transform: uppercase;
}

.user-edit-role {
  font-weight: 300;
}

.user-chip-actions {
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 6px;
}

.user-chip-actions .ghost {
  min-height: 34px;
  padding: 6px 10px;
}

@media (max-width: 1120px) {
  .meeting-top,
  .timer-strip,
  .config-grid,
  .user-form {
    grid-template-columns: 1fr;
  }

  .phase-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .agent-header,
  .agent-heading {
    grid-template-columns: 1fr;
  }

  .mio-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .yes-no,
  .row-note,
  .parking-button {
    grid-column: auto;
  }

  .row-quick-actions,
  .yes-no,
  .parking-button {
    min-height: var(--row-control-height);
  }

  .save-state {
    margin-left: 0;
  }
}
