/* =====================================================
   Structr – Global Theme System
   ===================================================== */

/* ---- Design Tokens --------------------------------- */
:root {
  /* Colors */
  --bg:           #0f1117;
  --bg-surface:   #161b27;
  --bg-elevated:  #1e2535;
  --border:       #262d3d;
  --border-light: #2f3850;

  --text:         #e4e8f0;
  --text-muted:   #7a8599;
  --text-faint:   #4a5568;

  --accent:       #6366f1;
  --accent-hover: #818cf8;
  --accent-dim:   rgba(99,102,241,.15);
  --primary:      var(--accent);
  --bg-card:      var(--bg-surface);

  --green:        #22c55e;
  --green-dim:    rgba(34,197,94,.15);
  --red:          #ef4444;
  --red-dim:      rgba(239,68,68,.15);
  --yellow:       #f59e0b;
  --yellow-dim:   rgba(245,158,11,.15);

  /* Sizing */
  --sidebar-w:    240px;
  --topbar-h:     60px;
  --radius:       10px;
  --radius-sm:    6px;
  --radius-lg:    16px;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,.5);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.6);

  /* Transitions */
  --t: .18s ease;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg:           #edf2f8;
  --bg-surface:   #ffffff;
  --bg-elevated:  #f6f8fb;
  --border:       #cfd9e6;
  --border-light: #aebdce;

  --text:         #111827;
  --text-muted:   #526173;
  --text-faint:   #8998aa;

  --accent:       #1f6feb;
  --accent-hover: #185abc;
  --accent-dim:   rgba(31,111,235,.13);
  --primary:      var(--accent);
  --bg-card:      var(--bg-surface);

  --green:        #15803d;
  --green-dim:    rgba(21,128,61,.12);
  --red:          #dc2626;
  --red-dim:      rgba(220,38,38,.1);
  --yellow:       #b45309;
  --yellow-dim:   rgba(180,83,9,.12);

  --shadow-sm:  0 1px 3px rgba(15,23,42,.08);
  --shadow-md:  0 8px 24px rgba(15,23,42,.1);
  --shadow-lg:  0 18px 46px rgba(15,23,42,.14);
}

/* ---- Reset & Base ---------------------------------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Ensure [hidden] always wins over display:flex/grid rules */
[hidden] { display: none !important; }

html { font-size: 15px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  cursor: default;
  caret-color: transparent;
}

:root[data-theme="light"] body {
  background:
    radial-gradient(900px 520px at 72% -18%, rgba(37,99,235,.08), transparent 58%),
    var(--bg);
}

input,
textarea,
select,
[contenteditable="true"] {
  cursor: text;
  caret-color: auto;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

code, .mono { font-family: 'Consolas', 'Fira Code', monospace; font-size: .85em; }

h1 { font-size: 1.4rem; font-weight: 600; }
h2 { font-size: 1.1rem; font-weight: 600; }
h3 { font-size: 1rem;   font-weight: 600; }
h4 { font-size: .9rem;  font-weight: 600; color: var(--text-muted); }

/* ---- Scrollbar -------------------------------------- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 99px; }

:root[data-theme="light"] {
  scrollbar-color: #aebdce #edf2f8;
}
:root[data-theme="light"] ::-webkit-scrollbar-track {
  background: #edf2f8;
}
:root[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: #aebdce;
  border-radius: 99px;
}
:root[data-theme="light"] ::-webkit-scrollbar-thumb:hover {
  background: #8998aa;
}

/* =====================================================
   Layout
   ===================================================== */

.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform var(--t);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  height: var(--topbar-h);
  padding: 0 1.4rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.sidebar-brand-logo {
  display: block;
  width: min(118px, 100%);
  height: auto;
  -webkit-user-drag: none;
  user-select: none;
}

.sidebar-brand-logo-light {
  display: none;
}

:root[data-theme="light"] .sidebar-brand-logo-light {
  display: block;
}

:root[data-theme="light"] .sidebar-brand-logo-dark {
  display: none;
}

.sidebar-nav {
  list-style: none;
  padding: .8rem 0;
  flex: 1;
  overflow-y: auto;
}

.sidebar-nav li a {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem 1.4rem;
  color: var(--text-muted);
  font-weight: 500;
  font-size: .9rem;
  transition: color var(--t), background var(--t);
  border-radius: 0;
  text-decoration: none;
}

.sidebar-nav li a svg {
  width: 18px; height: 18px;
  fill: currentColor;
  flex-shrink: 0;
}

.sidebar-nav li a:hover {
  color: var(--text);
  background: var(--bg-elevated);
}

.sidebar-nav li.active a {
  color: var(--accent-hover);
  background: var(--accent-dim);
  border-right: 3px solid var(--accent);
}

/* ── Sidebar footer – user menu ──────────────────────────── */
.sidebar-footer {
  position: relative;
  padding: .5rem .6rem;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: .3rem;
}

.sf-user {
  flex: 1;
  display: flex;
  align-items: center;
  gap: .55rem;
  background: none;
  border: none;
  cursor: pointer;
  padding: .4rem .5rem;
  border-radius: 8px;
  text-align: left;
  color: var(--text);
  transition: background var(--t);
  min-width: 0;
}
.sf-user:hover { background: var(--bg-elevated); }

.sf-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}

.sf-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.25;
}
.sf-name {
  font-size: .82rem;
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sf-timer {
  font-size: .67rem;
  color: var(--text-muted);
}

.sf-chevron {
  width: 16px;
  height: 16px;
  fill: var(--text-muted);
  flex-shrink: 0;
  transition: transform .2s;
}
.sf-user[aria-expanded="true"] .sf-chevron { transform: rotate(180deg); }

.sf-settings {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  padding: .4rem;
  border-radius: 7px;
  flex-shrink: 0;
  transition: color var(--t), background var(--t);
}
.sf-settings:hover { color: var(--text); background: var(--bg-elevated); text-decoration: none; }
.sf-settings svg { width: 17px; height: 17px; fill: currentColor; display: block; }

/* Popup menu (öffnet sich nach oben) */
.sf-popup {
  position: absolute;
  bottom: calc(100% + 6px);
  left: .5rem;
  right: .5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: 10px;
  padding: .3rem;
  display: none;
  z-index: 500;
  box-shadow: 0 -4px 24px rgba(0,0,0,.55);
}
.sf-popup.open { display: block; }

.sf-popup-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem .75rem;
  border-radius: 7px;
  font-size: .84rem;
  color: var(--text);
  transition: background var(--t);
  text-decoration: none;
}
.sf-popup-item[type="button"],
.sf-theme-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
  text-align: left;
}
.sf-popup-item:hover { background: rgba(255,255,255,.06); text-decoration: none; }
.sf-popup-item svg { width: 15px; height: 15px; fill: currentColor; flex-shrink: 0; }
.sf-theme-moon { display: none; }
:root[data-theme="light"] .sf-theme-sun { display: none; }
:root[data-theme="light"] .sf-theme-moon { display: block; }
.sf-popup-logout { color: var(--red); }
.sf-popup-logout:hover { background: rgba(239,68,68,.08); }

/* Main wrapper */
.main-wrapper {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Topbar */
.topbar {
  position: sticky;
  top: 0;
  height: var(--topbar-h);
  background: rgba(22, 27, 39, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,.06);
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 1.8rem;
  z-index: 100;
}

.topbar-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.topbar-toggle span {
  display: block;
  width: 20px; height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: var(--t);
}

.topbar-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -.01em;
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar-actions { display: flex; gap: .5rem; align-items: center; flex-shrink: 0; }

/* Push everything after actions to the right */
.topbar-actions ~ * { margin-left: auto; }

/* Content area */
.content {
  flex: 1;
  padding: 1.6rem 1.8rem;
  max-width: 1400px;
  width: 100%;
  animation: pageIn .22s ease both;
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(7px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .content { animation: none; }
}

/* =====================================================
   Cards
   ===================================================== */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}


.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.4rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
  flex-wrap: wrap;
}

.card-body {
  padding: 1.4rem;
}
.card-body.p0 { padding: 0; }

/* =====================================================
   Stat Grid
   ===================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.2rem;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  transition: border-color var(--t);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.stat-card:hover { border-color: var(--border-light); }
.stat-card.stat-up  { border-left: 3px solid var(--green); }
.stat-card.stat-down{ border-left: 3px solid var(--red); }

.stat-label { font-size: .8rem; color: var(--text-muted); margin-bottom: .35rem; text-transform: uppercase; letter-spacing: .5px; }
.stat-value { font-size: 2rem; font-weight: 700; }
.stat-value-next { font-size: 2rem !important; }
.stats-grid-6 { grid-template-columns: repeat(6, 1fr); }

/* ── Range bar ───────────────────────────────────── */
.range-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .65rem 1.2rem;
}
.range-bar-label {
  font-size: .8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
  white-space: nowrap;
  flex-shrink: 0;
}
.range-btns-h { display: flex; gap: .4rem; flex-wrap: wrap; }
.range-btn {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: .28rem .75rem;
  font-size: .8rem;
  color: var(--text-muted);
  cursor: pointer;
  text-align: center;
  transition: all var(--t);
  white-space: nowrap;
  line-height: 1.5;
}
.range-btn:hover { border-color: var(--border-light); color: var(--text); }
.range-btn.active { background: rgba(99,102,241,.15); border-color: rgba(99,102,241,.5); color: var(--text); }

/* =====================================================
   2-col grid
   ===================================================== */
.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
  margin-bottom: 1.2rem;
}
@media (max-width: 900px) { .grid-2col { grid-template-columns: 1fr; } }

/* =====================================================
   Tables
   ===================================================== */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .875rem;
}

.data-table th {
  text-align: left;
  padding: .8rem 1.2rem;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.data-table td {
  padding: .75rem 1.2rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.data-table tbody tr { background: var(--bg-elevated); }
.data-table tr:last-child td { border-bottom: none; }

.data-table tbody tr:hover { background: var(--border-light); }

.empty {
  text-align: center;
  color: var(--text-faint);
  padding: 2rem !important;
}

.loading { color: var(--text-muted); font-style: italic; }

/* =====================================================
   Skeleton Preloader
   ===================================================== */
@keyframes shimmer {
  0%   { background-position: -400% 0; }
  100% { background-position:  400% 0; }
}
.skeleton-cell {
  display: block;
  height: .8rem;
  border-radius: 4px;
  background: linear-gradient(
    90deg,
    var(--bg-elevated) 25%,
    var(--border-light) 50%,
    var(--bg-elevated) 75%
  );
  background-size: 400% 100%;
  animation: shimmer 1.6s ease-in-out infinite;
}
.skeleton-cell.w-30  { width: 30%; }
.skeleton-cell.w-40  { width: 40%; }
.skeleton-cell.w-55  { width: 55%; }
.skeleton-cell.w-70  { width: 70%; }
.skeleton-cell.w-full{ width: 100%; }
tr.skeleton-row td   { padding: .8rem 1.2rem; }

/* stat-value skeletons: block inside the large value div */
.stat-value .skeleton-cell {
  display: block;
  width: 55%;
  height: 2rem;
  margin-top: .15rem;
}

/* monitor-card skeleton: disable hover effect on fake cards */
.monitor-card:has(.skeleton-cell) {
  pointer-events: none;
}
.monitor-card:has(.skeleton-cell):hover {
  border-color: var(--border);
  box-shadow: none;
}

.actions { display: flex; gap: .35rem; white-space: nowrap; }

.monitor-row-actions {
  flex-wrap: wrap;
  align-items: center;
}

.monitor-mobile-cards {
  display: none;
}

.monitor-mobile-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .95rem;
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.monitor-mobile-card-inactive {
  opacity: .72;
}

.monitor-mobile-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .7rem;
}

.monitor-mobile-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .35rem;
}

.monitor-mobile-title strong {
  display: block;
  width: 100%;
  font-size: .95rem;
  line-height: 1.3;
}

.monitor-mobile-target {
  font-size: .8rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.monitor-mobile-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .45rem .6rem;
  font-size: .76rem;
  color: var(--text-muted);
}

.monitor-mobile-meta strong {
  color: var(--text);
  margin-left: .25rem;
  font-weight: 600;
}

.monitor-mobile-actions {
  display: grid;
  grid-template-columns: 1fr 1fr auto auto;
  gap: .5rem;
}

.monitor-mobile-card-skeleton .skeleton-cell {
  height: .72rem;
}

/* =====================================================
   Badges & Tags
   ===================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: .2rem .6rem;
  border-radius: 99px;
  font-size: .75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
}

.badge-up, .badge-success {
  background: var(--green-dim);
  color: var(--green);
}
.badge-down, .badge-failed, .badge-error {
  background: var(--red-dim);
  color: var(--red);
}
  .badge-paused {
    background: rgba(245,158,11,.15);
    color: var(--yellow);
  }
.badge-unknown, .badge-running {
  background: rgba(245,158,11,.15);
  color: var(--yellow);
}

.tag {
  display: inline-flex;
  padding: .15rem .5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  font-size: .75rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* =====================================================
   Buttons
   ===================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: background var(--t), color var(--t), opacity var(--t);
  white-space: nowrap;
}

.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-ghost {
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
}
.btn-ghost:hover { border-color: var(--border-light); }

.btn-danger {
  background: var(--red-dim);
  color: var(--red);
}
.btn-danger:hover { background: var(--red); color: #fff; }

.btn-block { width: 100%; justify-content: center; }
.btn-sm { padding: .3rem .7rem; font-size: .8rem; }

.btn-icon {
  background: none;
  border: none;
  cursor: pointer;
  padding: .3rem .4rem;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  line-height: 1;
  transition: background var(--t);
  color: var(--text-muted);
}
.btn-icon:hover { background: var(--bg-elevated); }
.btn-icon.btn-danger:hover { background: var(--red-dim); }

.monitor-mini-action {
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.monitor-mini-action svg {
  width: 1rem;
  height: 1rem;
  fill: currentColor;
}

.btn-player {
  border: 1px solid var(--border-light);
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0));
  color: var(--text);
  border-radius: 999px;
  min-height: 2.5rem;
  padding: 0 .9rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .02em;
  cursor: pointer;
  transition: transform var(--t), filter var(--t), border-color var(--t), background var(--t);
}

.btn-player svg {
  width: .95rem;
  height: .95rem;
  fill: currentColor;
}

.btn-player-icon {
  width: 2.5rem;
  min-width: 2.5rem;
  padding: 0;
  gap: 0;
}

.btn-player:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  filter: brightness(1.06);
}

.btn-player-play {
  background: linear-gradient(180deg, rgba(34,197,94,.18), rgba(34,197,94,.08));
  color: #86efac;
  border-color: rgba(34,197,94,.45);
}

.btn-player-pause {
  background: linear-gradient(180deg, rgba(245,158,11,.16), rgba(245,158,11,.07));
  color: #fbbf24;
  border-color: rgba(245,158,11,.45);
}

.btn-player-delete {
  background: linear-gradient(180deg, rgba(239,68,68,.18), rgba(239,68,68,.08));
  color: #fca5a5;
  border-color: rgba(239,68,68,.5);
}

.monitor-edit-action {
  color: var(--accent);
  border-color: rgba(26,127,212,.48);
  background: linear-gradient(180deg, rgba(26,127,212,.18), rgba(26,127,212,.07));
  box-shadow: 0 0 0 1px rgba(26,127,212,.12) inset;
  padding: 0 1rem;
}

.monitor-edit-action:hover {
  background: linear-gradient(180deg, rgba(26,127,212,.26), rgba(26,127,212,.1));
  border-color: var(--accent);
}

/* =====================================================
   Delete Confirm Modal
   ===================================================== */
.modal-delete {
  max-width: 400px;
  text-align: center;
  overflow: visible;
}

.modal-delete-header {
  padding: 2.4rem 1.8rem 1.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .7rem;
  position: relative;
}

/* Icon wrapper */
.del-icon-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: .2rem;
}

.del-icon-svg {
  width: 64px;
  height: 64px;
  overflow: visible;
}

/* Pulsing rings */
.del-ring {
  transform-origin: 32px 32px;
}
.del-ring-1 { animation: delRing1 2.4s ease-in-out infinite; }
.del-ring-2 { animation: delRing1 2.4s ease-in-out .3s infinite; }
.del-ring-3 { animation: delRingCore 2.4s ease-in-out infinite; }

@keyframes delRing1 {
  0%, 100% { transform: scale(1);   opacity: .6; }
  50%       { transform: scale(1.18); opacity: 1; }
}
@keyframes delRingCore {
  0%, 100% { transform: scale(1); }
  50%       { transform: scale(1.08); }
}

/* Trash icon shake on enter */
.del-icon-trash {
  transform-origin: 32px 32px;
}
.del-icon-enter .del-icon-trash {
  animation: delTrashShake .55s cubic-bezier(.36,.07,.19,.97) both;
}
@keyframes delTrashShake {
  0%  { transform: rotate(0); }
  15% { transform: rotate(-14deg) scale(1.15); }
  30% { transform: rotate(12deg) scale(1.12); }
  45% { transform: rotate(-9deg); }
  60% { transform: rotate(7deg); }
  75% { transform: rotate(-4deg); }
  90% { transform: rotate(2deg); }
  100%{ transform: rotate(0); }
}

/* Shockwave ring burst on enter */
.del-shockwave {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none;
}
.del-icon-enter .del-shockwave {
  animation: delShockwave .55s ease-out both;
}
@keyframes delShockwave {
  0%   { box-shadow: 0 0 0 0 rgba(239,68,68,.6); }
  100% { box-shadow: 0 0 0 32px rgba(239,68,68,0); }
}

/* Titles */
.del-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.del-subtitle {
  font-size: .85rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* Action row */
.modal-delete-actions {
  display: flex;
  gap: .6rem;
  padding: 0 1.4rem 1.6rem;
  justify-content: center;
}

.modal-delete-actions .btn-ghost {
  flex: 1;
  justify-content: center;
}

.btn-delete-confirm {
  flex: 1;
  justify-content: center;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem 1.1rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid rgba(239,68,68,.6);
  background: linear-gradient(180deg, rgba(239,68,68,.22), rgba(239,68,68,.12));
  color: #fca5a5;
  transition: background var(--t), border-color var(--t), color var(--t), transform var(--t), box-shadow var(--t);
}
.btn-delete-confirm:hover {
  background: var(--red);
  border-color: var(--red);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(239,68,68,.4);
}
.btn-delete-confirm:active { transform: translateY(0); }

/* =====================================================
   Forms
   ===================================================== */
.form-group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-bottom: .9rem;
}

.form-group:last-child { margin-bottom: 0; }

.form-group label {
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .5px;
}

.form-group input:not([type="range"]),
.form-group select,
.form-group textarea {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: .55rem .8rem;
  font-size: .9rem;
  font-family: inherit;
  transition: border-color var(--t), box-shadow var(--t);
  width: 100%;
}

.form-group input:not([type="range"]):focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: .8rem;
}

.form-actions {
  display: flex;
  gap: .6rem;
  margin-top: 1.2rem;
}

/* ── Slider – Modern Neon/Glassmorphism ─────────────────────────────────────────────── */
#monitorForm .form-slider {
  -webkit-appearance: none;
  appearance: none;
  padding: 0;
  border: 0;
  width: 100%;
  height: 10px;
  border-radius: 99px;
  outline: none;
  cursor: pointer;
  background: linear-gradient(
    to right,
    #6366f1 0%,
    #38bdf8 var(--fill, 0%),
    rgba(56,189,248,.22) var(--fill, 0%),
    rgba(255,255,255,.22) 100%
  );
  box-shadow: inset 0 0 0 1px rgba(99,102,241,.28), 0 8px 24px rgba(56,189,248,.16);
  margin: .75rem 0 .45rem;
  transition: box-shadow .2s ease, filter .2s ease;
}
#monitorForm .form-slider:hover,
#monitorForm .form-slider:focus {
  box-shadow: inset 0 0 0 1px rgba(129,140,248,.6), 0 10px 28px rgba(99,102,241,.22);
  filter: saturate(1.08);
}
#monitorForm .form-slider::-webkit-slider-runnable-track {
  height: 10px;
  border-radius: 99px;
  background: transparent;
}
#monitorForm .form-slider::-moz-range-track {
  height: 10px;
  border-radius: 99px;
  background: transparent;
}
#monitorForm .form-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 22px;
  height: 22px;
  margin-top: -6px;
  border-radius: 50%;
  border: 2px solid #dbeafe;
  background: radial-gradient(circle at 30% 30%, #ffffff 0%, #93c5fd 35%, #60a5fa 70%, #2563eb 100%);
  box-shadow: 0 0 0 0 rgba(59,130,246,.35), 0 8px 20px rgba(37,99,235,.28);
  transition: box-shadow .12s ease;
}
#monitorForm .form-slider:hover::-webkit-slider-thumb {
  box-shadow: 0 0 0 8px rgba(59,130,246,.18), 0 10px 24px rgba(37,99,235,.3);
}
#monitorForm .form-slider:active::-webkit-slider-thumb {
  transform: scale(1.12);
  box-shadow: 0 0 0 10px rgba(59,130,246,.22), 0 12px 28px rgba(37,99,235,.34);
}
#monitorForm .form-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #dbeafe;
  background: radial-gradient(circle at 30% 30%, #ffffff 0%, #93c5fd 35%, #60a5fa 70%, #2563eb 100%);
  box-shadow: 0 0 0 0 rgba(59,130,246,.35), 0 8px 20px rgba(37,99,235,.28);
  transition: box-shadow .12s ease;
}
#monitorForm .form-slider:hover::-moz-range-thumb {
  box-shadow: 0 0 0 8px rgba(59,130,246,.18), 0 10px 24px rgba(37,99,235,.3);
}
#monitorForm .form-slider:active::-moz-range-thumb {
  transform: scale(1.12);
  box-shadow: 0 0 0 10px rgba(59,130,246,.22), 0 12px 28px rgba(37,99,235,.34);
}

#monitorForm .slider-wrap {
  position: relative;
  margin-bottom: 2.05rem;
}
#monitorForm .slider-bubble {
  position: absolute;
  top: calc(100% + 10px);
  left: 50%;
  transform: translateX(-50%) scale(1);
  background: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .02em;
  padding: .26em .85em;
  border-radius: 10px;
  border: 1px solid rgba(147,197,253,.35);
  box-shadow: 0 8px 20px rgba(8,47,73,.38);
  white-space: nowrap;
  pointer-events: none;
  z-index: 2;
  opacity: .98;
  transition: transform .08s ease;
}
#monitorForm .slider-wrap:hover .slider-bubble,
#monitorForm .slider-wrap:focus-within .slider-bubble,
#monitorForm .form-slider:active ~ .slider-bubble {
  transform: translateX(-50%) scale(1.05);
}
#monitorForm .slider-bubble::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: #2563eb;
}


.form-hint {
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: .25rem;
}

.text-warning { color: var(--yellow); }

/* =====================================================
   Modals
   ===================================================== */
.modal-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(3px);
  align-items: center;
  justify-content: center;
  z-index: 500;
  padding: 1rem;
  overflow-y: auto;
}
.modal-backdrop.is-open {
  display: flex;
}

.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  will-change: transform, opacity;
}

.modal-lg { max-width: 760px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--border);
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: .25rem .4rem;
  border-radius: var(--radius-sm);
  transition: color var(--t), background var(--t);
}
.modal-close:hover { color: var(--text); background: var(--bg-elevated); }

.modal-body {
  padding: 1.4rem;
  overflow-y: auto;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .6rem;
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--border);
}

/* =====================================================
   Modal Animations
   ===================================================== */
@keyframes backdropIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes backdropOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(.93) translateY(-20px); }
  to   { opacity: 1; transform: scale(1)   translateY(0); }
}
@keyframes modalOut {
  from { opacity: 1; transform: scale(1)   translateY(0); }
  to   { opacity: 0; transform: scale(.93) translateY(-12px); }
}

.modal-backdrop.is-open {
  animation: backdropIn .2s ease both;
}
.modal-backdrop.modal-closing {
  animation: backdropOut .2s ease both;
  pointer-events: none;
}
.modal-backdrop.is-open > .modal {
  animation: modalIn .26s cubic-bezier(.34,1.4,.64,1) both;
}
.modal-backdrop.modal-closing > .modal {
  animation: modalOut .18s ease both;
}

@media (prefers-reduced-motion: reduce) {
  .modal-backdrop.is-open,
  .modal-backdrop.modal-closing,
  .modal-backdrop.is-open > .modal,
  .modal-backdrop.modal-closing > .modal { animation: none; }
}

/* =====================================================
   PayPal Subscription Modal
   ===================================================== */
.pp-plan-summary {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .9rem 1rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
}
.pp-plan-summary-icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: var(--radius-sm);
  background: var(--accent-dim);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.pp-plan-summary-info { flex: 1; min-width: 0; }
.pp-plan-summary-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}
.pp-plan-summary-price {
  font-size: .85rem;
  color: var(--text-muted);
  margin-top: .1rem;
}
.pp-plan-summary-badge {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: .2rem .55rem;
  background: var(--accent-dim);
  color: var(--accent-hover);
  border-radius: 99px;
  flex-shrink: 0;
}

.pp-info-box {
  display: flex;
  gap: .6rem;
  align-items: flex-start;
  padding: .75rem .9rem;
  background: var(--yellow-dim);
  color: var(--yellow);
  border: 1px solid rgba(245,158,11,.3);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  line-height: 1.5;
}

.pp-breakdown {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.pp-breakdown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: .6rem 1rem;
  font-size: .875rem;
  color: var(--text-muted);
  gap: 1rem;
}
.pp-breakdown-row span:last-child { white-space: nowrap; }
.pp-breakdown-credit {
  color: var(--green);
}
.pp-breakdown-credit span:last-child { font-weight: 600; }
.pp-breakdown-divider {
  height: 1px;
  background: var(--border);
  margin: 0;
}
.pp-breakdown-total {
  color: var(--text);
  font-weight: 700;
  font-size: .95rem;
  padding: .75rem 1rem;
}
.pp-breakdown-recurring {
  font-size: .8rem;
  color: var(--text-muted);
  padding: .4rem 1rem .65rem;
}

.pp-modal-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .5rem 0;
  color: var(--text-muted);
  font-size: .85rem;
  margin: 0;
}
@keyframes pp-spin { to { transform: rotate(360deg); } }
.pp-loading-spin { animation: pp-spin .8s linear infinite; }

/* =====================================================
   Skeleton → Content Transition
   ===================================================== */
@keyframes contentIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.sk-loaded {
  animation: contentIn .32s ease both;
}

@media (prefers-reduced-motion: reduce) {
  .sk-loaded { animation: none; }
}

/* =====================================================
   Auth Pages
   ===================================================== */

/* Honeypot field – invisible to humans, bots fill it */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
}

.gate-page {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1200px 800px at 50% -20%, rgba(99,102,241,.2), transparent 65%),
    linear-gradient(180deg, #070b14 0%, #0c1424 56%, #080f1c 100%);
  position: relative;
  overflow: hidden;
}

.gate-page::before,
.gate-page::after {
  content: "";
  position: fixed;
  width: 56vmax;
  height: 56vmax;
  border-radius: 50%;
  filter: blur(58px);
  pointer-events: none;
  z-index: 0;
}

.gate-page::before {
  top: -20vmax;
  left: -16vmax;
  background: rgba(99,102,241,.34);
  opacity: .42;
  animation: lavaBlobA 18s ease-in-out infinite;
}

.gate-page::after {
  right: -22vmax;
  bottom: -22vmax;
  background: rgba(16,185,129,.30);
  opacity: .38;
  animation: lavaBlobB 22s ease-in-out infinite;
}

.human-gate-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  position: relative;
  z-index: 1;
}

.human-gate-wrap::before {
  content: "";
  position: fixed;
  width: 52vmax;
  height: 52vmax;
  left: 34%;
  top: 38%;
  border-radius: 50%;
  filter: blur(64px);
  pointer-events: none;
  background: rgba(56,189,248,.24);
  opacity: .34;
  animation: lavaBlobC 20s ease-in-out infinite;
  z-index: 0;
}

.human-gate-content {
  width: 100%;
  max-width: 640px;
  padding: 1rem;
  position: relative;
  z-index: 1;
}

.human-gate-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: .9rem;
}

.human-gate-brand .auth-brand-logo {
  width: 168px;
}

.human-gate-content h1 {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  letter-spacing: -.01em;
  margin: 0;
  text-align: center;
}

.human-gate-copy {
  margin: .65rem auto 1.3rem;
  max-width: 56ch;
  color: var(--text-muted);
  font-size: .92rem;
  text-align: center;
}

.human-gate-panel {
  border: 1px solid rgba(148,163,184,.28);
  border-radius: 14px;
  background: rgba(10,16,29,.58);
  box-shadow: 0 16px 40px rgba(0,0,0,.34), 0 0 0 1px rgba(255,255,255,.04) inset;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1.1rem 1rem 1rem;
  text-align: center;
}

.human-gate-panel-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  color: var(--text-muted);
  font-size: .8rem;
  margin-bottom: .9rem;
}

.human-gate-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34,197,94,.14);
}

.human-gate-form {
  min-height: 68px;
  display: flex;
  justify-content: center;
}

.human-gate-form .cf-turnstile {
  width: 100%;
}

.human-gate-error {
  margin-top: .8rem;
  color: var(--red);
  font-size: .82rem;
  text-align: center;
}

.human-gate-footnote {
  margin: .8rem 0 0;
  font-size: .78rem;
  color: var(--text-faint);
  text-align: center;
}

@keyframes lavaBlobA {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: .34;
  }
  50% {
    transform: translate3d(16vmax, 12vmax, 0) scale(1.24);
    opacity: .46;
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: .34;
  }
}

@keyframes lavaBlobB {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: .3;
  }
  50% {
    transform: translate3d(-12vmax, -10vmax, 0) scale(1.18);
    opacity: .42;
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: .3;
  }
}

@keyframes lavaBlobC {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: .24;
  }
  50% {
    transform: translate3d(-8vmax, 7vmax, 0) scale(1.2);
    opacity: .36;
  }
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: .24;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gate-page::before,
  .gate-page::after,
  .human-gate-wrap::before {
    animation: none;
  }
}

@media (max-width: 640px) {
  .gate-page::before,
  .gate-page::after,
  .human-gate-wrap::before {
    filter: blur(44px);
  }

  .human-gate-content {
    max-width: 100%;
    padding: .6rem;
  }
}

.auth-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-md);
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.8rem;
}

.auth-brand-logo {
  display: block;
  width: 150px;
  max-width: 70%;
  height: auto;
  -webkit-user-drag: none;
  user-select: none;
}

.auth-brand-logo-light {
  display: none;
}

:root[data-theme="light"] .auth-brand-logo-light {
  display: block;
}

:root[data-theme="light"] .auth-brand-logo-dark {
  display: none;
}

.auth-card h2 {
  text-align: center;
  margin-bottom: 1.4rem;
  color: var(--text-muted);
  font-weight: 400;
}

.auth-switch {
  text-align: center;
  margin-top: 1.2rem;
  font-size: .875rem;
  color: var(--text-muted);
}

/* =====================================================
   Alerts
   ===================================================== */
.alert {
  padding: .75rem 1rem;
  border-radius: var(--radius-sm);
  font-size: .875rem;
  margin-bottom: 1rem;
}
.alert-error   { background: var(--red-dim);    color: var(--red);    border: 1px solid var(--red); }
.alert-success { background: var(--green-dim);  color: var(--green);  border: 1px solid var(--green); }
.alert-warning { background: rgba(245,158,11,.12); color: var(--yellow); border: 1px solid var(--yellow); }
.alert-info    { background: rgba(99,102,241,.12); color: var(--accent); border: 1px solid var(--accent); }

/* Login step hint (email address display) */
.login-step-hint { margin: -.25rem 0 1rem; font-size: .85rem; color: var(--text-muted); }
.login-step-email { color: var(--text); font-weight: 500; }
.login-identity {
  margin: -.2rem 0 1rem;
  padding: .55rem .7rem;
  border: 1px solid var(--border);
  background: rgba(255,255,255,.02);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: .15rem;
}
.login-identity-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-faint);
}

/* =====================================================
   Toast Notifications
   ===================================================== */
#toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: .6rem;
  pointer-events: none;
}

.toast {
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  padding: .65rem 1.1rem;
  font-size: .875rem;
  box-shadow: var(--shadow-md);
  animation: toastIn .2s ease;
  pointer-events: all;
  max-width: 320px;
}
.toast-error  { border-color: var(--red);   color: var(--red); }
.toast-success{ border-color: var(--green); color: var(--green); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   Detail / Log UI
   ===================================================== */
.meta-row {
  display: flex;
  gap: .6rem;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.log-scroll {
  max-height: 360px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
}

.log-entry {
  display: flex;
  align-items: baseline;
  gap: .6rem;
  padding: .5rem .8rem;
  border-bottom: 1px solid var(--border);
  font-size: .8rem;
  flex-wrap: wrap;
}
.log-entry:last-child { border-bottom: none; }
.log-up   { border-left: 3px solid var(--green); }
.log-down { border-left: 3px solid var(--red); }
.log-success { border-left: 3px solid var(--green); }
.log-failed  { border-left: 3px solid var(--red); }

.log-output {
  width: 100%;
  font-size: .78rem;
  color: var(--text-muted);
  white-space: pre-wrap;
  word-break: break-word;
  margin-top: .25rem;
  padding: .3rem .5rem;
  background: var(--bg-elevated);
  border-radius: 4px;
}
.log-error-text { color: var(--red); }

/* =====================================================
   Tabs
   ===================================================== */
.tabs {
  display: flex;
  gap: .3rem;
  margin-bottom: 1rem;
}
.tab {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  padding: .45rem 1rem;
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--t);
}
.tab:hover { color: var(--text); }
.tab.active { background: var(--accent-dim); color: var(--accent-hover); border-color: var(--accent); }

/* =====================================================
   Filter Row
   ===================================================== */
.filter-row {
  display: flex;
  gap: .6rem;
  align-items: center;
  flex-wrap: wrap;
}
.filter-row select,
.filter-row input[type=date] {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: .4rem .7rem;
  font-size: .85rem;
  font-family: inherit;
}
.filter-row select:focus,
.filter-row input:focus {
  outline: none;
  border-color: var(--accent);
}

/* =====================================================
   Cron Expression UI
   ===================================================== */
.cron-input-row {
  display: flex;
  gap: .5rem;
  align-items: center;
}
.cron-input-row input { flex: 1; }

.cron-presets {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin-top: .5rem;
}
.cron-presets button {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  padding: .25rem .65rem;
  font-size: .78rem;
  cursor: pointer;
  transition: var(--t);
}
.cron-presets button:hover { color: var(--accent-hover); border-color: var(--accent); }

/* =====================================================
   Token Display
   ===================================================== */
.token-display {
  display: flex;
  align-items: center;
  gap: .5rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .6rem .9rem;
  margin-top: .6rem;
  word-break: break-all;
}
.token-display code { flex: 1; font-size: .78rem; color: var(--accent-hover); }
.token-display .secret-value.secret-masked {
  filter: blur(7px) saturate(.7);
  user-select: none;
  transition: filter var(--t);
}

/* =====================================================
   Section Header
   ===================================================== */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 1.4rem 0 .8rem;
}
.section-header h2 { font-size: 1rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }

/* =====================================================
   Monitor Cards (Grafana-style)
   ===================================================== */
.monitor-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 760px) {
  .monitor-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1160px) {
  .monitor-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.monitor-card-placeholder {
  color: var(--text-muted);
  padding: 2rem;
  grid-column: 1 / -1;
  text-align: center;
}

.monitor-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: .9rem;
  transition: border-color var(--t), box-shadow var(--t);
}
.monitor-card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-sm);
}
.monitor-card-inactive {
  opacity: .55;
}

/* ── Plan-disabled: item exceeds current subscription limit ── */
.monitor-card-plan-disabled {
  position: relative;
  opacity: .45;
  filter: grayscale(.7);
  pointer-events: none;
  cursor: default;
}
.monitor-card-plan-disabled::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 6px,
    rgba(239,68,68,.05) 6px,
    rgba(239,68,68,.05) 12px
  );
  border: 1px solid rgba(239,68,68,.3);
  pointer-events: none;
  z-index: 1;
}
.plan-disabled-badge {
  display: inline-flex;
  align-items: center;
  gap: .28rem;
  padding: .2rem .55rem;
  border-radius: 999px;
  background: rgba(239,68,68,.18);
  color: #fca5a5;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  white-space: nowrap;
  flex-shrink: 0;
}
.plan-disabled-row td {
  opacity: .45;
  filter: grayscale(.7);
}
.plan-disabled-row td .btn-icon,
.plan-disabled-row td button {
  pointer-events: none;
  opacity: .35;
}
.sp-page-card.plan-disabled-card {
  position: relative;
  opacity: .45;
  filter: grayscale(.7);
  pointer-events: none;
  cursor: default;
}
.sp-page-card.plan-disabled-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(239,68,68,.35);
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 6px,
    rgba(239,68,68,.05) 6px,
    rgba(239,68,68,.05) 12px
  );
  pointer-events: none;
  z-index: 1;
}
.team-member-item.plan-disabled-member {
  opacity: .42;
  filter: grayscale(.6);
  pointer-events: none;
  position: relative;
}
.team-member-item.plan-disabled-member::after {
  content: '';
  position: absolute;
  inset: 0;
  border-left: 3px solid rgba(239,68,68,.5);
  pointer-events: none;
}

/* Prominent upgrade CTA button shown on plan-limited items */
.btn-plan-upgrade-cta {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem 1rem;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent), #a78bfa);
  color: #fff !important;
  font-size: .8rem;
  font-weight: 700;
  text-decoration: none !important;
  letter-spacing: .03em;
  pointer-events: auto;
  transition: opacity .15s, transform .1s;
  box-shadow: 0 2px 8px rgba(99,102,241,.35);
  white-space: nowrap;
}
.btn-plan-upgrade-cta:hover {
  opacity: .9;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(99,102,241,.45);
}
.btn-plan-upgrade-cta:active { transform: none; opacity: 1; }

/* Card header row */
.monitor-card-header {
  display: flex;
  align-items: center;
  gap: .7rem;
}
.monitor-card-name {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  min-width: 0;
  flex: 1;
}
.monitor-card-name strong {
  font-size: .95rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.monitor-card-url {
  font-size: .75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Status dot with pulse */
.status-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  flex-shrink: 0;
  position: relative;
}
.status-dot-up {
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(34,197,94,.6);
  animation: pulse-up 2.5s ease infinite;
}
.status-dot-down {
  background: var(--red);
  box-shadow: 0 0 0 0 rgba(239,68,68,.6);
  animation: pulse-down 1s ease infinite;
}
.status-dot-unknown {
  background: var(--text-faint);
}

@keyframes pulse-up {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,.5); }
  70%  { box-shadow: 0 0 0 7px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}
@keyframes pulse-down {
  0%   { box-shadow: 0 0 0 0 rgba(239,68,68,.6); }
  70%  { box-shadow: 0 0 0 8px rgba(239,68,68,0); }
  100% { box-shadow: 0 0 0 0 rgba(239,68,68,0); }
}

/* Availability bar */
.monitor-card-avail {
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

.avail-bar {
  display: flex;
  gap: 2px;
  height: 26px;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: visible;
}
.avail-empty {
  align-items: center;
  color: var(--text-faint);
  font-size: .78rem;
}
.avail-block {
  flex: 1;
  border-radius: 2px;
  min-width: 0;
  cursor: default;
  position: relative;
  transition: transform 1s ease-out, opacity .08s ease-out;
  transform-origin: center center;
}
.avail-block:hover {
  transform: scaleY(1.6) translateY(-2px);
  opacity: 1;
  z-index: 2;
  transition: none;
}
.avail-up      { background: var(--green); }
.avail-down    { background: #ff4d4f; }
.avail-unknown { background: var(--border-light); }
.avail-paused  { background: #b9891a; opacity: .9; }
.checks-bar-paused { background: #b9891a; opacity: .9; }

/* ── Checks bar (ms-height) ─────────────────────── */
@keyframes checksBarBounce {
  0%   { transform: scaleY(0); }
  55%  { transform: scaleY(1.12); }
  75%  { transform: scaleY(0.94); }
  90%  { transform: scaleY(1.04); }
  100% { transform: scaleY(1); }
}
.checks-bar {
  display: flex;
  gap: 2px;
  height: 80px;
  align-items: flex-end;
  overflow: visible;
  position: relative;
}
.checks-bar-col {
  flex: 1;
  min-width: 2px;
  position: relative;
  cursor: default;
  border-radius: 2px 2px 0 0;
  transform-origin: bottom center;
  animation: checksBarBounce .4s cubic-bezier(.22,.68,0,1.2) forwards;
  transition: transform .08s ease-out, filter .08s ease-out;
}
.checks-bar-col:hover {
  z-index: 2;
}
.checks-bar-inner {
  position: absolute;
  inset: 0;
  border-radius: 2px 2px 0 0;
  background: inherit;
  transition: transform .4s ease-out, filter .4s ease-out;
}
.checks-bar-col:hover .checks-bar-inner {
  transform: translateY(-4px);
  filter: brightness(1.3);
  transition: none;
}
.checks-bar-col::after {
  display: none;
}
.checks-bar-up   { background: var(--green); }
.checks-bar-down { background: #ff4d4f; }
.checks-bar-fill { display: none; }

/* ── Interval progress bar ──────────────────────── */
.checks-interval-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.checks-interval-fill {
  height: 100%;
  width: 0%;
  background: var(--accent, #6366f1);
  border-radius: 2px;
  transition: width linear;
}
@keyframes checksPulseBar {
  0%   { transform: translateY(0);    filter: brightness(1); }
  30%  { transform: translateY(-5px); filter: brightness(1.4); }
  100% { transform: translateY(0);    filter: brightness(1); }
}
.checks-bar-col.is-pulse .checks-bar-inner {
  animation: checksPulseBar .35s ease-out forwards;
}

/* ── Avail tooltip (body-level, JS-driven) ──────── */
#avail-tooltip {
  position: absolute;
  z-index: 9999;
  background: #1e2536;
  color: #c8d0e0;
  font-size: .7rem;
  line-height: 1.3;
  padding: .3rem .6rem;
  border-radius: 5px;
  border: 1px solid #2e3650;
  box-shadow: 0 4px 14px rgba(0,0,0,.4);
  white-space: nowrap;
  pointer-events: none;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity .12s ease;
  margin-top: 8px;
}
#avail-tooltip.is-visible { opacity: 1; }
#avail-tooltip::after {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 5px solid #2e3650;
}

.avail-labels {
  display: flex;
  justify-content: space-between;
}

/* Metrics row */
.monitor-card-metrics {
  display: flex;
  gap: .5rem;
  flex-wrap: wrap;
  align-items: flex-end;
}
.metric-block {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  flex: 1;
  min-width: 52px;
}
.metric-block.metric-spark {
  flex: 2;
  min-width: 100px;
}
.metric-label {
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-muted);
}
.metric-value {
  font-size: .9rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.metric-spark canvas {
  display: block;
  border-radius: 3px;
}

/* Card footer */
.monitor-card-footer {
  position: relative;
  display: flex;
  align-items: center;
  gap: .5rem;
  justify-content: space-between;
  border-top: 1px solid var(--border);
  padding-top: .6rem;
  font-size: .78rem;
  overflow: visible;
}

.agent-region-badge {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .68rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: .1em .5em;
  white-space: nowrap;
  cursor: default;
}
.agent-region-badge::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

#agentTooltip {
  position: fixed;
  z-index: 9999;
  min-width: 180px;
  background: #1a2133;
  color: #c9d1e0;
  font-size: .78rem;
  line-height: 1.5;
  padding: .55rem .75rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 6px 24px rgba(0,0,0,.45);
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .15s;
}
#agentTooltip.visible { opacity: 1; }
.at-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  font-size: .72rem;
  line-height: 1.7;
}
.at-label { color: #7a8a9e; }
.at-val    { color: #c9d1e0; font-weight: 600; }

/* Progress bar: JS-gesteuert via width-transition */
.monitor-card-progress-track {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  overflow: hidden;
  border-radius: 0;
}

.monitor-card-progress {
  position: absolute;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  will-change: width;
  border-radius: 0 1px 1px 0;
}

.monitor-card-actions {
  margin-top: .75rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: .5rem;
}

.text-muted  { color: var(--text-muted); }
.text-faint  { color: var(--text-faint); }
.small       { font-size: .8rem; }
.ms-auto     { margin-left: auto; }
.mt          { margin-top: 1.2rem; }
.mt-xs       { margin-top: .4rem; }

/* =====================================================
   Status Pages
   ===================================================== */
.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

/* ── Status Pages Grid ────────────────────────────────────────────────────── */
.status-pages-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

@media (max-width: 1280px) {
  .status-pages-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .status-pages-grid {
    grid-template-columns: 1fr;
  }
}

/* ── Status Page Card ─────────────────────────────────────────────────────── */
.sp-page-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--t), border-color var(--t), transform var(--t);
}
.sp-page-card:hover {
  border-color: var(--border-light);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

/* Mini browser preview area */
.sp-card-preview {
  background: #0d1018;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  overflow: hidden;
}
.sp-card-preview-framewrap {
  position: relative;
  height: calc(900px * var(--sp-preview-scale, .32));
  overflow: hidden;
  background: var(--bg-surface);
}
.sp-card-preview-framewrap.is-clickable {
  cursor: pointer;
}
.sp-card-preview-framewrap.is-clickable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}
.sp-card-preview-framewrap.is-loading::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,.02), rgba(255,255,255,.08), rgba(255,255,255,.02));
  background-size: 200% 100%;
  animation: sp-preview-shimmer 1.35s ease-in-out infinite;
}
.sp-card-preview-framewrap.is-loaded::before,
.sp-card-preview-framewrap.is-empty::before {
  display: none;
}
.sp-card-preview-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  z-index: 2;
  color: rgba(224,231,255,.88);
  font-size: .78rem;
  font-weight: 600;
  background: linear-gradient(180deg, rgba(13,16,24,.2), rgba(13,16,24,.05));
  backdrop-filter: blur(6px);
  opacity: 1;
  transition: opacity .2s ease;
}
.sp-card-preview-loader.hidden {
  opacity: 0;
  pointer-events: none;
}
.sp-card-preview-loader-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.18);
  border-top-color: rgba(255,255,255,.85);
  animation: sp-preview-spin .85s linear infinite;
}
.sp-card-preview-frame {
  width: 1440px;
  height: 900px;
  border: 0;
  display: block;
  background: var(--bg-surface);
  transform: scale(var(--sp-preview-scale, .32));
  transform-origin: 0 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s ease;
}
.sp-card-preview-framewrap.is-loaded .sp-card-preview-frame {
  opacity: 1;
}
.sp-card-browser-chrome {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .48rem .65rem;
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.055));
  border-bottom: 1px solid rgba(255,255,255,.04);
  backdrop-filter: blur(10px);
}
.sp-card-browser-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sp-card-browser-dot:nth-child(1) { background: rgba(239,68,68,.88); }
.sp-card-browser-dot:nth-child(2) { background: rgba(245,158,11,.88); }
.sp-card-browser-dot:nth-child(3) { background: rgba(34,197,94,.88); }
.sp-card-browser-title {
  flex: 1;
  min-width: 0;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.06);
  border-radius: 999px;
  padding: .16rem .6rem;
  font-size: .75rem;
  font-weight: 600;
  color: rgba(224,231,255,.88);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-card-browser-title.is-active {
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.07);
  color: rgba(240,247,255,.92);
}
.sp-card-browser-title.is-inactive {
  background: rgba(255,255,255,.06);
  border-color: rgba(255,255,255,.05);
  color: rgba(224,231,255,.68);
}
.sp-card-preview-body {
  padding: .6rem .7rem .75rem;
}
.sp-card-preview-accentbar {
  height: 3px;
  border-radius: 2px;
  margin-bottom: .5rem;
  background: var(--preview-accent, #6366f1);
  box-shadow: 0 0 8px var(--preview-accent, #6366f1);
  opacity: .85;
}
.sp-card-preview-head {
  display: flex;
  align-items: center;
  gap: .35rem;
  margin-bottom: .45rem;
}
.sp-card-preview-logo {
  height: 14px;
  object-fit: contain;
  flex-shrink: 0;
}
.sp-card-preview-pagetitle {
  font-size: .68rem;
  font-weight: 700;
  color: #c0cce0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-card-preview-rows {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.sp-card-preview-row {
  display: flex;
  align-items: center;
  gap: .3rem;
  background: rgba(255,255,255,.04);
  border-radius: 4px;
  padding: .2rem .45rem;
}
.sp-card-preview-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sp-card-preview-dot.up      { background: #22c55e; }
.sp-card-preview-dot.down    { background: #ef4444; }
.sp-card-preview-dot.unknown { background: #f59e0b; }
.sp-card-preview-rowlabel {
  flex: 1;
  font-size: .62rem;
  color: #7a8aa8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sp-card-preview-rowbadge {
  font-size: .56rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: .05rem .3rem;
  border-radius: 3px;
  flex-shrink: 0;
}
.sp-card-preview-rowbadge.up      { background: rgba(34,197,94,.18);  color: #4ade80; }
.sp-card-preview-rowbadge.down    { background: rgba(239,68,68,.18);   color: #f87171; }
.sp-card-preview-rowbadge.unknown { background: rgba(245,158,11,.18);  color: #fbbf24; }
.sp-card-preview-empty {
  font-size: .66rem;
  color: #3a4460;
  font-style: italic;
  padding: .5rem 0;
  text-align: center;
}
@keyframes sp-preview-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes sp-preview-shimmer {
  0% { background-position: 0 0; }
  100% { background-position: 200% 0; }
}
.sp-card-preview-more {
  font-size: .6rem;
  color: #3a4460;
  text-align: center;
  margin-top: 3px;
}

/* Card body */
.sp-card-body {
  padding: .85rem 1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .55rem;
  flex: 1;
}
.sp-card-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: .6rem;
}
.sp-card-title-row h3 {
  margin: 0;
  font-size: .97rem;
  font-weight: 700;
  line-height: 1.3;
}
.sp-card-slug {
  font-size: .74rem;
  margin-top: .08rem;
  font-family: monospace;
}
.sp-card-badges {
  display: flex;
  gap: .3rem;
  flex-wrap: wrap;
  justify-content: flex-start;
  flex-shrink: 0;
}

.sp-card-stats {
  display: flex;
  gap: .8rem;
  font-size: .8rem;
  color: var(--text-muted);
}
.sp-card-stats .sp-stat-down { color: var(--red); font-weight: 600; }
.sp-card-desc {
  font-size: .83rem;
  color: var(--text-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Card action footer */
.sp-card-actions {
  display: flex;
  gap: .4rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: auto;
  padding-top: .3rem;
}

/* Dropdown */
.sp-card-dropdown {
  position: relative;
  margin-left: auto;
}
.sp-dropdown-toggle::after {
  content: '';
  display: inline-block;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  margin-left: .3rem;
  vertical-align: middle;
  opacity: .7;
}
.sp-dropdown-menu {
  position: absolute;
  right: 0;
  bottom: calc(100% + 5px);
  background: var(--bg-elevated);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  min-width: 170px;
  z-index: 200;
  overflow: hidden;
  display: none;
  animation: dropUp .14s ease;
}
@keyframes dropUp {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.sp-dropdown-menu.is-open { display: block; }
.sp-dropdown-item {
  display: block;
  width: 100%;
  padding: .5rem .9rem;
  font-size: .84rem;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  transition: background var(--t);
  white-space: nowrap;
}
.sp-dropdown-item:hover {
  background: rgba(255,255,255,.05);
  color: var(--text);
  text-decoration: none;
}
.sp-dropdown-item.danger { color: var(--red); }
.sp-dropdown-item.danger:hover { background: var(--red-dim); }
.sp-dropdown-sep {
  height: 1px;
  background: var(--border);
  margin: .2rem 0;
}

.status-monitor-list {
  max-height: 240px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}

.status-monitor-item {
  display: grid;
  grid-template-columns: auto 1fr 1fr auto;
  align-items: center;
  gap: .6rem;
  padding: .55rem .7rem;
  border-bottom: 1px solid var(--border);
}

.status-monitor-item:last-child { border-bottom: none; }

.status-monitor-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.status-monitor-name {
  font-weight: 600;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-monitor-target {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: .78rem;
}

@media (max-width: 700px) {
  .status-monitor-item {
    grid-template-columns: auto 1fr;
  }
}

/* =====================================================
   Monitor Card – clickable variant
   ===================================================== */
.monitor-card-link {
  cursor: pointer;
  user-select: none;
}
.monitor-card-link:hover {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-dim), var(--shadow-sm);
  transform: translateY(-1px);
}
.monitor-card-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* =====================================================
   Monitor Detail Page
   ===================================================== */

/* ── Hero ─────────────────────────────────────────── */
.monitor-hero {
  position: relative;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--bg-surface);
  margin-bottom: 0;
}

/* Tinted top accent bar per status */
.monitor-hero::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--border);
  transition: background var(--t);
}
.monitor-hero[data-status="up"]::before      { background: var(--green); }
.monitor-hero[data-status="down"]::before    { background: var(--red); }
.monitor-hero[data-status="unknown"]::before { background: var(--yellow); }

/* Subtle tint on hero surface */
.monitor-hero[data-status="up"]   { background: linear-gradient(135deg, rgba(34,197,94,.04) 0%, var(--bg-surface) 50%); }
.monitor-hero[data-status="down"] { background: linear-gradient(135deg, rgba(239,68,68,.05) 0%, var(--bg-surface) 50%); }

.monitor-hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.4rem 1.6rem 1rem;
  flex-wrap: wrap;
}

/* Left side */
.hero-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.monitor-card.is-dragging {
  opacity: .55;
  border-style: dashed;
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
}
.monitor-card.is-drop-moving {
  transition: transform .16s ease, box-shadow .16s ease;
}
.monitor-card-drag-origin,
.monitor-card-drop-placeholder {
  pointer-events: none;
}
.monitor-card-drag-origin {
  min-height: 220px;
  opacity: .58;
}
.monitor-card-drop-placeholder {
  position: absolute;
  z-index: 5;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-dim), 0 10px 24px rgba(0,0,0,.22);
  opacity: .95;
  transition: left .08s ease, top .08s ease, height .08s ease, width .08s ease;
}
.monitor-card-drop-placeholder.is-empty-target {
  border: 1px dashed var(--accent);
  border-radius: var(--radius);
  background: var(--accent-dim);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: .82rem;
}
.monitor-card-drop-placeholder:not(.is-empty-target) span {
  display: none;
}
.monitor-card-drop-placeholder.is-empty-target span {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: .25rem .7rem;
  background: var(--bg-surface);
}
.monitor-card-drag-preview {
  position: fixed;
  top: 0;
  left: 0;
  transform: none !important;
  transition: none !important;
  opacity: 1 !important;
  box-shadow: var(--shadow-lg);
  pointer-events: none;
  z-index: 9999;
  margin: 0;
}
.monitor-card.is-availability-highlight {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(239,68,68,.18), var(--shadow-md);
  animation: availabilityHighlightPulse 1s ease-in-out infinite;
}
@keyframes availabilityHighlightPulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

/* Status orb */
.hero-status-orb {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-orb-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--border);
  transition: border-color var(--t);
}
.hero-orb-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--border);
  transition: background var(--t), box-shadow var(--t);
}

/* Status-specific orb colors + pulse */
@keyframes orbPulse {
  0%,100% { box-shadow: 0 0 0 0 currentColor; }
  50%      { box-shadow: 0 0 0 6px transparent; }
}
.hero-orb-up   .hero-orb-ring { border-color: rgba(34,197,94,.4); }
.hero-orb-up   .hero-orb-dot  { background: var(--green); color: var(--green); animation: orbPulse 2.5s ease infinite; box-shadow: 0 0 10px rgba(34,197,94,.5); }
.hero-orb-down .hero-orb-ring { border-color: rgba(239,68,68,.4); }
.hero-orb-down .hero-orb-dot  { background: var(--red); color: var(--red); animation: orbPulse 1.8s ease infinite; box-shadow: 0 0 10px rgba(239,68,68,.5); }
  .hero-orb-paused .hero-orb-ring { border-color: rgba(245,158,11,.4); }
  .hero-orb-paused .hero-orb-dot  { background: var(--yellow); color: var(--yellow); box-shadow: 0 0 10px rgba(245,158,11,.35); }
.hero-orb-unknown .hero-orb-ring { border-color: rgba(245,158,11,.4); }
.hero-orb-unknown .hero-orb-dot  { background: var(--yellow); }

.hero-title-block {
  min-width: 0;
  flex: 1;
}
.hero-title-block h1 {
  font-size: 1.35rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin: 0;
}
.hero-target {
  display: block;
  margin-top: .2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-decoration: none;
  transition: color var(--t);
}
.hero-target:hover { color: var(--text); }

/* Right side */
.hero-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .8rem;
  flex-shrink: 0;
}

.hero-quick-stats {
  display: flex;
  gap: 1.6rem;
}
.hero-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: .15rem;
}
.hero-stat-label {
  font-size: .7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .4px;
  font-weight: 500;
}
.hero-stat-value {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

/* Meta row at bottom of hero */
.hero-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  padding: .75rem 1.6rem;
  border-top: 1px solid var(--border);
  font-size: .8rem;
  background: rgba(0,0,0,.1);
}

/* Larger badge */
.badge-lg {
  font-size: .85rem;
  padding: .35rem 1rem;
  letter-spacing: .6px;
}

/* Smaller stat value for min/max pair */
.stat-value-sm {
  font-size: 1.3rem;
  font-weight: 700;
}

/* Inline range tabs (smaller, inside card-header) */
.tabs-inline {
  margin: 0;
  gap: .25rem;
}
.tabs-inline .tab {
  padding: .25rem .65rem;
  font-size: .78rem;
}

/* Daily breakdown grid */
.daily-grid {
  padding: 1rem 1.2rem;
}
.daily-grid-inner {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(52px, 1fr));
  gap: .4rem;
}
.daily-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .15rem;
  border-radius: 4px;
  padding: .35rem .2rem;
  font-size: .68rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform var(--t), box-shadow var(--t);
  cursor: default;
}
.daily-block:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.daily-date { color: var(--text-muted); font-weight: 400; font-size: .62rem; }

.daily-excellent { background: rgba(34,197,94,.12);  border-color: rgba(34,197,94,.25);  color: var(--green); }
.daily-good      { background: rgba(245,158,11,.12); border-color: rgba(245,158,11,.25); color: var(--yellow); }
.daily-degraded  { background: rgba(239,68,68,.08);  border-color: rgba(239,68,68,.2);   color: var(--red); }
.daily-down      { background: rgba(239,68,68,.2);   border-color: var(--red);           color: var(--red); }
.daily-unknown   { background: var(--bg-elevated);   border-color: var(--border);         color: var(--text-faint); }

/* =====================================================
   Monitor Detail – Two-column Layout
   ===================================================== */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 270px;
  gap: 1.7rem;
  align-items: start;
}
.detail-main  { min-width: 0; }
.detail-sidebar { display: flex; flex-direction: column; gap: 0; position: sticky; top: calc(var(--topbar-h) + 1rem); }

/* Sidebar card */
.sidebar-card { overflow: visible; }
.sidebar-card-fixed {
  height: 260px;
  display: flex;
  flex-direction: column;
}
.sidebar-card.mt-xs { margin-top: .7rem; }

.sidebar-card-header {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .9rem 1.1rem;
  border-bottom: 1px solid var(--border);
}
.sidebar-card-header h3 {
  font-size: .875rem;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}
.sidebar-card-icon { font-size: 1rem; line-height: 1; }

.icon-outline {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
  color: var(--text-muted);
}

.sidebar-card-body {
  padding: .9rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.sidebar-card-fixed .sidebar-card-body {
  flex: 1;
  min-height: 0;
}

.sidebar-skeleton {
  display: flex;
  flex-direction: column;
  gap: .4rem;
}

.sidebar-empty {
  font-size: .82rem;
  color: var(--text-faint);
  text-align: center;
  padding: .6rem 0;
}

.sidebar-hint {
  font-size: .78rem;
  margin: 0;
}

/* Add form inside sidebar */
.sidebar-add-form {
  display: flex;
  flex-direction: column;
  gap: .5rem;
  padding: .8rem 1.1rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-elevated);
}
.sidebar-input {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: .4rem .65rem;
  font-size: .82rem;
  font-family: inherit;
  width: 100%;
  transition: border-color var(--t);
}
.sidebar-input:focus {
  outline: none;
  border-color: var(--accent);
}
.sidebar-select {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: .4rem .65rem;
  font-size: .82rem;
  font-family: inherit;
  width: 100%;
}
.sidebar-label {
  font-size: .72rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .4px;
  margin-bottom: -.2rem;
}
.sidebar-form-actions {
  display: flex;
  gap: .4rem;
  margin-top: .2rem;
}

/* List items in sidebar */
.sidebar-list-item {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  padding: .5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: .82rem;
}
.sidebar-list-item:last-child { border-bottom: none; }

.sidebar-list-icon {
  flex-shrink: 0;
  margin-top: .1rem;
  display: flex;
  align-items: center;
  color: var(--text-muted);
}
.sidebar-list-info {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  flex: 1;
  min-width: 0;
  overflow: hidden;
}
.sidebar-list-label {
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-del-btn {
  flex-shrink: 0;
  font-size: .7rem;
  padding: .2rem .3rem;
  margin-top: .1rem;
  opacity: .4;
  transition: opacity var(--t), background var(--t);
}
.sidebar-list-item:hover .sidebar-del-btn { opacity: 1; }

/* Maintenance states */
.maint-active  { border-left: 2px solid var(--yellow); padding-left: .4rem; }
.maint-past    { opacity: .55; }

/* ── Chart info icon ───────────────────────────── */
.chart-info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .75rem;
  font-style: normal;
  color: var(--text-muted);
  cursor: default;
  vertical-align: middle;
  margin-left: .25rem;
  opacity: .65;
  transition: opacity .15s;
  user-select: none;
}
.chart-info-icon:hover { opacity: 1; }

/* ── Chart info tooltip (JS-driven, position:fixed) */
#chartInfoTooltip {
  position: fixed;
  z-index: 9999;
  min-width: 260px;
  max-width: 340px;
  background: #1a2133;
  color: #c9d1e0;
  font-size: .78rem;
  font-weight: 400;
  line-height: 1.5;
  padding: .55rem .75rem;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 6px 24px rgba(0,0,0,.45);
  pointer-events: none;
  white-space: normal;
  opacity: 0;
  transition: opacity .15s;
}
#chartInfoTooltip.visible { opacity: 1; }


/* ── SSL info – UptimeRobot style ──────────────── */
.ssl-nossl {
  display: flex;
  align-items: center;
  gap: .75rem;
  font-size: .85rem;
}

/* Badge icon for error / no-ssl */
.ssl-badge-icon {
  font-size: 1.4rem;
  flex-shrink: 0;
}

/* Big days counter */
.ssl-days-block {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .2rem 0 .6rem;
}
.ssl-days-circle {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 3px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--bg-elevated);
  transition: border-color var(--t);
}
.ssl-days-shield-wrap {
  width: 88px;
  height: 88px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.ssl-days-shield-icon {
  position: absolute;
  inset: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: .35;
}
.ssl-days-shield-icon svg {
  width: 100%;
  height: 100%;
}
.ssl-days-shield-num {
  position: relative;
  z-index: 1;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
}
.ssl-days-shield-unit {
  position: relative;
  z-index: 1;
  margin-top: .15rem;
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-muted);
}
.ssl-badge-good  { border-color: rgba(34,197,94,.5);  }
.ssl-badge-warn  { border-color: rgba(239,68,68,.5);  }
.ssl-badge-bad   { border-color: var(--red); }

.ssl-days-num  { font-size: 1.3rem; font-weight: 800; line-height: 1; }
.ssl-days-unit { font-size: .62rem; text-transform: uppercase; letter-spacing: .4px; color: var(--text-muted); margin-top: .1rem; }

.ssl-days-info {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  min-width: 0;
}
.ssl-domain-name {
  font-weight: 600;
  font-size: .9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.ssl-status-text {
  font-size: .78rem;
  font-weight: 600;
}

.ssl-divider {
  height: 1px;
  background: var(--border);
  margin: .4rem 0 .6rem;
}

/* Detail grid */
.ssl-detail-grid {
  display: flex;
  flex-direction: column;
  gap: .5rem;
}
.ssl-detail-grid-compact {
  margin-bottom: .3rem;
}
.ssl-detail-item {
  font-size: .78rem;
}
.ssl-detail-value-row {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.ssl-detail-icon {
  flex-shrink: 0;
  width: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.ssl-detail-item > div {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  min-width: 0;
}
.ssl-detail-label {
  font-size: .68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .3px;
  font-weight: 500;
}
.ssl-detail-value {
  font-size: .8rem;
  font-weight: 500;
  color: var(--text);
  word-break: break-word;
}
.ssl-detail-value-lg {
  font-size: 1.5rem;
  line-height: 1.1;
  font-weight: 600;
}

.ssl-collapsible {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.ssl-more-wrap {
  position: static;
  margin-top: auto;
  padding-top: .2rem;
}
.ssl-more-panel {
  position: absolute;
  top: 0;
  right: 100%;
  width: clamp(380px, 46vw, 720px);
  min-height: 100%;
  padding: .9rem 1rem;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30,37,53,.98), rgba(22,27,39,.98));
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateX(10px);
  transition: opacity .22s ease, transform .22s ease;
  overflow-y: auto;
  overflow-x: hidden;
  z-index: 25;
}
.ssl-collapsible:hover .ssl-more-panel,
.ssl-more-wrap:hover .ssl-more-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}
.ssl-more-panel-title {
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-muted);
  margin-bottom: .7rem;
}
.ssl-more-panel-content {
  overflow: visible;
}
.ssl-more-columns {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 1.1rem;
  row-gap: .6rem;
  align-items: start;
}
.ssl-more-columns::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(50% - .5px);
  width: 1px;
  background: rgba(255,255,255,.08);
}
.ssl-more-columns .ssl-detail-item {
  margin: 0;
}
.ssl-more-panel-meta {
  margin-top: .75rem;
  padding-top: .65rem;
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex;
  flex-direction: column;
  gap: .35rem;
}
.ssl-more-panel-meta .sidebar-hint {
  margin: 0;
  font-size: .73rem;
}
.ssl-more-shadow {
  display: none;
}
.ssl-more-hint {
  font-size: .72rem;
  color: var(--text-faint);
  margin-top: .15rem;
  opacity: .95;
  transition: opacity .18s ease;
}
.ssl-collapsible:hover .ssl-more-hint,
.ssl-more-wrap:hover .ssl-more-hint {
  opacity: .25;
}
.ssl-days-shield-icon-strong {
  opacity: .85;
  color: var(--text-muted);
}

/* ── Incident Cards ─────────────────────────────── */
.incident-loading,
.incident-empty {
  padding: 1rem;
}
.incident-skeleton {
  height: 80px;
  border-radius: 6px;
  background: var(--card-bg);
  margin-bottom: .5rem;
  animation: skeletonPulse 1.4s ease-in-out infinite;
}
.incident-empty {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--green);
  font-size: .85rem;
  padding: 1.2rem 1rem;
}
.incident-empty-icon {
  font-size: 1.1rem;
}
.incident-item {
  display: flex;
  border-bottom: 1px solid var(--border);
}
.incident-item:last-child { border-bottom: none; }
.incident-bar {
  width: 4px;
  flex-shrink: 0;
  border-radius: 0;
}
.incident-ongoing .incident-bar  { background: var(--red); }
.incident-resolved .incident-bar { background: var(--green); }
.incident-body {
  flex: 1;
  padding: .85rem 1rem;
  min-width: 0;
}
.incident-head {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .6rem;
}
.incident-duration {
  margin-left: auto;
  font-size: .75rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.incident-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
}
.incident-event {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
}
.incident-connector {
  width: 8px;
  height: 14px;
  border-left: 1px dashed var(--border);
  margin-left: 3px;
}
.incident-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: .2rem;
}
.dot-down    { background: var(--red); }
.dot-up      { background: var(--green); }
.dot-ongoing { background: var(--yellow); box-shadow: 0 0 0 2px rgba(234,179,8,.25); }
.incident-event-info {
  display: flex;
  flex-direction: column;
  gap: .1rem;
  min-width: 0;
}
.incident-event-label {
  font-size: .78rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.2;
}
.incident-event-time {
  font-size: .7rem;
}
.incident-detail {
  margin-top: .5rem;
  font-size: .71rem;
  padding: .25rem .5rem;
  background: rgba(239,68,68,.07);
  border-radius: 4px;
  border-left: 2px solid rgba(239,68,68,.3);
  color: var(--text-muted);
  word-break: break-word;
}
.incident-log-btn {
  cursor: pointer;
  border-radius: 4px;
  padding: .15rem .3rem;
  margin: -.15rem -.3rem;
}
.incident-log-btn:hover {
  background: rgba(99,102,241,.08);
}
.incident-log-btn:hover .incident-event-label { color: var(--accent); }
.incident-log-hint {
  font-size: .65rem;
  color: var(--accent);
  opacity: 0;
  margin-left: .3rem;
  transition: opacity .15s;
}
.incident-log-btn:hover .incident-log-hint { opacity: 1; }

/* ── Incident Log Modal ──────────────────────── */
#incidentModal .modal-body { padding: 0; }
.incident-modal-loading {
  padding: 2rem;
  text-align: center;
  color: var(--text-muted);
  font-size: .85rem;
}

/* Header banner inside modal body */
.ilog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,.018);
}
.ilog-header-col { display: flex; flex-direction: column; gap: .25rem; }
.ilog-header-label {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-muted);
  font-weight: 500;
}
.ilog-header-time {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.ilog-header-time.is-down { color: var(--red); }
.ilog-header-time.is-up   { color: var(--green); }
.ilog-header-arrow {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-top: .9rem;
  flex-shrink: 0;
}
.ilog-header-duration {
  font-size: .75rem;
  color: var(--text-muted);
  background: rgba(255,255,255,.06);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: .15rem .6rem;
  align-self: center;
  white-space: nowrap;
}

/* Timeline container */
.ilog-timeline {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Each timeline entry */
.ilog-entry {
  display: grid;
  grid-template-columns: 3rem 1px 1fr;
  gap: 0 0;
  position: relative;
}
/* Time column */
.ilog-entry-time {
  font-size: .7rem;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  text-align: right;
  padding-right: .75rem;
  padding-top: .15rem;
  line-height: 1.35;
  white-space: nowrap;
}
/* Vertical line + dot column */
.ilog-entry-track {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.ilog-entry-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: .12rem;
  box-shadow: 0 0 0 3px var(--bg-surface);
  position: relative;
  z-index: 1;
}
.ilog-entry-dot.dot-down    { background: var(--red);    box-shadow: 0 0 0 3px var(--bg-surface), 0 0 6px rgba(239,68,68,.45); }
.ilog-entry-dot.dot-up      { background: var(--green);  box-shadow: 0 0 0 3px var(--bg-surface), 0 0 6px rgba(34,197,94,.35); }
.ilog-entry-dot.dot-start   { background: var(--red);    width: 12px; height: 12px; box-shadow: 0 0 0 3px var(--bg-surface), 0 0 8px rgba(239,68,68,.55); }
.ilog-entry-dot.dot-end     { background: var(--green);  width: 12px; height: 12px; box-shadow: 0 0 0 3px var(--bg-surface), 0 0 8px rgba(34,197,94,.5); }
.ilog-entry-dot.dot-ongoing { background: var(--yellow); width: 12px; height: 12px; box-shadow: 0 0 0 3px var(--bg-surface), 0 0 8px rgba(234,179,8,.45); }

.ilog-entry-line {
  flex: 1;
  width: 2px;
  background: linear-gradient(to bottom, rgba(255,255,255,.08), rgba(255,255,255,.04));
  min-height: .75rem;
}
/* Content column */
.ilog-entry-content {
  padding: 0 0 1.1rem 1rem;
}
/* First/last entries have no bottom padding gap */
.ilog-entry:last-child .ilog-entry-content { padding-bottom: 0; }
.ilog-entry:last-child .ilog-entry-line    { display: none; }

.ilog-entry-title {
  font-size: .8rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: .3rem;
}
.ilog-entry-title.is-down    { color: rgba(239,68,68,.9); }
.ilog-entry-title.is-up      { color: rgba(34,197,94,.9); }
.ilog-entry-title.is-ongoing { color: rgba(234,179,8,.9); }

.ilog-entry-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .5rem;
  margin-bottom: .3rem;
}
.ilog-meta-chip {
  font-size: .65rem;
  padding: .1rem .45rem;
  border-radius: 4px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.08);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.ilog-meta-chip.chip-down { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.2); color: rgba(239,68,68,.85); }
.ilog-meta-chip.chip-up   { background: rgba(34,197,94,.08); border-color: rgba(34,197,94,.18); color: rgba(34,197,94,.85); }

.ilog-entry-msg {
  font-size: .73rem;
  color: var(--text-muted);
  line-height: 1.45;
  word-break: break-word;
}

/* Milestone entries (start / end) */
.ilog-entry.is-milestone .ilog-entry-content {
  padding-bottom: 1.4rem;
}
.ilog-entry.is-milestone .ilog-entry-title {
  font-size: .85rem;
}

/* Summary row below timeline */
.ilog-summary {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .85rem 1.5rem;
  border-top: 1px solid var(--border);
  background: rgba(255,255,255,.015);
  font-size: .72rem;
  color: var(--text-muted);
}
.ilog-summary strong { color: var(--text); font-weight: 600; }

@media (max-width: 1100px) {
  .detail-layout {
    grid-template-columns: 1fr 260px;
  }
}
@media (max-width: 900px) {
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .detail-sidebar { position: static; }
  .sidebar-card-fixed {
    height: auto;
  }
  .ssl-more-panel {
    position: static;
    top: auto;
    right: auto;
    width: 100%;
    min-height: 0;
    margin-top: .7rem;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
  }
  .ssl-more-panel-content {
    max-height: none;
  }
  .ssl-more-columns {
    grid-template-columns: 1fr;
  }
  .ssl-more-columns::before {
    display: none;
  }
  .ssl-more-hint {
    display: none;
  }
}

/* =====================================================
   Responsive
   ===================================================== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .main-wrapper {
    margin-left: 0;
  }
  .topbar-toggle {
    display: flex;
  }
  .content {
    padding: 1rem;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
  }
  .stats-grid-6 {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .range-bar { flex-wrap: wrap; }
  .monitor-card-actions {
    grid-template-columns: auto 1fr auto;
  }
  .monitor-card-actions .monitor-mini-action {
    width: 2.85rem;
    border-radius: var(--radius-sm);
  }
  .monitor-card-actions .monitor-edit-action {
    width: 100%;
  }
  .btn-player {
    min-height: 2.85rem;
    font-size: .82rem;
  }
  .btn-player-icon {
    width: 2.85rem;
    min-width: 2.85rem;
  }
}

/* =====================================================
   Billing / Subscription Page
   ===================================================== */

.billing-reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease;
  transition-delay: calc(var(--billing-stagger, 0) * 45ms);
}

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

@media (prefers-reduced-motion: reduce) {
  .billing-reveal,
  .billing-reveal.is-visible {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ── Hero ───────────────────────────────────────── */
.billing-hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.25fr .9fr;
  gap: 1rem;
  margin-bottom: 1.1rem;
  padding: 1.3rem;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: calc(var(--radius-lg) + 2px);
  background:
    radial-gradient(120% 130% at 100% 0%, rgba(34,197,94,.16), transparent 48%),
    radial-gradient(120% 120% at 0% 100%, rgba(14,165,233,.13), transparent 50%),
    linear-gradient(135deg, rgba(30,37,53,.95), rgba(22,27,39,.96));
  box-shadow: var(--shadow-md);
}

.billing-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(transparent 96%, rgba(255,255,255,.03) 100%);
  background-size: 100% 18px;
  opacity: .3;
}

.billing-hero-copy h2 {
  margin: .2rem 0 .45rem;
  font-size: clamp(1.15rem, 2.2vw, 1.65rem);
  line-height: 1.25;
  letter-spacing: -.02em;
}

.billing-hero-copy p {
  max-width: 52ch;
  color: var(--text-muted);
  font-size: .92rem;
}

.billing-kicker {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  border-radius: 99px;
  border: 1px solid rgba(14,165,233,.35);
  background: rgba(14,165,233,.14);
  color: #7dd3fc;
  font-size: .73rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .26rem .62rem;
}

.billing-hero-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
  align-content: center;
}

.billing-hero-chip {
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(12,16,25,.5);
  border-radius: 12px;
  padding: .64rem .78rem;
}

.billing-hero-chip span {
  display: block;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: .67rem;
  margin-bottom: .14rem;
}

.billing-hero-chip strong {
  display: block;
  font-size: .93rem;
  font-weight: 700;
}

.billing-hero-status-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
}

.billing-hero-status-line strong {
  margin-right: auto;
}

.billing-hero-cancel-btn {
  margin-top: 0;
  padding: .28rem .6rem;
  font-size: .72rem;
  line-height: 1.2;
  border-color: rgba(239,68,68,.35);
  background: rgba(239,68,68,.08);
  color: #fecaca;
  white-space: nowrap;
}

.billing-hero-cancel-btn:hover {
  border-color: rgba(239,68,68,.7);
  background: rgba(239,68,68,.16);
  color: #fee2e2;
}

.billing-hero-chip-mono code {
  font-size: .78rem;
  color: var(--text);
  word-break: break-all;
}

@media (max-width: 900px) {
  .billing-hero {
    grid-template-columns: 1fr;
    padding: 1rem;
  }
  .billing-hero-meta {
    grid-template-columns: 1fr;
  }
  .billing-hero-status-line {
    flex-wrap: wrap;
  }
}

/* ── Account Overview Card ──────────────────────── */
.billing-account-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.02), rgba(255,255,255,0) 30%),
    var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.2rem 1.25rem;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}

.billing-account-top {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.2rem;
}

.billing-account-left {
  display: flex;
  align-items: center;
  gap: .7rem;
  flex-wrap: wrap;
  flex: 1;
}

.billing-account-price strong {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -.02em;
}
.billing-account-price span {
  font-size: .85rem;
  color: var(--text-muted);
}

.billing-cancel-btn {
  color: var(--text-muted);
  border-color: rgba(239,68,68,.35);
  background: rgba(239,68,68,.06);
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .8rem;
  white-space: nowrap;
}
.billing-cancel-btn:hover {
  border-color: rgba(239,68,68,.7);
  color: #fca5a5;
  background: rgba(239,68,68,.12);
}

/* Stats row */
.billing-account-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .55rem;
  flex-wrap: wrap;
  border: none;
  border-radius: var(--radius-sm);
}

.billing-stat {
  min-width: 130px;
  padding: .7rem 1rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  background: rgba(8,12,19,.36);
}
.billing-stat:last-child { border-right: 1px solid rgba(255,255,255,.08); }
.billing-stat-mono { min-width: 200px; }

.billing-stat-label {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .4px;
  color: var(--text-faint);
  margin-bottom: .25rem;
}
.billing-stat-value {
  font-size: .9rem;
  font-weight: 700;
  color: var(--text);
}
.billing-stat-highlight { color: var(--accent-hover); }

@media (max-width: 700px) {
  .billing-account-stats { grid-template-columns: 1fr; }
  .billing-stat { min-width: 0; }
  .billing-stat:last-child { border-right: 1px solid rgba(255,255,255,.08); }
}

/* Plan badge (current plan name) */
.billing-plan-badge {
  display: inline-flex;
  align-items: center;
  padding: .3rem .9rem;
  border-radius: 99px;
  font-size: .9rem;
  font-weight: 700;
  letter-spacing: -.2px;
}
.plan-free         { background: var(--bg-elevated); color: var(--text-muted); border: 1px solid var(--border); }
.plan-basis        { background: rgba(34,197,94,.12); color: var(--green); border: 1px solid rgba(34,197,94,.3); }
.plan-premium      { background: var(--accent-dim); color: var(--accent-hover); border: 1px solid var(--accent); }
.plan-enterprise   { background: rgba(245,158,11,.12); color: var(--yellow); border: 1px solid rgba(245,158,11,.3); }
/* Legacy slugs */
.plan-basic        { background: rgba(34,197,94,.12); color: var(--green); border: 1px solid rgba(34,197,94,.3); }
.plan-advance      { background: var(--accent-dim); color: var(--accent-hover); border: 1px solid var(--accent); }
.plan-professional { background: rgba(245,158,11,.12); color: var(--yellow); border: 1px solid rgba(245,158,11,.3); }

/* Pending change notice */
.billing-pending-notice {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-top: 1rem;
  padding: .78rem .9rem;
  background: rgba(245,158,11,.1);
  border: 1px solid rgba(245,158,11,.32);
  border-radius: 11px;
  font-size: .875rem;
  color: var(--yellow);
  flex-wrap: wrap;
}

/* ── Plans Section Header ───────────────────────── */
.billing-plans-header {
  margin-top: .35rem;
  margin-bottom: 1.05rem;
}
.billing-plans-header h2 {
  font-size: 1.2rem;
  font-weight: 800;
  letter-spacing: -.02em;
  margin-bottom: .3rem;
}
.billing-plans-header p {
  font-size: .9rem;
  color: var(--text-muted);
}

.billing-costs {
  margin-top: 1.1rem;
  margin-bottom: 1.1rem;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,0) 35%),
    var(--bg-surface);
  padding: 1rem;
}

.billing-costs-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .8rem;
  margin-bottom: .9rem;
  flex-wrap: wrap;
}

.billing-costs-head h3 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.01em;
}

.billing-costs-head p {
  margin: .28rem 0 0;
  color: var(--text-muted);
  font-size: .84rem;
  line-height: 1.45;
}

.billing-cost-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .7rem;
  margin-bottom: .8rem;
}

.billing-cost-stat {
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--bg-elevated);
  padding: .65rem .75rem;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.billing-cost-stat span {
  color: var(--text-muted);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.billing-cost-stat strong {
  color: var(--text);
  font-size: 1rem;
}

.billing-year-totals {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
  margin-bottom: .8rem;
}

.billing-year-pill {
  display: inline-flex;
  align-items: center;
  padding: .22rem .55rem;
  border-radius: 999px;
  border: 1px solid rgba(14,165,233,.36);
  background: rgba(14,165,233,.1);
  color: var(--accent-hover);
  font-size: .74rem;
  font-weight: 600;
}

.billing-cost-empty {
  border: 1px dashed var(--border);
  border-radius: 10px;
  padding: .7rem .8rem;
  color: var(--text-muted);
  font-size: .84rem;
}

.billing-cost-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--bg-elevated);
}

.billing-cost-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.billing-cost-table th,
.billing-cost-table td {
  padding: .56rem .7rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
  font-size: .82rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.billing-cost-table th {
  background: rgba(255,255,255,.02);
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: .05em;
  font-size: .72rem;
  font-weight: 700;
}

.billing-cost-table tbody tr:hover td {
  background: rgba(14,165,233,.06);
}

.billing-cost-table td:nth-child(3) {
  color: var(--text);
  font-weight: 600;
}

.billing-cost-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: .76rem;
}

.billing-cost-link {
  display: inline-flex;
  align-items: center;
  padding: .2rem .5rem;
  border-radius: 999px;
  border: 1px solid rgba(14,165,233,.35);
  background: rgba(14,165,233,.12);
  color: var(--accent-hover);
  font-size: .74rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color var(--t), background var(--t), color var(--t);
}

.billing-cost-link:hover {
  border-color: rgba(14,165,233,.58);
  background: rgba(14,165,233,.2);
  color: #d5f0ff;
}

@media (max-width: 880px) {
  .billing-cost-stats {
    grid-template-columns: 1fr;
  }
}

.pp-coupon-editor {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  padding: .75rem .85rem;
  background: rgba(14,165,233,.06);
  border: 1px solid rgba(14,165,233,.28);
  border-radius: var(--radius-sm);
}

.pp-coupon-editor-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem;
  flex-wrap: wrap;
}

.pp-coupon-label {
  font-size: .74rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent-hover);
}

.pp-coupon-sub {
  font-size: .75rem;
  color: var(--text-muted);
}

.pp-coupon-row {
  display: grid;
  grid-template-columns: minmax(180px,1fr) auto auto;
  gap: .5rem;
  align-items: center;
}

.pp-coupon-input {
  width: 100%;
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .52rem .7rem;
  font-size: .85rem;
  outline: none;
  text-transform: uppercase;
  letter-spacing: .02em;
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}

.pp-coupon-input::placeholder {
  color: var(--text-faint);
}

.pp-coupon-input:focus {
  border-color: rgba(14,165,233,.65);
  box-shadow: 0 0 0 4px rgba(14,165,233,.16);
  background: rgba(255,255,255,.03);
}

.pp-coupon-status {
  min-height: 1.25rem;
  border-radius: 8px;
  padding: .3rem .55rem;
  font-size: .76rem;
  line-height: 1.35;
  border: 1px dashed transparent;
}

.pp-coupon-status.is-neutral {
  color: var(--text-faint);
  background: rgba(255,255,255,.02);
  border-color: rgba(255,255,255,.08);
}

.pp-coupon-status.is-info {
  color: var(--accent-hover);
  background: rgba(14,165,233,.12);
  border-color: rgba(14,165,233,.32);
}

.pp-coupon-status.is-success {
  color: #7ef5b0;
  background: rgba(34,197,94,.14);
  border-color: rgba(34,197,94,.38);
}

.pp-coupon-status.is-error {
  color: #ffb5b5;
  background: rgba(239,68,68,.14);
  border-color: rgba(239,68,68,.4);
}

/* ── Billing Profile Form (in payment modal) ────── */
.pp-billing-step { display: flex; flex-direction: column; gap: .65rem; }
.pp-billing-label {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: .05em;
}
.pp-billing-radio-group { display: flex; gap: .55rem; flex-wrap: wrap; }
.pp-billing-radio {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .875rem;
  color: var(--text);
  cursor: pointer;
  padding: .4rem .8rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .15s, background .15s;
  user-select: none;
}
.pp-billing-radio:has(input:checked) {
  border-color: var(--accent);
  background: var(--accent-dim);
}
.pp-billing-radio input { accent-color: var(--accent); cursor: pointer; }
.pp-billing-input {
  width: 100%;
  padding: .48rem .65rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: .875rem;
  outline: none;
  transition: border-color .15s;
  box-sizing: border-box;
}
.pp-billing-input:focus { border-color: var(--accent); }
.pp-billing-input::placeholder { color: var(--text-faint); }
.pp-billing-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.pp-billing-error {
  font-size: .82rem;
  color: var(--red);
  padding: .4rem .6rem;
  background: var(--red-dim);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(239,68,68,.25);
}
.pp-paypal-step { display: flex; flex-direction: column; gap: 1rem; }
.pp-billing-back {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: .82rem;
  cursor: pointer;
  padding: 0;
}
.pp-billing-back:hover { color: var(--text); }

@media (max-width: 620px) {
  .pp-coupon-row {
    grid-template-columns: 1fr;
  }
  .pp-coupon-row .btn {
    width: 100%;
  }
}

/* ── Plans Layout ───────────────────────────────── */
.billing-plans-layout {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.35rem;
  align-items: start;
}
@media (max-width: 1100px) { .billing-plans-layout { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px)  { .billing-plans-layout { grid-template-columns: 1fr; } }

.plan-column {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.plan-variant-slot {
  position: relative;
  min-width: 0;
  perspective: 1200px;
}

.plan-variant-stage {
  --tilt-rx: 0deg;
  --tilt-ry: 0deg;
  display: grid;
  position: relative;
  transform: perspective(1200px) rotateX(var(--tilt-rx)) rotateY(var(--tilt-ry));
  transform-style: preserve-3d;
  will-change: transform;
}

.plan-variant-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .35rem;
  position: absolute;
  top: .72rem;
  left: .85rem;
  right: .85rem;
  z-index: 4;
}

.plan-variant-tab {
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  background: rgba(7,10,18,.72);
  color: var(--text-muted);
  font-size: .72rem;
  font-weight: 700;
  line-height: 1.1;
  padding: .42rem .38rem;
  cursor: pointer;
  backdrop-filter: blur(10px);
  transition: background var(--t), border-color var(--t), color var(--t);
  min-width: 0;
}
.plan-variant-tab:hover,
.plan-variant-tab.is-active {
  border-color: rgba(14,165,233,.42);
  background: rgba(14,165,233,.12);
  color: var(--text);
}

.plan-variant-card {
  grid-row: 1;
  grid-column: 1;
  opacity: 0;
  pointer-events: none;
  backface-visibility: hidden;
  transform: scale(.985);
  transition: opacity .22s ease, transform .22s ease;
  z-index: 1;
}

.plan-variant-card.is-active {
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
  z-index: 2;
}

/* ── Main plan card ─────────────────────────────── */
.billing-plan-card {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,0) 28%),
    var(--bg-surface);
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 14px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 100%;
  transform-style: preserve-3d;
  transition: border-color var(--t), box-shadow var(--t);
}

.plan-variant-slot:hover .billing-plan-card {
  border-color: rgba(14,165,233,.46);
  box-shadow: 0 18px 38px rgba(0,0,0,.38);
}

.billing-plan-card.is-current {
  border-color: rgba(34,197,94,.56);
  background:
    linear-gradient(180deg, rgba(34,197,94,.08), rgba(34,197,94,0) 35%),
    var(--bg-elevated);
}
.billing-plan-card.is-featured {
  border-color: rgba(14,165,233,.5);
  box-shadow: 0 0 0 1px rgba(14,165,233,.18) inset;
}

/* "Beliebt" ribbon */
.plan-popular-badge {
  position: absolute;
  top: .78rem;
  right: .85rem;
  z-index: 3;
  border-radius: 999px;
  background: linear-gradient(90deg, #0ea5e9, #22c55e);
  color: #05202e;
  font-size: .72rem;
  font-weight: 700;
  text-align: center;
  padding: .24rem .68rem;
  letter-spacing: .5px;
  text-transform: uppercase;
}
.plan-variant-slot.has-variants .plan-popular-badge {
  top: 3.25rem;
}

/* Card header: name + price */
.plan-card-header {
  min-height: 156px;
  padding: 4.65rem 1.3rem .9rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.plan-name {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-muted);
  margin-bottom: .4rem;
}
.plan-price {
  min-height: 44px;
  display: flex;
  align-items: baseline;
  gap: .2rem;
}
.price-amount {
  font-size: 2.05rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -1px;
}
.price-amount--plus { font-size: 1.55rem; }
.price-period { font-size: .85rem; color: var(--text-muted); }

/* Feature list */
.plan-features {
  list-style: none;
  padding: .9rem 1.3rem 5.2rem;
  min-height: 295px;
  display: flex;
  flex-direction: column;
  gap: .5rem;
  flex: 1;
  position: relative;
  z-index: 1;
}
.plan-features li {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  color: var(--text-muted);
}
.plan-features li svg { color: var(--green); flex-shrink: 0; }
.plan-features li.plan-feature-sub {
  padding-left: 1.35rem;
  font-size: .8rem;
  color: color-mix(in srgb, var(--text-muted) 88%, var(--text) 12%);
}
.plan-features li.plan-feature-group {
  margin-top: .25rem;
  color: var(--text);
  font-weight: 700;
}
.plan-feature-sub-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--accent) 70%, var(--text-muted) 30%);
  flex-shrink: 0;
}

/* Card footer: CTA button */
.plan-variant-actions {
  position: absolute;
  left: 1.3rem;
  right: 1.3rem;
  bottom: 1.1rem;
  z-index: 5;
  pointer-events: none;
}

.plan-card-footer {
  padding: 0;
  border-top: 0;
  background: transparent;
  backdrop-filter: none;
  position: relative;
  z-index: 1;
  display: none;
  pointer-events: none;
}
.plan-card-footer.is-active {
  display: block;
  pointer-events: auto;
}
.plan-card-footer .btn { width: 100%; justify-content: center; }

.plan-card-footer .btn {
  --btn-glow-x: 50%;
  --btn-glow-y: 50%;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.plan-card-footer .btn::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 170px;
  height: 170px;
  pointer-events: none;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(14,165,233,.46) 0%, rgba(14,165,233,.16) 36%, rgba(14,165,233,0) 70%);
  transform: translate(calc(var(--btn-glow-x) - 85px), calc(var(--btn-glow-y) - 85px));
  opacity: 0;
  transition: opacity .22s ease;
  z-index: -1;
}

.plan-card-footer .btn:hover::before,
.plan-card-footer .btn:focus-visible::before {
  opacity: 1;
}

.plan-card-footer .btn:disabled::before {
  opacity: 0;
}

/* Tab panel visibility */
.plan-tab-panel.is-hidden { display: none; }

/* ── Plan Tab Switcher ───────────────────────────── */
.plan-tabs {
  display: flex;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: rgba(10,14,22,.55);
  position: relative;
  z-index: 1;
}
.plan-tab {
  flex: 1;
  padding: .5rem .6rem;
  font-size: .78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color var(--t), background var(--t), border-color var(--t);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.plan-tab:hover { color: var(--text); background: var(--bg-surface); }
.plan-tab.is-active {
  color: #7dd3fc;
  border-bottom-color: #0ea5e9;
  background: var(--bg-surface);
}

/* Plus pill inside plan name */
.plan-plus-pill {
  display: inline-flex;
  align-items: center;
  padding: .1rem .45rem;
  background: rgba(99,102,241,.15);
  color: var(--accent-hover);
  border: 1px solid rgba(99,102,241,.3);
  border-radius: 99px;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .3px;
  text-transform: uppercase;
}

/* Outline button variant */
.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-light);
}
.btn-outline:hover { background: var(--bg-elevated); border-color: var(--accent); color: var(--accent-hover); }

/* Disabled state buttons for active/pending plan */
.btn-current {
  background: rgba(34,197,94,.14);
  color: #86efac;
  border: 1px solid rgba(34,197,94,.45);
  cursor: default;
  opacity: 1;
}
.btn-pending {
  background: rgba(245,158,11,.1);
  color: #fcd34d;
  border: 1px solid rgba(245,158,11,.4);
  cursor: default;
  opacity: 1;
}

@media (max-width: 900px) {
  .billing-plan-card { transform: none; }
}

/* ── Cancel Modal ───────────────────────────────── */
.cancel-info-box {
  display: flex;
  gap: .6rem;
  padding: .7rem .9rem;
  background: rgba(245,158,11,.06);
  border: 1px solid rgba(245,158,11,.2);
  border-radius: var(--radius-sm);
  font-size: .85rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin-top: .75rem;
}

.btn-danger-outline {
  background: transparent;
  color: var(--red);
  border: 1px solid rgba(239,68,68,.4);
}
.btn-danger-outline:hover { background: var(--red-dim); border-color: var(--red); }

/* ── Retention Offer ────────────────────────────── */
.retention-header {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .8rem 1rem;
  background: linear-gradient(135deg, rgba(99,102,241,.1), rgba(245,158,11,.08));
  border: 1px solid rgba(99,102,241,.2);
  border-radius: var(--radius-sm);
  margin-bottom: .75rem;
}
.retention-gift { font-size: 1.6rem; line-height: 1; }

.retention-price-box {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .6rem .9rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  flex-wrap: wrap;
}
.retention-old-price {
  font-size: .9rem;
  color: var(--text-faint);
  text-decoration: line-through;
}
.retention-new-price {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--green);
}
.retention-badge {
  margin-left: auto;
  background: rgba(34,197,94,.15);
  color: var(--green);
  border: 1px solid rgba(34,197,94,.3);
  border-radius: 99px;
  font-size: .75rem;
  font-weight: 700;
  padding: .15rem .55rem;
}


/* ── Status-Pages Modal Tabs ──────────────────────────────────────────────── */
.modal-tabs-bar {
  display: flex;
  gap: .25rem;
  padding: .5rem 1.4rem 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}
.modal-tab {
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  padding: .5rem .9rem;
  font-size: .88rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  transition: color .15s, border-color .15s;
  margin-bottom: -1px;
}
.modal-tab:hover { color: var(--text); }
.modal-tab.active { color: var(--primary); border-bottom-color: var(--primary); }

/* ── Layout Builder ───────────────────────────────────────────────────────── */
.sp-layout-builder { display: flex; flex-direction: column; gap: .5rem; }
.sp-layout-empty { color: var(--text-muted); padding: .75rem 0; }
.sp-layout-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .6rem .75rem;
  cursor: default;
  transition: opacity .15s, box-shadow .15s;
  user-select: none;
}
.sp-layout-item.sp-layout-hidden { opacity: .45; }
.sp-layout-item.sp-layout-dragging { opacity: .35; }
.sp-layout-item.sp-layout-over { box-shadow: 0 0 0 2px var(--primary); }
.sp-layout-handle { cursor: grab; font-size: 1.1rem; color: var(--text-muted); line-height: 1; }
.sp-layout-info { flex: 1; min-width: 0; }
.sp-layout-name { font-weight: 600; display: block; }
.sp-layout-target { font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.sp-vis-btn { min-width: 32px; font-size: .9rem; }

/* ── Design Preview ───────────────────────────────────────────────────────── */
.sp-design-preview {
  margin-top: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
}
.sp-prev-bar { height: 4px; background: var(--sp-accent, #6366f1); }
.sp-prev-head {
  display: flex;
  align-items: center;
  padding: .65rem 1rem;
  border-bottom: 1px solid var(--border);
  font-weight: 600;
}
.sp-prev-incident {
  background: #fef3c7;
  color: #92400e;
  padding: .4rem .8rem;
  font-size: .82rem;
  font-weight: 500;
}
.sp-prev-cards {
  display: flex;
  gap: .5rem;
  padding: .65rem 1rem;
  flex-wrap: wrap;
}
.sp-prev-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-top: 2px solid var(--sp-accent, #6366f1);
  border-radius: var(--radius);
  padding: .4rem .65rem;
  font-size: .82rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}

/* ── modal-xl ─────────────────────────────────────────────────────────────── */
.modal.modal-xl { max-width: 760px; }

/* ── Plan Limit Banner (monitors, crons, status-pages, team) ─────────────── */
.plan-limit-banner {
  margin-bottom: 1.25rem;
  border-radius: 18px;
  overflow: hidden;
}
.plan-limit-banner:empty { display: none; }

.plan-limit-bar {
  display: flex;
  align-items: center;
  gap: .95rem;
  padding: .95rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--bg-card);
}
.plan-limit-bar .plan-pill {
  padding: .28rem .8rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, #0ea5e9 30%));
  color: #fff;
  font-size: .74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  white-space: nowrap;
}
.plan-limit-bar .plan-progress-wrap {
  flex: 1;
  height: 8px;
  background: color-mix(in srgb, var(--border) 72%, #fff 28%);
  border-radius: 999px;
  overflow: hidden;
}
.plan-limit-bar .plan-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #14b8a6);
  border-radius: 999px;
  transition: width .35s ease;
}
.plan-limit-bar .plan-limit-text {
  color: var(--text-muted);
  white-space: nowrap;
  font-weight: 600;
  font-size: .82rem;
}
/* ── Monitor Card Warmup State (kein Check bisher) ──────────────── */
.monitor-card-warmup {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem .9rem;
  border-radius: calc(var(--radius) - 2px);
  background: repeating-linear-gradient(
    -45deg,
    transparent,
    transparent 6px,
    rgba(99,102,241,.04) 6px,
    rgba(99,102,241,.04) 12px
  );
  border: 1px dashed rgba(99,102,241,.3);
}
.monitor-warmup-pulse {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: warmupPulse 1.4s ease-in-out infinite;
}
@keyframes warmupPulse {
  0%,100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(99,102,241,.5); }
  50%      { opacity: .7; transform: scale(1.15); box-shadow: 0 0 0 5px rgba(99,102,241,0); }
}
.monitor-warmup-text {
  font-size: .8rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.monitor-warmup-text small {
  font-size: .72rem;
  opacity: .7;
}
.monitor-few-checks-hint {
  display: block;
  font-size: .74rem;
  color: var(--text-muted);
  padding: .2rem 0;
  opacity: .8;
}

/* ── Monitor Warmup Info Banner ─────────────────────────────────── */
.warmup-banner {
  display: flex;
  align-items: flex-start;
  gap: .85rem;
  padding: .9rem 1.1rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(99,102,241,.35);
  border-radius: var(--radius);
  background: linear-gradient(135deg, rgba(99,102,241,.1), rgba(99,102,241,.04));
  font-size: .875rem;
  line-height: 1.55;
  animation: pageIn .3s ease both;
}
.warmup-icon {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: .05rem;
}
.warmup-body {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.warmup-body strong {
  font-weight: 700;
  color: var(--text);
}
.warmup-body span {
  color: var(--text-muted);
}

.plan-upgrade-hint {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--bg-card) 94%, #fff 6%), var(--bg-card));
  font-size: .84rem;
  color: var(--text-muted);
}
.plan-upgrade-hint a { color: var(--accent); font-weight: 600; }

/* =====================================================
   OTP / Auth-Token Modal
   ===================================================== */
.otp-icon-ring {
  width: 68px; height: 68px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1.5px solid rgba(99,102,241,.4);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--accent);
  box-shadow: 0 0 24px rgba(99,102,241,.18);
}
.otp-icon-ring--sent {
  background: var(--green-dim);
  border-color: rgba(34,197,94,.4);
  color: var(--green);
  box-shadow: 0 0 24px rgba(34,197,94,.18);
}
.otp-feature-list {
  display: flex; flex-direction: column; gap: .55rem;
  text-align: left;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  margin-top: 1.25rem;
}
.otp-feature {
  display: flex; align-items: center; gap: .6rem;
  font-size: .82rem; color: var(--text-muted);
}
.otp-feature svg { flex-shrink: 0; color: var(--green); }
.otp-boxes {
  display: flex; gap: .5rem; justify-content: center;
  margin: 1.4rem 0 .75rem;
}
.otp-box {
  width: 46px; height: 56px;
  background: var(--bg-elevated);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 1.6rem; font-weight: 700; text-align: center;
  caret-color: transparent;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.otp-box:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
  background: var(--bg-surface);
}
.otp-box.otp-filled {
  border-color: var(--accent-hover);
  background: var(--accent-dim);
}
.otp-resend {
  font-size: .8rem; color: var(--text-muted);
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
}
.otp-resend-btn {
  background: none; border: none; cursor: pointer;
  color: var(--accent); font-size: .8rem; padding: 0;
  text-decoration: underline;
}
.otp-resend-btn:hover  { color: var(--accent-hover); }
.otp-resend-btn:disabled { color: var(--text-faint); text-decoration: none; cursor: default; }
.otp-spam-hint {
  display: flex; align-items: center; gap: .35rem;
  font-size: .78rem; color: var(--text-muted);
  background: var(--yellow-dim);
  border: 1px solid rgba(245,158,11,.3);
  border-radius: var(--radius-sm);
  padding: .35rem .6rem;
  animation: fadeIn .4s ease;
}
.otp-spam-hint strong { color: var(--yellow); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
.otp-countdown-wrap {
  margin: .5rem 0 .75rem;
  display: flex; flex-direction: column; gap: .35rem; align-items: center;
}
.otp-countdown-bar {
  width: 100%; max-width: 260px; height: 4px;
  background: var(--bg-elevated);
  border-radius: 99px; overflow: hidden;
}
.otp-countdown-fill {
  height: 100%; width: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 1s linear, background .4s;
}
.otp-countdown-label {
  font-size: .75rem; color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
@keyframes otpSent {
  0%   { transform: scale(.8) translateY(6px); opacity: 0; }
  60%  { transform: scale(1.08) translateY(-2px); opacity: 1; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
.otp-sent-anim { animation: otpSent .4s cubic-bezier(.34,1.4,.64,1) both; }

/* ── Cloudflare Turnstile – fixed bottom-right ───────────────────────────── */
.turnstile-corner {
  position: fixed;
  bottom: 1.25rem;
  right: 1.25rem;
  z-index: 9999;
}

/* =====================================================
   Light Theme Overrides
   ===================================================== */
:root[data-theme="light"] .sidebar {
  background: #f9fbfe;
  border-right-color: #d8e1ec;
  box-shadow: 10px 0 30px rgba(15,23,42,.05);
}

:root[data-theme="light"] .topbar {
  background: rgba(249,251,254,.9);
  border-bottom-color: #d8e1ec;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

:root[data-theme="light"] .content {
  background: transparent;
}

:root[data-theme="light"] .card,
:root[data-theme="light"] .stat-card,
:root[data-theme="light"] .monitor-card,
:root[data-theme="light"] .sp-page-card,
:root[data-theme="light"] .modal,
:root[data-theme="light"] .api-usage-card,
:root[data-theme="light"] .token-row,
:root[data-theme="light"] .new-token-reveal {
  background: #ffffff;
  border-color: #d5dfeb;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(15,23,42,.05), 0 10px 30px rgba(15,23,42,.035);
}

:root[data-theme="light"] .card-header,
:root[data-theme="light"] .modal-header,
:root[data-theme="light"] .modal-footer {
  background: #fbfcfe;
  border-color: #dce4ee;
}

:root[data-theme="light"] .range-bar,
:root[data-theme="light"] .api-nav,
:root[data-theme="light"] .endpoint-url-row,
:root[data-theme="light"] .param-table,
:root[data-theme="light"] .otp-feature-list {
  background: #f7f9fc;
  border-color: #d5dfeb;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}

:root[data-theme="light"] .sf-popup {
  background: #ffffff;
  border-color: #d5dfeb;
  color: var(--text);
  box-shadow: 0 -10px 34px rgba(15,23,42,.16);
}

:root[data-theme="light"] .sidebar-nav a,
:root[data-theme="light"] .sf-user,
:root[data-theme="light"] .sf-settings,
:root[data-theme="light"] .topbar-title {
  color: var(--text-muted);
}

:root[data-theme="light"] .sidebar-nav a:hover,
:root[data-theme="light"] .sf-user:hover,
:root[data-theme="light"] .sf-settings:hover {
  background: #eef5ff;
  color: var(--accent);
}

:root[data-theme="light"] .sidebar-nav li.active a {
  background: #e7f0ff;
  color: #174ea6;
  box-shadow: inset 3px 0 0 var(--accent);
}

:root[data-theme="light"] .sf-popup-item:hover,
:root[data-theme="light"] .sf-theme-toggle:hover {
  background: #eef5ff;
  color: var(--accent);
  text-decoration: none;
}

:root[data-theme="light"] .sf-popup-logout:hover {
  background: rgba(220,38,38,.08);
}

:root[data-theme="light"] .sp-card-preview {
  background: #eef3f8;
  border-bottom-color: #d5dfeb;
}

:root[data-theme="light"] .sp-card-browser-chrome {
  background: linear-gradient(180deg, #f8fafc, #eef3f8);
  border-bottom-color: #d5dfeb;
}

:root[data-theme="light"] .sp-card-browser-title {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #526173;
}

:root[data-theme="light"] .sp-card-browser-title.is-active {
  background: #eaf2ff;
  border-color: #9ec0ef;
  color: #174ea6;
}

:root[data-theme="light"] .sp-card-browser-title.is-inactive {
  background: #f7f9fc;
  border-color: #d5dfeb;
  color: #8998aa;
}

:root[data-theme="light"] .data-table th,
:root[data-theme="light"] .param-table th {
  background: #eef3f8;
  border-bottom-color: #d2dce8;
  color: var(--text-muted);
}

:root[data-theme="light"] .data-table tbody tr,
:root[data-theme="light"] .param-table td {
  background: #ffffff;
  border-bottom-color: #e1e8f0;
}

:root[data-theme="light"] .data-table tbody tr:nth-child(even) {
  background: #fbfcfe;
}

:root[data-theme="light"] .data-table tbody tr:hover {
  background: #eaf2ff;
}

:root[data-theme="light"] input,
:root[data-theme="light"] select,
:root[data-theme="light"] textarea,
:root[data-theme="light"] .form-group input:not([type="range"]),
:root[data-theme="light"] .form-group select,
:root[data-theme="light"] .form-group textarea,
:root[data-theme="light"] .sidebar-input,
:root[data-theme="light"] .sidebar-select,
:root[data-theme="light"] .pp-coupon-input,
:root[data-theme="light"] .pp-billing-input,
:root[data-theme="light"] .filter-row select,
:root[data-theme="light"] .filter-row input[type=date] {
  background: #f7faff;
  color: var(--text);
  border-color: #b8c6d8;
  box-shadow: inset 0 1px 2px rgba(15,23,42,.045);
}

:root[data-theme="light"] input:hover,
:root[data-theme="light"] select:hover,
:root[data-theme="light"] textarea:hover,
:root[data-theme="light"] .form-group input:not([type="range"]):hover,
:root[data-theme="light"] .form-group select:hover,
:root[data-theme="light"] .form-group textarea:hover {
  background: #ffffff;
  border-color: #96a8bd;
}

:root[data-theme="light"] input:focus,
:root[data-theme="light"] select:focus,
:root[data-theme="light"] textarea:focus,
:root[data-theme="light"] .form-group input:not([type="range"]):focus,
:root[data-theme="light"] .form-group select:focus,
:root[data-theme="light"] .form-group textarea:focus {
  background: #ffffff;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31,111,235,.16), inset 0 1px 2px rgba(15,23,42,.03);
}

:root[data-theme="light"] input::placeholder,
:root[data-theme="light"] textarea::placeholder,
:root[data-theme="light"] .pp-coupon-input::placeholder,
:root[data-theme="light"] .pp-billing-input::placeholder {
  color: #8a98aa;
}

:root[data-theme="light"] .form-group label,
:root[data-theme="light"] .range-bar-label,
:root[data-theme="light"] .stat-label {
  color: #4c5c70;
}

:root[data-theme="light"] .btn-ghost,
:root[data-theme="light"] .btn-icon,
:root[data-theme="light"] .monitor-mini-action,
:root[data-theme="light"] .range-btn,
:root[data-theme="light"] .copy-btn,
:root[data-theme="light"] .cbcopy {
  background: #f7f9fc;
  border-color: #bfccdb;
  color: #334155;
  box-shadow: 0 1px 1px rgba(15,23,42,.04);
}

:root[data-theme="light"] .btn-ghost:hover,
:root[data-theme="light"] .btn-icon:hover,
:root[data-theme="light"] .monitor-mini-action:hover,
:root[data-theme="light"] .range-btn:hover,
:root[data-theme="light"] .copy-btn:hover,
:root[data-theme="light"] .cbcopy:hover {
  background: #eaf2ff;
  color: var(--accent);
  border-color: #86a8d8;
}

:root[data-theme="light"] .btn-primary {
  background: linear-gradient(180deg, #2f7af5, #1f6feb);
  color: #fff;
  box-shadow: 0 8px 18px rgba(31,111,235,.22);
}

:root[data-theme="light"] .btn-primary:hover {
  background: linear-gradient(180deg, #266fe6, #185abc);
}

:root[data-theme="light"] .btn-danger {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #b91c1c;
}

:root[data-theme="light"] .btn-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
  color: #fff;
}

:root[data-theme="light"] .range-btn.active {
  background: #dbeafe;
  border-color: #73a4ee;
  color: #174ea6;
}

:root[data-theme="light"] .btn-player {
  background: linear-gradient(180deg, #ffffff, #f3f6fb);
  border-color: #bac8d9;
  color: #243244;
  box-shadow: 0 1px 2px rgba(15,23,42,.06);
}

:root[data-theme="light"] .btn-player:hover {
  background: linear-gradient(180deg, #f7fbff, #eaf2ff);
  border-color: var(--accent);
}

:root[data-theme="light"] .btn-player-play {
  background: #ecfdf5;
  border-color: #86efac;
  color: #166534;
}

:root[data-theme="light"] .btn-player-pause {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e;
}

:root[data-theme="light"] .btn-player-delete,
:root[data-theme="light"] .btn-delete-confirm {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #b91c1c;
}

:root[data-theme="light"] .monitor-edit-action {
  background: #eaf2ff;
  border-color: #86a8d8;
  color: #174ea6;
}

:root[data-theme="light"] .monitor-card:hover,
:root[data-theme="light"] .sp-page-card:hover,
:root[data-theme="light"] .card:hover {
  border-color: #aebdce;
  box-shadow: 0 14px 36px rgba(15,23,42,.08);
}

:root[data-theme="light"] .billing-account-card,
:root[data-theme="light"] .billing-costs,
:root[data-theme="light"] .billing-plan-card {
  background: linear-gradient(180deg, #ffffff, #fbfcfe);
  border-color: #d5dfeb;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(15,23,42,.05), 0 12px 34px rgba(15,23,42,.055);
}

:root[data-theme="light"] .billing-stat,
:root[data-theme="light"] .billing-cost-stat,
:root[data-theme="light"] .billing-cost-table-wrap {
  background: #f7f9fc;
  border-color: #d5dfeb;
}

:root[data-theme="light"] .billing-cost-table th {
  background: #eef3f8;
  color: #607084;
}

:root[data-theme="light"] .billing-cost-table td {
  border-bottom-color: #e1e8f0;
  color: #526173;
}

:root[data-theme="light"] .billing-cost-table tbody tr:hover td {
  background: #eaf2ff;
}

:root[data-theme="light"] .billing-cost-link,
:root[data-theme="light"] .billing-year-pill {
  background: #eaf2ff;
  border-color: #9ec0ef;
  color: #174ea6;
}

:root[data-theme="light"] .billing-cost-link:hover {
  background: #dbeafe;
  border-color: #73a4ee;
  color: #123f85;
}

:root[data-theme="light"] .billing-cancel-btn {
  background: #fff1f2;
  border-color: #fecaca;
  color: #b91c1c;
}

:root[data-theme="light"] .billing-cancel-btn:hover {
  background: #fee2e2;
  border-color: #f87171;
  color: #991b1b;
}

:root[data-theme="light"] .plan-variant-tab {
  background: rgba(255,255,255,.86);
  border-color: #c6d3e3;
  color: #526173;
  box-shadow: 0 1px 2px rgba(15,23,42,.07);
}

:root[data-theme="light"] .plan-variant-tab:hover,
:root[data-theme="light"] .plan-variant-tab.is-active {
  background: #eaf2ff;
  border-color: #86a8d8;
  color: #174ea6;
}

:root[data-theme="light"] .billing-hero {
  background:
    radial-gradient(110% 130% at 100% 0%, rgba(21,128,61,.12), transparent 48%),
    radial-gradient(120% 120% at 0% 100%, rgba(31,111,235,.12), transparent 52%),
    linear-gradient(135deg, #ffffff, #f6f9fd);
  border-color: #d5dfeb;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(15,23,42,.05), 0 16px 42px rgba(15,23,42,.07);
}

:root[data-theme="light"] .billing-hero::after {
  background-image: linear-gradient(transparent 96%, rgba(15,23,42,.035) 100%);
  opacity: .45;
}

:root[data-theme="light"] .billing-hero-copy p {
  color: #526173;
}

:root[data-theme="light"] .billing-kicker {
  background: #eaf2ff;
  border-color: #9ec0ef;
  color: #174ea6;
}

:root[data-theme="light"] .billing-hero-chip {
  background: rgba(255,255,255,.76);
  border-color: #cbd8e6;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 1px 2px rgba(15,23,42,.04);
}

:root[data-theme="light"] .billing-hero-chip span {
  color: #6b7b8f;
}

:root[data-theme="light"] .billing-hero-chip strong,
:root[data-theme="light"] .billing-hero-chip-mono code {
  color: #111827;
}

:root[data-theme="light"] .billing-hero-cancel-btn {
  background: #fff1f2;
  border-color: #fecaca;
  color: #b91c1c;
}

:root[data-theme="light"] .billing-hero-cancel-btn:hover {
  background: #fee2e2;
  border-color: #f87171;
  color: #991b1b;
}

:root[data-theme="light"] .billing-plan-card.is-current {
  background: linear-gradient(180deg, #f0fdf4, #ffffff 42%);
  border-color: #86efac;
}

:root[data-theme="light"] .billing-plan-card.is-featured {
  border-color: #86a8d8;
  box-shadow: 0 0 0 1px rgba(31,111,235,.14) inset, 0 12px 34px rgba(15,23,42,.055);
}

:root[data-theme="light"] .plan-variant-slot:hover .billing-plan-card {
  border-color: #73a4ee;
  box-shadow: 0 18px 42px rgba(15,23,42,.1);
}

:root[data-theme="light"] .plan-card-header,
:root[data-theme="light"] .plan-tabs {
  background: #fbfcfe;
  border-color: #dce4ee;
}

:root[data-theme="light"] .plan-tab:hover,
:root[data-theme="light"] .plan-tab.is-active {
  background: #ffffff;
}

:root[data-theme="light"] .plan-tab.is-active {
  color: #174ea6;
}

:root[data-theme="light"] .plan-plus-pill {
  background: #eaf2ff;
  color: #174ea6;
  border-color: #9ec0ef;
}

:root[data-theme="light"] .btn-outline {
  background: #ffffff;
  color: #243244;
  border-color: #b8c6d8;
}

:root[data-theme="light"] .btn-outline:hover {
  background: #eaf2ff;
  color: #174ea6;
  border-color: #86a8d8;
}

:root[data-theme="light"] .btn-current {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

:root[data-theme="light"] .btn-pending,
:root[data-theme="light"] .billing-pending-notice {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

:root[data-theme="light"] .pp-coupon-editor {
  background: #eef7ff;
  border-color: #b8d7f5;
}

:root[data-theme="light"] .pp-coupon-label {
  color: #174ea6;
}

:root[data-theme="light"] .pp-coupon-status.is-neutral {
  background: #f7f9fc;
  border-color: #d5dfeb;
  color: #607084;
}

:root[data-theme="light"] .pp-coupon-status.is-info {
  background: #eaf2ff;
  border-color: #9ec0ef;
  color: #174ea6;
}

:root[data-theme="light"] .pp-coupon-status.is-success {
  background: #dcfce7;
  border-color: #86efac;
  color: #166534;
}

:root[data-theme="light"] .pp-coupon-status.is-error,
:root[data-theme="light"] .pp-billing-error {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #991b1b;
}

:root[data-theme="light"] .pp-billing-radio {
  background: #f7f9fc;
  border-color: #b8c6d8;
}

:root[data-theme="light"] .pp-billing-radio:has(input:checked) {
  background: #eaf2ff;
  border-color: #73a4ee;
  color: #174ea6;
}

:root[data-theme="light"] .tag,
:root[data-theme="light"] .empty,
:root[data-theme="light"] .loading,
:root[data-theme="light"] .form-hint {
  color: var(--text-muted);
}

:root[data-theme="light"] .tag {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

:root[data-theme="light"] .api-info-box.warn {
  background: #fff7ed;
  border-color: rgba(180,83,9,.22);
  color: #7c2d12;
}

:root[data-theme="light"] .api-info-box.success {
  background: #f0fdf4;
  border-color: rgba(21,128,61,.22);
  color: #14532d;
}

:root[data-theme="light"] .api-info-box.danger,
:root[data-theme="light"] .alert-danger {
  background: #fef2f2;
  border-color: rgba(220,38,38,.22);
  color: #7f1d1d;
}

:root[data-theme="light"] .alert-success {
  background: #f0fdf4;
  border-color: rgba(21,128,61,.22);
  color: #14532d;
}

:root[data-theme="light"] .alert-warning {
  background: #fff7ed;
  border-color: rgba(180,83,9,.22);
  color: #7c2d12;
}

:root[data-theme="light"] .badge,
:root[data-theme="light"] .status-badge,
:root[data-theme="light"] .region-badge,
:root[data-theme="light"] .agent-region-badge {
  border-color: rgba(15,23,42,.1);
}

:root[data-theme="light"] .badge-up,
:root[data-theme="light"] .badge-success {
  background: #dcfce7;
  color: #166534;
}

:root[data-theme="light"] .badge-down,
:root[data-theme="light"] .badge-failed,
:root[data-theme="light"] .badge-error {
  background: #fee2e2;
  color: #991b1b;
}

:root[data-theme="light"] .badge-paused,
:root[data-theme="light"] .badge-unknown,
:root[data-theme="light"] .badge-running {
  background: #fef3c7;
  color: #92400e;
}

:root[data-theme="light"] .warmup-banner,
:root[data-theme="light"] .plan-upgrade-hint {
  background: linear-gradient(135deg, rgba(37,99,235,.08), rgba(255,255,255,.85));
  border-color: rgba(37,99,235,.18);
}

:root[data-theme="light"] .otp-feature-list,
:root[data-theme="light"] .otp-box,
:root[data-theme="light"] .otp-countdown-bar {
  background: #f7faff;
  border-color: #b8c6d8;
}

:root[data-theme="light"] .modal-backdrop {
  background: rgba(15,23,42,.42);
}

:root[data-theme="light"] .ssl-more-panel {
  background: linear-gradient(180deg, #ffffff, #f7f9fc);
  border-color: #cbd8e6;
  color: var(--text);
  box-shadow: 0 18px 46px rgba(15,23,42,.14);
}

:root[data-theme="light"] .ssl-more-columns::before,
:root[data-theme="light"] .ssl-more-panel-meta {
  border-color: #dce4ee;
}

:root[data-theme="light"] .ssl-more-columns::before {
  background: #dce4ee;
}

:root[data-theme="light"] #chartInfoTooltip,
:root[data-theme="light"] #avail-tooltip,
:root[data-theme="light"] #agentTooltip {
  background: #ffffff;
  border-color: #cbd8e6;
  color: #243244;
  box-shadow: 0 12px 34px rgba(15,23,42,.14);
}

:root[data-theme="light"] .at-label { color: #6b7b8f; }
:root[data-theme="light"] .at-val { color: #243244; }

:root[data-theme="light"] #avail-tooltip::after {
  border-bottom-color: #cbd8e6;
}

:root[data-theme="light"] .codeblock {
  background: #f6f8fb;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
}

:root[data-theme="light"] .code-line-no {
  color: #94a3b8;
  border-right-color: #dbe5f0;
}

:root[data-theme="light"] .code-line-text {
  color: #0f172a;
}

:root[data-theme="light"] .codeblock code,
:root[data-theme="light"] .api-info-box code {
  color: #0f172a;
}

:root[data-theme="light"] .codeblock .ck { color: #1d4ed8; }
:root[data-theme="light"] .codeblock .cv { color: #047857; }
:root[data-theme="light"] .codeblock .cn { color: #b45309; }
:root[data-theme="light"] .codeblock .cb { color: #dc2626; }
:root[data-theme="light"] .codeblock .cc { color: #64748b; }
:root[data-theme="light"] .codeblock .cs { color: #be123c; }
:root[data-theme="light"] .codeblock .cf { color: #7e22ce; }
:root[data-theme="light"] .codeblock .cp { color: #0891b2; }

/* =====================================================
   Status Page Incident / Group Admin
   ===================================================== */
.status-monitor-group-input {
  width: 140px;
  min-width: 110px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: .34rem .5rem;
  font-size: .76rem;
}
.status-monitor-group-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.incident-admin-list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-top: 1rem;
}
.incident-admin-item {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem;
}
.incident-admin-head,
.incident-admin-inline {
  display: flex;
  align-items: center;
  gap: .55rem;
  flex-wrap: wrap;
}
.incident-admin-head {
  margin-bottom: .55rem;
}
.incident-admin-title-input {
  margin-right: auto;
  flex: 1;
  min-width: 220px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: .42rem .6rem;
  font-size: .86rem;
  font-weight: 600;
}
.incident-admin-update {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: .65rem;
  border-top: 1px solid var(--border);
  padding-top: .45rem;
  margin-top: .45rem;
  font-size: .82rem;
}
.incident-admin-update span {
  color: var(--text-muted);
  font-size: .74rem;
}
.incident-admin-update p {
  margin: 0;
}
.incident-admin-inline {
  margin-top: .7rem;
}
.incident-admin-inline select,
.incident-admin-inline input {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: .42rem .6rem;
  font-size: .82rem;
}
.incident-admin-inline input {
  flex: 1;
  min-width: 180px;
}

/* =====================================================
   Component Boards
   ===================================================== */
.component-board {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.2rem;
}
.component-board:empty {
  display: none;
}
.component-page-board {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1rem;
}
.component-page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: .8rem;
}
.component-page-head h3 {
  margin: 0;
  font-size: .95rem;
}
.component-page-head span {
  color: var(--text-muted);
  font-size: .78rem;
}
.component-lanes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .75rem;
}
.component-groups {
  display: flex;
  flex-direction: column;
  gap: .8rem;
}
.component-add-row {
  display: flex;
  align-items: center;
  gap: .5rem;
}
.component-add-row input {
  min-width: 180px;
  background: var(--bg-elevated);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: .45rem .6rem;
  font-size: .82rem;
}
.component-group {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
}
.component-group.is-drop-target,
.monitor-ungrouped-dropzone.is-drop-target {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
  transform: translateY(-1px);
}
.component-group-summary {
  display: grid;
  grid-template-columns: 1fr 14px;
  align-items: start;
  gap: .55rem .85rem;
  padding: .75rem .85rem;
  cursor: pointer;
  list-style: none;
}
.component-group-summary::-webkit-details-marker {
  display: none;
}
.component-group-summary::after {
  content: "▾";
  color: var(--text-muted);
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  transition: transform var(--t);
}
.component-group:not([open]) .component-group-summary::after {
  transform: rotate(-90deg);
}
.component-group-title {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-width: 0;
  grid-column: 1;
  grid-row: 1;
}
.component-group-title strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.component-group-meta {
  color: var(--text-muted);
  font-size: .78rem;
  white-space: nowrap;
  text-align: right;
}
.component-group-detail {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: .85rem;
  grid-column: 1 / -1;
  grid-row: 2;
  min-width: 0;
}
.component-group-availability {
  min-width: 0;
  max-width: 500px;
  width: 100%;
}
.component-group-availability .avail-bar {
  height: 18px;
}
.component-group-availability .avail-empty {
  height: 18px;
  font-size: .72rem;
}
.monitor-incident-hover-popup {
  position: fixed;
  z-index: 10050;
  width: min(340px, calc(100vw - 24px));
  padding: .7rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-surface);
  color: var(--text);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  pointer-events: none;
  transform: translateY(4px);
  transition: opacity .12s ease, transform .12s ease;
}
.monitor-incident-hover-popup.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.monitor-incident-popup-title {
  font-size: .78rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: .45rem;
}
.monitor-incident-popup-list {
  display: grid;
  gap: .35rem;
  max-height: 260px;
  overflow: auto;
}
.monitor-incident-popup-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: center;
  padding: .48rem .55rem;
  border-radius: calc(var(--radius) - 2px);
  color: var(--text);
  text-decoration: none;
  background: var(--bg-muted);
}
.monitor-incident-popup-item:hover,
.monitor-incident-popup-item:focus-visible {
  color: var(--text);
  background: var(--accent-dim);
  outline: none;
}
.monitor-incident-popup-item span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.monitor-incident-popup-item small {
  color: var(--text-muted);
  white-space: nowrap;
}
.availability-settings-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.availability-settings-btn svg {
  flex-shrink: 0;
}
.availability-mode-options {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}
.availability-mode-option {
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  padding: .85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-elevated);
  cursor: pointer;
}
.availability-mode-option input {
  margin-top: .2rem;
  accent-color: var(--accent);
}
.availability-mode-option span {
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.availability-mode-option strong {
  color: var(--text);
  font-size: .9rem;
}
.availability-mode-option small {
  color: var(--text-muted);
  font-size: .78rem;
  line-height: 1.35;
}
.component-group-body {
  padding: 0 .85rem .85rem;
}
.component-monitor-cards {
  margin: 0;
  position: relative;
}
.component-monitor-cards:has(.monitor-card-drop-placeholder.is-empty-target) {
  min-height: 110px;
}
.monitor-cards > .component-ungrouped-board {
  grid-column: 1 / -1;
}
.component-lane {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-left: 4px solid var(--border-light);
  border-radius: var(--radius);
  padding: .75rem;
  transition: border-color var(--t), box-shadow var(--t), transform var(--t);
}
.component-lane-up { border-left-color: var(--green); }
.component-lane-down { border-left-color: var(--red); }
.component-lane-unknown { border-left-color: var(--yellow); }
.component-lane.is-drop-target {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
  transform: translateY(-1px);
}
.component-lane-head {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: flex-start;
}
.component-lane-head strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.component-lane-head span,
.component-lane-meta span {
  color: var(--text-muted);
  font-size: .74rem;
  white-space: nowrap;
}
.component-lane-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin-top: .55rem;
}
.component-lane-monitors {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
  margin-top: .7rem;
}
.component-monitor-pill {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.component-monitor-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg-surface);
  color: var(--text-muted);
  padding: .18rem .5rem;
  font-size: .72rem;
}
@media (max-width: 860px) {
  .component-page-head,
  .component-add-row {
    align-items: stretch;
    flex-direction: column;
  }
  .component-group-summary {
    grid-template-columns: 1fr 14px;
  }
  .component-group-summary::after {
    grid-row: 1;
    grid-column: 2;
    align-self: start;
  }
  .component-group-detail {
    grid-template-columns: 1fr;
    gap: .45rem;
  }
  .component-group-title,
  .component-group-meta {
    padding-right: 1.2rem;
  }
  .component-group-meta {
    text-align: left;
    white-space: normal;
  }
}
