:root {
  color-scheme: light;
  --brand-400: #7794ff;
  --brand-500: #4d6fff;
  --brand-600: #2f57f7;
  --emerald-500: #1fb37a;
  --rose-500: #ff4d6d;
  --amber-500: #f7b500;
  --sky-500: #0096f2;
  --slate-900: #0f172a;
  --slate-700: #334155;
  --slate-600: #475569;
  --slate-500: #64748b;
  --surface-glass: rgba(255, 255, 255, 0.82);
  --surface-soft: rgba(245, 248, 255, 0.8);
  --shadow-soft: 0 25px 80px rgba(76, 111, 245, 0.18);
  --shadow-strong: 0 35px 120px rgba(67, 96, 200, 0.22);
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Inter", "Segoe UI", sans-serif;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 12% 12%, rgba(101, 131, 255, 0.15), transparent 55%),
    radial-gradient(circle at 88% -10%, rgba(255, 153, 204, 0.2), transparent 45%),
    linear-gradient(180deg, #f7f9ff 0%, #eef2ff 100%);
  color: var(--slate-900);
  -webkit-font-smoothing: antialiased;
}

.hidden {
  display: none !important;
}

.app-shell {
  min-height: 100vh;
}


.app-header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  padding: 0.35rem 0.85rem 0.15rem;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(148, 163, 255, 0.18);
  backdrop-filter: blur(18px);
  box-shadow: 0 16px 32px rgba(86, 110, 220, 0.12);
}

.app-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  min-height: 48px;
}

.app-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: inherit;
}

.app-brand__mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.85);
  background: linear-gradient(150deg, rgba(244, 247, 255, 0.9), rgba(219, 229, 255, 0.94));
  box-shadow: 0 12px 22px rgba(86, 110, 220, 0.18);
  overflow: hidden;
}

.app-brand__mark img {
  width: 24px;
  height: 24px;
  object-fit: cover;
  border-radius: 0.85rem;
}

.app-brand__text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.app-brand__title {
  font-size: 0.86rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.app-brand__subtitle {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(99, 102, 241, 0.85);
}

.app-nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 0.65rem;
  border: 1px solid rgba(148, 163, 255, 0.32);
  background: rgba(255, 255, 255, 0.9);
  color: rgba(71, 85, 105, 0.75);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.app-nav-toggle:hover,
.app-nav-toggle:focus-visible {
  transform: scale(1.05);
  border-color: rgba(99, 102, 241, 0.4);
  background: rgba(237, 242, 255, 0.95);
  color: var(--brand-600);
}

.app-nav-toggle svg {
  width: 18px;
  height: 18px;
}

.app-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 0.25rem 0 0.35rem;
}

.app-nav__metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.2rem 0 0.4rem;
}

.nav-metric {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(120, 140, 220, 0.28);
  background: rgba(240, 244, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.nav-metric__label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(99, 102, 241, 0.85);
}

.nav-metric__value {
  font-size: 0.85rem;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.8);
  min-width: 1.4rem;
  text-align: right;
}

.app-main {
  flex: 1;
  width: 100%;
  max-width: 1184px;
  margin: 0 auto;
  padding: 1rem 0.85rem 2.75rem;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.7rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: rgba(15, 23, 42, 0.62);
  border-radius: 999px;
  transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
  color: var(--brand-600);
  background: rgba(77, 111, 255, 0.12);
  transform: translateY(-1px);
}




.nav-link.active {
  color: var(--brand-600);
  background: rgba(77, 111, 255, 0.16);
  box-shadow: 0 14px 28px rgba(77, 111, 255, 0.18);
}

.nav-link.active::after {
  content: "";
  position: absolute;
  inset: auto auto -10px 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 4px;
  border-radius: 999px;
  background: var(--brand-500);
  box-shadow: 0 10px 22px rgba(77, 111, 255, 0.28);
}

@media (max-width: 767px) {
  .app-header {
    padding: 0.42rem 0.75rem 0.14rem;
  }

  .app-nav {
    position: relative;
    top: 0;
    left: 0;
    gap: 0.24rem;
    padding: 0.16rem 0 0.35rem;
    border-top: 1px solid rgba(148, 163, 255, 0.2);
  }

  .app-nav__metrics {
    padding: 0.12rem 0 0.32rem;
  }

  .app-main {
    padding: 0.75rem 0.7rem 2.4rem;
  }
}

@media (min-width: 768px) {
  .app-header {
    padding: 0.45rem 1.1rem 0.2rem;
  }

  .app-header__bar {
    max-width: 1184px;
    width: 100%;
    margin: 0 auto;
    min-height: 50px;
  }

  .app-nav {
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 0.2rem;
    padding: 0.18rem 0 0;
    background: transparent;
    border-top: none;
  }

  .app-nav__metrics {
    flex-direction: row;
    align-items: center;
    gap: 0.35rem;
    padding: 0;
    margin-right: 0.4rem;
  }

  .app-nav-toggle {
    display: none;
  }

  .app-header > .app-nav {
    max-width: 1184px;
    width: 100%;
    margin: 0 auto;
  }

  .app-main {
    padding: 1.05rem 1.1rem 2.85rem;
  }

  .automation-card__footer--lineup {
    flex-direction: row;
    align-items: stretch;
  }

  .lineup-card {
    flex: 1 1 auto;
  }

  .lineup-card__summary {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .lineup-card__hint {
    max-width: 320px;
    text-align: right;
  }
}

.page-section {
  display: flex;
  flex-direction: column;
  gap: clamp(1.6rem, 4vw, 2.4rem);
  width: 100%;
}

.page-section + .page-section {
  margin-top: clamp(1.5rem, 4vw, 2rem);
}

.glass-panel {
  border-radius: 1.25rem;
  border: 1px solid rgba(120, 140, 220, 0.22);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(238, 243, 255, 0.92));
  box-shadow: 0 18px 44px rgba(83, 110, 210, 0.16);
  padding: clamp(1.25rem, 3vw, 1.75rem);
}

.media-card__heading {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  flex: 1;
}

.media-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
}

.media-card__stat {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.55rem 0.9rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(120, 140, 220, 0.28);
  background: rgba(243, 246, 255, 0.92);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  min-width: 110px;
}

.media-card__stat-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(99, 102, 241, 0.85);
}

.media-card__stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--slate-900);
  line-height: 1;
}

.dashboard-primary {
  display: grid;
  gap: clamp(1.25rem, 3vw, 1.75rem);
}

.dashboard-hub {
  display: flex;
  flex-direction: column;
  gap: clamp(1.4rem, 3vw, 2.3rem);
  padding: clamp(1.6rem, 4vw, 2.25rem);
}

.dashboard-hub__preview {
  display: flex;
  flex-direction: column;
  gap: clamp(1.2rem, 3vw, 1.75rem);
  width: min(100%, 420px);
  max-width: 100%;
  align-self: center;
}

.dashboard-hub__timing {
  width: 100%;
}

.dashboard-hub__divider {
  height: 1px;
  background: linear-gradient(90deg, rgba(120, 140, 220, 0), rgba(120, 140, 220, 0.28), rgba(120, 140, 220, 0));
  border: none;
  margin: -0.35rem 0 0;
  opacity: 0.8;
}

.media-card {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.media-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.media-card__title {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.85);
}

.media-card__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(120, 140, 220, 0.32);
  background: rgba(120, 140, 220, 0.12);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--brand-600);
}

.media-card__frame {
  position: relative;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(120, 140, 220, 0.24);
  background: #0b1120;
  aspect-ratio: 16 / 9;
}

.media-card__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.automation-settings {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.automation-settings__header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.automation-settings__title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--slate-900);
}

.automation-settings__subtitle {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(71, 85, 105, 0.72);
}

.automation-delay-grid {
  display: grid;
  gap: 0.85rem;
}

.automation-delay {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(71, 85, 105, 0.8);
}

.automation-delay input {
  width: 100%;
  border-radius: 0.95rem;
  border: 1px solid rgba(158, 173, 225, 0.35);
  background: rgba(255, 255, 255, 0.95);
  padding: 0.6rem 0.85rem;
  font-size: 1rem;
  color: var(--slate-700);
}

.automation-presets {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.automation-suite {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.automation-suite__toolbar {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1rem 1.2rem;
  border-radius: 1.05rem;
  border: 1px solid rgba(121, 141, 220, 0.22);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.9), rgba(237, 243, 255, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.automation-timer {
  position: relative;
  gap: 0.9rem;
  padding: clamp(0.85rem, 2vw, 1.1rem) clamp(0.85rem, 2vw, 1.2rem);
  border-radius: 1.05rem;
  border: 1px solid rgba(108, 126, 220, 0.33);
  background:
    radial-gradient(110% 110% at 0% 0%, rgba(125, 151, 255, 0.16), transparent 58%),
    radial-gradient(110% 110% at 120% 10%, rgba(255, 169, 210, 0.16), transparent 55%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.92), rgba(239, 244, 255, 0.88));
  box-shadow: 0 18px 32px rgba(76, 102, 210, 0.16);
  overflow: hidden;
}

.automation-timer::after {
  content: "";
  position: absolute;
  inset: 10px 12px auto auto;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(125, 151, 255, 0.16), transparent 65%);
  pointer-events: none;
  opacity: 0.55;
}

.automation-timer__header {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.automation-timer__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 1rem;
  background: linear-gradient(135deg, rgba(77, 111, 255, 0.2), rgba(147, 170, 255, 0.3));
  border: 1px solid rgba(120, 140, 220, 0.3);
  color: var(--brand-600);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.automation-timer__icon svg {
  width: 20px;
  height: 20px;
}

.automation-timer__titles {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.automation-timer__title {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--slate-900);
}

.automation-timer__subtitle {
  margin: 0;
  font-size: 0.74rem;
  color: rgba(71, 85, 105, 0.7);
}

.automation-timer__body {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.55rem;
  position: relative;
  z-index: 1;
}

.automation-timer__label {
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.76);
}

.automation-timer__presets {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.dashboard-hub__shortcuts {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.85rem;
  gap: 0.55rem;
}

@media (min-width: 1024px) {
  .dashboard-hub__shortcuts {
    align-items: flex-start;
  }
}
.automation-timer .automation-delay-input {
  min-height: 3.1rem;
  padding: 0.75rem 1.1rem;
  font-size: 1rem;
  font-weight: 600;
  color: var(--slate-700);
  box-shadow: 0 12px 20px rgba(79, 103, 210, 0.12);
}

.automation-timer .btn.btn-soft {
  justify-content: center;
  padding-inline: 1.15rem;
  min-height: 2.85rem;
  font-size: 0.95rem;
}

.automation-timer .btn.btn-soft:is(:hover, :focus-visible) {
  border-color: rgba(77, 111, 255, 0.34);
}

.automation-suite__toolbar .automation-delay span {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.78);
}

.automation-suite__presets {
  width: 100%;
}

.automation-suite .automation-collection {
  gap: 1.1rem;
}

.automation-suite__grid {
  margin-top: 0.25rem;
}

@media (min-width: 600px) {
  .dashboard-hub__preview {
    width: min(100%, 460px);
  }
}

.automation-collection {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.automation-collection__header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.automation-collection__title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.9);
}

.automation-grid {
  display: grid;
  gap: 0.9rem;
  grid-template-columns: minmax(0, 1fr);
}

@media (min-width: 1024px) {
  .dashboard-hub {
    flex-direction: row;
    align-items: flex-start;
    gap: clamp(1.6rem, 3vw, 2.4rem);
  }

  .dashboard-hub__preview {
    align-self: flex-start;
    flex: 0 0 360px;
    max-width: 360px;
  }

  .dashboard-hub__timing {
    margin-top: -0.35rem;
  }

  .dashboard-hub__divider {
    display: none;
  }

  .automation-suite {
    flex: 1 1 auto;
    margin-top: 0;
    padding-left: clamp(1.2rem, 2.6vw, 1.8rem);
  }

  .automation-grid {
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  }
}

.automation-card {
  border-radius: 1.15rem;
  border: 1px solid rgba(122, 140, 220, 0.24);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.92), rgba(242, 246, 255, 0.94));
  padding: 1.1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  box-shadow: 0 14px 30px rgba(72, 98, 190, 0.12);
}

.automation-card--compact {
  padding: 0.85rem 1rem;
  gap: 0.6rem;
}

.automation-card--combo {
  gap: 0.75rem;
}

.automation-card--full {
  grid-column: 1 / -1;
}

.automation-card__combo-grid {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .automation-card__combo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.automation-card__segment {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  border-radius: 1rem;
  border: 1px solid rgba(122, 140, 220, 0.18);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.94), rgba(240, 246, 255, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.automation-card--compact .automation-card__title {
  font-size: 0.82rem;
  letter-spacing: 0.1em;
}

.automation-card--compact .automation-card__status {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

.automation-card--compact .automation-card__actions {
  gap: 0.45rem;
}

.automation-card--compact .btn {
  border-radius: 0.85rem;
  font-size: 0.78rem;
  padding: 0.45rem 0.75rem;
}

.automation-card--compact .automation-card__footer {
  gap: 0.4rem;
  margin-top: 0.15rem;
}

.automation-card--compact .automation-card__footer .btn {
  flex: 1 1 130px;
}

.automation-card__header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.automation-card__title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.95);
}

.automation-card__status {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.7);
  font-variant-numeric: tabular-nums;
}

.automation-card__actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.automation-card__actions .btn {
  width: 100%;
}

.automation-card__footer {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.25rem;
}

.automation-card__footer .btn {
  flex: 1 1 160px;
}

.automation-card__extras {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  width: 100%;
}

.automation-card__extras .btn {
  flex: 1 1 140px;
}

.automation-card__extras + .automation-card__extras {
  margin-top: 0.35rem;
}

.automation-card[data-has-timer="true"] {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 18px 42px rgba(77, 111, 255, 0.2);
}

.automation-card--lineup .automation-card__header {
  gap: 0.45rem;
}

.automation-card__footer--lineup {
  flex-direction: column;
  align-items: stretch;
  gap: 0.85rem;
  margin-top: 0.65rem;
}

.lineup-card__cancel {
  align-self: flex-start;
}

.lineup-card {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: 0.95rem 1.05rem;
  border-radius: 1.05rem;
  border: 1px solid rgba(118, 138, 220, 0.26);
  background:
    radial-gradient(120% 120% at -10% -10%, rgba(118, 138, 220, 0.16), transparent 60%),
    linear-gradient(155deg, rgba(255, 255, 255, 0.94), rgba(240, 244, 255, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 18px 30px rgba(76, 102, 210, 0.14);
}

.lineup-card__summary {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.lineup-card__metric {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.32rem 0.72rem;
  border-radius: 999px;
  border: 1px solid rgba(120, 140, 220, 0.3);
  background: rgba(235, 240, 255, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
  width: fit-content;
}

.lineup-card__metric-label {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(99, 102, 241, 0.85);
}

.lineup-card__metric-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: rgba(15, 23, 42, 0.82);
  min-width: 1.6rem;
  text-align: right;
}

.lineup-card__hint {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(71, 85, 105, 0.7);
  line-height: 1.5;
}


.lineup-card__group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.lineup-card__group--stepper,
.lineup-card__group--actions {
  width: 100%;
  gap: 0.85rem;
}

.lineup-card__group--stepper .btn-group,
.lineup-card__group--actions .btn-group {
  width: 100%;
}

@media (min-width: 640px) {
  .automation-presets {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
}

@media (min-width: 768px) {
  .media-card__header {
    align-items: center;
  }

  .media-card__heading {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 1.25rem;
    flex-wrap: wrap;
  }

  .media-card__stats {
    gap: 0.75rem;
  }

  .media-card__stat {
    min-width: 132px;
  }

  .automation-suite__delay {
    flex: 0 0 220px;
  }

  .automation-timer__body {
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .automation-suite__delay {
    flex: 1 1 auto;
  }

  .automation-timer__presets {
    justify-content: flex-start;
    gap: 0.5rem;
  }

  .automation-delay-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
  }

  .automation-card__actions {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.85rem;
  }

  .automation-card__actions .btn {
    flex: 1 1 160px;
    width: auto;
  }

  .automation-card__footer {
    gap: 0.85rem;
  }

  .automation-card__footer .btn {
    flex: 0 1 auto;
  }

  .automation-card__extras {
    gap: 0.75rem;
  }

  .automation-card__extras .btn {
    flex: 0 1 auto;
  }
}

@media (min-width: 1024px) {
  .dashboard-primary {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

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

  .automation-suite__delay {
    flex-basis: 100%;
  }

  .automation-card--lineup .lineup-card__group--actions {
    justify-content: flex-start;
  }

  .automation-card--lineup .lineup-card__group--actions .btn {
    flex: 0 0 auto;
  }
}

@media (min-width: 1440px) {
  .dashboard-primary {
    grid-template-columns: minmax(0, 1fr);
  }

  .automation-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.btn {
  min-height: 3rem;
  padding: 0.75rem 1.45rem;
  border-radius: 0.95rem;
  border: 1px solid transparent;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn-group {
  display: inline-flex;
  align-items: stretch;
  flex-wrap: nowrap;
  border-radius: 0.95rem;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(79, 103, 210, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 10px 28px rgba(79, 103, 210, 0.16);
}

.btn-group .btn {
  border-radius: 0;
  min-height: 2.85rem;
  padding: 0.75rem 1.15rem;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  margin: 0;
  transform: none;
  box-shadow: none;
  border: none;
}

.btn-group .btn:first-child {
  border-top-left-radius: 0.95rem;
  border-bottom-left-radius: 0.95rem;
}

.btn-group .btn:last-child {
  border-top-right-radius: 0.95rem;
  border-bottom-right-radius: 0.95rem;
}

.btn-group .btn + .btn {
  border-left: 1px solid rgba(79, 103, 210, 0.18);
}

.btn-group .btn:hover {
  transform: none;
  box-shadow: none;
}

.btn-group .btn:focus-visible {
  outline-offset: -2px;
}

.btn-group--stretch {
  width: 100%;
}

.btn-group--stretch .btn {
  flex: 1 1 0;
}

.btn-group--compact .btn {
  min-height: 2.6rem;
  padding: 0.65rem 0.95rem;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

@media (pointer: coarse) {
  .btn {
    min-height: 3.25rem;
    padding: 0.85rem 1.6rem;
    font-size: 1rem;
  }

  .btn-group .btn {
    min-height: 3.1rem;
    padding-inline: 1.2rem;
    font-size: 1rem;
  }

  .btn-group--compact .btn {
    min-height: 2.85rem;
    font-size: 0.95rem;
  }

  .automation-delay-input {
    min-height: 3.2rem;
    font-size: 1.05rem;
  }
}

.btn-group .btn.btn-primary,
.btn-group .btn.btn-outline,
.btn-group .btn.btn-outline-primary,
.btn-group .btn.btn-outline-info {
  box-shadow: none;
}

.btn:focus-visible {
  outline: 2px solid rgba(77, 111, 255, 0.45);
  outline-offset: 2px;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 28px rgba(59, 87, 181, 0.16);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary {
  background: linear-gradient(135deg, #4d6fff, #7794ff);
  border-color: rgba(77, 111, 255, 0.35);
  color: #fff;
  box-shadow: 0 22px 40px rgba(78, 111, 255, 0.28);
}

.btn-primary:hover {
  box-shadow: 0 26px 54px rgba(77, 111, 255, 0.35);
}

.btn-success {
  background: linear-gradient(135deg, var(--emerald-500), #4ed497);
  border-color: rgba(31, 179, 122, 0.35);
  color: #fff;
  box-shadow: 0 18px 38px rgba(31, 179, 122, 0.2);
}

.btn-success:hover {
  box-shadow: 0 24px 48px rgba(31, 179, 122, 0.24);
}

.btn-info {
  background: linear-gradient(135deg, var(--sky-500), #52c4ff);
  color: #fff;
  box-shadow: 0 18px 38px rgba(0, 150, 242, 0.24);
}

.btn-info:hover {
  box-shadow: 0 24px 52px rgba(0, 150, 242, 0.28);
}

.btn-warning {
  background: linear-gradient(135deg, var(--amber-500), #ffd566);
  color: #4c3500;
  box-shadow: 0 18px 38px rgba(247, 181, 0, 0.24);
}

.btn-warning:hover {
  box-shadow: 0 22px 46px rgba(247, 181, 0, 0.28);
}

.btn-outline {
  background: rgba(255, 255, 255, 0.4);
  border-color: rgba(79, 103, 210, 0.26);
  color: var(--slate-700);
}

.btn-outline:hover {
  border-color: rgba(77, 111, 255, 0.38);
  color: var(--brand-600);
  background: rgba(77, 111, 255, 0.1);
}

.btn-outline-primary {
  border-color: rgba(77, 111, 255, 0.4);
  color: var(--brand-600);
}

.btn-outline-primary:hover {
  background: rgba(77, 111, 255, 0.16);
  box-shadow: 0 20px 44px rgba(77, 111, 255, 0.25);
}

.btn-outline-danger {
  border-color: rgba(255, 77, 109, 0.38);
  color: var(--rose-500);
}

.btn-outline-danger:hover {
  background: rgba(255, 77, 109, 0.12);
  box-shadow: 0 18px 40px rgba(255, 77, 109, 0.22);
}

.btn-outline-success {
  border-color: rgba(31, 179, 122, 0.4);
  color: var(--emerald-500);
}

.btn-outline-success:hover {
  background: rgba(31, 179, 122, 0.15);
  box-shadow: 0 18px 40px rgba(31, 179, 122, 0.26);
}

.btn-outline-info {
  border-color: rgba(0, 150, 242, 0.42);
  color: var(--sky-500);
}

.btn-outline-info:hover {
  background: rgba(0, 150, 242, 0.16);
  box-shadow: 0 18px 40px rgba(0, 150, 242, 0.26);
}

.btn.btn-soft {
  background: linear-gradient(135deg, rgba(77, 111, 255, 0.16), rgba(147, 170, 255, 0.24));
  border-color: rgba(77, 111, 255, 0.2);
  color: var(--brand-600);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.btn.btn-soft:hover,
.btn.btn-soft:focus-visible {
  background: linear-gradient(135deg, rgba(77, 111, 255, 0.24), rgba(147, 170, 255, 0.32));
  border-color: rgba(77, 111, 255, 0.32);
}

.btn.btn-soft.is-active {
  background: linear-gradient(135deg, #4d6fff, #7a96ff);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 18px 42px rgba(77, 111, 255, 0.28);
}

.btn.btn-compact {
  min-height: 2.8rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.2rem;
  gap: 0.45rem;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.btn-outline-warning {
  border-color: rgba(247, 181, 0, 0.4);
  color: #8f6500;
}

.btn-outline-warning:hover {
  background: rgba(247, 181, 0, 0.15);
  box-shadow: 0 18px 40px rgba(247, 181, 0, 0.22);
}

.dashboard-grid {
  display: grid;
  gap: clamp(1rem, 2vw, 1.6rem);
}

.dashboard-hub__shortcuts {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.85rem;
}

@media (min-width: 1024px) {
  .dashboard-hub__shortcuts {
    justify-content: flex-start;
  }

  .dashboard-primary {
    display: flex;
    align-items: flex-start;
    gap: clamp(1.6rem, 3vw, 2.6rem);
  }

  .dashboard-hub__preview {
    align-self: flex-start;
    flex: 0 0 360px;
    max-width: 360px;
  }

  .dashboard-hub__timing {
    margin-top: -0.35rem;
  }

  .dashboard-hub__divider {
    display: none;
  }

  .automation-suite {
    flex: 1 1 auto;
    margin-top: 0;
    padding-left: clamp(1.4rem, 2.6vw, 1.9rem);
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.35fr) minmax(0, 1fr);
  }

  .dashboard-panel--monitor {
    grid-column: span 1;
  }

  .dashboard-panel--wide {
    grid-column: 1 / -1;
  }
}

@media (min-width: 1440px) {
  .dashboard-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .dashboard-panel--monitor {
    grid-column: span 1;
  }

  .dashboard-panel--wide {
    grid-column: 1 / -1;
  }
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.panel-title {
  margin: 0;
  font-size: clamp(1.05rem, 1.4vw, 1.35rem);
  font-weight: 600;
  color: var(--slate-900);
}

.panel-subtitle {
  margin: 0.35rem 0 0 0;
  font-size: 0.86rem;
  color: rgba(71, 85, 105, 0.75);
  line-height: 1.5;
}

.panel-subheading {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.72);
}

.panel-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.panel-badges {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.monitor-display {
  position: relative;
  border-radius: 1.5rem;
  border: 1px solid rgba(77, 111, 255, 0.24);
  background: #0b1120;
  box-shadow: 0 28px 72px rgba(12, 17, 32, 0.46);
  overflow: hidden;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-width: 520px;
}

.monitor-display iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #0b1120;
}

.stacked-links {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-width: 520px;
}

.stacked-links .btn {
  padding-inline: 0.9rem;
  font-size: 0.86rem;
}

@media (min-width: 640px) {
  .stacked-links {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
  }

  .stacked-links .btn {
    flex: 0 0 auto;
  }
}

.live-control-grid {
  display: grid;
  gap: clamp(1.2rem, 2vw, 2rem);
}

.live-preview {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 1.8vw, 1.6rem);
}

.monitor-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(0.85rem, 1.2vw, 1.2rem);
  padding: clamp(1rem, 1.4vw, 1.4rem);
  border-radius: 1.5rem;
  border: 1px solid rgba(87, 106, 209, 0.22);
  background: linear-gradient(160deg, rgba(244, 247, 255, 0.92), rgba(230, 237, 255, 0.96));
  box-shadow: 0 24px 56px rgba(77, 111, 255, 0.18);
}

.monitor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.monitor-label {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.88);
}

.monitor-meta {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(77, 111, 255, 0.3);
  background: rgba(77, 111, 255, 0.12);
  color: var(--brand-600);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

@media (min-width: 1024px) {
  .live-control-grid {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.4fr);
    align-items: start;
  }

  .monitor-card .stacked-links {
    max-width: none;
  }

  .monitor-display {
    max-width: none;
  }
}

@media (min-width: 1600px) {
  .dashboard-grid {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr) minmax(0, 1fr);
  }
}

.live-automation-grid {
  display: flex;
  flex-direction: column;
  gap: clamp(1.2rem, 2vw, 2rem);
}

.live-automation-controls {
  display: flex;
  flex-direction: column;
  gap: clamp(1rem, 1.8vw, 1.6rem);
}

.live-automation-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.status-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.status-card {
  border-radius: 1.25rem;
  border: 1px solid rgba(120, 140, 220, 0.26);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.94) 0%, rgba(239, 244, 255, 0.88) 100%);
  padding: 1.1rem 1.25rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.status-card:hover,
.status-card:focus-within {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px rgba(79, 103, 210, 0.15);
  border-color: rgba(79, 103, 210, 0.35);
}

.status-card[data-state="on"] {
  border-color: rgba(31, 179, 122, 0.32);
  background: linear-gradient(145deg, rgba(235, 255, 248, 0.92), rgba(212, 251, 234, 0.96));
  box-shadow: 0 18px 48px rgba(31, 179, 122, 0.22);
}

.status-card[data-state="off"] {
  border-color: rgba(255, 77, 109, 0.28);
  background: linear-gradient(145deg, rgba(255, 241, 244, 0.96), rgba(255, 229, 235, 0.94));
}

.status-card[data-state="unknown"] {
  opacity: 0.82;
}

.status-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: rgba(143, 156, 190, 0.6);
  box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.9);
}

.status-card[data-state="on"] .status-dot {
  background: var(--emerald-500);
}

.status-card[data-state="off"] .status-dot {
  background: var(--rose-500);
}

.status-label {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--slate-900);
}

.status-state {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.78);
  font-variant-numeric: tabular-nums;
}

.status-state[data-live-diff="true"] {
  color: var(--brand-600);
}

.status-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.status-actions .btn {
  flex: 1 1 120px;
  min-width: 0;
}

.status-updated {
  margin-top: 0.35rem;
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.7);
}

.automation-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.automation-delay {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  color: rgba(71, 85, 105, 0.85);
}

.automation-delay-input {
  width: 120px;
  min-height: 3rem;
  padding: 0.75rem 1.15rem;
  border-radius: 1rem;
  border: 1px solid rgba(120, 140, 200, 0.45);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: inset 0 1px 2px rgba(120, 140, 200, 0.18);
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  color: var(--slate-700);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.automation-delay-input:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.automation-presets {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.btn.btn-soft {
  background: rgba(99, 102, 241, 0.08);
  color: var(--brand-600);
  border: 1px solid rgba(99, 102, 241, 0.18);
  box-shadow: none;
}

.btn.btn-soft:hover,
.btn.btn-soft:focus-visible {
  background: rgba(99, 102, 241, 0.16);
  border-color: rgba(99, 102, 241, 0.32);
  color: var(--brand-600);
}

.btn.btn-soft.is-active {
  background: linear-gradient(135deg, var(--brand-500), var(--brand-600));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 12px 28px rgba(99, 102, 241, 0.22);
}

.media-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.media-card-body {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.media-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.media-card-caption {
  font-size: 0.85rem;
  color: rgba(71, 85, 105, 0.72);
}

.media-card-frame {
  position: relative;
  width: 100%;
  border-radius: 1.35rem;
  border: 1px solid rgba(88, 110, 185, 0.35);
  background: #0b1120;
  box-shadow: 0 22px 60px rgba(12, 17, 32, 0.45);
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.media-card-frame[data-aspect="4x3"] {
  aspect-ratio: 4 / 3;
}

.media-card-frame[data-aspect="1x1"] {
  aspect-ratio: 1 / 1;
}

.media-card-frame[data-aspect="21x9"] {
  aspect-ratio: 21 / 9;
}

.media-card-frame iframe,
.media-card-frame video,
.media-card-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: cover;
  background: #0b1120;
}

.btn.btn-compact {
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  border-radius: 999px;
}

@media (pointer: coarse), (hover: none) {
  .btn {
    min-height: 3.1rem;
    padding: 0.95rem 1.5rem;
    font-size: 1rem;
  }

  .btn.btn-compact {
    padding: 0.7rem 1.2rem;
    font-size: 0.92rem;
    min-height: 2.6rem;
    border-radius: 0.95rem;
    border: 1px solid transparent;
    line-height: 1.2;
  }

  .automation-delay-input {
    height: 3rem;
    font-size: 1.05rem;
  }

  .status-card {
    padding: 1.35rem 1.4rem;
  }

  .status-actions .btn,
  .automation-buttons .btn,
  .automation-supplement .btn {
    flex: 1 1 calc(50% - 0.5rem);
    min-width: 0;
  }
}

.automation-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.automation-control {
  border-radius: 1rem;
  border: 1px solid rgba(122, 140, 220, 0.24);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.9), rgba(242, 246, 255, 0.92));
  box-shadow: 0 14px 30px rgba(72, 98, 190, 0.12);
  padding: 0.9rem 1.1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.automation-row {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.automation-row-main {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.automation-row-body {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.automation-row-actions {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.automation-row-actions .btn {
  align-self: flex-start;
}

.automation-supplement {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.automation-supplement .btn {
  flex: 1 1 150px;
}

.automation-control[data-has-timer="true"] {
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 20px 46px rgba(77, 111, 255, 0.22);
}

.automation-control h6 {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.95);
}

.automation-buttons {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.automation-buttons .btn {
  flex: 1 1 150px;
}

.automation-status {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.72);
  font-variant-numeric: tabular-nums;
}

.automation-control[data-has-timer="true"] .automation-status {
  color: var(--brand-600);
}

@media (min-width: 768px) {
  .automation-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
  }

  .automation-row-main {
    flex: 0 0 auto;
    min-width: 200px;
  }

  .automation-row-body {
    flex: 1 1 auto;
    gap: 0.85rem;
  }

  .automation-row-actions {
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
  }

  .automation-row-actions .btn {
    align-self: center;
  }

  .automation-supplement {
    gap: 0.6rem;
  }

  .automation-supplement .btn {
    flex: 0 1 auto;
  }
}

.toast-container {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  position: relative;
  border-radius: 1rem;
  border: 1px solid rgba(88, 110, 185, 0.22);
  background: rgba(255, 255, 255, 0.85);
  box-shadow: 0 20px 55px rgba(55, 78, 150, 0.18);
  color: var(--slate-700);
  overflow: hidden;
  transform: translateY(-10px);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.toast::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--brand-500);
}

.toast[data-variant="success"]::before {
  background: var(--emerald-500);
}

.toast[data-variant="danger"]::before {
  background: var(--rose-500);
}

.toast[data-variant="warning"]::before {
  background: var(--amber-500);
}

.toast[data-variant="info"]::before {
  background: var(--sky-500);
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

.toast.is-dismissing {
  opacity: 0;
  transform: translateY(-8px);
}

.toast-body {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 1rem 1.25rem 1.1rem 1.5rem;
}

.toast-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.toast-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--slate-900);
}

.toast-close {
  border: none;
  background: rgba(15, 23, 42, 0.04);
  border-radius: 0.65rem;
  padding: 0.35rem;
  color: rgba(15, 23, 42, 0.45);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease;
}

.toast-close:hover {
  background: rgba(15, 23, 42, 0.1);
  color: var(--slate-700);
}

.toast-close svg {
  width: 18px;
  height: 18px;
}

.toast-message {
  font-size: 0.9rem;
  color: rgba(71, 85, 105, 0.85);
}

.toast-time {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(100, 116, 139, 0.85);
}

.toast-time::before {
  content: "\23F1";
  font-size: 0.85rem;
  opacity: 0.7;
}

.floating-clock {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  padding: 0.55rem 0.9rem;
  border-radius: 1rem;
  border: 1px solid rgba(102, 120, 190, 0.22);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 24px 48px rgba(67, 96, 200, 0.22);
  font-family: "IBM Plex Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  color: var(--brand-600);
  pointer-events: none;
  user-select: none;
  z-index: 1100;
}

@media (max-width: 768px) {
  .floating-clock {
    bottom: 1rem;
    right: 1rem;
    font-size: 0.8rem;
    padding: 0.45rem 0.75rem;
  }
}

.lineup-table-wrapper {
  border-radius: 1.25rem;
  border: 1px solid rgba(180, 195, 255, 0.28);
  background: rgba(255, 255, 255, 0.9);
  overflow: hidden;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.lineup-table {
  width: 100%;
  min-width: 560px;
  border-collapse: separate;
  border-spacing: 0;
}

.lineup-table thead th {
  padding: 0.8rem 1.1rem;
  text-align: left;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.8);
  background: rgba(235, 240, 255, 0.9);
  border-bottom: 1px solid rgba(180, 195, 255, 0.35);
}

.lineup-table tbody td,
.lineup-table tbody th {
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid rgba(226, 232, 255, 0.6);
  font-size: 0.88rem;
  color: rgba(51, 65, 85, 0.9);
}

.lineup-table tbody tr:last-child td,
.lineup-table tbody tr:last-child th {
  border-bottom: none;
}

.lineup-table-row {
  transition: background 0.18s ease, transform 0.18s ease;
}

.lineup-table-row:hover {
  background: rgba(77, 111, 255, 0.08);
}

.lineup-table-row-active {
  background: rgba(77, 111, 255, 0.15);
  box-shadow: inset 4px 0 0 rgba(77, 111, 255, 0.6);
}

.mode-filter {
  border: 1px solid rgba(120, 140, 220, 0.24);
  background: rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.8);
  cursor: pointer;
  transition: background 0.18s ease, box-shadow 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.mode-filter:hover {
  border-color: rgba(77, 111, 255, 0.35);
  background: rgba(77, 111, 255, 0.1);
  color: var(--brand-600);
}

.mode-filter.is-active {
  background: linear-gradient(135deg, var(--brand-600), #5f8bff);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 18px 40px rgba(77, 111, 255, 0.24);
}

.input-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(71, 85, 105, 0.8);
}

.input-field {
  width: 100%;
  border-radius: 0.95rem;
  border: 1px solid rgba(158, 173, 225, 0.35);
  background: rgba(255, 255, 255, 0.9);
  padding: 0.65rem 1rem;
  font-size: 0.92rem;
  color: var(--slate-700);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.input-field:focus {
  outline: none;
  border-color: rgba(77, 111, 255, 0.55);
  box-shadow: 0 0 0 3px rgba(77, 111, 255, 0.18);
}

.leaderboard-row {
  border-radius: 1.25rem;
  border: 1px solid rgba(180, 195, 255, 0.28);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 16px 36px rgba(83, 104, 196, 0.14);
  padding: 1.1rem;
}

.glass-callout {
  border-radius: 1rem;
  padding: 0.9rem 1.1rem;
  background: rgba(0, 150, 242, 0.12);
  color: rgba(0, 82, 132, 0.85);
  border: 1px solid rgba(0, 150, 242, 0.2);
  font-size: 0.85rem;
}

.wrapper-sidebar {
  padding: 1.5rem 1.4rem;
  background: rgba(245, 248, 255, 0.92);
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.wrapper-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.wrapper-link {
  border-radius: 1.25rem;
  border: 1px solid rgba(120, 140, 200, 0.22);
  background: rgba(255, 255, 255, 0.72);
  padding: 0.75rem 0.9rem;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, transform 0.18s ease;
  color: var(--slate-700);
  cursor: pointer;
}

.wrapper-link:hover {
  border-color: rgba(77, 111, 255, 0.32);
  transform: translateX(4px);
}

.wrapper-link-title {
  font-weight: 600;
  color: var(--slate-900);
}

.wrapper-link-sub {
  font-size: 0.8rem;
  color: rgba(100, 116, 139, 0.85);
}

.wrapper-link.is-active {
  border-color: rgba(77, 111, 255, 0.55);
  background: linear-gradient(135deg, rgba(77, 111, 255, 0.18), rgba(181, 201, 255, 0.22));
  box-shadow: 0 20px 52px rgba(77, 111, 255, 0.25);
}

.wrapper-grid {
  display: grid;
  grid-template-columns: minmax(210px, 260px) minmax(0, 1fr);
  gap: 1.5rem;
}

.wrapper-content {
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
  background: rgba(255, 255, 255, 0.96);
}

.wrapper-shell .wrapper-frame {
  flex: 1 1 auto;
  border-radius: 1.5rem;
  border: 1px solid rgba(77, 111, 255, 0.24);
  background: #0b1120;
  box-shadow: 0 25px 70px rgba(12, 17, 32, 0.45);
  overflow: hidden;
  min-height: clamp(420px, 65vh, 720px);
  position: relative;
}
.wrapper-shell .wrapper-frame iframe {
  width: 100%;
  height: 100%;
  border: none;
  background: #0b1120;
  position: relative;
  z-index: 1;
}

.wrapper-frame__fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  text-align: center;
  background: linear-gradient(160deg, rgba(16, 24, 48, 0.86), rgba(16, 24, 48, 0.78));
  color: rgba(226, 232, 240, 0.92);
  font-size: 0.9rem;
  line-height: 1.5;
}

.wrapper-frame__fallback[hidden] {
  display: none;
}

.page-header {
  position: relative;
}

.page-header::after {
  content: "";
  position: absolute;
  inset: auto 0 -18px 0;
  height: 35px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(79, 103, 210, 0.12), transparent 70%);
  filter: blur(18px);
  z-index: -1;
}

.page-header-title {
  margin: 0;
}

.page-header-subtitle {
  margin: 0;
}

@supports not (backdrop-filter: blur(1px)) {
  .glass-panel,
  .wrapper-grid,
  .wrapper-sidebar,
  .wrapper-content,
  .toast,
  .floating-clock {
    background: #ffffff;
  }
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(77, 111, 255, 0.28);
}

::-webkit-scrollbar-track {
  background: transparent;
}

@media (max-width: 1024px) {
  .wrapper-grid {
    grid-template-columns: 1fr;
  }

  .wrapper-sidebar {
    border-bottom: 1px solid rgba(77, 111, 255, 0.18);
    padding: 1.5rem;
  }
}

@media (max-width: 640px) {
  .glass-panel {
    border-radius: 1.25rem;
  }

  .nav-link::after {
    display: none;
  }
}

@media (max-width: 520px) {
  .btn-group {
    flex-wrap: wrap;
  }

  .btn-group .btn {
    flex: 1 1 100%;
    border-radius: 0;
  }

  .btn-group .btn:first-child {
    border-top-left-radius: 0.95rem;
    border-top-right-radius: 0.95rem;
    border-bottom-left-radius: 0;
  }

  .btn-group .btn:last-child {
    border-bottom-left-radius: 0.95rem;
    border-bottom-right-radius: 0.95rem;
    border-top-right-radius: 0;
  }
}
