:root {
  color-scheme: light;
  --bg: #f3f6fb;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --text: #0f1f38;
  --muted: #617089;
  --line: #d7deea;
  --brand: #1167e8;
  --brand-dark: #0a4fb8;
  --brand-navy: #082a5b;
  --green: #15803d;
  --green-dark: #116434;
  --danger: #b42318;
  --blue: #1167e8;
  --amber: #f59e0b;
  --shadow: 0 18px 45px rgba(15, 31, 56, .08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, #f8fbff 0, #eef4fb 260px, var(--bg) 100%);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 15px;
}

a {
  color: var(--brand);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, .94);
  color: var(--text);
  border-bottom: 1px solid rgba(215, 222, 234, .86);
  box-shadow: 0 10px 28px rgba(15, 31, 56, .06);
  backdrop-filter: blur(12px);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.brand-lockup-large {
  gap: 14px;
}

.cloud-mark {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 42px;
  height: 28px;
  background: linear-gradient(135deg, #1888ff, #075edc);
  border-radius: 999px;
  box-shadow: 0 10px 22px rgba(17, 103, 232, .24);
}

.cloud-mark::before,
.cloud-mark::after {
  position: absolute;
  content: "";
  background: inherit;
  border-radius: 999px;
}

.cloud-mark::before {
  width: 20px;
  height: 20px;
  left: 7px;
  top: -8px;
}

.cloud-mark::after {
  width: 24px;
  height: 24px;
  right: 5px;
  top: -11px;
}

.brand-name {
  display: inline-flex;
  align-items: baseline;
  color: var(--brand-navy);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.brand-name span {
  color: var(--brand);
}

.brand-lockup-large .cloud-mark {
  width: 54px;
  height: 36px;
}

.brand-lockup-large .cloud-mark::before {
  width: 26px;
  height: 26px;
  left: 9px;
  top: -10px;
}

.brand-lockup-large .cloud-mark::after {
  width: 31px;
  height: 31px;
  right: 6px;
  top: -14px;
}

.brand-lockup-large .brand-name {
  font-size: clamp(38px, 6vw, 64px);
}

.topbar nav {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.topbar-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-width: 0;
}

.topbar a {
  min-height: 34px;
  padding: 8px 10px;
  color: #344054;
  border-radius: 7px;
  text-decoration: none;
  font-weight: 700;
}

.topbar a:hover {
  background: #edf4ff;
  color: var(--brand);
}

.topbar-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  max-width: 270px;
  min-height: 42px;
  padding: 7px 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  text-decoration: none;
}

.topbar-user-chip i {
  color: var(--brand);
  font-size: 21px;
}

.topbar-user-chip span {
  display: grid;
  min-width: 0;
  line-height: 1.1;
}

.topbar-user-chip strong,
.topbar-user-chip em {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-user-chip strong {
  color: var(--text);
  font-size: 13px;
}

.topbar-user-chip em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.topbar-user-chip:hover {
  background: #edf4ff;
}

.page {
  width: min(1180px, calc(100% - 32px));
  margin: 30px auto 60px;
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: min(1180px, calc(100% - 32px));
  margin: -32px auto 28px;
  color: #667085;
  font-size: 13px;
}

.app-footer a {
  color: var(--brand-navy);
  font-weight: 800;
  text-decoration: none;
}

.app-footer a:hover {
  color: var(--brand);
}

.app-footer span::before {
  content: "-";
  margin-right: 8px;
  color: #98a2b3;
}

.app-footer-login {
  position: fixed;
  right: 24px;
  bottom: 18px;
  justify-content: flex-end;
  width: auto;
  margin: 0;
}

.impersonation-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 18px;
  padding: 14px 16px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  color: #7c2d12;
  box-shadow: 0 12px 26px rgba(124, 45, 18, .08);
}

.impersonation-banner strong {
  display: block;
  margin-bottom: 3px;
  color: #9a3412;
}

.impersonation-banner span {
  color: #7c2d12;
}

.impersonation-banner form {
  flex: 0 0 auto;
  padding: 0;
  background: transparent;
  border: 0;
}

h1 {
  margin: 0 0 22px;
  font-size: 28px;
}

h2 {
  margin: 0 0 16px;
  font-size: 19px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  box-shadow: var(--shadow);
}

.metric {
  display: block;
  margin-top: 8px;
  font-size: 32px;
  font-weight: 800;
}

.muted {
  color: var(--muted);
}

.home-actions-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.home-action-card {
  display: grid;
  gap: 14px;
  align-content: space-between;
  min-height: 210px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
}

.home-action-card-monitor {
  background:
    linear-gradient(135deg, rgba(8, 42, 91, .98), rgba(17, 103, 232, .92) 62%, rgba(21, 128, 61, .88)),
    var(--brand-navy);
  color: #fff;
}

.home-action-card h2 {
  margin: 0 0 7px;
  font-size: 21px;
}

.home-action-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.42;
}

.home-action-card-monitor p,
.home-action-card-monitor .home-action-meta span {
  color: rgba(255, 255, 255, .82);
}

.home-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: #e8f2ff;
  color: var(--brand-dark);
  border-radius: 10px;
  font-size: 18px;
}

.home-action-card-monitor .home-action-icon {
  background: rgba(255, 255, 255, .14);
  color: #fff;
}

.home-action-card-monitor .button {
  background: #fff;
  color: var(--brand-navy);
  box-shadow: none;
}

.home-action-card-monitor .button:hover {
  background: #e8f2ff;
  color: var(--brand-dark);
}

.home-action-card-monitor .button-secondary {
  background: rgba(255, 255, 255, .14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, .24);
}

.home-action-card-monitor .button-secondary:hover {
  background: rgba(255, 255, 255, .22);
  color: #fff;
}

.home-action-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.home-action-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.home-action-meta span {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 4px 8px;
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
}

.home-summary-grid {
  display: grid;
  grid-template-columns: 1.25fr repeat(3, minmax(150px, .7fr));
  gap: 12px;
  margin-bottom: 16px;
}

.home-summary-card {
  padding: 16px;
}

.home-summary-card h2 {
  margin-bottom: 10px;
  font-size: 17px;
}

.home-summary-card .metric {
  margin-top: 0;
  font-size: 30px;
}

.home-public-links {
  margin-top: 0;
}

.home-monitor-links {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
}

.home-note {
  margin: 14px 0 0;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(15, 31, 56, .54);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-panel {
  width: min(620px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  padding: 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 28px 80px rgba(15, 31, 56, .28);
}

.modal-panel textarea {
  min-height: 130px;
}

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

.icon-button {
  width: 38px;
  min-height: 38px;
  padding: 0;
  background: #eef2f6;
  color: #344054;
  box-shadow: none;
}

.icon-button:hover {
  background: #dfe7f1;
  color: #1d2939;
}

.field-help {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

.toolbar {
  display: flex;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 18px;
  padding: 14px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

label {
  display: block;
  margin: 0 0 6px;
  font-weight: 700;
}

input,
select,
textarea,
button {
  min-height: 40px;
  border-radius: 6px;
  border: 1px solid var(--line);
  padding: 9px 11px;
  font: inherit;
}

input,
select,
textarea {
  background: #fff;
  color: var(--text);
  transition: border-color .16s ease, box-shadow .16s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(17, 103, 232, .72);
  box-shadow: 0 0 0 4px rgba(17, 103, 232, .12);
  outline: 0;
}

textarea {
  width: 100%;
  resize: vertical;
}

input[type="checkbox"] {
  min-height: 0;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  border: 0;
  background: linear-gradient(135deg, var(--brand), #064fbf);
  color: #fff;
  border-radius: 6px;
  padding: 9px 15px;
  text-decoration: none;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 20px rgba(17, 103, 232, .18);
}

button:hover,
.button:hover {
  background: linear-gradient(135deg, var(--brand-dark), #073f94);
}

.button-secondary,
button.secondary {
  background: #344054;
  box-shadow: none;
}

.button-light {
  background: #eef2f6;
  color: #344054;
  box-shadow: none;
}

.button-light:hover {
  background: #dfe7f1;
  color: #1d2939;
}

.button-danger,
button.danger {
  background: var(--danger);
  box-shadow: none;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.form-grid p {
  margin: 0;
}

.form-wide {
  grid-column: 1 / -1;
}

.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, .7fr);
  gap: 18px;
  margin-bottom: 18px;
}

.page-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
  padding: 24px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(8, 42, 91, .98), rgba(17, 103, 232, .92) 62%, rgba(21, 128, 61, .88)),
    var(--brand-navy);
  border-radius: 8px;
  box-shadow: 0 18px 46px rgba(15, 31, 56, .12);
}

.page-hero h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 42px);
  line-height: 1.05;
}

.page-hero .muted {
  max-width: 720px;
  color: rgba(255, 255, 255, .82);
}

.page-hero .button {
  flex: 0 0 auto;
  background: #fff;
  color: var(--brand-navy);
  box-shadow: none;
}

.hero-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 260px;
  background:
    linear-gradient(135deg, rgba(19, 111, 67, .96), rgba(11, 92, 171, .9)),
    #0f172a;
  color: #fff;
}

.hero-panel h2 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(28px, 4vw, 48px);
  line-height: 1.05;
}

.hero-panel .muted {
  max-width: 700px;
  color: rgba(255, 255, 255, .82);
  font-size: 18px;
}

.eyebrow {
  margin: 0 0 12px;
  color: #facc15;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

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

.panel-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-title-row h2,
.panel-title-row p {
  margin-top: 0;
}

.calendar-panel {
  margin-bottom: 18px;
}

.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}

.calendar-head {
  color: #475467;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.calendar-day {
  min-height: 96px;
  padding: 9px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.calendar-day-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
}

.calendar-day.today {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 2px rgba(19, 111, 67, .18);
}

.calendar-empty {
  background: transparent;
  border-color: transparent;
}

.calendar-day strong {
  display: block;
  margin: 0;
}

.calendar-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  margin: 0;
  background: #e8f2ff;
  color: var(--brand-dark);
  border-radius: 999px;
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
}

.calendar-add:hover {
  background: var(--brand);
  color: #fff;
}

.calendar-day a:not(.calendar-add),
.more-badge {
  display: block;
  margin-top: 4px;
  padding: 4px 6px;
  overflow: hidden;
  background: #e8f2ff;
  color: var(--brand-dark);
  border-radius: 5px;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.more-badge {
  background: #fff7ed;
  color: #9a3412;
}

.playlist-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
}

.playlist-sidebar {
  align-self: start;
}

.playlist-card {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding: 12px;
  color: var(--text);
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
}

.playlist-card.active {
  border-color: var(--brand);
  box-shadow: inset 0 0 0 2px rgba(19, 111, 67, .16);
}

.playlist-card span {
  color: var(--muted);
  font-size: 13px;
}

.playlist-card .status {
  justify-self: start;
  font-style: normal;
}

.monitor-list {
  display: grid;
  gap: 14px;
}

.monitor-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.monitor-card-body {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.monitor-card-body p {
  margin: 0;
}

.monitor-detail-hero {
  align-items: center;
  margin-bottom: 14px;
  padding: 20px;
}

.monitor-detail-hero h2 {
  font-size: clamp(28px, 3.6vw, 40px);
}

.cloudmonitor-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.kpi-card {
  min-width: 0;
  padding: 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(15, 31, 56, .07);
}

.kpi-card-strong {
  background: linear-gradient(135deg, #082a5b, #1167e8);
  color: #fff;
  border-color: rgba(255, 255, 255, .18);
}

.kpi-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.kpi-card-strong .kpi-label,
.kpi-card-strong .kpi-meta {
  color: rgba(255, 255, 255, .78);
}

.kpi-card strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 20px;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.kpi-card-strong strong {
  color: #fff;
}

.kpi-meta {
  display: block;
  min-width: 0;
  margin-top: 6px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cloudmonitor-dashboard {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: 14px;
  margin-bottom: 14px;
}

.cloudmonitor-command-panel,
.cloudmonitor-info-panel,
.compact-monitor-panel,
.compact-endpoint-panel {
  padding: 16px;
}

.compact-title-row {
  align-items: center;
  margin-bottom: 12px;
}

.compact-title-row h2 {
  margin-bottom: 4px;
  font-size: 18px;
}

.compact-title-row .muted {
  margin: 0;
  font-size: 13px;
}

.monitor-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

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

.detail-list {
  display: grid;
  gap: 10px;
  margin: 0;
}

.detail-list div {
  padding: 11px 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.detail-list dt {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-list dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

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

.cloudmonitor-actions form,
.cloudmonitor-status-form {
  display: grid;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.cloudmonitor-actions button {
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  font-size: 13px;
  box-shadow: none;
}

.cloudmonitor-status-form {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.cloudmonitor-status-form p {
  margin: 0;
}

.cloudmonitor-status-form select,
.cloudmonitor-status-form button {
  min-height: 36px;
  padding: 7px 10px;
}

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

.compact-info-grid-four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
}

.compact-info-grid > div {
  min-width: 0;
  padding: 10px 11px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.compact-info-grid span,
.compact-text-block span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.compact-info-grid strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-info-grid em {
  display: block;
  min-width: 0;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-text-block {
  margin-top: 8px;
  padding: 10px 11px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.compact-text-block code,
.compact-text-block p {
  display: block;
  max-height: 64px;
  margin: 0;
  overflow: auto;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.compact-link-stack {
  display: grid;
  gap: 8px;
}

.endpoint-list {
  display: grid;
  gap: 12px;
}

.endpoint-list > div {
  display: grid;
  gap: 7px;
}

.endpoint-list-compact {
  gap: 8px;
}

.endpoint-list-compact > div {
  grid-template-columns: 130px minmax(0, 1fr);
  align-items: center;
}

.endpoint-list-compact strong {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

.compact-endpoint-panel .public-link-control,
.compact-monitor-panel .public-link-control {
  gap: 6px;
}

.compact-endpoint-panel .public-link,
.compact-monitor-panel .public-link {
  min-height: 36px;
  padding: 8px 10px;
  font-size: 12px;
}

.compact-endpoint-panel .copy-link-button,
.compact-monitor-panel .copy-link-button {
  min-height: 36px;
  padding: 8px 10px;
  font-size: 12px;
}

.break-anywhere {
  overflow-wrap: anywhere;
  white-space: normal !important;
}

.monitor-choice-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.monitor-choice {
  display: flex;
  gap: 10px;
  min-height: 72px;
  margin: 0;
  padding: 12px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.monitor-choice input {
  margin-top: 3px;
}

.monitor-choice small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-weight: 400;
}

.playlist-list {
  display: grid;
  gap: 12px;
}

.playlist-row-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 14px;
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.playlist-row-card h2,
.playlist-row-card p {
  margin-top: 0;
}

.playlist-row-actions {
  justify-content: flex-end;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.table-wrap table {
  border: 0;
  border-radius: 0;
}

.playlist-table {
  min-width: 980px;
}

.playlist-table th:nth-child(1),
.playlist-table td:nth-child(1) {
  width: 22%;
}

.playlist-table th:nth-child(4),
.playlist-table td:nth-child(4) {
  width: 17%;
}

.playlist-table th:nth-child(8),
.playlist-table td:nth-child(8) {
  width: 220px;
}

.monitors-table {
  min-width: 1040px;
}

.monitors-table th:nth-child(1),
.monitors-table td:nth-child(1) {
  width: 24%;
}

.monitors-table th:nth-child(2),
.monitors-table td:nth-child(2) {
  width: 13%;
}

.monitors-table th:nth-child(3),
.monitors-table td:nth-child(3),
.monitors-table th:nth-child(4),
.monitors-table td:nth-child(4) {
  width: 12%;
}

.monitors-table th:nth-child(5),
.monitors-table td:nth-child(5),
.monitors-table th:nth-child(6),
.monitors-table td:nth-child(6) {
  width: 16%;
}

.monitors-table th:nth-child(7),
.monitors-table td:nth-child(7) {
  width: 132px;
}

.monitors-table-all {
  min-width: 1220px;
}

.monitors-table-all th:nth-child(1),
.monitors-table-all td:nth-child(1) {
  width: 18%;
}

.monitors-table-all th:nth-child(2),
.monitors-table-all td:nth-child(2) {
  width: 17%;
}

.monitors-table-all th:nth-child(3),
.monitors-table-all td:nth-child(3),
.monitors-table-all th:nth-child(4),
.monitors-table-all td:nth-child(4),
.monitors-table-all th:nth-child(5),
.monitors-table-all td:nth-child(5) {
  width: 10%;
}

.monitors-table-all th:nth-child(6),
.monitors-table-all td:nth-child(6),
.monitors-table-all th:nth-child(7),
.monitors-table-all td:nth-child(7) {
  width: 15%;
}

.monitors-table-all th:nth-child(8),
.monitors-table-all td:nth-child(8) {
  width: 132px;
}

.monitors-table .table-actions {
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.copy-icon-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 36px;
  gap: 6px;
  align-items: center;
}

.table-code-link {
  min-height: 34px;
  padding: 7px 9px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
}

.copy-icon-button {
  width: 36px;
  min-width: 36px;
  min-height: 34px;
  padding: 0;
}

.copy-icon-button i {
  margin: 0;
}

.table-subtext {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.25;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-wrap: wrap;
}

.table-actions form {
  display: inline-flex;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

form.table-actions {
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.table-actions .button,
.table-actions button {
  min-height: 32px;
  padding: 7px 9px;
  border-radius: 6px;
  font-size: 12px;
  box-shadow: none;
}

.table-action-primary {
  background: #edf4ff;
  color: var(--brand-dark);
}

.table-action-primary:hover {
  background: #dbeafe;
  color: #073f94;
}

.table-action-secondary {
  background: #eef2f6;
  color: #344054;
}

.table-action-secondary:hover {
  background: #dfe7f1;
  color: #1d2939;
}

.table-action-danger {
  background: #fff1f0;
  color: var(--danger);
}

.table-action-danger:hover {
  background: #fee4e2;
  color: #8a1f16;
}

.content-table {
  min-width: 980px;
}

.content-table th:nth-child(1),
.content-table td:nth-child(1) {
  width: 96px;
}

.content-table th:nth-child(2),
.content-table td:nth-child(2) {
  width: 34%;
}

.content-table th:nth-child(5),
.content-table td:nth-child(5) {
  width: 110px;
}

.content-table th:nth-child(7),
.content-table td:nth-child(7) {
  width: 92px;
}

.content-thumb-button {
  display: inline-flex;
  width: 82px;
  height: 58px;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  background: #111827;
  border: 1px solid var(--line);
  border-radius: 7px;
  box-shadow: none;
  cursor: zoom-in;
}

.content-thumb-button:hover {
  background: #111827;
  border-color: var(--brand);
}

.content-table-title {
  width: 100%;
  min-height: 34px;
  padding: 7px 9px;
}

.content-duration-input {
  width: 82px;
  min-height: 34px;
  padding: 7px 9px;
}

.content-active-check {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
}

.content-active-check input {
  margin: 0;
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
  color: var(--muted);
}

.empty-state {
  padding: 28px;
  background: var(--panel-soft);
  border: 1px dashed #b8c2d2;
  border-radius: 8px;
  text-align: center;
}

.empty-state h2 {
  margin-top: 0;
}

.flow-steps {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.flow-steps span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  color: #475467;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 700;
}

.flow-steps .active {
  color: var(--brand-dark);
  background: #e8f2ff;
  border-color: #bed8ff;
}

.form-page-panel {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 22px;
}

.form-page-panel h2,
.form-page-panel p {
  margin-top: 0;
}

.playlist-form {
  min-width: 0;
}

.playlist-form-sections {
  display: grid;
  gap: 16px;
}

.profile-password-box {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.profile-password-box h2 {
  margin-bottom: 4px;
  font-size: 17px;
}

.profile-password-box p {
  margin-bottom: 0;
}

.profile-tabs-panel {
  padding: 0;
  overflow: hidden;
}

.profile-tabs {
  margin: 0;
  padding: 14px 14px 0;
  border-bottom: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
}

.profile-tab-panel {
  padding: 20px;
}

.profile-tab-panel .form-page-panel {
  padding: 0;
  border: 0;
  box-shadow: none;
}

.profile-credits-head {
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
}

.profile-credits-head h2,
.profile-credits-head p {
  margin-top: 0;
}

.credit-settings-box {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.credit-settings-box .panel-title-row {
  margin-bottom: 0;
}

.credit-settings-box h2,
.credit-settings-box p {
  margin-top: 0;
}

.playlist-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 4px;
  background: #eef2f6;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.playlist-tab {
  min-height: 40px;
  background: transparent;
  color: #344054;
  border: 0;
}

.playlist-tab.active {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 4px 14px rgba(15, 23, 42, .08);
}

.playlist-tab:hover,
.playlist-tab.active:hover {
  background: var(--brand);
  color: #fff;
}

.playlist-tab-panel {
  display: none;
}

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

.form-row {
  display: grid;
  gap: 14px;
}

.form-row p {
  margin: 0;
}

.form-row input,
.form-row select {
  width: 100%;
}

.form-row-title {
  grid-template-columns: minmax(0, 1fr) minmax(120px, 180px);
}

.form-row-pair {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.form-check-wrap {
  display: flex;
  align-items: end;
}

.form-actions {
  margin-top: 16px;
}

.form-actions .form-wide {
  flex: 1 0 100%;
}

.text-toggle {
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.playlist-text-preview {
  min-height: 74px;
  max-width: 100%;
  overflow: hidden;
  padding: 16px 18px;
  border-radius: 8px;
  font-weight: 800;
  line-height: 1.18;
  overflow-wrap: anywhere;
}

.color-swatch-grid {
  display: grid;
  grid-template-columns: repeat(5, 34px);
  gap: 8px;
}

.color-swatch {
  display: block;
  margin: 0;
  cursor: pointer;
}

.color-swatch input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.color-swatch span {
  display: block;
  width: 34px;
  height: 34px;
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px var(--line);
}

.color-swatch input:checked + span {
  box-shadow: 0 0 0 3px var(--brand);
}

.upload-panel-form {
  display: grid;
  gap: 16px;
}

.upload-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 4px;
  background: #eef2f6;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.upload-tab {
  min-height: 40px;
  background: transparent;
  color: #344054;
  border: 0;
}

.upload-tab.active {
  background: #fff;
  color: var(--brand);
  box-shadow: 0 4px 14px rgba(15, 23, 42, .08);
}

.upload-tab:hover,
.upload-tab.active:hover {
  background: var(--brand);
  color: #fff;
}

.upload-tab-panel {
  display: none;
}

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

.notice-box {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-bottom: 14px;
  padding: 12px 14px;
  color: #7a4a00;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
}

.notice-box p {
  margin: 0;
  line-height: 1.4;
}

.upload-field-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.45fr) minmax(150px, .72fr) minmax(190px, .9fr);
  gap: 12px;
  align-items: stretch;
}

.upload-pdf-grid {
  grid-template-columns: minmax(300px, 1.55fr) minmax(150px, .7fr) minmax(190px, .85fr) minmax(190px, .85fr);
}

.upload-field-grid p {
  min-width: 0;
  margin: 0;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.upload-field-grid label {
  color: #344054;
  font-size: 13px;
}

.upload-field-grid input,
.upload-field-grid select {
  width: 100%;
}

.upload-file-field input[type="file"] {
  min-height: 42px;
  padding: 7px;
  overflow: hidden;
  background: #fff;
  font-size: 14px;
}

.upload-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 2px;
}

.upload-actions button {
  min-width: 190px;
  box-shadow: 0 10px 22px rgba(17, 103, 232, .16);
}

.fa-solid {
  margin-right: 6px;
}

.upload-progress {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  align-items: center;
  gap: 10px;
}

.upload-progress-bar {
  height: 12px;
  overflow: hidden;
  background: #d9dee7;
  border-radius: 999px;
}

.upload-progress-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--brand), var(--blue));
  border-radius: inherit;
  transition: width .18s ease;
}

.upload-status {
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.38;
}

.upload-status-error {
  color: var(--danger);
  font-weight: 700;
}

.playlist-content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  align-items: start;
}

.content-preview-card {
  min-width: 0;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.content-preview-card.dragging {
  opacity: .45;
}

.content-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 10px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}

.drag-handle {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  background: #eef2f6;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #344054;
  cursor: grab;
  font-size: 12px;
  font-weight: 800;
}

.position-badge {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.content-preview-media {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 3;
  background: #111827;
  cursor: zoom-in;
}

.content-preview-media img,
.content-preview-media video {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.content-preview-body {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.content-preview-body input[type="number"] {
  width: 100%;
}

.content-preview-body .danger {
  width: 100%;
}

.content-title {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.media-lightbox[hidden] {
  display: none;
}

.media-lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, .92);
}

.media-lightbox-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.media-lightbox-content img,
.media-lightbox-content video {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  background: #000;
  border-radius: 8px;
}

.media-lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 1001;
  background: #fff;
  color: #111827;
}

.playlist-settings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.subpanel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.content-picker {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.content-picker label {
  display: flex;
  gap: 10px;
  min-height: 58px;
  margin: 0;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}

.content-picker small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.compact-table th,
.compact-table td {
  padding: 9px;
}

.small-input {
  width: 84px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

th,
td {
  padding: 11px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  background: #eef2f6;
  font-size: 13px;
  text-transform: uppercase;
  color: #475467;
}

tr:last-child td {
  border-bottom: 0;
}

.users-table {
  table-layout: fixed;
}

.users-list-panel {
  margin-top: 18px;
}

.users-table th:nth-child(1),
.users-table td:nth-child(1) {
  width: 22%;
}

.users-table th:nth-child(2),
.users-table td:nth-child(2) {
  width: 26%;
}

.users-table th:nth-child(3),
.users-table td:nth-child(3),
.users-table th:nth-child(4),
.users-table td:nth-child(4) {
  width: 11%;
}

.users-table th:nth-child(5),
.users-table td:nth-child(5) {
  width: 10%;
}

.users-table th:nth-child(6),
.users-table td:nth-child(6) {
  width: 20%;
}

.inline-action-form {
  display: flex;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.user-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}

.user-action-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13px;
  line-height: 1;
  box-shadow: none;
  white-space: nowrap;
}

.user-action-secondary {
  background: #eef2f6;
  color: #344054;
}

.user-action-secondary:hover {
  background: #dfe7f1;
  color: #1d2939;
}

.user-action-primary {
  background: #edf4ff;
  color: var(--brand-dark);
}

.user-action-primary:hover {
  background: #dbeafe;
  color: #073f94;
}

.user-action-danger {
  background: #fff1f3;
  color: var(--danger);
}

.user-action-danger:hover {
  background: #fee4e2;
  color: #912018;
}

.user-action-button i {
  font-size: 12px;
}

.code-inline {
  display: inline-block;
  max-width: 100%;
  padding: 3px 6px;
  overflow: hidden;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 5px;
  text-overflow: ellipsis;
  vertical-align: middle;
  white-space: nowrap;
}

.checkline {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
}

.edit-actions {
  display: flex;
  align-items: end;
  gap: 8px;
  flex-wrap: wrap;
}

.alert {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.alert-success {
  border-color: #a6d8b8;
  background: #ecfdf3;
}

.alert-error {
  border-color: #fecdca;
  background: #fff1f3;
}

.alert-info {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.limit-request-alert {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.limit-request-alert .button {
  flex: 0 0 auto;
  box-shadow: none;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2f6;
  color: #344054;
  font-size: 13px;
  font-weight: 700;
}

.status-on {
  background: #dcfce7;
  color: var(--green-dark);
}

.status-off {
  background: #fee4e2;
  color: #912018;
}

.preview-thumb {
  width: 76px;
  height: 54px;
  object-fit: contain;
  background: #111827;
  border-radius: 6px;
}

.login-box {
  width: min(420px, calc(100% - 32px));
  margin: 70px auto;
}

.login-page {
  min-height: 100vh;
  background:
    linear-gradient(135deg, #f9fbff 0, #edf5ff 46%, #eef7f1 100%);
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(320px, .95fr) minmax(320px, 430px);
  gap: clamp(28px, 6vw, 76px);
  align-items: center;
  width: min(1100px, calc(100% - 36px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 42px 0;
}

.login-brand {
  display: grid;
  gap: 22px;
}

.login-brand p {
  max-width: 540px;
  margin: 0;
  color: #475467;
  font-size: clamp(18px, 2.4vw, 27px);
  line-height: 1.28;
}

.login-page .login-box {
  width: 100%;
  margin: 0;
  padding: 30px;
}

.login-page .login-box h1 {
  margin-bottom: 8px;
  font-size: 32px;
}

.login-page .login-box form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.login-page .login-box form p {
  margin: 0;
}

.login-page .login-box input {
  width: 100%;
  min-height: 46px;
}

.login-page .login-box button {
  width: 100%;
  min-height: 46px;
  margin-top: 4px;
}

.login-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.login-actions .button {
  width: 100%;
  min-height: 42px;
  box-shadow: none;
}

.public-link-control {
  display: flex;
  align-items: stretch;
  gap: 8px;
  width: 100%;
}

.public-link {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  word-break: break-all;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #344054;
  font-size: 13px;
  text-decoration: none;
}

.public-link:hover {
  border-color: #b8c5d8;
  color: var(--brand);
}

.copy-link-button {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 9px 12px;
  background: #edf4ff;
  color: var(--brand-dark);
  box-shadow: none;
}

.copy-link-button:hover,
.copy-link-button.copied {
  background: #dbeafe;
  color: #073f94;
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-right {
    align-items: flex-start;
    flex-direction: column;
    width: 100%;
  }

  .topbar-user-chip {
    max-width: 100%;
  }

  .brand-name {
    font-size: 22px;
  }

  .cloud-mark {
    width: 36px;
    height: 24px;
  }

  .login-shell {
    grid-template-columns: 1fr;
    align-items: start;
    min-height: auto;
    padding: 28px 0;
  }

  .login-brand {
    gap: 14px;
  }

  .brand-lockup-large .brand-name {
    font-size: 38px;
  }

  .login-brand p {
    font-size: 18px;
  }

  .public-link-control {
    flex-direction: column;
  }

  .login-actions {
    grid-template-columns: 1fr;
  }

  .upload-field-grid,
  .upload-pdf-grid {
    grid-template-columns: 1fr;
  }

  .upload-actions {
    justify-content: stretch;
  }

  .upload-actions button {
    width: 100%;
  }

  .app-footer,
  .app-footer-login {
    position: static;
    justify-content: center;
    width: calc(100% - 32px);
    margin: 18px auto 24px;
  }

  .dashboard-grid,
  .home-actions-grid,
  .home-summary-grid,
  .playlist-layout,
  .playlist-row-card,
  .form-page-panel,
  .cloudmonitor-kpis,
  .cloudmonitor-dashboard,
  .monitor-detail-grid,
  .monitor-detail-grid-three,
  .cloudmonitor-status-form,
  .compact-info-grid,
  .compact-info-grid-four,
  .endpoint-list-compact > div {
    grid-template-columns: 1fr;
  }

  .page-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .compact-grid,
  .calendar-grid,
  .form-row-title,
  .form-row-pair {
    grid-template-columns: 1fr;
  }

  table {
    display: block;
    overflow-x: auto;
  }
}
