:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --ink: #172033;
  --muted: #637083;
  --line: #d7e2ee;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-2: #172033;
  --cyan: #06b6d4;
  --soft: #eef7ff;
  --soft-cyan: #ecfeff;
  --success: #22c55e;
  --shadow: 0 14px 32px rgba(23, 32, 51, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: Arial, Helvetica, sans-serif;
}

.marketing-body {
  background:
    linear-gradient(180deg, rgba(236, 254, 255, 0.65) 0%, rgba(244, 247, 251, 0.95) 34%, #f4f7fb 100%);
}

.marketing-page {
  display: grid;
  gap: 24px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 36px;
}

.marketing-hero,
.marketing-section,
.marketing-footer {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--shadow);
}

.marketing-hero {
  overflow: hidden;
}

.marketing-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
  border-bottom: 1px solid #e6eef5;
}

.marketing-nav a,
.marketing-footer a {
  color: #0f4f93;
  font-weight: 800;
  text-decoration: none;
}

.marketing-nav div,
.marketing-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.marketing-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-size: 18px;
}

.marketing-brand img {
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

.hero-content {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(460px, 1.2fr);
  gap: 28px;
  align-items: center;
  padding: 34px 30px 38px;
}

.hero-content h1 {
  max-width: 660px;
  margin: 0 0 14px;
  color: #0d263f;
  font-size: 46px;
  line-height: 1.05;
}

.hero-content p {
  max-width: 620px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.55;
}

.hero-note {
  margin-top: 14px;
  color: #0f4f93;
  font-size: 14px;
  font-weight: 800;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
}

.secondary-link-button {
  border-color: #c9d7e5;
  background: #ffffff;
  color: #0f4f93;
}

.hero-content figure,
.screenshot-grid figure {
  margin: 0;
}

.screenshot-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: transparent;
  cursor: zoom-in;
}

.hero-content img,
.screenshot-grid img {
  display: block;
  width: 100%;
  border: 1px solid #d9e5ef;
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(23, 32, 51, 0.15);
}

.screenshot-button:hover img,
.screenshot-button:focus-visible img {
  border-color: #7dd3fc;
  box-shadow: 0 22px 48px rgba(14, 116, 144, 0.18);
}

.marketing-section {
  padding: 26px;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.proof-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  background: linear-gradient(135deg, #102338 0%, #0f4f93 58%, #0e7490 100%);
}

.proof-strip article {
  padding: 18px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.proof-strip strong {
  display: block;
  margin-bottom: 7px;
  color: #ffffff;
  font-size: 30px;
  line-height: 1;
}

.proof-strip span {
  color: #d9f4ff;
  font-weight: 800;
  line-height: 1.4;
}

.feature-strip article,
.marketing-grid article {
  padding: 16px;
  border: 1px solid #e3edf6;
  border-radius: 8px;
  background: #ffffff;
}

.feature-strip strong,
.marketing-grid h3 {
  display: block;
  margin-bottom: 8px;
  color: #102338;
}

.feature-strip span,
.marketing-grid p,
.callout-section p {
  color: var(--muted);
  line-height: 1.5;
}

.problem-section {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

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

.pain-grid article {
  position: relative;
  min-height: 72px;
  padding: 16px 16px 16px 42px;
  border: 1px solid #e3edf6;
  border-radius: 8px;
  background: #ffffff;
  color: #25364a;
  font-weight: 800;
  line-height: 1.35;
}

.pain-grid article::before {
  content: "";
  position: absolute;
  top: 19px;
  left: 16px;
  width: 12px;
  height: 12px;
  border: 3px solid #06b6d4;
  border-radius: 50%;
  background: #ffffff;
}

.marketing-grid,
.screenshot-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

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

.screenshot-grid figcaption {
  margin-top: 10px;
  color: #546575;
  font-weight: 800;
}

.workflow-section {
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.workflow-chain {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 24px;
}

.workflow-chain div {
  position: relative;
  display: grid;
  min-height: 86px;
  place-items: center;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #ffffff;
  color: #102338;
  text-align: center;
  font-weight: 900;
  line-height: 1.25;
  box-shadow: 0 10px 24px rgba(23, 32, 51, 0.06);
}

.workflow-chain div:not(:last-child)::after {
  content: ">";
  position: absolute;
  right: -18px;
  color: #0e7490;
  font-size: 22px;
  font-weight: 900;
}

.story-section {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
  gap: 22px;
  align-items: center;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 58%, #ecfeff 100%);
}

.story-section h2 {
  margin-bottom: 12px;
  color: #0d263f;
  font-size: 26px;
}

.story-section p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.58;
}

.story-section blockquote {
  margin: 0;
  padding: 22px;
  border: 1px solid #bfdbfe;
  border-left: 5px solid #06b6d4;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 32px rgba(23, 32, 51, 0.08);
}

.story-section blockquote p {
  margin: 0;
  color: #102338;
  font-size: 20px;
  font-weight: 900;
  line-height: 1.35;
}

.story-section cite {
  display: block;
  margin-top: 14px;
  color: #0f4f93;
  font-style: normal;
  font-weight: 800;
}

.roi-section {
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.roi-calculator {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.roi-calculator label,
.roi-result {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 16px;
  border: 1px solid #e3edf6;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(23, 32, 51, 0.06);
}

.roi-calculator label {
  grid-template-rows: auto 1fr auto;
  color: #25364a;
  font-size: 13px;
  font-weight: 900;
}

.roi-calculator input {
  align-self: end;
  margin-top: auto;
}

.roi-result span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.roi-result strong {
  color: #0f4f93;
  font-size: 30px;
  line-height: 1;
}

.roi-result small {
  color: var(--muted);
  font-weight: 800;
  line-height: 1.35;
}

.roi-result.highlight {
  border-color: rgba(6, 182, 212, 0.42);
  background: #ecfeff;
}

.faq-section {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.callout-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.callout-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 55%, #ecfeff 100%);
}

.callout-section h2 {
  margin: 0 0 8px;
  color: #0d263f;
}

.marketing-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 22px;
}

.marketing-footer span {
  color: #0d263f;
  font-weight: 900;
}

.lightbox-open {
  overflow: hidden;
}

.screenshot-lightbox {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 28px;
}

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

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(8, 16, 30, 0.72);
  cursor: zoom-out;
}

.screenshot-lightbox figure {
  position: relative;
  z-index: 1;
  width: min(1380px, 96vw);
  max-height: 92vh;
  margin: 0;
  padding: 16px;
  border: 1px solid rgba(226, 232, 240, 0.24);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
}

.screenshot-lightbox img {
  display: block;
  width: 100%;
  max-height: calc(92vh - 82px);
  object-fit: contain;
  border: 1px solid #d9e5ef;
  border-radius: 8px;
}

.screenshot-lightbox figcaption {
  margin-top: 10px;
  color: #334155;
  font-weight: 800;
}

.lightbox-close {
  position: absolute;
  top: -14px;
  right: -14px;
  width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 50%;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.25);
}

.doc-body {
  padding: 32px 18px;
}

.doc-page {
  display: grid;
  gap: 18px;
  width: min(960px, 100%);
  margin: 0 auto;
}

.doc-header,
.doc-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.doc-header {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 24px;
}

.doc-header img {
  width: 72px;
  height: 72px;
  border-radius: 8px;
}

.doc-header h1 {
  font-size: 34px;
}

.doc-section {
  padding: 22px 24px;
}

.doc-section h2 {
  margin-bottom: 10px;
  color: #0f4f93;
}

.doc-section p,
.doc-section li,
.doc-section dd {
  color: var(--muted);
  line-height: 1.55;
}

.doc-section ul,
.doc-section ol {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding-left: 22px;
}

.doc-section a {
  color: var(--accent);
  font-weight: 800;
}

.doc-list {
  display: grid;
}

.doc-list div {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid #edf1f3;
}

.doc-list dt {
  color: var(--ink);
  font-weight: 800;
}

.support-callout {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.support-page {
  width: min(1120px, 100%);
}

.support-hero {
  background:
    linear-gradient(90deg, rgba(6, 182, 212, 0.12), rgba(37, 99, 235, 0.08) 48%, rgba(255, 255, 255, 0)),
    var(--surface);
}

.support-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.support-stat {
  min-width: 0;
  padding: 18px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
  box-shadow: var(--shadow);
}

.support-stat span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.support-stat strong {
  display: block;
  margin-top: 8px;
  overflow-wrap: anywhere;
  color: #0f4f93;
  font-size: 17px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin-bottom: 0;
}

.section-heading > p {
  max-width: 360px;
  text-align: right;
}

.ticket-panel {
  border-color: #bfdbfe;
}

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

.ticket-form label {
  display: grid;
  grid-template-columns: none;
  gap: 7px;
  color: var(--ink);
  font-weight: 800;
}

.ticket-form input,
.ticket-form select,
.ticket-form textarea {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  color: var(--ink);
  font: inherit;
}

.ticket-form textarea {
  padding: 11px 12px;
  resize: vertical;
}

.ticket-wide,
.ticket-legal-note,
.ticket-actions {
  grid-column: 1 / -1;
}

.ticket-trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.ticket-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 4px;
}

.ticket-legal-note {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.ticket-legal-note a {
  color: #0f4f93;
  font-weight: 900;
}

.ticket-status {
  margin: 0;
  color: var(--muted);
  font-weight: 800;
}

.ticket-status.success {
  color: #15803d;
}

.ticket-status.error {
  color: #b91c1c;
}

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

.faq-grid article {
  padding: 16px;
  border: 1px solid #e1ebf3;
  border-radius: 8px;
  background: #fbfdff;
}

.faq-grid h3 {
  margin-bottom: 8px;
  color: var(--ink);
  font-size: 16px;
}

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

.sidebar {
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100vh;
  padding: 22px 16px;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 8%, rgba(6, 182, 212, 0.28), transparent 28%),
    linear-gradient(180deg, #111827 0%, #172033 58%, #0f172a 100%);
  color: #ffffff;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 42px;
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 11px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(6, 182, 212, 0.22);
}

.brand-mark img {
  display: block;
  width: 44px;
  height: 44px;
}

.brand small {
  display: block;
  margin-top: 3px;
  color: #bfd4e8;
}

nav {
  display: grid;
  gap: 8px;
}

.sidebar-main {
  display: grid;
  gap: 18px;
  min-height: 0;
}

.nav-item {
  justify-content: flex-start;
  width: 100%;
  border-color: transparent;
  background: transparent;
  color: #d7e0e8;
}

.nav-item.active,
.nav-item:hover {
  background: rgba(6, 182, 212, 0.16);
  border-color: rgba(125, 211, 252, 0.18);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 42px;
  margin-top: auto;
  border-color: rgba(125, 211, 252, 0.2);
  background: rgba(255, 255, 255, 0.08);
  color: #e5edf7;
}

.theme-toggle:hover {
  background: rgba(6, 182, 212, 0.16);
}

.theme-toggle span {
  color: #bfd4e8;
  font-size: 12px;
  text-transform: uppercase;
}

.theme-toggle strong {
  font-size: 13px;
}

.workspace {
  padding: 28px;
}

.view-panel[hidden] {
  display: none;
}

.page-header,
.section-title,
.form-actions,
.card-top,
.card-actions,
.header-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  color: #0f2a44;
  font-size: 32px;
  line-height: 1.1;
  letter-spacing: 0;
}

h2 {
  color: #12385c;
  font-size: 19px;
  line-height: 1.15;
}

h3 {
  color: #172033;
  font-size: 16px;
  line-height: 1.2;
}

.page-header {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(37, 99, 235, 0.14);
}

.page-header p {
  margin-top: 6px;
  color: #53657a;
}

.section-title h2,
.settings-card h2,
.help-card h2 {
  position: relative;
  padding-left: 12px;
}

.section-title h2::before,
.settings-card h2::before,
.help-card h2::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.18em;
  width: 4px;
  height: 1em;
  border-radius: 999px;
  background: linear-gradient(180deg, var(--cyan), var(--accent));
}

p {
  color: var(--muted);
  line-height: 1.45;
}

button {
  min-height: 40px;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: linear-gradient(180deg, #2f74ff 0%, var(--accent) 100%);
  color: #ffffff;
  padding: 0 14px;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

button:hover {
  background: var(--accent-hover);
}

button.secondary {
  background: #ffffff;
  color: var(--accent-2);
  border-color: #c5d0da;
}

.data-status {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.data-status.good {
  border-color: #bfdbfe;
  background: var(--soft);
  color: #1d4ed8;
}

.settings-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.save-status {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.save-status.good {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.save-status.error {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #b91c1c;
}

.retention-note {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: var(--soft);
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
}

.loading-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 92px;
  padding: 18px;
  border: 1px dashed #bfdbfe;
  border-radius: 8px;
  background: #f8fbff;
  color: #0f4f93;
}

.loading-spinner {
  width: 18px;
  height: 18px;
  border: 3px solid #bfdbfe;
  border-top-color: #0f4f93;
  border-radius: 50%;
  animation: loading-spin 0.85s linear infinite;
}

@keyframes loading-spin {
  to {
    transform: rotate(360deg);
  }
}

button.secondary:hover {
  background: var(--soft);
}

button.danger {
  color: #8f2d2d;
}

button.danger:hover {
  border-color: #e2b4b4;
  background: #fff5f5;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin: 22px 0;
}

.summary-strip div,
.form-surface,
.schedule-panel,
.preview-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.summary-strip div {
  padding: 16px;
}

.summary-strip div:nth-child(2) {
  border-color: rgba(6, 182, 212, 0.38);
  background: linear-gradient(180deg, #ffffff 0%, #f3fbff 100%);
}

.summary-strip span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.summary-strip strong {
  display: block;
  margin-top: 6px;
  font-size: 22px;
}

.summary-strip .next-run-time {
  display: block;
  color: #0f2a44;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.15;
}

.summary-strip .next-run-name {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 18px;
  align-items: start;
}

.form-surface,
.schedule-panel,
.preview-panel {
  padding: 20px;
}

.form-surface {
  display: grid;
  gap: 18px;
}

.schedule-steps {
  display: grid;
  gap: 22px;
}

.schedule-step {
  position: relative;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 10px 24px rgba(23, 32, 42, 0.05);
}

.schedule-step + .schedule-step::before {
  content: "";
  position: absolute;
  top: -15px;
  left: 50%;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 10px solid var(--accent);
  opacity: 0.85;
  transform: translateX(-50%);
}

.schedule-step + .schedule-step::after {
  content: "";
  position: absolute;
  top: -22px;
  left: 50%;
  width: 2px;
  height: 10px;
  border-radius: 999px;
  background: var(--accent);
  opacity: 0.65;
  transform: translateX(-50%);
}

.schedule-step.is-open {
  border-color: rgba(37, 99, 235, 0.34);
  box-shadow: 0 16px 36px rgba(37, 99, 235, 0.1);
}

.schedule-step-toggle {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 66px;
  padding: 12px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  box-shadow: none;
}

.schedule-step-toggle:hover {
  transform: none;
  background: rgba(239, 246, 255, 0.78);
  box-shadow: none;
}

.schedule-step-toggle span:last-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.schedule-step-toggle strong {
  color: var(--accent-2);
  font-size: 14px;
}

.schedule-step-toggle small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.step-number {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(180deg, #22314d 0%, var(--accent-2) 100%);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.schedule-step-body {
  display: grid;
  gap: 16px;
  padding: 0 16px 16px;
}

.step-actions {
  display: flex;
  justify-content: flex-end;
}

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

.review-summary div {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.review-summary span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.review-summary strong {
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 13px;
}

label,
fieldset {
  display: grid;
  gap: 7px;
  color: #2f3e4d;
  font-size: 13px;
  font-weight: 700;
}

fieldset {
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfd 100%);
}

legend {
  padding: 0 8px;
  color: var(--accent-2);
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 9px 12px;
  font: inherit;
  font-weight: 400;
}

textarea {
  min-height: 88px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus,
.dropdown-button:focus {
  outline: 3px solid rgba(37, 99, 235, 0.15);
  border-color: var(--accent);
}

input:disabled {
  background: #edf1f3;
}

label small,
.line-advanced-rules small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
}

.check-dropdown {
  position: relative;
}

.dropdown-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
  padding: 8px 10px;
  text-align: left;
  font-weight: 400;
}

.dropdown-button:hover {
  background: #ffffff;
}

.check-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 260px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.check-option {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 7px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.check-option:hover {
  background: var(--soft);
}

.check-option input {
  width: 16px;
  min-height: 16px;
}

.identifier-icon,
.identifier-fallback {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 7px;
}

.identifier-icon {
  object-fit: contain;
  padding: 3px;
  border: 1px solid #edf1f3;
  background: #ffffff;
}

.identifier-fallback {
  display: grid;
  place-items: center;
  background: var(--soft-cyan);
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

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

.day-grid label,
.switch,
.option-switch {
  display: flex;
  align-items: center;
  gap: 7px;
}

.day-grid input,
.switch input,
.option-switch input {
  width: 16px;
  min-height: 16px;
}

.option-switch {
  align-items: flex-start;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.option-switch span {
  display: grid;
  gap: 3px;
}

.option-switch strong {
  color: var(--ink);
  font-size: 13px;
}

.option-switch small {
  color: var(--muted);
  font-weight: 600;
  line-height: 1.35;
}

.time-rows {
  display: grid;
  gap: 10px;
}

.time-row {
  display: grid;
  grid-template-columns: 1fr 46px;
  gap: 10px;
}

.time-row button {
  padding: 0;
  background: #ffffff;
  color: var(--accent-2);
  border-color: #c5d0da;
}

.line-editor {
  display: grid;
  gap: 16px;
  padding: 2px 0 4px;
}

.line-advanced-rules {
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

.line-advanced-rules summary {
  cursor: pointer;
  padding: 12px 14px;
  color: var(--accent-2);
  font-size: 13px;
  font-weight: 900;
}

.line-advanced-rules summary::marker {
  color: var(--accent);
}

.line-advanced-rules[open] {
  padding-bottom: 14px;
}

.line-advanced-rules[open] summary {
  margin-bottom: 2px;
}

.line-advanced-rules > label,
.advanced-rules-grid {
  margin: 0 14px;
}

.advanced-rules-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 12px;
}

.rule-value-panel {
  display: grid;
  gap: 12px;
}

.rule-value-panel[hidden] {
  display: none;
}

#lineRuleTextValueLabel[hidden],
#lineRuleChipInput[hidden],
#lineRuleValueChips[hidden],
#lineRuleIdentifierValueLabel[hidden],
#lineRuleIdentifierDropdown[hidden] {
  display: none !important;
}

.chip-input {
  display: flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  padding: 4px;
}

.chip-input input {
  min-height: 34px;
  border: 0;
  box-shadow: none;
}

.chip-input input:focus {
  outline: 0;
  border-color: transparent;
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 0;
}

.value-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #0f4f86;
  padding: 6px 8px 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.value-chip > span {
  overflow: hidden;
  max-width: 260px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.value-chip button {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  min-height: 18px;
  border: 0;
  border-radius: 999px;
  background: #dbeafe;
  color: var(--accent);
  padding: 0;
  font-size: 12px;
  line-height: 1;
}

.value-chip button:hover {
  background: #bfdbfe;
  transform: none;
  box-shadow: none;
}

.line-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.line-card {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(23, 32, 42, 0.06);
}

.line-card.is-editing {
  border-color: #38bdf8;
  box-shadow: 0 14px 34px rgba(56, 189, 248, 0.16);
}

.line-card-main {
  display: grid;
  grid-template-columns: 38px minmax(180px, 1.4fr) minmax(120px, 0.7fr) minmax(170px, 1fr) minmax(120px, 0.7fr);
  gap: 12px;
  align-items: stretch;
}

.line-card strong,
.preview-line strong {
  display: block;
}

.line-number {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: linear-gradient(180deg, #22314d 0%, var(--accent-2) 100%);
  color: #ffffff;
  font-weight: 800;
}

.line-view,
.line-stat {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid #edf1f3;
  border-radius: 8px;
  background: #fbfcfd;
}

.line-view {
  border-left: 4px solid var(--cyan);
}

.line-card span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.line-card strong {
  overflow-wrap: anywhere;
}

.line-card p {
  margin-top: 4px;
  font-size: 13px;
}

.line-identifiers strong {
  font-size: 13px;
  line-height: 1.35;
}

.line-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid #edf1f3;
}

.line-actions button {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.schedule-list {
  display: grid;
  gap: 18px;
  margin-top: 14px;
}

.schedule-group {
  display: grid;
  gap: 12px;
  padding: 12px;
  border: 1px solid #e3ebf1;
  border-radius: 8px;
  background: linear-gradient(180deg, #fbfdff 0%, #f6f9fc 100%);
}

.schedule-group-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 42px;
  padding: 0 12px;
  border-color: var(--line);
  background: linear-gradient(180deg, #f8fbff 0%, #eef7ff 100%);
  color: var(--ink);
}

.schedule-group-toggle:hover {
  border-color: #bfdbfe;
  background: #eef7ff;
}

.schedule-group-toggle span {
  flex: 1;
  font-size: 14px;
  font-weight: 800;
  text-align: left;
}

.schedule-group-toggle strong {
  display: grid;
  min-width: 28px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: #dbeafe;
  color: var(--accent);
  font-size: 13px;
}

.schedule-group-toggle::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  flex: 0 0 auto;
  transform: rotate(45deg);
  transition: transform 0.18s ease;
}

.schedule-group-toggle[aria-expanded="true"]::after {
  transform: rotate(225deg) translate(-2px, -2px);
}

.schedule-group-list {
  display: grid;
  gap: 16px;
  max-height: none;
  overflow: visible;
  padding: 0;
  scrollbar-width: thin;
}

.schedule-group-list[hidden] {
  display: none;
}

.schedule-group-list.is-scrollable {
  max-height: 70vh;
  overflow-y: auto;
  padding: 0 8px 12px 0;
}

.right-column {
  display: grid;
  gap: 18px;
}

.selected-schedule-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid #cbdceb;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: 0 16px 38px rgba(30, 54, 82, 0.12);
}

.selected-schedule-panel[hidden] {
  display: none;
}

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

.selected-schedule-head h3 {
  color: #102338;
}

.selected-schedule-head p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.preview-card {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfd;
}

.preview-card h3 {
  font-size: 18px;
}

.preview-card p {
  margin-top: 6px;
}

.preview-lines,
.saved-line-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.preview-line {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.preview-line span,
.saved-line-list p,
.muted {
  color: var(--muted);
  font-size: 13px;
}

.schedule-card {
  overflow: hidden;
  min-height: max-content;
  padding: 0;
  border: 1px solid #cbdceb;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(30, 54, 82, 0.1);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.schedule-card.is-selected {
  border-color: #9fc5e8;
  box-shadow: 0 18px 42px rgba(30, 54, 82, 0.14);
}

.schedule-card.is-running {
  border-color: rgba(6, 182, 212, 0.55);
  box-shadow: 0 18px 44px rgba(6, 182, 212, 0.16);
}

.schedule-card.is-running .schedule-card-head {
  background:
    linear-gradient(90deg, rgba(6, 182, 212, 0.18), rgba(37, 99, 235, 0.1) 45%, rgba(255, 255, 255, 0)),
    linear-gradient(180deg, #effbff 0%, #ffffff 100%);
}

.schedule-card p {
  margin-top: 5px;
  font-size: 13px;
}

.schedule-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid #cfe2f3;
  background:
    linear-gradient(90deg, rgba(6, 182, 212, 0.12), rgba(37, 99, 235, 0.08) 45%, rgba(255, 255, 255, 0)),
    linear-gradient(180deg, #f4f9ff 0%, #ffffff 100%);
  cursor: pointer;
}

.schedule-card-head:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.24);
  outline-offset: -3px;
}

.schedule-card-head h3 {
  color: #102338;
}

.schedule-card-head p {
  color: #546575;
}

.schedule-state-stack {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.running-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid rgba(6, 182, 212, 0.36);
  border-radius: 999px;
  background: #ecfeff;
  color: #0e7490;
  font-size: 12px;
  font-weight: 900;
}

.running-badge span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #06b6d4;
  box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.5);
  animation: soft-pulse 1.6s ease-out infinite;
}

.schedule-summary-grid {
  display: grid;
  grid-template-columns: minmax(150px, 1.35fr) 70px minmax(120px, 0.9fr) minmax(150px, 1.05fr) minmax(120px, 0.9fr);
  gap: 10px;
  padding: 14px 18px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
}

.schedule-summary-grid[hidden],
.schedule-card .card-actions[hidden] {
  display: none;
}

.schedule-summary-tile {
  min-width: 0;
  padding: 10px;
  border: 1px solid #e1ebf3;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.schedule-summary-tile span,
.expanded-title span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.schedule-summary-tile strong {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: #233447;
  font-size: 13px;
}

.schedule-summary-tile.location {
  border-left: 4px solid #06b6d4;
}

.schedule-summary-tile.lines {
  border-left: 4px solid #2563eb;
}

.schedule-summary-tile.assigned {
  border-left: 4px solid #7c3aed;
}

.schedule-summary-tile.last-run {
  border-left: 4px solid #22c55e;
}

.schedule-details,
.run-log-panel {
  margin: 0 14px 12px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

.schedule-details[hidden],
.run-log-panel[hidden] {
  display: none;
}

.saved-line-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.8fr);
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid #e3ebf1;
  border-radius: 8px;
  background: #ffffff;
}

.saved-line-item strong {
  color: #172b3d;
}

.identifier-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.identifier-badge {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  gap: 6px;
  padding: 4px 8px 4px 4px;
  border: 1px solid #edf1f3;
  border-radius: 999px;
  background: #fbfcfd;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
}

.identifier-badge > span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-log-panel {
  display: grid;
  gap: 10px;
}

.expanded-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.expanded-title strong {
  color: #172b3d;
}

.run-log-item {
  padding: 12px;
  border: 1px solid #e3ebf1;
  border-radius: 8px;
  background: #ffffff;
}

.run-log-item.failed {
  border-color: #f1b5b5;
  background: #fff8f8;
}

.run-log-item.running {
  border-color: rgba(6, 182, 212, 0.42);
  background: linear-gradient(180deg, #f0fdff 0%, #ffffff 100%);
  box-shadow: 0 14px 34px rgba(6, 182, 212, 0.12);
}

.run-log-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.run-history-row,
.run-log-grid {
  display: grid;
  gap: 10px;
  align-items: stretch;
}

.run-history-row {
  grid-template-columns: minmax(110px, 0.9fr) minmax(180px, 1.8fr) repeat(4, minmax(82px, 0.7fr)) minmax(150px, 1.1fr) minmax(90px, auto);
}

.run-log-grid {
  grid-template-columns: minmax(100px, 1fr) repeat(4, minmax(74px, 0.8fr)) minmax(140px, 1.2fr) minmax(90px, auto);
}

.run-date-cell,
.run-schedule-cell,
.run-metric-cell,
.run-skip-cell,
.run-status-cell {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid #edf4fa;
  border-radius: 8px;
  background: #fbfdff;
}

.run-date-cell {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 100%);
}

.run-date-cell strong {
  color: #0f4f93;
  font-size: 21px;
  line-height: 1;
}

.run-date-cell span,
.run-schedule-cell span,
.run-metric-cell span,
.run-skip-cell span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.run-date-cell.prominent strong {
  font-size: 24px;
}

.run-schedule-cell strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.run-metric-cell strong,
.run-skip-cell strong {
  color: #172b3d;
  font-size: 16px;
}

.run-status-cell {
  justify-items: end;
  border-color: transparent;
  background: transparent;
  padding-right: 0;
}

.pill.running {
  border-color: rgba(6, 182, 212, 0.38);
  background: #ecfeff;
  color: #0e7490;
  animation: pill-pulse 1.8s ease-in-out infinite;
}

@keyframes soft-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(6, 182, 212, 0.42);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(6, 182, 212, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(6, 182, 212, 0);
  }
}

@keyframes pill-pulse {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.04);
  }
}

.run-error {
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff7f7;
  color: #a33a3a;
  font-weight: 700;
}

.run-card-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.run-card-actions button {
  min-height: 32px;
  font-size: 12px;
}

.run-events {
  margin-top: 10px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

.run-events summary {
  padding: 9px 10px;
  color: #0f4f93;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.run-events ol {
  display: grid;
  gap: 7px;
  max-height: 320px;
  margin: 0;
  padding: 0 10px 10px;
  overflow-y: auto;
  list-style: none;
}

.run-events li {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  padding: 8px;
  border: 1px solid #e8f0f7;
  border-radius: 8px;
  background: #ffffff;
}

.run-events time {
  color: #0e7490;
  font-size: 12px;
  font-weight: 900;
}

.run-events span {
  color: var(--ink);
  font-size: 13px;
  line-height: 1.35;
}

.schedule-toggle {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 5px 9px;
  border: 1px solid #d8e0e6;
  border-radius: 999px;
  background: #edf1f3;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.schedule-toggle input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--accent);
}

.schedule-toggle:has(input:checked) {
  border-color: #bfdbfe;
  background: var(--soft);
  color: #1d4ed8;
}

.card-actions {
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 14px 18px 16px;
  border-top: 1px solid #edf4fa;
  background: #fbfdff;
  margin-top: 0;
}

.schedule-card .card-actions[hidden] {
  display: none;
}

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

.action-group button {
  min-height: 36px;
  font-size: 13px;
}

button:disabled {
  opacity: 0.65;
  cursor: wait;
}

button.is-saving {
  position: relative;
  padding-left: 42px;
}

button.is-saving::before {
  content: "";
  position: absolute;
  left: 16px;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  border: 2px solid rgba(255, 255, 255, 0.55);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: loading-spin 0.85s linear infinite;
}

.pill {
  padding: 5px 8px;
  border-radius: 999px;
  background: #edf1f3;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.pill.active {
  background: var(--soft);
  color: var(--accent);
}

dl {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

dl div {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 8px;
}

dt,
dd {
  margin: 0;
  font-size: 13px;
}

dt {
  color: var(--muted);
  font-weight: 700;
}

.empty {
  padding: 26px 0;
  text-align: center;
}

.empty.compact {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcfd;
  font-size: 13px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.settings-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.settings-card h2 {
  font-size: 18px;
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-check-list {
  display: grid;
  max-height: 320px;
  overflow: auto;
  gap: 8px;
  padding: 4px;
}

.settings-check-list label {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid #edf1f3;
  border-radius: 8px;
  background: #fbfcfd;
  font-weight: 700;
}

.settings-check-list input {
  width: 16px;
  min-height: 16px;
  accent-color: var(--accent);
}

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

.run-day-group {
  overflow: hidden;
  border: 1px solid #cbdceb;
  border-radius: 8px;
  background: #f8fbff;
  box-shadow: 0 12px 28px rgba(30, 54, 82, 0.08);
}

.run-day-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  cursor: pointer;
  list-style: none;
}

.run-day-summary::-webkit-details-marker {
  display: none;
}

.run-day-summary strong {
  color: #102338;
  font-size: 17px;
}

.run-day-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.run-day-counts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.run-day-counts > span:not(.pill) {
  padding: 5px 9px;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  background: #ffffff;
}

.run-day-list {
  display: grid;
  gap: 10px;
  padding: 0 10px 10px;
}

.pill.danger {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b42318;
}

.help-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin-top: 22px;
}

.help-card {
  display: grid;
  gap: 10px;
  align-content: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.help-card.intro,
.help-card.support {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.help-card h2 {
  font-size: 18px;
}

.help-card p,
.help-card li,
.help-card dd {
  color: var(--muted);
  line-height: 1.48;
}

.help-card strong {
  color: var(--ink);
}

.help-card ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 20px;
}

.help-card a {
  color: var(--accent);
  font-weight: 700;
}

.help-list {
  margin: 0;
}

.help-list div {
  grid-template-columns: 130px 1fr;
  padding: 9px 0;
  border-bottom: 1px solid #edf1f3;
}

.help-list div:last-child {
  border-bottom: 0;
}

body[data-theme="dark"] {
  --bg: #0e1524;
  --surface: #151e2f;
  --ink: #eef6ff;
  --muted: #9eb0c6;
  --line: #2a3950;
  --accent: #60a5fa;
  --accent-hover: #3b82f6;
  --accent-2: #eaf4ff;
  --cyan: #22d3ee;
  --soft: #152b46;
  --soft-cyan: #0f3141;
  --success: #4ade80;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

body[data-theme="dark"] .sidebar {
  background:
    radial-gradient(circle at 18% 8%, rgba(34, 211, 238, 0.2), transparent 30%),
    linear-gradient(180deg, #08111f 0%, #0f172a 58%, #070d18 100%);
}

body[data-theme="dark"] h1,
body[data-theme="dark"] h2,
body[data-theme="dark"] h3,
body[data-theme="dark"] .summary-strip .next-run-time {
  color: var(--ink);
}

body[data-theme="dark"] .page-header {
  border-bottom-color: rgba(96, 165, 250, 0.24);
}

body[data-theme="dark"] .page-header p {
  color: var(--muted);
}

body[data-theme="dark"] .summary-strip div,
body[data-theme="dark"] .form-surface,
body[data-theme="dark"] .schedule-panel,
body[data-theme="dark"] .preview-panel,
body[data-theme="dark"] .settings-card,
body[data-theme="dark"] .help-card,
body[data-theme="dark"] .schedule-step,
body[data-theme="dark"] .review-summary div,
body[data-theme="dark"] .line-card,
body[data-theme="dark"] .selected-schedule-panel,
body[data-theme="dark"] .schedule-card,
body[data-theme="dark"] .run-log-item,
body[data-theme="dark"] .saved-line-item {
  background: var(--surface);
}

body[data-theme="dark"] .schedule-step.is-open {
  border-color: rgba(96, 165, 250, 0.48);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

body[data-theme="dark"] .schedule-step-toggle:hover {
  background: #101827;
}

body[data-theme="dark"] .step-number {
  background: linear-gradient(180deg, #1e3a5f 0%, #2563eb 100%);
}

body[data-theme="dark"] .review-summary div {
  border-color: var(--line);
}

body[data-theme="dark"] .review-summary strong {
  color: var(--ink);
}

body[data-theme="dark"] .run-date-cell,
body[data-theme="dark"] .run-schedule-cell,
body[data-theme="dark"] .run-metric-cell,
body[data-theme="dark"] .run-skip-cell {
  border-color: var(--line);
  background: #101827;
}

body[data-theme="dark"] .run-date-cell {
  border-color: #1e3a5f;
  background: linear-gradient(180deg, #14213a 0%, #101827 100%);
}

body[data-theme="dark"] .run-date-cell strong {
  color: #93c5fd;
}

body[data-theme="dark"] .run-metric-cell strong,
body[data-theme="dark"] .run-skip-cell strong,
body[data-theme="dark"] .run-schedule-cell strong {
  color: var(--ink);
}

body[data-theme="dark"] .run-day-group {
  border-color: #263f5b;
  background: #0f172a;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.24);
}

body[data-theme="dark"] .run-day-summary strong {
  color: var(--ink);
}

body[data-theme="dark"] .run-day-counts > span:not(.pill) {
  border-color: #1e3a5f;
  background: #101827;
}

body[data-theme="dark"] fieldset,
body[data-theme="dark"] .option-switch,
body[data-theme="dark"] .help-card.intro,
body[data-theme="dark"] .help-card.support,
body[data-theme="dark"] .schedule-card-head {
  background: linear-gradient(180deg, #18243a 0%, var(--surface) 100%);
}

body[data-theme="dark"] .summary-strip div:nth-child(2) {
  border-color: rgba(34, 211, 238, 0.38);
  background: linear-gradient(180deg, #172238 0%, #132033 100%);
}

body[data-theme="dark"] input,
body[data-theme="dark"] select,
body[data-theme="dark"] textarea,
body[data-theme="dark"] .chip-input,
body[data-theme="dark"] .dropdown-button,
body[data-theme="dark"] .check-menu,
body[data-theme="dark"] button.secondary,
body[data-theme="dark"] .time-row button {
  background: #101827;
  color: var(--ink);
  border-color: var(--line);
}

body[data-theme="dark"] input:disabled,
body[data-theme="dark"] .pill,
body[data-theme="dark"] .schedule-toggle {
  background: #26344a;
}

body[data-theme="dark"] label,
body[data-theme="dark"] fieldset,
body[data-theme="dark"] legend,
body[data-theme="dark"] .option-switch strong,
body[data-theme="dark"] .line-card strong,
body[data-theme="dark"] .saved-line-item strong,
body[data-theme="dark"] .expanded-title strong,
body[data-theme="dark"] .schedule-summary-tile strong,
body[data-theme="dark"] .help-card strong,
body[data-theme="dark"] .selected-schedule-head h3,
body[data-theme="dark"] .schedule-card-head h3 {
  color: var(--ink);
}

body[data-theme="dark"] .data-status,
body[data-theme="dark"] .line-view,
body[data-theme="dark"] .line-stat,
body[data-theme="dark"] .line-advanced-rules,
body[data-theme="dark"] .preview-card,
body[data-theme="dark"] .preview-line,
body[data-theme="dark"] .schedule-group,
body[data-theme="dark"] .schedule-group-toggle,
body[data-theme="dark"] .schedule-summary-grid,
body[data-theme="dark"] .schedule-summary-tile,
body[data-theme="dark"] .schedule-details,
body[data-theme="dark"] .run-log-panel,
body[data-theme="dark"] .card-actions,
body[data-theme="dark"] .settings-check-list label,
body[data-theme="dark"] .empty.compact,
body[data-theme="dark"] .identifier-badge {
  background: #101827;
  border-color: var(--line);
}

body[data-theme="dark"] .identifier-icon {
  background: #ffffff;
  border-color: #d7e2ee;
}

body[data-theme="dark"] .schedule-group-toggle strong {
  background: #1e3a5f;
  color: #bfdbfe;
}

body[data-theme="dark"] .schedule-card {
  border-color: #263f5b;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

body[data-theme="dark"] .schedule-card.is-selected {
  border-color: #3b82b8;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34);
}

body[data-theme="dark"] .schedule-card.is-running {
  border-color: rgba(34, 211, 238, 0.46);
  box-shadow: 0 18px 42px rgba(34, 211, 238, 0.12);
}

body[data-theme="dark"] .value-chip {
  border-color: #1e3a5f;
  background: #14213a;
  color: #bfdbfe;
}

body[data-theme="dark"] .value-chip button {
  background: #1e3a5f;
  color: #bfdbfe;
}

body[data-theme="dark"] .line-card.is-editing {
  border-color: rgba(34, 211, 238, 0.46);
  box-shadow: 0 18px 42px rgba(34, 211, 238, 0.12);
}

body[data-theme="dark"] .running-badge,
body[data-theme="dark"] .pill.running {
  border-color: rgba(34, 211, 238, 0.32);
  background: #103241;
  color: #67e8f9;
}

body[data-theme="dark"] .run-log-item.running {
  border-color: rgba(34, 211, 238, 0.32);
  background: linear-gradient(180deg, #102b3a 0%, #101827 100%);
}

body[data-theme="dark"] .run-log-item.failed,
body[data-theme="dark"] button.danger:hover {
  border-color: #7f3b3b;
  background: #2a1820;
}

body[data-theme="dark"] .run-error,
body[data-theme="dark"] button.danger {
  color: #fca5a5;
}

body[data-theme="dark"] .pill.danger {
  border-color: #7f1d1d;
  background: #2a1820;
  color: #fca5a5;
}

body[data-theme="dark"] .run-error {
  border-color: #7f1d1d;
  background: #2a1820;
}

body[data-theme="dark"] .run-events {
  border-color: #1e3a5f;
  background: #101827;
}

body[data-theme="dark"] .run-events summary {
  color: #93c5fd;
}

body[data-theme="dark"] .run-events li {
  border-color: var(--line);
  background: #0f172a;
}

body[data-theme="dark"] .run-events span {
  color: var(--ink);
}

body[data-theme="dark"] .save-status.good {
  border-color: #166534;
  background: #052e1a;
  color: #86efac;
}

body[data-theme="dark"] .save-status.error {
  border-color: #7f1d1d;
  background: #2a1820;
  color: #fca5a5;
}

body[data-theme="dark"] .retention-note {
  border-color: #1e3a5f;
  background: #101827;
  color: #bfdbfe;
}

body[data-theme="dark"] .loading-panel {
  border-color: #1e3a5f;
  background: #101827;
  color: #bfdbfe;
}

body[data-theme="dark"] .loading-spinner {
  border-color: #1e3a5f;
  border-top-color: #93c5fd;
}

body[data-theme="dark"] .support-hero,
body[data-theme="dark"] .support-stat,
body[data-theme="dark"] .ticket-legal-note,
body[data-theme="dark"] .faq-grid article {
  border-color: var(--line);
  background: #101827;
}

body[data-theme="dark"] .ticket-legal-note a {
  color: #93c5fd;
}

@media (max-width: 980px) {
  .app-shell,
  .content-grid,
  .summary-strip,
  .two-col,
  .advanced-rules-grid,
  .schedule-summary-grid,
  .settings-grid,
  .help-grid,
  .review-summary,
  .support-overview,
  .ticket-form,
  .faq-grid,
  .doc-list div {
    grid-template-columns: 1fr;
  }

  .doc-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-heading > p {
    max-width: none;
    text-align: left;
  }

  .sidebar {
    height: auto;
    max-height: none;
    min-height: auto;
    overflow: visible;
    position: static;
  }

  .theme-toggle {
    margin-top: 18px;
  }

  nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .line-card-main {
    grid-template-columns: 38px minmax(0, 1fr) minmax(0, 1fr);
  }

  .line-identifiers {
    grid-column: 2 / -1;
  }

  .hero-content,
  .feature-strip,
  .proof-strip,
  .pain-grid,
  .workflow-chain,
  .story-section,
  .roi-calculator,
  .marketing-grid,
  .screenshot-grid {
    grid-template-columns: 1fr;
  }

  .workflow-chain {
    gap: 12px;
  }

  .workflow-chain div:not(:last-child)::after {
    position: static;
    margin-top: 10px;
    transform: rotate(90deg);
  }

  .marketing-nav,
  .marketing-footer,
  .callout-section {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .workspace {
    padding: 18px;
  }

  .page-header,
  .section-title,
  .form-actions,
  .card-top,
  .header-actions {
    align-items: stretch;
    flex-direction: column;
  }

  fieldset {
    padding: 14px;
  }

  .line-card-main {
    grid-template-columns: 1fr;
  }

  .line-number {
    width: 100%;
  }

  .line-identifiers {
    grid-column: auto;
  }

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

  .schedule-card-head,
  .card-actions,
  .expanded-title {
    align-items: stretch;
    flex-direction: column;
  }

  .action-group {
    justify-content: stretch;
  }

  .action-group button {
    flex: 1 1 120px;
  }

  .line-actions button {
    flex: 1 1 90px;
  }

  .saved-line-item {
    grid-template-columns: 1fr;
  }

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

  .run-date-cell,
  .run-schedule-cell,
  .run-skip-cell,
  .run-status-cell {
    grid-column: span 2;
  }

  .run-status-cell {
    justify-items: start;
    padding-left: 0;
  }

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

  dl div {
    grid-template-columns: 1fr;
  }

  .marketing-page {
    width: min(100% - 18px, 1180px);
  }

  .hero-content,
  .marketing-section {
    padding: 20px;
  }

  .hero-content h1 {
    font-size: 34px;
  }
}
