:root {
  --bg: #060711;
  --card-bg: #101322;
  --accent: #6366f1;
  --accent-soft: rgba(99, 102, 241, 0.2);
  --text: #f9fafb;
  --muted: #9ca3af;
  --error: #f97373;
  --idle: #6b7280;
  --running: #facc15;
  --finished: #4ade80;
  --sidebar-bg: #020617;
  --card-border: rgba(148, 163, 184, 0.25);
  --input-bg: rgba(15, 23, 42, 0.95);
  --input-border: rgba(148, 163, 184, 0.5);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.4), 0 2px 4px -1px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.4);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.6), 0 10px 10px -5px rgba(0, 0, 0, 0.5);
}

[data-theme="light"] {
  --bg: #f1f5f9;
  --card-bg: #ffffff;
  --accent: #6366f1;
  --accent-soft: rgba(99, 102, 241, 0.12);
  --text: #0f172a;
  --muted: #475569;
  --error: #dc2626;
  --idle: #64748b;
  --running: #ca8a04;
  --finished: #15803d;
  --sidebar-bg: #ffffff;
  --card-border: rgba(148, 163, 184, 0.2);
  --input-bg: #f8fafc;
  --input-border: rgba(148, 163, 184, 0.3);
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.saved-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  padding: 8px 20px;
  border-radius: 999px;
  background: linear-gradient(135deg, #7c3aed, #4338ca);
  color: #f9fafb;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
  box-shadow:
    0 10px 18px rgba(67, 56, 202, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

[data-theme="light"] .saved-pill {
  color: #101322;
}

.wp-pass-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.wp-pass-status-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.pill-btn {
  appearance: none;
  border: 0;
  padding: 8px 18px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.85rem;
  background: linear-gradient(135deg, #7c3aed, #4338ca);
  color: #f9fafb;
  cursor: pointer;
  box-shadow:
    0 8px 18px rgba(67, 56, 202, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease;
  width: fit-content;
}

.pill-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 12px 24px rgba(67, 56, 202, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.pill-btn:active {
  transform: translateY(0);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  width: 100%;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
  background: var(--bg);
  background-image: radial-gradient(circle at top, 
    var(--bg) 0%, 
    var(--bg) 50%, 
    var(--bg) 100%);
  color: var(--text);
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.modal-open {
  overflow: hidden;
}

[data-theme="light"] body {
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 50%, #f8fafc 100%);
  background-attachment: fixed;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="range"]),
textarea,
select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  padding: 11px 16px;
  font-size: 1rem;
  font-family: inherit;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, 0.35),
    0 0 0 0 rgba(99, 102, 241, 0);
}

input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="range"]):hover,
textarea:hover,
select:hover {
  border-color: var(--accent);
  background-color: color-mix(in srgb, var(--input-bg) 90%, var(--input-hover));
}

input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]):not([type="range"]):focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--input-focus);
  box-shadow:
    0 0 0 1px var(--input-focus),
    0 12px 30px rgba(99, 102, 241, 0.25);
}

input:required:invalid,
textarea:required:invalid,
select:required:invalid {
  border-color: rgba(248, 113, 113, 0.85);
  box-shadow:
    0 0 0 1px rgba(248, 113, 113, 0.9),
    0 15px 32px rgba(248, 113, 113, 0.15);
}

input:required:invalid:focus,
textarea:required:invalid:focus,
select:required:invalid:focus {
  background-color: rgba(248, 113, 113, 0.05);
}

input::placeholder,
textarea::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

[data-theme="light"] input::placeholder,
[data-theme="light"] textarea::placeholder {
  color: rgba(15, 23, 42, 0.5);
}

select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 44px;
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='7' viewBox='0 0 12 7' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23c7d2fe' d='M5.998 6.5 0 .5h11.996z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  background-size: 12px 7px;
}

[data-theme="light"] select {
  background-image: url("data:image/svg+xml,%3Csvg width='12' height='7' viewBox='0 0 12 7' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23343a55' d='M5.998 6.5 0 .5h11.996z'/%3E%3C/svg%3E");
}

input:disabled,
textarea:disabled,
select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.page {
  max-width: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}

.header {
  display: none;
}

#app-layout:not(.hidden) ~ .header,
.layout:not(.hidden) ~ .header {
  display: none;
}

.header h1 {
  margin: 0 0 4px;
  font-size: 1.9rem;
}

.header p {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.card {
  margin-top: 0;
  padding: 80px 70px 100px;
  border-radius: 18px;
  background: var(--card-bg);
  background-image: radial-gradient(circle at top left, var(--card-bg), var(--card-bg));
  border: 1px solid var(--card-border);
  box-shadow: var(--shadow-xl);
  width: 100%;
  min-height: calc(100vh - 40px);
  box-sizing: border-box;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

[data-theme="light"] .card {
  box-shadow: 
    0 20px 25px -5px rgba(0, 0, 0, 0.08),
    0 10px 10px -5px rgba(0, 0, 0, 0.04),
    0 0 0 1px rgba(148, 163, 184, 0.1);
  border: 1px solid rgba(148, 163, 184, 0.15);
}

.card h2 {
  font-size: 2rem;
  margin: 0 0 16px;
  font-weight: 700;
}

.card p.muted {
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 24px;
}

.card-manual {
  margin-top: 0;
}

.card-config {
  margin-top: 0;
}

.controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin-bottom: 18px;
}

.primary-btn,
button.primary-btn {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 12px 24px;
  border-radius: 999px;
  border: 0;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #f9fafb;
  font-family: inherit;
  background-color: transparent;
  background-image: linear-gradient(135deg, #4f46e5, #7c3aed);
  box-shadow:
    0 12px 30px rgba(88, 80, 236, 0.5),
    0 0 0 1px rgba(129, 140, 248, 0.4);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition:
    transform 0.08s ease-out,
    box-shadow 0.08s ease-out,
    filter 0.08s ease-out;
}

[data-theme="light"] .primary-btn,
[data-theme="light"] button.primary-btn {
  box-shadow:
    0 10px 20px rgba(99, 102, 241, 0.3),
    0 0 0 1px rgba(99, 102, 241, 0.2);
}

[data-theme="light"] .primary-btn:hover,
[data-theme="light"] button.primary-btn:hover {
  box-shadow:
    0 12px 24px rgba(99, 102, 241, 0.4),
    0 0 0 1px rgba(99, 102, 241, 0.3);
}

.primary-btn:disabled {
  cursor: default;
  filter: grayscale(0.35);
  opacity: 0.85;
  box-shadow: 0 0 0 1px rgba(148, 163, 184, 0.3);
}

.primary-btn:not(:disabled):hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.primary-btn:not(:disabled):active {
  transform: translateY(0);
  box-shadow:
    0 6px 16px rgba(88, 80, 236, 0.55),
    0 0 0 1px rgba(129, 140, 248, 0.6);
}

.secondary-btn {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 10px 22px;
  border-radius: 999px;
  border: 1px solid var(--card-border);
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition:
    color 0.15s ease,
    border-color 0.15s ease,
    background-color 0.15s ease;
}

.secondary-btn:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(99, 102, 241, 0.08);
}

[data-theme="light"] .secondary-btn:hover {
  background: rgba(99, 102, 241, 0.12);
}

.secondary-btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.danger-btn {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding: 9px 18px;
  border-radius: 999px;
  border: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fee2e2;
  font-family: inherit;
  background-image: linear-gradient(135deg, #dc2626, #b91c1c);
  box-shadow:
    0 12px 30px rgba(239, 68, 68, 0.4),
    0 0 0 1px rgba(248, 113, 113, 0.4);
  cursor: pointer;
  transition:
    transform 0.08s ease-out,
    box-shadow 0.08s ease-out,
    filter 0.08s ease-out;
}

.danger-btn:disabled {
  cursor: default;
  filter: grayscale(0.4);
  opacity: 0.6;
  box-shadow: 0 0 0 1px rgba(248, 113, 113, 0.2);
}

.danger-btn:not(:disabled):hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
}

.danger-btn:not(:disabled):active {
  transform: translateY(0);
  box-shadow:
    0 6px 16px rgba(239, 68, 68, 0.5),
    0 0 0 1px rgba(248, 113, 113, 0.6);
}

.muted {
  font-size: 1.3rem;
  color: var(--muted);
}

.status-block {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px dashed rgba(148, 163, 184, 0.4);
}

.status-block h2 {
  margin: 0 0 4px;
  font-size: 1.1rem;
  color: var(--text);
}

.status-block h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
}

.status-block p {
  margin: 4px 0;
  font-size: 0.95rem;
  color: var(--text);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--text);
  letter-spacing: 0.06em;
}

.status-idle {
  background: rgba(148, 163, 184, 0.2);
  color: var(--idle);
}

[data-theme="light"] .status-idle {
  background: rgba(148, 163, 184, 0.15);
  color: #475569;
}

.status-running {
  background: rgba(250, 204, 21, 0.18);
  color: var(--running);
}

.status-finished {
  background: rgba(74, 222, 128, 0.16);
  color: var(--finished);
}

.status-error {
  background: rgba(248, 113, 113, 0.16);
  color: var(--error);
}

.error-line {
  min-height: 1.2em;
  font-size: 0.95rem;
  color: var(--error);
  font-weight: 500;
}

.hint {
  margin-top: 24px;
  font-size: 1.3rem;
  color: var(--muted);
}

code {
  font-family: "SF Mono", ui-monospace, Menlo, Monaco, Consolas, "Liberation Mono",
    "Courier New", monospace;
  font-size: 0.9em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(30, 64, 175, 0.6);
}

[data-theme="light"] code {
  background: rgba(241, 245, 249, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #1e293b;
}

@media (max-width: 600px) {
  .card {
    padding: 16px 14px 20px;
  }

  .header h1 {
    font-size: 1.6rem;
  }
}

.manual-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 20px;
}

.manual-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.95rem;
}

.manual-form span {
  color: var(--muted);
}

.manual-form input,
.manual-form textarea,
.manual-form select {
  border-radius: 10px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  padding: 10px 14px;
  font-size: 1rem;
  outline: none;
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}

.manual-form input:focus,
.manual-form textarea:focus,
.manual-form select:focus {
  border-color: rgba(129, 140, 248, 0.9);
  box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.6);
}

/* Manual mode rich selects / inputs row */
.manual-form .grid-2 label {
  padding: 8px 10px;
  border-radius: 12px;
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.7));
  border: 1px solid rgba(31, 41, 55, 0.9);
  box-shadow:
    0 10px 20px rgba(15, 23, 42, 0.8),
    0 0 0 1px rgba(17, 24, 39, 0.9);
}

.manual-form .field-note {
  font-size: 1.1rem;
  opacity: 0.8;
}

.manual-form select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 32px;
  background-image:
    linear-gradient(to right, rgba(79, 70, 229, 0.8), rgba(56, 189, 248, 0.8)),
    url("data:image/svg+xml,%3Csvg width='10' height='6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='%23e5e7eb' d='M0 0l5 6 5-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat, no-repeat;
  background-position: 0 0, right 10px center;
  background-size: 0 0, 10px 6px;
}

.manual-form select:focus {
  background-size: 0 0, 10px 6px;
}

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

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

.controls-bottom {
  margin-top: 6px;
}

.output-block {
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px dashed rgba(148, 163, 184, 0.4);
  font-size: 0.92rem;
}

.log-block {
  margin-top: 16px;
}

.log-block h3 {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

[data-theme="light"] .log-block h3 {
  color: var(--text);
}

.log-terminal {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.3);
  border-radius: 10px;
  padding: 12px;
  font-family: "SF Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  color: #e5e7eb;
  height: 180px;
  overflow-y: auto;
  white-space: pre-wrap;
  line-height: 1.5;
}

[data-theme="light"] .log-terminal {
  background: #1e293b;
  border: 1px solid rgba(148, 163, 184, 0.3);
  color: #e2e8f0;
}

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

.output-item h4 {
  margin: 0 0 4px;
  font-size: 0.9rem;
  font-weight: 600;
}

.output-link {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #a5b4fc;
}

.article-item {
  grid-column: 1 / -1;
}

.output-thumb-wrap {
  margin-top: 6px;
  padding: 6px;
  border-radius: 12px;
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.9), rgba(15, 23, 42, 0.7));
  border: 1px solid rgba(30, 64, 175, 0.65);
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: center;
}

.output-thumb {
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 8px;
}

.output-thumb-actions {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: nowrap;
}

.output-download {
  flex: 1;
  text-align: center;
  font-size: 0.8rem;
  color: #e5e7eb;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  text-decoration: none;
}

.output-download:hover {
  border-color: rgba(129, 140, 248, 0.9);
}

/* primary buttons (sheet run, manual run, save config) share same style */

.output-block h3 {
  margin: 0 0 6px;
  font-size: 1.0rem;
}

.output-block ul {
  margin: 0;
  padding-left: 16px;
  list-style: disc;
}

.output-block li {
  margin-bottom: 3px;
}

.output-block a {
  color: #a5b4fc;
  text-decoration: none;
}

.output-block a:hover {
  text-decoration: underline;
}

.config-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 24px;
}

.config-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.95rem;
}

.config-form span {
  color: var(--muted);
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.95rem;
  line-height: 1.3;
}

.checkbox-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: #7c3aed;
}

.scheduler-trigger {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px dashed rgba(99, 102, 241, 0.35);
  background: rgba(15, 23, 42, 0.25);
}

[data-theme="light"] .scheduler-trigger {
  background: rgba(241, 245, 249, 0.85);
  border-color: rgba(99, 102, 241, 0.2);
}

.scheduler-trigger-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: radial-gradient(circle at top, rgba(99, 102, 241, 0.9), rgba(67, 56, 202, 0.75));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow:
    0 8px 18px rgba(99, 102, 241, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.scheduler-trigger-btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 12px 28px;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #7c3aed, #4338ca);
  box-shadow:
    0 12px 26px rgba(67, 56, 202, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  cursor: pointer;
  transition:
    transform 0.12s ease,
    box-shadow 0.12s ease;
}

.scheduler-trigger-btn:hover {
  transform: translateY(-1px);
  box-shadow:
    0 16px 32px rgba(67, 56, 202, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

.scheduler-trigger-btn:active {
  transform: translateY(0);
}

.scheduler-trigger-note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.pinterest-schedule {
  margin-top: 32px;
  padding: 20px 24px;
  border-radius: 20px;
  border: 1px solid rgba(99, 102, 241, 0.25);
  background: radial-gradient(circle at top left, rgba(8, 10, 22, 0.9), rgba(8, 10, 22, 0.7));
  box-shadow:
    0 20px 35px rgba(2, 6, 23, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

[data-theme="light"] .pinterest-schedule {
  background: rgba(255, 255, 255, 0.95);
  border-color: rgba(148, 163, 184, 0.35);
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.08);
}

.pinterest-schedule-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 18px;
}

.pinterest-schedule-header h3 {
  margin: 0;
  font-size: 1.2rem;
}

.pinterest-schedule .schedule-grid {
  margin-top: 12px;
}

.scheduler-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 900;
}

.scheduler-modal.active {
  display: flex;
}

.scheduler-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(4px);
}

.scheduler-modal-dialog {
  position: relative;
  max-width: 960px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  background: radial-gradient(circle at top left, rgba(8, 10, 22, 0.98), rgba(8, 10, 22, 0.92));
  border-radius: 28px;
  border: 1px solid rgba(99, 102, 241, 0.3);
  padding: 28px 32px;
  box-shadow:
    0 25px 65px rgba(2, 6, 23, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .scheduler-modal-dialog {
  background: rgba(255, 255, 255, 0.98);
}

.scheduler-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.scheduler-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.scheduler-form-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
}

.domain-manager {
  margin-top: 48px;
  padding: 28px 32px;
  border-radius: 28px;
  border: 1px solid rgba(99, 102, 241, 0.25);
  background: radial-gradient(circle at top left, rgba(8, 10, 22, 0.95), rgba(6, 7, 14, 0.92));
  box-shadow:
    0 25px 45px rgba(3, 4, 12, 0.6),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

[data-theme="light"] .domain-manager {
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.98), rgba(237, 242, 255, 0.92));
  border-color: rgba(99, 102, 241, 0.15);
}

.domain-manager-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 22px;
}

.domain-manager-header h3 {
  margin: 0;
  font-size: 1.5rem;
}

.domain-manager-header p {
  margin: 4px 0 0;
  max-width: 640px;
}

.domain-list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.domain-list.compact {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.domain-pill {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 16px 34px;
  min-width: 440px;
  justify-content: center;
  border-radius: 22px;
  border: 1px solid rgba(99, 102, 241, 0.45);
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.18), rgba(59, 130, 246, 0.06));
  color: var(--text);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
  box-shadow:
    0 12px 25px rgba(2, 5, 18, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.domain-pill strong {
  font-size: 1.08rem;
  text-align: center;
}

.domain-pill:hover {
  transform: translateY(-2px);
  border-color: rgba(99, 102, 241, 0.8);
  box-shadow:
    0 18px 30px rgba(2, 5, 18, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.domain-pill::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #a5b4fc, #818cf8);
  box-shadow: 0 0 12px rgba(129, 140, 248, 0.7);
}

[data-theme="light"] .domain-pill {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.12), rgba(59, 130, 246, 0.04));
  border-color: rgba(99, 102, 241, 0.25);
  color: #0f172a;
}

.domain-empty {
  color: var(--muted);
  font-size: 0.95rem;
}

.domain-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.domain-modal.active {
  display: flex;
}

.domain-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 18, 0.75);
  backdrop-filter: blur(6px);
}

.domain-modal-dialog {
  position: relative;
  max-width: 900px;
  width: calc(100% - 40px);
  background: #070813;
  border-radius: 28px;
  border: 1px solid rgba(99, 102, 241, 0.4);
  box-shadow: 0 25px 80px rgba(3, 4, 12, 0.9);
  padding: 30px;
  z-index: 1001;
}

[data-theme="light"] .domain-modal-dialog {
  background: #ffffff;
  border-color: rgba(99, 102, 241, 0.2);
}

.domain-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.domain-modal-header h3 {
  margin: 0;
  font-size: 1.35rem;
}

.icon-btn {
  appearance: none;
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 1.4rem;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.domain-form {
  max-height: 70vh;
  overflow-y: auto;
  padding-right: 4px;
}

.domain-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-bottom: 14px;
}

.domain-form-grid-wide {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.domain-form-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.domain-form textarea {
  min-height: 110px;
}

.domain-form-actions {
  align-items: center;
}

.domain-select {
  display: block;
  margin-bottom: 20px;
}

.domain-select select {
  width: 100%;
}

.grid-3 {
  display: grid;
  grid-template-columns: minmax(0, 2.2fr) minmax(0, 1.1fr) minmax(0, 1.1fr);
  gap: 10px;
}

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

/* Design Controls Wrapper - Split Layout */
.design-controls-wrapper {
  display: grid;
  grid-template-columns: minmax(0, 560px) minmax(0, 720px);
  gap: 100px;
  margin-top: 0;
  max-width: 1400px;
  margin-right: auto;
  align-items: start;
  align-content: start;
}

@media (max-width: 1200px) {
  .design-controls-wrapper {
    grid-template-columns: 1fr;
  }
  .design-preview-panel {
    margin-top: 30px;
  }
}

.design-controls-left {
  display: flex;
  flex-direction: column;
  gap: 0;
  max-width: 700px;
}

/* Tabs above the wrapper */
#design-controls-card .config-tabs {
  margin-bottom: 16px;
  margin-top: 0;
}

.design-controls-form-left {
  min-width: 0;
  margin-top: 0;
}

.design-controls-form-left .config-tab-panel {
  padding-top: 0;
}

.design-preview-panel {
  position: sticky;
  top: 20px;
  height: fit-content;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 24px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  align-self: start;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  margin-top: 0;
}

.design-preview-panel h3 {
  margin-top: 0;
  padding-top: 0;
  margin-bottom: 12px;
  height: fit-content;
  line-height: 1.2;
}

/* Reduce padding for design controls card */
#design-controls-card.card {
  padding: 40px 50px 60px;
}

/* Design Controls List Layout */
.design-controls-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 0;
}

.design-controls-list label {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-radius: 8px;
  background: radial-gradient(circle at top left, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.7));
  border: 1px solid rgba(31, 41, 55, 0.9);
  box-shadow:
    0 10px 20px rgba(15, 23, 42, 0.8),
    0 0 0 1px rgba(17, 24, 39, 0.9);
  transition: background-color 0.3s ease, border-color 0.3s ease;
  justify-content: flex-start;
  flex-wrap: nowrap;
}

[data-theme="light"] .design-controls-list label {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.design-controls-list label > span:first-child {
  font-weight: 500;
  color: var(--text);
  text-align: left;
  flex-shrink: 0;
  display: inline-block;
  font-size: 0.9rem;
  white-space: nowrap;
  margin: 0;
  padding: 0;
}

.design-controls-list label input,
.design-controls-list label select {
  width: 100px;
  max-width: 100px;
  flex: 0 0 200px;
  margin: 0;
  padding: 6px 10px;
  font-size: 0.9rem;
  display: inline-block;
  vertical-align: middle;
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 6px;
  color: var(--text);
}

.design-controls-list label select {
  cursor: pointer;
  appearance: auto;
  -webkit-appearance: menulist;
  -moz-appearance: menulist;
  background-image: none;
  padding-right: 30px; /* Space for dropdown arrow */
  background-repeat: no-repeat;
  background-position: right 8px center;
}

.design-controls-list label select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

/* Ensure select looks like a dropdown, not a text input */
.design-controls-list label select option {
  background: var(--input-bg);
  color: var(--text);
  padding: 8px;
}

.design-controls-list .field-note {
  margin-left: auto;
  margin-top: 0;
  font-size: 0.75rem;
  opacity: 0.7;
  white-space: nowrap;
  padding: 4px 8px;
}

/* Design Preview Panel */
.design-preview-panel {
  position: sticky;
  top: 20px;
  height: fit-content;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.design-preview-panel h3 {
  margin: 0 0 12px 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.preview-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.preview-box {
  background: var(--bg);
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 20px;
  min-height: 320px;
  max-height: none;
  overflow: visible;
}

.preview-box h4 {
  margin: 0 0 10px 0;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 180px;
  text-align: center;
  border: 2px dashed var(--card-border);
  border-radius: 8px;
  padding: 16px;
}

.preview-placeholder p {
  margin: 0;
  font-size: 0.85rem;
}

.preview-inputs {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.preview-input-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.preview-input-group label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.preview-input-group label > span {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
}

.preview-input-group input {
  width: 100%;
  padding: 8px 12px;
  font-size: 0.9rem;
  border-radius: 6px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.preview-input-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-soft);
}

.preview-input-group input::placeholder {
  color: var(--muted);
}

/* Inline tips / notes */
.info-note {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.4);
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text);
}

[data-theme="light"] .info-note {
  background: rgba(59, 130, 246, 0.06);
  border-color: rgba(59, 130, 246, 0.5);
}

.field-note {
  display: inline-flex;
  align-items: center;
  margin-top: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 1.1rem;
  color: rgba(148, 163, 184, 0.95);
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
}

.field-note.ok {
  color: #e0e7ff;
  background: radial-gradient(circle at top left, rgba(129, 140, 248, 0.4), rgba(79, 70, 229, 0.9));
  border-color: rgba(129, 140, 248, 0.9);
}

.hidden {
  display: none;
}

.auth-card {
  margin-top: 24px;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 10px;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.92rem;
}

.auth-form span {
  color: var(--muted);
}

.auth-form input {
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.5);
  background: rgba(15, 23, 42, 0.95);
  color: var(--text);
  padding: 7px 9px;
  font-size: 0.95rem;
  outline: none;
}

.auth-form input:focus {
  border-color: rgba(129, 140, 248, 0.9);
  box-shadow: 0 0 0 1px rgba(129, 140, 248, 0.6);
}

.auth-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}

.auth-actions button {
  padding: 7px 16px;
  border-radius: 999px;
  border: none;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
}

#auth-login {
  color: white;
  background-image: linear-gradient(135deg, #4f46e5, #7c3aed);
}

#auth-register {
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(148, 163, 184, 0.6);
}

.app-main {
  margin-top: 0;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.app-main > .card:first-child {
  margin-top: 0;
}

#admin-card .output-block {
  margin-top: 10px;
}

#admin-users-list {
  list-style: none;
  padding-left: 0;
  margin: 0;
  font-size: 0.88rem;
}

#admin-users-list li {
  margin-bottom: 6px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}

.admin-user-main {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.admin-user-meta {
  font-size: 0.8rem;
  opacity: 0.8;
}

.badge {
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  border: 1px solid rgba(74, 222, 128, 0.7);
  color: #bbf7d0;
  font-size: 0.72rem;
}

.admin-user-actions {
  display: inline-flex;
  gap: 6px;
}

.admin-user-actions button {
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.6);
  background: rgba(15, 23, 42, 0.9);
  color: #e5e7eb;
  font-size: 0.75rem;
  padding: 3px 9px;
  cursor: pointer;
}

#google-connect-btn {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.7);
  background: radial-gradient(circle at top left, rgba(56, 189, 248, 0.3), rgba(8, 47, 73, 0.95));
  color: #e0f2fe;
  font-size: 0.9rem;
  cursor: pointer;
}

.layout {
  margin-top: 0;
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 30px;
  max-width: 100%;
  width: 100%;
  margin-left: 0;
  margin-right: 0;
  padding: 20px 24px;
  align-items: start;
  min-height: 100vh;
}

.sidebar {
  border-radius: 18px;
  background: var(--sidebar-bg);
  background-image: radial-gradient(circle at top left, var(--sidebar-bg), var(--sidebar-bg));
  border: 1px solid rgba(30, 64, 175, 0.7);
  padding: 32px 40px 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-height: fit-content;
  height: fit-content;
  position: sticky;
  top: 20px;
  width: 100%;
  transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  box-shadow: var(--shadow-lg);
}

[data-theme="light"] .sidebar {
  border: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 
    0 10px 15px -3px rgba(0, 0, 0, 0.08),
    0 4px 6px -2px rgba(0, 0, 0, 0.04),
    0 0 0 1px rgba(148, 163, 184, 0.1);
  background: #ffffff;
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 12px 10px 16px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(99, 102, 241, 0.2);
}

.sidebar-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  border-radius: 999px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

/* Fallback for text logo if image doesn't load */
.sidebar-logo:not([src]) {
  background: radial-gradient(circle at top left, #4f46e5, #22c55e);
  font-weight: 700;
  font-size: 1.1rem;
  color: #f9fafb;
}

.sidebar-title {
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text);
  letter-spacing: -0.02em;
  text-align: center;
  width: 100%;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-top: 12px;
  margin-bottom: 4px;
  background: var(--accent-soft);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  cursor: pointer;
  user-select: none;
  transition: all 0.2s ease;
  width: 100%;
  text-align: left;
}

.sidebar-section-title:hover {
  color: var(--text);
  background: var(--accent-soft);
  border-color: var(--accent);
}

[data-theme="light"] .sidebar-section-title {
  background: rgba(99, 102, 241, 0.06);
  border-color: rgba(148, 163, 184, 0.2);
}

[data-theme="light"] .sidebar-section-title:hover {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.3);
}

.sidebar-section-title:active {
  background: rgba(99, 102, 241, 0.2);
}

.sidebar-section-title .menu-arrow {
  font-size: 0.7rem;
  margin-left: 8px;
}

.sidebar-section-links {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-left: 24px;
  padding-top: 6px;
  padding-bottom: 6px;
  margin-top: 6px;
  margin-bottom: 8px;
}

.sidebar-section-links.collapsed {
  display: none !important;
}

.sidebar-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
  padding-left: 4px;
}

.sidebar-group-label {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
  opacity: 0.85;
  padding-left: 8px;
}

.sidebar-sublinks {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-left: 18px;
  margin: 2px 0 4px;
}

.sidebar-sublinks::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 4px;
  bottom: 4px;
  width: 1.5px;
  border-radius: 999px;
  background: rgba(99, 102, 241, 0.35);
}

.sidebar-sublink {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 8px 12px;
  border-radius: 10px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
}

.sidebar-sublink::before {
  content: "";
  position: absolute;
  left: -12px;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.6);
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.18);
}

.sidebar-sublink:hover {
  color: var(--text);
  background: rgba(99, 102, 241, 0.12);
  transform: translateX(2px);
}

.sidebar-sublink.active {
  color: #ffffff;
  background: linear-gradient(135deg, #7c3aed, #4338ca);
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.3),
    0 6px 16px rgba(99, 102, 241, 0.25);
}

[data-theme="light"] .sidebar-sublink:hover {
  background: rgba(99, 102, 241, 0.2);
}

[data-theme="light"] .sidebar-sublink.active {
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.25),
    0 6px 14px rgba(99, 102, 241, 0.2);
}

.sidebar-link {
  text-align: left;
  border-radius: 8px;
  padding: 12px 16px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: block;
  width: 100%;
}

.sidebar-link:hover {
  background: var(--accent-soft);
  color: var(--text);
  transform: translateX(2px);
}

.sidebar-link.active {
  color: #ffffff;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.3),
    0 4px 12px rgba(99, 102, 241, 0.25);
  font-weight: 500;
}

[data-theme="light"] .sidebar-link.active {
  color: #ffffff;
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.2),
    0 4px 12px rgba(99, 102, 241, 0.2);
}

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

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

  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* Ensure hidden always wins, even over layout/grid rules */
.hidden {
  display: none !important;
}

/* Theme toggle button */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1px solid var(--card-border);
  background: var(--input-bg);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-bottom: 8px;
  width: 100%;
}

.theme-toggle:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.theme-icon {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
}

.theme-toggle:hover .theme-icon {
  transform: rotate(15deg);
}



.config-tabs {
  display: inline-flex;
  padding: 8px;
  border-radius: 999px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  margin-top: 12px;
  gap: 4px;
  box-shadow: var(--shadow-sm);
}

[data-theme="light"] .config-tabs {
  background: #f8fafc;
  border-color: rgba(148, 163, 184, 0.2);
}

.config-tab {
  border: none;
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
  transition:
    background 0.12s ease-out,
    color 0.12s ease-out,
    box-shadow 0.12s ease-out,
    transform 0.08s ease-out;
}

.config-tab.active {
  color: #ffffff;
  background: linear-gradient(135deg, #6366f1, #4f46e5);
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.3),
    0 4px 12px rgba(99, 102, 241, 0.3);
}

[data-theme="light"] .config-tab.active {
  box-shadow:
    0 0 0 1px rgba(99, 102, 241, 0.2),
    0 4px 12px rgba(99, 102, 241, 0.25);
}

.config-tab:not(.active):hover {
  color: var(--text);
  background: var(--accent-soft);
}

.config-tab-panel {
  display: none;
  padding-top: 24px;
}

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




