:root {
  --bg: #07101d;
  --panel: #0d1828;
  --panel2: #101d30;
  --border: #20344f;
  --text: #f8fbff;
  --muted: #8fa3bb;
  --blue: #1686ff;
  --purple: #8b5cf6;
  --green: #18c98b;
  --orange: #f59e0b;
  --red: #fb5571;
  --slate: #6d86a5;
  --shadow: 0 16px 40px rgba(0,0,0,.28);
}

* { box-sizing: border-box; }
html { color-scheme: dark; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 70% 0%, rgba(22,134,255,.10), transparent 32rem),
    linear-gradient(180deg, #07101d, #081321);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

button,input,textarea { font: inherit; }
button { cursor: pointer; }

.shell { min-height: 100vh; display: grid; grid-template-columns: 220px 1fr; }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 14px;
  border-right: 1px solid var(--border);
  background: rgba(7,16,29,.96);
  display: flex;
  flex-direction: column;
  z-index: 10;
}

.brand { display: flex; align-items: flex-start; gap: 12px; padding: 2px 7px 22px; }
.brand-icon {
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--blue); color: white; font-weight: 900; font-size: 28px;
}
.brand-title { font-weight: 800; line-height: 1.05; }
.brand-version {
  margin-top: 7px; display: inline-block; font-size: 11px;
  padding: 3px 7px; border-radius: 6px; background: #17253a; color: #b8c8da;
}

.side-nav { display: grid; gap: 7px; }
.nav-item {
  width: 100%; border: 0; border-radius: 10px; padding: 11px 12px;
  background: transparent; color: #cdd8e6; text-align: left;
  display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center;
}
.nav-item:hover, .nav-item.active { background: linear-gradient(135deg,#116ee8,#154fae); color:#fff; }
.nav-item b { background: #157fff; color:#fff; border-radius:6px; padding:2px 6px; font-size:11px; }

.side-stats {
  margin-top: auto; padding: 14px 10px; border-top: 1px solid var(--border);
}
.side-label,.side-note { color: var(--muted); font-size: 12px; }
.side-number { font-size: 28px; font-weight: 800; margin: 3px 0; }

.main { width: min(1580px, 100%); margin: 0 auto; padding: 20px 22px 96px; }

.hero {
  display:flex; align-items:center; justify-content:space-between; gap:16px;
  margin-bottom:14px;
}
.hero h1 { margin:0; font-size:26px; letter-spacing:-.03em; }
.hero p { margin:5px 0 0; color:var(--muted); }
.hero-pill {
  padding: 7px 12px; border:1px solid var(--border); border-radius:999px;
  color:#a8c9ee; background:#0d1a2d; font-weight:700; font-size:13px;
}

.summary-grid {
  display:grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap:10px; margin-bottom:14px;
}
.metric {
  min-height:86px; padding:14px;
  border:1px solid var(--border); border-radius:12px; background:linear-gradient(180deg,#0f1c2f,#0b1727);
  box-shadow: 0 8px 24px rgba(0,0,0,.14);
}
.metric-label { color:var(--muted); font-size:12px; }
.metric-value { margin-top:7px; font-size:25px; font-weight:850; }
.metric-blue { border-color:rgba(22,134,255,.38); }
.metric-purple { border-color:rgba(139,92,246,.38); }
.metric-green { border-color:rgba(24,201,139,.38); }
.metric-orange { border-color:rgba(245,158,11,.42); }
.metric-red { border-color:rgba(251,85,113,.42); }
.metric-slate { border-color:rgba(109,134,165,.40); }

.workspace-grid { display:grid; grid-template-columns:minmax(0,1.05fr) minmax(520px,1fr); gap:14px; }
.left-column,.right-column { min-width:0; display:grid; align-content:start; gap:14px; }

.card {
  padding:17px;
  border:1px solid var(--border);
  border-radius:14px;
  background:linear-gradient(180deg,rgba(14,27,45,.98),rgba(10,21,36,.98));
  box-shadow:var(--shadow);
}
.card-head { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; margin-bottom:13px; }
.card h2 { margin:0; font-size:18px; }
.card p { margin:4px 0 0; color:var(--muted); font-size:12px; }
.head-actions { display:flex; gap:8px; align-items:center; }

.badge {
  padding:6px 9px; border-radius:8px; background:#17263c; color:#bfd3ea; border:1px solid #2a405d; font-size:12px; font-weight:700;
}

button {
  border:1px solid transparent; color:white; border-radius:9px; min-height:38px; padding:9px 13px; font-weight:750;
}
.primary,.add-post-button { background:linear-gradient(135deg,#1686ff,#1166dd); }
.primary:hover,.add-post-button:hover { filter:brightness(1.08); }
.secondary,.ghost,.post-control { background:#15243a; border-color:#29415f; color:#dce9f8; }
.stop-button,.remove-post { background:#382033; border-color:#6f2d4a; color:#ffb4c3; }
button:disabled { opacity:.45; cursor:not-allowed; }

input,textarea {
  width:100%; color:var(--text); background:#0a1525; border:1px solid #29415f; border-radius:9px; outline:none;
}
input { padding:10px 12px; }
textarea { padding:8px 12px; resize:vertical; line-height:44px; min-height:242px; white-space:pre; overflow-x:auto;
  background-image:repeating-linear-gradient(to bottom,rgba(22,134,255,.04) 0,rgba(22,134,255,.04) 43px,rgba(98,126,160,.22) 43px,rgba(98,126,160,.22) 44px);
}
input:focus,textarea:focus { border-color:#1686ff; box-shadow:0 0 0 3px rgba(22,134,255,.12); }
label { display:block; margin-bottom:7px; color:#d9e7f7; font-size:12px; font-weight:700; }

.auto-controls,.manual-actions,.toolbar,.search-row { display:flex; gap:9px; align-items:center; margin-top:10px; }
.search-row input { flex:1; }

.status-box {
  margin-top:11px; padding:11px 12px; border:1px solid #24466e; border-radius:10px; background:#0c1b2f; color:#cfe5ff;
  white-space:pre-wrap; font-size:12px; line-height:1.45;
}

.selected-container-preview,.overall-panel {
  margin-top:13px; padding-top:13px; border-top:1px solid var(--border);
}
.preview-title,.overall-head { display:flex; justify-content:space-between; gap:10px; align-items:center; font-size:12px; }
.pill-row { display:flex; flex-wrap:wrap; gap:6px; margin-top:8px; }
.pill {
  padding:5px 8px; border:1px solid #2b425f; border-radius:8px; background:#122136; color:#c7d7ea; font-size:11px;
}

.progress-track,.mini-progress {
  height:9px; border-radius:99px; background:#1a2a41; overflow:hidden; margin-top:9px;
}
.progress-fill,#stickyThisArticleBar,#stickyTotalBar {
  height:100%; width:0%; border-radius:inherit; background:linear-gradient(90deg,#1686ff,#43b8ff); transition:width .25s ease;
}
#stickyTotalBar { background:linear-gradient(90deg,#18c98b,#38e0a5); }
.progress-percent { margin-top:5px; text-align:right; color:#c5d5e8; font-size:11px; }

#containerList {
  display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; max-height:370px; overflow:auto; margin-top:12px;
}
.container-item {
  padding:10px 11px; border:1px solid #20344f; border-radius:10px; background:#0b1727;
}
.container-top { display:flex; align-items:center; gap:8px; }
.container-top input[type=checkbox] { width:16px; height:16px; accent-color:#1686ff; }
.container-name { font-size:12px; font-weight:750; }
.container-group { margin:6px 0 0 24px; font-size:10px; color:var(--muted); }
.group-ready { color:#70e2ad; }
.group-missing { color:#ff8ca1; }

#postQueue { display:grid; gap:10px; }
.post-card {
  padding:14px; border:1px solid #20344f; border-radius:11px; background:#0b1727;
}
.post-header { display:flex; align-items:center; gap:7px; margin-bottom:10px; }
.post-title { margin-right:auto; font-weight:800; }
.file-info { color:var(--muted); font-size:11px; margin-top:5px; }

.pipeline-list { display:grid; gap:10px; max-height:720px; overflow:auto; padding-right:2px; }
.pipeline-item {
  padding:12px; border:1px solid #213752; border-radius:11px; background:#0b1727;
}
.pipeline-top { display:grid; grid-template-columns:30px minmax(0,1fr) auto; gap:9px; align-items:center; }
.pipeline-num {
  width:30px; height:30px; border-radius:8px; display:grid; place-items:center; background:#1686ff; font-weight:800;
}
.pipeline-url { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:12px; }
.pipeline-state { padding:4px 8px; border-radius:999px; font-size:10px; font-weight:800; background:#26364c; color:#c7d3e1; }
.pipeline-state.done { background:rgba(24,201,139,.17); color:#6ee7b7; }
.pipeline-state.processing { background:rgba(22,134,255,.16); color:#7cc2ff; }
.pipeline-state.failed { background:rgba(251,85,113,.16); color:#ff95a8; }
.pipeline-steps { display:grid; grid-template-columns:repeat(5,1fr); gap:5px; margin-top:11px; }
.step { text-align:center; color:#7187a0; font-size:9px; }
.step-dot {
  width:17px; height:17px; margin:0 auto 4px; border:2px solid #44607f; border-radius:50%; background:#0a1525;
}
.step.active .step-dot { border-color:#1686ff; background:#1686ff; box-shadow:0 0 0 4px rgba(22,134,255,.10); }
.step.done .step-dot { border-color:#18c98b; background:#18c98b; }
.pipeline-posts { margin-top:10px; display:grid; grid-template-columns:1fr auto; gap:10px; align-items:center; }
.pipeline-small-progress { height:7px; border-radius:99px; background:#1a2a41; overflow:hidden; }
.pipeline-small-progress > div { height:100%; width:0%; background:linear-gradient(90deg,#1686ff,#35b6ff); }
.pipeline-count { color:#c9d9ea; font-size:11px; font-weight:750; }

#results { display:grid; gap:8px; }
.result-item {
  padding:10px 11px; border:1px solid #20344f; border-radius:9px; background:#0b1727; white-space:pre-wrap; font-size:11px; line-height:1.45;
}
.result-success { border-color:rgba(24,201,139,.35); background:rgba(24,201,139,.06); }
.result-failed { border-color:rgba(251,85,113,.35); background:rgba(251,85,113,.06); }
.result-restricted { border-color:rgba(245,158,11,.38); background:rgba(245,158,11,.06); }

.compat-progress { display:none !important; }
.empty-state { color:var(--muted); padding:30px 14px; text-align:center; border:1px dashed #2b425f; border-radius:10px; }

.sticky-runbar {
  position:fixed; left:242px; right:22px; bottom:14px; z-index:30;
  min-height:68px; padding:10px 14px; border:1px solid #29415f; border-radius:14px;
  background:rgba(8,18,31,.94); box-shadow:0 18px 50px rgba(0,0,0,.38); backdrop-filter:blur(16px);
  display:grid; grid-template-columns:minmax(180px,.9fr) minmax(220px,1.15fr) minmax(180px,.8fr) minmax(180px,.8fr); gap:14px; align-items:center;
}
.run-state { display:flex; gap:9px; align-items:center; }
.live-dot { width:9px; height:9px; border-radius:50%; background:#18c98b; box-shadow:0 0 0 6px rgba(24,201,139,.10); }
.run-state small,.sticky-current small,.sticky-progress small { display:block; color:var(--muted); font-size:10px; }
.sticky-current strong { display:block; margin-top:3px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:11px; }
.mini-progress { height:7px; margin-top:5px; }

* { scrollbar-width:thin; scrollbar-color:#2c4869 transparent; }
::-webkit-scrollbar { width:8px; height:8px; }
::-webkit-scrollbar-thumb { background:#2c4869; border-radius:99px; }

@media(max-width:1250px){
  .summary-grid { grid-template-columns:repeat(4,1fr); }
  .workspace-grid { grid-template-columns:1fr; }
}
@media(max-width:900px){
  .shell { grid-template-columns:1fr; }
  .sidebar { position:relative; height:auto; flex-direction:row; align-items:center; overflow:auto; }
  .brand { min-width:180px; padding-bottom:0; }
  .side-nav { display:flex; min-width:max-content; }
  .nav-item { width:auto; grid-template-columns:22px auto auto; }
  .side-stats { display:none; }
  .sticky-runbar { left:12px; right:12px; grid-template-columns:1fr 1fr; }
}
@media(max-width:650px){
  .main { padding:14px 10px 160px; }
  .summary-grid { grid-template-columns:repeat(2,1fr); }
  .workspace-grid { display:block; }
  .right-column { margin-top:14px; }
  #containerList { grid-template-columns:1fr; }
  .sticky-runbar { grid-template-columns:1fr; }
}

/* =========================================================
   OPTION 1 — ONE ARTICLE LINK PER VISUAL CARD
   The original #autoArticleLinks textarea stays in the page,
   hidden, so the working dashboard.js logic is unchanged.
   ========================================================= */
.compat-link-source {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  min-height: 0 !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.link-entry-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.link-entry-heading > div {
  display: grid;
  gap: 3px;
}

.link-entry-heading strong {
  font-size: 13px;
  color: #eef7ff;
}

.link-entry-heading span:not(.badge) {
  font-size: 11px;
  color: var(--muted);
}

.link-entry-cards {
  display: grid;
  gap: 10px;
}

.link-entry-card {
  position: relative;
  padding: 13px;
  border: 1px solid #25415f;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(22,134,255,.055), transparent 42%),
    #0a1626;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.025);
}

.link-entry-card:focus-within {
  border-color: #1686ff;
  box-shadow: 0 0 0 3px rgba(22,134,255,.10);
}

.link-entry-top {
  display: grid;
  grid-template-columns: 38px minmax(0,1fr) 34px;
  align-items: center;
  gap: 10px;
}

.link-entry-number {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg,#1686ff,#0f68d7);
  color: #fff;
  font-size: 16px;
  font-weight: 850;
  box-shadow: 0 6px 18px rgba(22,134,255,.18);
}

.link-entry-input-wrap {
  min-width: 0;
}

.link-entry-label {
  display: block;
  margin: 0 0 5px;
  color: #9eb1c7;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.link-entry-input {
  width: 100%;
  min-height: 39px;
  padding: 9px 11px;
  border: 1px solid #2b4969;
  border-radius: 8px;
  background: #081321;
  color: #f3f8ff;
  line-height: 1.2;
}

.link-entry-input::placeholder {
  color: #5f7690;
}

.link-entry-remove {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid #344b66;
  background: #17263a;
  color: #9eb1c7;
  font-size: 18px;
  font-weight: 500;
}

.link-entry-remove:hover:not(:disabled) {
  background: #3a2030;
  border-color: #77405a;
  color: #ff91a6;
}

.link-entry-remove:disabled {
  opacity: .28;
}

.link-entry-meta {
  margin: 9px 0 0 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  color: #8fa5be;
  font-size: 10px;
}

.link-entry-meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border: 1px solid #28425f;
  border-radius: 999px;
  background: #101f33;
}

.link-entry-meta-chip strong {
  color: #cfe4fb;
}

.add-link-card {
  width: 100%;
  margin-top: 10px;
  min-height: 44px;
  border: 1px dashed #31577f;
  background: rgba(18,39,65,.45);
  color: #59b2ff;
}

.add-link-card:hover:not(:disabled) {
  background: rgba(22,134,255,.09);
  border-color: #1686ff;
}

.link-entry-tip {
  margin-top: 8px;
  color: #738aa4;
  font-size: 10px;
}

@media(max-width:650px) {
  .link-entry-top {
    grid-template-columns: 34px minmax(0,1fr) 32px;
    gap: 7px;
  }
  .link-entry-number {
    width: 34px;
    height: 34px;
  }
  .link-entry-meta {
    margin-left: 41px;
  }
}
/* =========================================================
   MANUAL POST IMAGE PREVIEW
========================================================= */

.manual-image-preview-wrap {
  margin-top: 9px;
  padding: 8px;
  border: 1px solid #29415f;
  border-radius: 11px;
  background: #081321;
  width: fit-content;
  max-width: 100%;
}

.manual-image-preview-wrap[hidden] {
  display: none !important;
}

.manual-image-preview {
  display: block;
  width: 160px;
  height: 160px;
  max-width: 100%;
  object-fit: cover;
  border-radius: 8px;
  background: #0a1525;
}

.image-duplicate-warning {
  margin-top: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(245, 158, 11, .5);
  border-radius: 8px;
  background: rgba(245, 158, 11, .10);
  color: #ffd180;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}

.image-duplicate-warning[hidden] {
  display: none !important;
}
/* =========================================================
   RATE SCHEDULER
========================================================= */

.rate-scheduler-card {
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid rgba(22, 134, 255, .38);
  border-radius: 14px;
  background:
    radial-gradient(circle at 92% 0%, rgba(22, 134, 255, .12), transparent 20rem),
    linear-gradient(180deg, rgba(14, 28, 47, .99), rgba(9, 20, 34, .99));
  box-shadow: var(--shadow);
}

.rate-scheduler-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.scheduler-eyebrow {
  color: #62b6ff;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .12em;
}

.rate-scheduler-head h2 {
  margin: 4px 0 4px;
  font-size: 20px;
}

.rate-scheduler-head p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.scheduler-ready-pill {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid rgba(24, 201, 139, .35);
  border-radius: 999px;
  background: rgba(24, 201, 139, .08);
  color: #82e9bf;
  font-size: 11px;
  font-weight: 800;
}

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

.scheduler-metric {
  min-height: 92px;
  padding: 12px;
  display: grid;
  align-content: center;
  gap: 4px;
  border: 1px solid #243c58;
  border-radius: 11px;
  background: #0a1727;
}

.scheduler-metric > span,
.scheduler-metric small {
  color: var(--muted);
  font-size: 10px;
}

.scheduler-metric strong {
  font-size: 20px;
}

.scheduler-rate-input-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
}

.scheduler-rate-input-wrap input {
  width: 68px;
  padding: 7px 9px;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
}

.scheduler-rate-input-wrap b {
  color: #c7d9ec;
  font-size: 11px;
}

.scheduler-progress-track {
  height: 9px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #1a2b42;
}

.scheduler-progress-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1686ff, #18c98b);
  transition: width .25s ease;
}

.scheduler-current-row {
  margin-top: 11px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, .8fr);
  gap: 10px;
}

.scheduler-current-row > div {
  padding: 10px 12px;
  border: 1px solid #223951;
  border-radius: 9px;
  background: #091625;
}

.scheduler-current-row span,
.scheduler-current-row small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.scheduler-current-row strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #eef7ff;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scheduler-queue-note {
  text-align: right;
}

.scheduler-controls {
  margin-top: 11px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.scheduler-start {
  background: linear-gradient(135deg, #1686ff, #0f6bdd);
}

.scheduler-secondary {
  border-color: #2a4563;
  background: #13243a;
  color: #d9e8f8;
}

.scheduler-cancel {
  border-color: rgba(255, 91, 114, .35);
  background: rgba(255, 91, 114, .10);
  color: #ff9bad;
}

.scheduler-status {
  margin-top: 10px;
  min-height: 44px;
  padding: 11px 12px;
  border: 1px solid #284561;
  border-radius: 9px;
  background: #09182a;
  color: #cfe4fb;
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.scheduler-footnote {
  margin-top: 7px;
  color: #7288a0;
  font-size: 9px;
}

@media (max-width: 900px) {
  .scheduler-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .scheduler-current-row {
    grid-template-columns: 1fr;
  }

  .scheduler-queue-note {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .scheduler-metrics {
    grid-template-columns: 1fr;
  }

  .rate-scheduler-head {
    flex-direction: column;
  }
}
/* =========================================================
   TIME WINDOW SCHEDULER V2
========================================================= */

.scheduler-config-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1.15fr;
  gap: 9px;
  margin-bottom: 10px;
}

.scheduler-config-box {
  min-height: 104px;
  padding: 12px;
  display: grid;
  align-content: center;
  gap: 6px;
  border: 1px solid #243c58;
  border-radius: 11px;
  background: #0a1727;
}

.scheduler-config-label {
  color: var(--muted);
  font-size: 10px;
}

.scheduler-config-box small {
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.scheduler-config-input-row {
  display: flex;
  align-items: center;
  gap: 7px;
}

.scheduler-config-input-row input {
  width: 82px;
  padding: 8px 9px;
  text-align: center;
  font-size: 19px;
  font-weight: 850;
}

.scheduler-config-input-row b {
  color: #c7d9ec;
  font-size: 11px;
}

.scheduler-window-row input {
  width: 76px;
}

.scheduler-window-row select {
  min-width: 102px;
  padding: 8px 9px;
  border: 1px solid #2a4563;
  border-radius: 8px;
  background: #0d1c2e;
  color: #e9f4ff;
  font: inherit;
  font-size: 11px;
}

.scheduler-derived-box strong {
  display: block;
  font-size: 19px;
  line-height: 1.2;
  color: #7fd0ff;
}

@media (max-width: 900px) {
  .scheduler-config-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   PHONE MONITOR
========================================================= */

.phone-monitor-card {
  margin-bottom: 14px;
  padding: 18px;
  border: 1px solid rgba(24, 201, 139, .34);
  border-radius: 14px;
  background:
    radial-gradient(circle at 95% 0%, rgba(24, 201, 139, .10), transparent 22rem),
    linear-gradient(180deg, rgba(14, 28, 46, .99), rgba(9, 20, 34, .99));
  box-shadow: var(--shadow);
}

.phone-monitor-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 14px;
}

.phone-monitor-eyebrow {
  color: #61d8ac;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .12em;
}

.phone-monitor-head h2 {
  margin: 4px 0 4px;
  font-size: 20px;
}

.phone-monitor-head p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.phone-monitor-state {
  flex: 0 0 auto;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.phone-monitor-state.connected {
  border: 1px solid rgba(24, 201, 139, .40);
  background: rgba(24, 201, 139, .09);
  color: #7de9bd;
}

.phone-monitor-state.disconnected {
  border: 1px solid rgba(255, 91, 114, .32);
  background: rgba(255, 91, 114, .08);
  color: #ff9caf;
}

.phone-monitor-grid {
  display: grid;
  grid-template-columns: 1.3fr .9fr;
  gap: 10px;
}

.phone-monitor-field {
  margin: 0;
}

.phone-monitor-field span {
  display: block;
  margin-bottom: 6px;
  color: #dce9f7;
  font-size: 10px;
  font-weight: 750;
}

.phone-monitor-actions {
  margin-top: 11px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.phone-monitor-primary {
  background: linear-gradient(135deg, #18c98b, #0ea872);
  color: white;
}

.phone-monitor-secondary {
  border-color: #2b4664;
  background: #13243a;
  color: #dce9f8;
}

.phone-monitor-danger {
  border-color: rgba(255, 91, 114, .35);
  background: rgba(255, 91, 114, .09);
  color: #ff9caf;
}

.phone-monitor-info {
  margin-top: 11px;
  display: grid;
  grid-template-columns: 1.4fr .6fr;
  gap: 9px;
}

.phone-monitor-info > div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #223951;
  border-radius: 9px;
  background: #091625;
}

.phone-monitor-info span {
  display: block;
  color: var(--muted);
  font-size: 9px;
}

.phone-monitor-info strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #ecf6ff;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.phone-monitor-message {
  margin-top: 9px;
  padding: 10px 12px;
  border: 1px solid #284560;
  border-radius: 9px;
  background: #09182a;
  color: #cfe4fb;
  font-size: 10px;
  line-height: 1.5;
  white-space: pre-wrap;
}

@media (max-width: 760px) {
  .phone-monitor-grid,
  .phone-monitor-info {
    grid-template-columns: 1fr;
  }

  .phone-monitor-head {
    flex-direction: column;
  }
}


/* =========================================================
   AUTO ARTICLE — OPTIONAL CUSTOM CAPTION
========================================================= */

.link-entry-caption-wrap {
  display: block;
  margin: 10px 0 0 46px;
}

.link-entry-caption-title {
  display: block;
  margin-bottom: 6px;
  color: #9fb6cd;
  font-size: 10px;
  font-weight: 800;
}

.link-entry-caption {
  width: 100%;
  min-height: 68px;
  resize: vertical;
  padding: 9px 10px;
  border: 1px solid #28445f;
  border-radius: 8px;
  outline: none;
  background: #081625;
  color: #eef7ff;
  font: inherit;
  font-size: 11px;
  line-height: 1.45;
}

.link-entry-caption::placeholder {
  color: #647d97;
}

.link-entry-caption:focus {
  border-color: #1686ff;
  box-shadow: 0 0 0 2px rgba(22, 134, 255, .10);
}

.link-entry-meta-chip.link-caption-mode.is-custom {
  border-color: rgba(24, 201, 139, .35);
  background: rgba(24, 201, 139, .08);
  color: #82e9bf;
}

@media (max-width: 700px) {
  .link-entry-caption-wrap {
    margin-left: 0;
  }
}


/* =========================================================
   PROFESSIONAL DESIGN V2 — SOCIAL PUBLISHER CONTROL CENTER
   This layer intentionally overrides the earlier theme while
   preserving every existing element ID and behavior.
========================================================= */

:root {
  --sp-bg: #07101c;
  --sp-bg-2: #0a1524;
  --sp-panel: rgba(15, 29, 47, .88);
  --sp-panel-solid: #0f1d2f;
  --sp-panel-soft: #122238;
  --sp-line: rgba(149, 174, 204, .16);
  --sp-line-strong: rgba(149, 174, 204, .28);
  --sp-text: #f2f7fc;
  --sp-muted: #8fa4ba;
  --sp-blue: #5aa7ff;
  --sp-blue-2: #2f7de1;
  --sp-green: #46d7a2;
  --sp-orange: #f6b65b;
  --sp-red: #ff6f7d;
  --sp-purple: #a68cff;
  --sp-pinterest: #e60023;
  --sp-shadow: 0 22px 60px rgba(0, 0, 0, .24);
  --sp-radius-xl: 22px;
  --sp-radius-lg: 16px;
  --sp-radius-md: 12px;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--sp-bg);
}

body {
  margin: 0;
  color: var(--sp-text);
  background:
    radial-gradient(circle at 78% -10%, rgba(65, 133, 216, .18), transparent 34%),
    radial-gradient(circle at 20% 0%, rgba(166, 140, 255, .10), transparent 30%),
    linear-gradient(180deg, #07101c 0%, #081321 45%, #07101c 100%);
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 16px;
  background: rgba(7, 16, 28, .93);
  border-right: 1px solid var(--sp-line);
  backdrop-filter: blur(18px);
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 22px;
  border-bottom: 1px solid var(--sp-line);
}

.brand-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background:
    linear-gradient(145deg, #61aaff, #3372d1);
  box-shadow:
    0 12px 30px rgba(47, 125, 225, .25),
    inset 0 1px rgba(255, 255, 255, .18);
  color: #fff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .02em;
}

.brand-title {
  color: #fff;
  font-size: 15px;
  font-weight: 850;
  letter-spacing: -.02em;
}

.brand-subtitle {
  margin-top: 2px;
  color: #b7c9da;
  font-size: 11px;
  font-weight: 700;
}

.brand-version {
  display: inline-flex;
  margin-top: 5px;
  padding: 3px 7px;
  border: 1px solid rgba(90, 167, 255, .18);
  border-radius: 999px;
  background: rgba(90, 167, 255, .07);
  color: #7db8f7;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.side-nav {
  margin-top: 18px;
  display: grid;
  gap: 6px;
}

.nav-item {
  width: 100%;
  min-height: 42px;
  padding: 0 11px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: #8fa4ba;
  font-size: 11px;
  font-weight: 750;
  text-align: left;
  transition:
    background .18s ease,
    color .18s ease,
    border-color .18s ease,
    transform .18s ease;
}

.nav-item:hover {
  background: rgba(90, 167, 255, .065);
  color: #d8e9fb;
  border-color: rgba(90, 167, 255, .10);
  transform: translateX(2px);
}

.nav-item.active {
  background:
    linear-gradient(90deg, rgba(72, 145, 232, .17), rgba(72, 145, 232, .06));
  border-color: rgba(90, 167, 255, .16);
  color: #f4f9ff;
  box-shadow: inset 3px 0 #5aa7ff;
}

.nav-item b {
  margin-left: auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #17283d;
  color: #a9bed2;
  font-size: 9px;
}

.side-stats {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 18px;
  padding: 15px;
  border: 1px solid var(--sp-line);
  border-radius: 15px;
  background:
    linear-gradient(145deg, rgba(18, 34, 56, .88), rgba(10, 23, 39, .88));
  box-shadow: inset 0 1px rgba(255, 255, 255, .025);
}

.side-label {
  color: #7d93aa;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.side-number {
  margin-top: 5px;
  color: #fff;
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.04em;
}

.side-note {
  margin-top: 6px;
  color: #73899f;
  font-size: 9px;
  line-height: 1.45;
}

.main {
  width: min(1440px, 100%);
  padding: 28px clamp(18px, 3.5vw, 52px) 70px;
  margin: 0 auto;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 184px;
  padding: 28px 30px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  border: 1px solid rgba(90, 167, 255, .15);
  border-radius: 26px;
  background:
    linear-gradient(125deg, rgba(23, 54, 86, .86), rgba(13, 31, 52, .90) 58%, rgba(19, 34, 56, .90));
  box-shadow: var(--sp-shadow);
}

.hero::after {
  content: "";
  position: absolute;
  width: 380px;
  height: 380px;
  right: -110px;
  top: -220px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(91, 169, 255, .24), rgba(91, 169, 255, 0) 68%);
  pointer-events: none;
}

.hero > * {
  position: relative;
  z-index: 2;
}

.hero-kicker,
.section-eyebrow,
.scheduler-eyebrow,
.phone-monitor-eyebrow {
  color: #6faef1;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.hero h1 {
  margin: 8px 0 7px;
  color: #fff;
  font-size: clamp(25px, 3vw, 39px);
  line-height: 1.02;
  letter-spacing: -.045em;
}

.hero p {
  max-width: 720px;
  margin: 0;
  color: #a7bbcf;
  font-size: 12px;
  line-height: 1.65;
}

.channel-badges {
  margin-top: 17px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.channel-badge {
  padding: 6px 10px;
  border: 1px solid var(--sp-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
  color: #b8c8d8;
  font-size: 9px;
  font-weight: 850;
}

.channel-facebook {
  color: #8fc5ff;
  border-color: rgba(90, 167, 255, .18);
}

.channel-pinterest {
  color: #ff8ea0;
  border-color: rgba(230, 0, 35, .24);
}

.channel-cloud {
  color: #a7e7d0;
  border-color: rgba(70, 215, 162, .18);
}

.hero-pill,
.scheduler-ready-pill,
.phone-monitor-state,
.pinterest-state-pill {
  align-self: flex-start;
  padding: 8px 12px;
  border: 1px solid rgba(70, 215, 162, .20);
  border-radius: 999px;
  background: rgba(70, 215, 162, .07);
  color: #73e4bb;
  font-size: 9px;
  font-weight: 900;
  white-space: nowrap;
}

.summary-grid {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 9px;
}

.metric {
  min-height: 92px;
  padding: 14px;
  border: 1px solid var(--sp-line);
  border-radius: 15px;
  background:
    linear-gradient(145deg, rgba(17, 33, 54, .92), rgba(10, 24, 41, .92));
  box-shadow: inset 0 1px rgba(255, 255, 255, .025);
}

.metric-label {
  color: #7f95aa;
  font-size: 8px;
  font-weight: 850;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.metric-value {
  margin-top: 9px;
  color: #fff;
  font-size: 27px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: -.04em;
}

.combined-launch-card,
.rate-scheduler-card,
.phone-monitor-card,
.pinterest-channel-card,
.workspace-card,
#containersCard,
#autoCard,
#manualCard,
#resultsCard {
  border: 1px solid var(--sp-line) !important;
  border-radius: var(--sp-radius-xl) !important;
  background:
    linear-gradient(145deg, rgba(15, 29, 47, .94), rgba(10, 23, 39, .94)) !important;
  box-shadow:
    0 16px 44px rgba(0, 0, 0, .16),
    inset 0 1px rgba(255, 255, 255, .022) !important;
}

.combined-launch-card {
  margin-top: 16px;
  padding: 19px 21px;
  border-color: rgba(90, 167, 255, .19) !important;
}

.combined-launch-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(90, 167, 255, .11);
  color: #75b6fb;
  font-size: 16px;
}

.start-everything-button,
.scheduler-start,
.phone-monitor-primary,
.pinterest-primary,
.primary-button,
button.primary {
  border: 0 !important;
  background:
    linear-gradient(135deg, #5ba8ff, #337cdf) !important;
  box-shadow:
    0 12px 26px rgba(48, 124, 223, .20);
  color: #fff !important;
}

.start-everything-button:hover,
.scheduler-start:hover,
.phone-monitor-primary:hover,
.pinterest-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

/* ---------- Pinterest channel ---------- */

.pinterest-channel-card {
  margin-top: 16px;
  padding: 22px;
  position: relative;
  overflow: hidden;
}

.pinterest-channel-card::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  right: -85px;
  top: -125px;
  border-radius: 50%;
  background:
    radial-gradient(circle, rgba(230, 0, 35, .14), rgba(230, 0, 35, 0) 68%);
  pointer-events: none;
}

.pinterest-card-head {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}

.pinterest-brand-mark {
  width: 45px;
  height: 45px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(230, 0, 35, .11);
  border: 1px solid rgba(230, 0, 35, .20);
  color: #ff6e82;
  font-size: 17px;
  font-weight: 950;
}

.pinterest-card-copy h2 {
  margin: 5px 0 6px;
  color: #fff;
  font-size: 18px;
  letter-spacing: -.025em;
}

.pinterest-card-copy p {
  max-width: 780px;
  margin: 0;
  color: #8fa5ba;
  font-size: 10px;
  line-height: 1.65;
}

.pinterest-state-pill[data-state="working"] {
  border-color: rgba(246, 182, 91, .24);
  background: rgba(246, 182, 91, .08);
  color: #f6c77d;
}

.pinterest-state-pill[data-state="warning"] {
  border-color: rgba(246, 182, 91, .24);
  background: rgba(246, 182, 91, .08);
  color: #f6c77d;
}

.pinterest-state-pill[data-state="error"] {
  border-color: rgba(255, 111, 125, .24);
  background: rgba(255, 111, 125, .08);
  color: #ff99a4;
}

.pinterest-settings-grid {
  position: relative;
  z-index: 2;
  margin-top: 17px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.pinterest-toggle-card,
.pinterest-field {
  padding: 15px;
  border: 1px solid var(--sp-line);
  border-radius: 14px;
  background: rgba(7, 17, 29, .50);
}

.pinterest-toggle-card {
  display: grid;
  grid-template-columns: auto auto 1fr;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.pinterest-toggle-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.pinterest-toggle-ui {
  width: 35px;
  height: 20px;
  padding: 2px;
  display: block;
  border-radius: 999px;
  background: #20344a;
  transition: .2s ease;
}

.pinterest-toggle-ui::before {
  content: "";
  width: 16px;
  height: 16px;
  display: block;
  border-radius: 50%;
  background: #8ea1b4;
  transition: .2s ease;
}

.pinterest-toggle-card input:checked + .pinterest-toggle-ui {
  background: rgba(230, 0, 35, .55);
}

.pinterest-toggle-card input:checked + .pinterest-toggle-ui::before {
  transform: translateX(15px);
  background: #fff;
}

.pinterest-toggle-card strong,
.pinterest-field > span {
  display: block;
  color: #dce7f1;
  font-size: 10px;
  font-weight: 850;
}

.pinterest-toggle-card small,
.pinterest-field small {
  display: block;
  margin-top: 4px;
  color: #71879d;
  font-size: 8px;
  line-height: 1.5;
}

.pinterest-field em {
  color: #697f95;
  font-size: 8px;
  font-style: normal;
  font-weight: 700;
}

.pinterest-field input {
  width: 100%;
  height: 38px;
  margin-top: 8px;
  padding: 0 11px;
  border: 1px solid #28415b;
  border-radius: 10px;
  outline: none;
  background: #081522;
  color: #f1f7fd;
  font-size: 10px;
}

.pinterest-field input:focus {
  border-color: rgba(230, 0, 35, .52);
  box-shadow: 0 0 0 3px rgba(230, 0, 35, .07);
}

.pinterest-actions {
  position: relative;
  z-index: 2;
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pinterest-actions button {
  min-height: 36px;
  padding: 0 13px;
  border-radius: 10px;
  font-size: 9px;
  font-weight: 850;
}

.pinterest-primary {
  background:
    linear-gradient(135deg, #ef2443, #bd001d) !important;
  box-shadow: 0 10px 24px rgba(230, 0, 35, .14) !important;
}

.pinterest-secondary {
  border: 1px solid var(--sp-line-strong);
  background: #11243a;
  color: #b9c9d8;
}

.pinterest-flow {
  position: relative;
  z-index: 2;
  margin-top: 13px;
  padding: 11px 13px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  border: 1px solid var(--sp-line);
  border-radius: 12px;
  background: rgba(5, 14, 24, .42);
}

.pinterest-flow span {
  padding: 4px 8px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .035);
  color: #a9bacb;
  font-size: 8px;
  font-weight: 800;
}

.pinterest-flow b {
  color: #526b83;
  font-size: 9px;
}

.pinterest-status {
  position: relative;
  z-index: 2;
  margin-top: 10px;
  min-height: 40px;
  padding: 11px 12px;
  border: 1px solid var(--sp-line);
  border-radius: 11px;
  background: #081522;
  color: #9eb2c6;
  font-size: 9px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.pinterest-note {
  position: relative;
  z-index: 2;
  margin-top: 8px;
  color: #60758b;
  font-size: 8px;
  line-height: 1.5;
}

/* ---------- Inputs / cards / status areas ---------- */

input,
textarea,
select {
  font-family: inherit;
}

input:not([type="checkbox"]):not([type="radio"]),
textarea,
select {
  border-color: #28415b !important;
  background: #081522 !important;
  color: #edf5fc !important;
  border-radius: 10px !important;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(90, 167, 255, .58) !important;
  box-shadow: 0 0 0 3px rgba(90, 167, 255, .07) !important;
  outline: none !important;
}

button {
  font-family: inherit;
  transition:
    transform .16s ease,
    filter .16s ease,
    border-color .16s ease,
    background .16s ease;
}

button:not(:disabled):hover {
  transform: translateY(-1px);
}

button:disabled {
  opacity: .46;
  cursor: not-allowed;
}

.rate-scheduler-card,
.phone-monitor-card {
  margin-top: 16px !important;
  padding: 22px !important;
}

.scheduler-config-box,
.scheduler-metric,
.phone-monitor-field,
.phone-monitor-info > div {
  border-color: var(--sp-line) !important;
  background: rgba(7, 17, 29, .45) !important;
  border-radius: 13px !important;
}

.scheduler-progress-track {
  background: #071522 !important;
  border: 1px solid var(--sp-line);
}

.scheduler-progress-fill {
  background:
    linear-gradient(90deg, #4f9ff7, #67c3ff) !important;
}

.phone-monitor-card {
  border-color: rgba(70, 215, 162, .14) !important;
}

.phone-monitor-primary {
  background:
    linear-gradient(135deg, #3acb95, #1b9c71) !important;
  box-shadow: 0 10px 24px rgba(38, 178, 130, .14) !important;
}

/* Make long working sections visually quieter and more professional. */
.workspace-grid {
  margin-top: 16px;
  gap: 14px !important;
}

.card,
.panel,
.section-card {
  border-color: var(--sp-line) !important;
  background: rgba(12, 27, 45, .80) !important;
}

/* Scrollbars */
* {
  scrollbar-width: thin;
  scrollbar-color: #2c4762 #081522;
}

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

::-webkit-scrollbar-track {
  background: #081522;
}

::-webkit-scrollbar-thumb {
  border: 2px solid #081522;
  border-radius: 999px;
  background: #2c4762;
}

/* Responsive */
@media (max-width: 1180px) {
  .summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .shell {
    display: block;
  }

  .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 14px;
    border-right: 0;
    border-bottom: 1px solid var(--sp-line);
  }

  .side-nav {
    display: flex;
    overflow-x: auto;
    gap: 6px;
  }

  .nav-item {
    width: auto;
    flex: 0 0 auto;
  }

  .side-stats {
    position: static;
    margin-top: 12px;
  }

  .main {
    padding: 18px 14px 50px;
  }

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

  .pinterest-settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .hero {
    padding: 22px;
    align-items: flex-start;
    flex-direction: column;
  }

  .pinterest-card-head {
    grid-template-columns: auto 1fr;
  }

  .pinterest-state-pill {
    grid-column: 1 / -1;
    justify-self: start;
  }
}


/* =========================================================
   SCHEDULED START
========================================================= */

.scheduled-start-card {
  margin-top: 16px;
  padding: 22px;
  border: 1px solid rgba(90, 167, 255, .16);
  border-radius: var(--sp-radius-xl, 22px);
  background:
    linear-gradient(
      145deg,
      rgba(15, 29, 47, .94),
      rgba(10, 23, 39, .94)
    );
  box-shadow:
    0 16px 44px rgba(0, 0, 0, .16),
    inset 0 1px rgba(255, 255, 255, .022);
}

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

.scheduled-start-head h2 {
  margin: 5px 0 6px;
  color: #fff;
  font-size: 18px;
  letter-spacing: -.025em;
}

.scheduled-start-head p {
  max-width: 830px;
  margin: 0;
  color: #8fa5ba;
  font-size: 10px;
  line-height: 1.65;
}

.scheduled-start-state {
  flex: 0 0 auto;
  padding: 8px 12px;
  border: 1px solid rgba(149, 174, 204, .16);
  border-radius: 999px;
  background: rgba(255, 255, 255, .035);
  color: #91a6ba;
  font-size: 9px;
  font-weight: 900;
}

.scheduled-start-state[data-state="ready"] {
  border-color: rgba(70, 215, 162, .20);
  background: rgba(70, 215, 162, .07);
  color: #73e4bb;
}

.scheduled-start-state[data-state="waiting"] {
  border-color: rgba(246, 182, 91, .22);
  background: rgba(246, 182, 91, .07);
  color: #f4c77f;
}

.scheduled-start-state[data-state="error"] {
  border-color: rgba(255, 111, 125, .22);
  background: rgba(255, 111, 125, .07);
  color: #ff9aa5;
}

.scheduled-start-controls {
  margin-top: 16px;
  display: grid;
  grid-template-columns:
    minmax(260px, 1.3fr)
    minmax(180px, .7fr)
    auto;
  gap: 12px;
  align-items: stretch;
}

.scheduled-start-toggle,
.scheduled-start-time-field {
  min-height: 76px;
  padding: 14px;
  border: 1px solid rgba(149, 174, 204, .16);
  border-radius: 14px;
  background: rgba(7, 17, 29, .50);
}

.scheduled-start-toggle {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 11px;
  align-items: center;
  cursor: pointer;
}

.scheduled-start-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.scheduled-start-switch {
  width: 38px;
  height: 22px;
  padding: 3px;
  display: block;
  border-radius: 999px;
  background: #20344a;
  transition: .2s ease;
}

.scheduled-start-switch::before {
  content: "";
  width: 16px;
  height: 16px;
  display: block;
  border-radius: 50%;
  background: #8ea1b4;
  transition: .2s ease;
}

.scheduled-start-toggle
input:checked +
.scheduled-start-switch {
  background: rgba(90, 167, 255, .66);
}

.scheduled-start-toggle
input:checked +
.scheduled-start-switch::before {
  transform: translateX(16px);
  background: #fff;
}

.scheduled-start-toggle strong,
.scheduled-start-time-field > span {
  display: block;
  color: #dce7f1;
  font-size: 10px;
  font-weight: 850;
}

.scheduled-start-toggle small,
.scheduled-start-time-field small {
  display: block;
  margin-top: 4px;
  color: #71879d;
  font-size: 8px;
  line-height: 1.5;
}

.scheduled-start-time-field input {
  width: 100%;
  height: 38px;
  margin-top: 7px;
  padding: 0 11px;
}

.scheduled-start-cancel {
  min-width: 150px;
  padding: 0 15px;
  border: 1px solid rgba(149, 174, 204, .20);
  border-radius: 12px;
  background: #11243a;
  color: #b9c9d8;
  font-size: 9px;
  font-weight: 850;
}

.scheduled-start-status {
  margin-top: 11px;
  min-height: 40px;
  padding: 11px 12px;
  border: 1px solid rgba(149, 174, 204, .16);
  border-radius: 11px;
  background: #081522;
  color: #9eb2c6;
  font-size: 9px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.scheduled-start-note {
  margin-top: 8px;
  color: #60758b;
  font-size: 8px;
  line-height: 1.5;
}

@media (max-width: 900px) {
  .scheduled-start-controls {
    grid-template-columns: 1fr;
  }

  .scheduled-start-cancel {
    min-height: 42px;
  }
}


/* Open container tabs panel */
.open-tabs-panel { margin-top:10px; border:1px solid #29415f; border-radius:12px; padding:10px; background:#0f1b2e; }
.open-tabs-panel[hidden] { display:none; }
.open-tabs-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:8px; }
.open-tabs-list { display:flex; flex-direction:column; gap:6px; max-height:280px; overflow-y:auto; }
.open-tab-row { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:7px 9px; border-radius:9px; background:#15243a; }
.open-tab-info { min-width:0; display:flex; flex-direction:column; }
.open-tab-info strong { font-size:13px; }
.open-tab-info span { font-size:11px; opacity:.7; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:360px; }
.open-tab-go { flex:none; }

.open-only-label { display:flex; align-items:center; gap:6px; font-size:12px; color:#dce9f8; cursor:pointer; }

.remember-links-label { display:flex; align-items:center; gap:6px; font-size:12px; color:#dce9f8; cursor:pointer; }

.open-tabs-note { margin-top:8px; font-size:11px; opacity:.75; white-space:pre-wrap; }

/* WordPress connection – harmonized with existing dashboard cards */
.wp-settings-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(185px,1fr)); gap:12px; padding:12px 0; }
.wp-settings-grid label { display:flex; flex-direction:column; gap:6px; font-weight:600; font-size:13px; }
.wp-settings-grid input { width:100%; min-width:0; box-sizing:border-box; padding:11px; border:1px solid #a8b2c6; border-radius:9px; background:var(--card-bg,#fff); color:inherit; }
.wp-settings-actions { display:flex; gap:10px; flex-wrap:wrap; margin:8px 0 12px; }
.wp-settings-note { opacity:.78; line-height:1.5; font-size:12px; margin:10px 0 0; }

/* Optional WordPress Connector fallback. Hidden until requested or direct connection fails. */
.wp-connector-fallback { margin-top:16px; border-top:1px solid #d7deea; padding-top:15px; }
.wp-connector-toggle { width:100%; max-width:490px; text-align:center; }
.wp-connector-panel { background:var(--card-bg,#fff); border:1px solid #c8d2e2; border-radius:12px; padding:16px; margin-top:12px; }
.wp-connector-panel[hidden] { display:none; }
.wp-connector-panel h3 { margin:0 0 8px; font-size:16px; }
.wp-connector-panel p { line-height:1.5; }
.wp-connector-panel ol { padding-left:23px; line-height:1.7; margin:12px 0; }
.wp-connector-panel li { margin-bottom:7px; }
.wp-pair-row { display:flex; align-items:end; flex-wrap:wrap; gap:12px; margin:12px 0; }
.wp-pair-row label { display:flex; flex:1 1 270px; flex-direction:column; gap:6px; font-size:13px; font-weight:600; }
.wp-pair-row input { width:100%; min-width:0; box-sizing:border-box; padding:11px; border:1px solid #a8b2c6; border-radius:9px; }
.wp-pair-row button { min-height:42px; }
#wpConnectionStatus { white-space:pre-line; }

/* Reliable WordPress connector download, triggered via Firefox downloads API. */
.wp-download-anchor {
  display:inline-flex; align-items:center; justify-content:center; min-height:42px;
  padding:10px 16px; border-radius:9px; background:#182f51; color:#fff;
  border:1px solid #365173; text-decoration:none; font-size:13px; font-weight:700;
  cursor:pointer; box-sizing:border-box;
}
.wp-download-anchor:hover { background:#274773; color:#fff; }
.wp-download-anchor:focus-visible { outline:3px solid #5a94f6; outline-offset:2px; }

.wp-download-anchor:disabled { opacity:0.65; cursor:wait; }
#wpConnectorDownloadStatus[data-download-state="error"] { color:#b91c1c; }
#wpConnectorDownloadStatus[data-download-state="success"] { color:#166534; }
/* Keep Connector instructions readable on the light instructional panel. */
.wp-connector-panel,
.wp-connector-panel h3,
.wp-connector-panel p,
.wp-connector-panel ol,
.wp-connector-panel li,
.wp-connector-panel label,
.wp-connector-panel strong,
.wp-connector-panel .wp-settings-note { color:#1f2937; }
