:root {
  --bg: #ecf2fb;
  --card: #ffffff;
  --ink: #0b1738;
  --muted: #475569;
  --accent: #1d4ed8;
  --accent-2: #2563eb;
  --accent-3: #0470f0;
  --cyan: #0ea5e9;
  --line: #d6e2f2;
  --focus: rgba(37, 99, 235, 0.18);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: "Inter", "Poppins", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top right, rgba(4, 112, 240, 0.2), transparent 42%),
    linear-gradient(180deg, #f7faff, var(--bg));
  padding-bottom: 84px;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 90;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  padding: 8px 14px;
  border-bottom: 1px solid #b8ccef;
  background:
    linear-gradient(90deg, rgba(248, 251, 255, 0.92) 0%, rgba(215, 231, 255, 0.72) 25%, rgba(215, 231, 255, 0.08) 46%, rgba(215, 231, 255, 0) 58%),
    radial-gradient(circle at 12% 44%, rgba(56, 189, 248, 0.22), rgba(56, 189, 248, 0) 34%),
    linear-gradient(90deg, #2b60b2 0%, #1f57b3 38%, #1f67d8 100%);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.2);
}
.topbar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0));
}
.topbar a { color: #fff; text-decoration: none; margin-right: 14px; font-weight: 700; }
.topbar .brand {
  margin-right: 10px;
  display: inline-flex;
  align-items: center;
  gap: 0;
}
.brand-wordmark-img {
  width: 210px;
  height: 60px;
  max-width: 210px;
  max-height: 60px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 5px rgba(30, 58, 138, 0.2));
}
.topbar-nav {
  display: flex;
  align-items: center;
  gap: 2px;
}
.topbar-nav a {
  margin-right: 0;
  border-radius: 10px;
  padding: 8px 10px;
  color: #f6f9ff;
}
.topbar-nav a:hover {
  background: rgba(255,255,255,0.15);
}
.container { max-width: 1080px; margin: 24px auto; padding: 0 18px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.08);
  margin-bottom: 18px;
}
h1, h2, h3 { margin-top: 0; }
h1, h2, h3, h4 { font-family: "Poppins", "Inter", "Segoe UI", sans-serif; }
input, select, textarea {
  width: 100%; padding: 10px; margin-bottom: 10px;
  border: 1px solid #c8d7ea; border-radius: 8px;
  background: #ffffff;
  color: var(--ink);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px var(--focus);
}
input[type="checkbox"] { width: auto; margin: 0 8px 0 0; }
input[type="color"] {
  -webkit-appearance: auto;
  appearance: auto;
  width: 48px;
  height: 36px;
  padding: 0;
  border: 1px solid #9fb2c8;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 0;
  background: transparent;
}
button {
  background: linear-gradient(135deg, var(--accent-2), var(--accent-3)); color: white; border: 0; border-radius: 10px;
  padding: 10px 14px; font-weight: 700; cursor: pointer;
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.25);
}
button:hover {
  filter: brightness(1.05);
}
@media (max-width: 980px) {
  .topbar {
    flex-wrap: wrap;
    padding: 8px 10px;
  }
  .brand-wordmark-img {
    width: 180px;
    height: 52px;
    max-width: 180px;
    max-height: 52px;
  }
}
@media (max-width: 760px) {
  .brand-wordmark-img {
    width: 150px;
    height: 42px;
    max-width: 150px;
    max-height: 42px;
  }
  .topbar-nav {
    width: 100%;
    flex-wrap: wrap;
    gap: 6px;
  }
  .topbar-nav a {
    padding: 6px 8px;
    font-size: 13px;
  }
}
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.badge { background: #e2e8f0; border-radius: 30px; display: inline-block; padding: 4px 10px; font-size: 12px; }
.error { color: #b91c1c; font-weight: 700; }
.success { color: #047857; font-weight: 700; }
.small { color: var(--muted); font-size: 13px; }
code { background: #e2e8f0; padding: 2px 5px; border-radius: 4px; }
.inline-checks { display: grid; gap: 8px; margin: 8px 0 12px; }
.inline-checks label { display: flex; align-items: center; font-size: 14px; }
.font-style-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 8px 0 12px;
}
.font-style-btn {
  min-width: 38px;
  height: 36px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #b7c6d8;
  background: #ffffff;
  color: #0f172a;
}
.font-style-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}
.font-style-btn.is-disabled {
  opacity: 0.45;
}
.zoom-field { display: grid; gap: 6px; }
.canvas-zoom-controls {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto auto;
  gap: 8px;
  align-items: center;
}
.canvas-zoom-controls input[type="range"] {
  width: 100%;
  margin: 0;
}
.builder-toolbar { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; align-items: end; }
.builder-toolbar label { font-size: 13px; color: var(--muted); }
.builder-toolbar input { width: 120px; margin: 4px 0 0; }
.builder-canvas-wrap { overflow: auto; border: 1px solid #cbd5e1; border-radius: 10px; background: #f1f5f9; padding: 10px; }
.builder-canvas-stage { position: relative; }
.layout-editor { position: relative; border: 1px dashed #64748b; border-radius: 8px; overflow: hidden; }
.builder-layer { position: absolute; cursor: move; user-select: none; }
.builder-layer.layer-countdown,
.builder-layer.layer-subtitle,
.builder-layer.layer-text {
  padding: 0;
  border: 1px dashed rgba(255,255,255,0.6);
  background: rgba(15, 23, 42, 0.22);
  border-radius: 6px;
  white-space: nowrap;
  line-height: 1;
}
.builder-layer.selected { outline: 2px solid #38bdf8; }
.layer-resize-handle {
  position: absolute;
  width: 10px;
  height: 10px;
  right: -5px;
  bottom: -5px;
  border: 1px solid #0369a1;
  background: #e0f2fe;
  border-radius: 2px;
  cursor: nwse-resize;
}
.builder-layer.layer-background {
  border: 2px dashed rgba(255,255,255,0.4);
  background: rgba(255,255,255,0.1);
}
.layer-chip {
  position: absolute; top: 6px; left: 6px; font-size: 11px;
  background: rgba(15,23,42,0.65); color: #fff; padding: 2px 6px; border-radius: 999px;
}
.builder-grid { margin-top: 12px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.builder-columns {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: start;
}
.builder-panel {
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 10px;
  background: #fff;
}
.builder-props label { display: block; margin-bottom: 8px; }
.builder-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.template-add-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.layer-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; border: 1px solid #cbd5e1; border-radius: 8px; padding: 6px; margin-bottom: 8px; background: #fff; }
.layer-row.selected { border-color: #0ea5e9; box-shadow: 0 0 0 2px rgba(14,165,233,0.2); }
.layer-btn { background: transparent; color: var(--ink); padding: 6px 8px; border-radius: 6px; font-size: 13px; }
.layer-row-controls { display: flex; gap: 6px; }
.layer-row-controls button { padding: 6px 8px; font-size: 12px; }
.builder-fields label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.builder-fields { display: grid; gap: 10px; }
.layer-visibility-btn {
  width: 30px;
  min-width: 30px;
  height: 30px;
  padding: 0;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #f8fafc;
  color: #64748b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.layer-visibility-btn.is-on {
  color: #ffffff;
  background: #0f172a;
  border-color: #0f172a;
}
.layer-visibility-btn.is-off {
  color: #94a3b8;
  background: #e2e8f0;
  border-color: #cbd5e1;
}

.countdown-head { margin-bottom: 12px; }
.embed-row label { font-weight: 700; display: block; margin-bottom: 6px; }
.embed-copy-wrap { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.copy-btn { white-space: nowrap; }
.copy-icon { margin-right: 4px; }

.builder-section { margin: 16px 0; padding: 14px; border: 1px solid #dbe2ea; border-radius: 12px; background: #fbfdff; }
.builder-section h2 { margin: 0 0 10px; }
.editor-shell-card {
  width: calc(100vw - 28px);
  margin-left: calc(50% - 50vw + 14px);
  margin-right: calc(50% - 50vw + 14px);
}
.builder-section-workbench {
  padding: 10px;
  background: linear-gradient(180deg, #eef2ff, #e8ecff);
}
.editor-workbench {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 360px;
  gap: 10px;
  min-height: 72vh;
}
.create-workbench {
  min-height: 64vh;
}
.create-workbench .editor-left-panel,
.create-workbench .editor-centre-panel,
.create-workbench .editor-right-panel {
  min-height: 560px;
}
.create-workbench #layer_type {
  pointer-events: none;
  opacity: 0.55;
}
.editor-left-panel,
.editor-centre-panel,
.editor-right-panel {
  border: 1px solid #cad3e2;
  border-radius: 12px;
  background: #f9fbff;
  padding: 10px;
}
.editor-centre-panel {
  background: linear-gradient(180deg, #f3f4ff, #edf1ff);
}
.editor-canvas-surface {
  background: #dbe0f4;
  border-color: #b6bfd9;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 16px;
  position: relative;
}
.editor-canvas-surface .builder-canvas-stage {
  flex: 0 0 auto;
  position: relative;
}
.editor-loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  background: rgba(231, 237, 253, 0.58);
}
.editor-loading-canvas {
  width: 100%;
  height: 100%;
  border: 1px dashed #94a3b8;
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(255,255,255,0.66), rgba(241,245,249,0.66));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #1e293b;
  font-weight: 700;
  text-align: center;
}
.editor-spinner {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid #c8d4f2;
  border-top-color: #328cc1;
  animation: editorSpin .8s linear infinite;
}
@keyframes editorSpin {
  to { transform: rotate(360deg); }
}
.layer-group-row {
  margin: 8px 0 6px;
}
.layer-group-toggle {
  width: 100%;
  text-align: left;
  border: 1px solid #d4c7f5;
  background: #f5f0ff;
  color: #5b3bb6;
}

.core-row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.core-row-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.font-confirm-wrap { display: grid; gap: 8px; align-content: start; }
.font-list { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #cbd5e1; }

.builder-toolbar-wide { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; align-items: end; }
.builder-toolbar-wide input { margin-top: 6px; }

.builder-grid-split { margin-top: 12px; display: grid; grid-template-columns: 330px 1fr; gap: 14px; }
.layer-add-buttons {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.layer-add-buttons button {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.layer-row-canvas .layer-btn {
  font-weight: 800;
}
.property-group {
  border: 1px solid #d4deeb;
  border-radius: 10px;
  background: #ffffff;
  padding: 0;
  overflow: hidden;
}
.property-group-readonly {
  padding: 10px 12px;
}
.property-group-readonly h4 {
  margin: 0;
}
.property-accordion-toggle {
  width: 100%;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fbff;
  color: #0f172a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  padding: 10px 12px;
  font-size: 14px;
}
.property-accordion-body {
  padding: 10px 12px;
}
.property-group.is-collapsed .property-accordion-body {
  display: none;
}
.panel-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  background: #e2eef9;
  color: #0f172a;
  border: 1px solid #b7ccdf;
  padding: 8px 10px;
  margin: 0 0 10px;
}
.panel-toggle .arrow { font-size: 12px; }
.panel-box {
  border: 1px solid #d0dce8;
  border-radius: 10px;
  padding: 10px;
  background: #f8fbff;
}
.panel-box.is-hidden { display: none; }
.is-hidden { display: none !important; }
.preview-box {
  margin-top: 10px;
  border: 1px solid #dbe2ea;
  border-radius: 10px;
  padding: 10px;
  background: #f8fbff;
}
.preview-box img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  background: #0f172a;
}
.preview-dirty {
  margin: 0 0 8px;
  color: #92400e;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 13px;
  font-weight: 700;
}
.editor-bottom-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  background: #ffffff;
  border-top: 1px solid #cbd5e1;
  box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.08);
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.editor-bottom-bar .preview-dirty {
  margin: 0;
  flex: 1;
}
.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.font-picker {
  position: relative;
  margin-bottom: 8px;
}
.font-picker-toggle {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
}
.font-picker-label {
  max-width: calc(100% - 28px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.font-picker-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 80;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(2, 6, 23, 0.16);
  padding: 8px;
}
.font-picker-panel input {
  margin: 0 0 8px;
}
.font-picker-list {
  max-height: 220px;
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
}
.font-picker-option {
  width: 100%;
  text-align: left;
  background: #ffffff;
  color: #0f172a;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  padding: 8px 10px;
  font-weight: 500;
}
.font-picker-option:hover,
.font-picker-option.is-active {
  background: #e0f2fe;
}

.notice {
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
}
.notice-info { border-color: #93c5fd; background: #eff6ff; }
.notice-success { border-color: #86efac; background: #f0fdf4; }
.notice-warning { border-color: #fcd34d; background: #fffbeb; }
.notice-danger { border-color: #fca5a5; background: #fef2f2; }

.admin-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.admin-nav a {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #cbd5e1;
  text-decoration: none;
  color: #0f172a;
  background: #f8fafc;
}
.admin-nav a.is-active {
  background: #0b3c5d;
  color: #fff;
  border-color: #0b3c5d;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 940px;
}
.admin-table th,
.admin-table td {
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  padding: 8px 6px;
  vertical-align: top;
}

.inline-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 4px 4px 0;
}
.inline-form input,
.inline-form select {
  margin: 0;
  width: auto;
  min-width: 88px;
  padding: 6px 8px;
}
.inline-form button {
  padding: 6px 8px;
  font-size: 12px;
}

.danger-btn {
  background: #b91c1c;
}

.admin-grid {
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}
.admin-grid-2 {
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.admin-form-grid.compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.admin-form-grid button {
  width: max-content;
}

.bool-radios {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-top: 6px;
}
.bool-radios label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 740px) {
  .admin-form-grid {
    grid-template-columns: 1fr;
  }
}

.lp-home { position: relative; display: grid; gap: 20px; }
.lp-hero {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 18px;
  background: linear-gradient(135deg, #0b3c5d, #145374 60%, #328cc1);
  border-radius: 18px;
  padding: 24px;
  color: #f8fafc;
  box-shadow: 0 18px 34px rgba(2, 6, 23, 0.2);
}
.lp-hero .badge { background: rgba(255, 255, 255, 0.18); color: #f8fafc; }
.lp-hero h1 { font-size: clamp(34px, 5vw, 56px); margin-bottom: 10px; }
.lp-hero .small { color: #dbeafe; }
.lp-lead { font-size: 18px; line-height: 1.55; margin-bottom: 12px; }
.lp-tagline { margin-top: 10px; }
.lp-cta-row { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.lp-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 700;
}
.lp-btn-primary { background: #fbbf24; color: #111827; }
.lp-btn-secondary { background: rgba(255, 255, 255, 0.14); color: #f8fafc; border: 1px solid rgba(255, 255, 255, 0.35); }
.lp-showcase {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  padding: 12px;
}
.lp-showcase-frame {
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.82), rgba(30, 41, 59, 0.95));
  padding: 12px;
  min-height: 220px;
}
.lp-showcase-top { font-size: 13px; color: #bfdbfe; margin-bottom: 12px; }
.lp-showcase-banner {
  font-size: clamp(24px, 3.5vw, 34px);
  letter-spacing: 1px;
  margin-bottom: 16px;
  color: #60a5fa;
  animation: lpPulse 2.6s ease-in-out infinite;
}
.lp-showcase-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px dashed rgba(148, 163, 184, 0.45);
  padding-top: 8px;
  margin-top: 8px;
  font-size: 14px;
}
.lp-two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.lp-image-block {
  margin-top: 10px;
  border-radius: 10px;
  height: 110px;
  background: repeating-linear-gradient(135deg, #e2e8f0, #e2e8f0 12px, #f8fafc 12px, #f8fafc 24px);
  border: 1px solid #cbd5e1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #334155;
  font-weight: 700;
}
.lp-image-block-live {
  background: linear-gradient(135deg, #dcfce7, #bfdbfe);
  border-color: #7dd3fc;
}
.lp-list { margin: 0; padding-left: 18px; line-height: 1.6; }
.lp-section { padding-top: 22px; padding-bottom: 22px; }
.lp-airplane {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 40;
  color: #0ea5e9;
  font-size: 24px;
  pointer-events: none;
  text-shadow: 0 6px 16px rgba(14, 165, 233, 0.35);
}

.auth-shell { max-width: 560px; margin: 0 auto; }
.auth-shell .card h1 { margin-bottom: 8px; }
.auth-shell .small { margin-bottom: 14px; }

@keyframes lpPulse {
  0% { opacity: 0.84; }
  50% { opacity: 1; }
  100% { opacity: 0.84; }
}

.layer-row { cursor: grab; }
.layer-row:active { cursor: grabbing; }
.layer-row .layer-btn { text-align: left; width: 100%; }
.small-btn { padding: 6px 8px; font-size: 12px; }
.danger-btn { background: #b91c1c; color: #fff; }
.danger-btn:hover { background: #991b1b; }

.layer-image { border: 2px dashed rgba(255,255,255,0.6); background-color: rgba(255,255,255,0.12); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; }
.builder-layer-image {
  width: 100%;
  height: 100%;
  display: block;
  object-position: center;
  pointer-events: none;
}

.colour-field { display: grid; gap: 6px; }
.colour-input-wrap { display: inline-flex; align-items: center; gap: 6px; }
.colour-picker { width: 48px !important; }
.palette-mark { font-size: 16px; color: #0f172a; line-height: 1; }

@media (max-width: 980px) {
  .editor-workbench {
    grid-template-columns: 1fr;
  }
  .editor-shell-card {
    width: auto;
    margin-left: 0;
    margin-right: 0;
  }
  .core-row-3,
  .builder-toolbar-wide,
  .builder-grid-split {
    grid-template-columns: 1fr;
  }
  .lp-hero,
  .lp-two-col {
    grid-template-columns: 1fr;
  }
}

.wizard {
  border: 1px solid #d8e2ee;
  border-radius: 12px;
  padding: 14px;
  background: #fbfdff;
}
.wizard-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}
.wizard-progress span {
  display: block;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid #c8d6e6;
  background: #f1f5f9;
  color: #334155;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
.wizard-progress span.is-active {
  background: #0b3c5d;
  color: #fff;
  border-color: #0b3c5d;
}
.wizard-step {
  display: none;
  min-height: 260px;
  animation: wizardSlideIn .28s ease;
}
.wizard-step.is-active {
  display: block;
}
.wizard-step.slide-left {
  animation-name: wizardSlideInLeft;
}
.wizard-step.slide-right {
  animation-name: wizardSlideInRight;
}
.wizard-actions {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.wizard-submit-group {
  display: none;
  gap: 8px;
  margin-left: auto;
}
@keyframes wizardSlideIn {
  from { opacity: 0; transform: translateX(8px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes wizardSlideInLeft {
  from { opacity: 0; transform: translateX(36px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes wizardSlideInRight {
  from { opacity: 0; transform: translateX(-36px); }
  to { opacity: 1; transform: translateX(0); }
}

.countdown-wizard-editor .builder-toolbar-wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.countdown-editor-columns {
  display: grid;
  grid-template-columns: minmax(290px, 360px) minmax(0, 1fr);
  align-items: start;
}
.countdown-editor-columns .countdown-editor-layers { grid-column: 1; }
.countdown-editor-columns .countdown-editor-properties { grid-column: 2; }
.countdown-editor-layers,
.countdown-editor-properties {
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
}
.countdown-editor-properties .builder-props {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px;
}
.countdown-editor-properties .builder-props > label,
.countdown-editor-properties .builder-props > .builder-row-2,
.countdown-editor-properties .builder-props > .inline-checks,
.countdown-editor-properties .builder-props > p {
  margin: 0;
}
.countdown-editor-properties .builder-props > .builder-row-2,
.countdown-editor-properties .builder-props > .inline-checks,
.countdown-editor-properties .builder-props > label[id^="group_countdown_full_options"] {
  grid-column: 1 / -1;
}
.countdown-editor-properties .builder-props input,
.countdown-editor-properties .builder-props select {
  margin-bottom: 0;
}
@media (max-width: 980px) {
  .countdown-wizard-editor .builder-toolbar-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .countdown-editor-columns {
    grid-template-columns: 1fr;
  }
  .countdown-editor-properties .builder-props {
    grid-template-columns: 1fr;
  }
}

.wizard-progress-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.wizard-progress-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.wizard-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.wizard-choice {
  min-height: 180px;
  border: 1px solid #c7d5e6;
  border-radius: 14px;
  color: #0f172a;
  text-align: left;
  padding: 16px;
  background:
    radial-gradient(circle at 78% 18%, rgba(50,140,193,0.22), rgba(50,140,193,0) 50%),
    linear-gradient(135deg, #ffffff, #eaf2fb);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}
.wizard-choice.is-selected {
  border-color: #0b3c5d;
  box-shadow: 0 0 0 2px rgba(11, 60, 93, 0.15), 0 14px 30px rgba(15, 23, 42, 0.12);
}
.wizard-choice-title {
  display: block;
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 8px;
}
.wizard-choice-sub {
  display: block;
  font-size: 14px;
  color: #334155;
}
.template-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.template-card {
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  text-align: left;
  color: #0f172a;
  padding: 0;
}
.template-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid #e2e8f0;
}
.template-card-title {
  display: block;
  padding: 8px 10px 2px;
  font-weight: 700;
}
.template-card-meta {
  display: block;
  padding: 0 10px 10px;
  font-size: 12px;
  color: #475569;
}
.template-card.is-selected {
  border-color: #0b3c5d;
  box-shadow: 0 0 0 2px rgba(11, 60, 93, 0.15);
}
.countdown-wizard-editor .property-group {
  border: 1px solid #dbe3ee;
  border-radius: 10px;
  padding: 8px;
  background: #f8fbff;
  margin: 0;
}
.countdown-wizard-editor .property-group h4 {
  margin: 0 0 6px;
  font-size: 13px;
  color: #334155;
}
.property-image-box {
  grid-column: 1 / -1;
}
@media (max-width: 980px) {
  .builder-columns {
    grid-template-columns: 1fr;
  }
  .builder-row-2 {
    grid-template-columns: 1fr;
  }
  .wizard-choice-grid {
    grid-template-columns: 1fr;
  }
  .wizard-progress-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Dashboard v2 */
.dashboard-shell {
  --lp-blue-700: #1d4ed8;
  --lp-blue-600: #2563eb;
  --lp-blue-500: #0470f0;
  --lp-cyan-500: #0ea5e9;
  --lp-ink-900: #0b1738;
  --lp-ink-700: #334155;
  --lp-surface-1: #f3f7ff;
  --lp-surface-2: #ffffff;
  --lp-border: #d9e4f4;
  --lp-danger: #ef4444;
  font-family: "Inter", "Poppins", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  display: grid;
  gap: 16px;
}
.dashboard-top {
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
}
.dashboard-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  border-bottom: 1px solid var(--lp-border);
  background: var(--lp-surface-2);
}
.dashboard-top-title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  color: #1e2b4d;
}
.dashboard-user {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lp-brand {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0;
}
.lp-brand-wordmark-img {
  width: min(100%, 520px);
  min-width: 240px;
  height: auto;
  display: block;
  filter: drop-shadow(0 10px 22px rgba(4, 112, 240, 0.08));
}
.plan-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 66px;
  padding: 7px 14px;
  border-radius: 10px;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, var(--lp-blue-600), var(--lp-cyan-500));
}
.avatar-circle {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid #c8d8f2;
  color: var(--lp-ink-900);
  background: #eef4ff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
}
.dashboard-hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 14px;
  padding: 18px 24px;
  background:
    radial-gradient(circle at 80% 8%, rgba(4, 112, 240, 0.14), transparent 45%),
    linear-gradient(180deg, #f8fbff, #eff5ff);
}
.dashboard-hero-grid h2 {
  margin: 0 0 4px;
  font-family: "Poppins", "Inter", sans-serif;
  font-size: 42px;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--lp-ink-900);
}
.kpi-row {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.kpi-card {
  border: 1px solid var(--lp-border);
  border-radius: 12px;
  background: var(--lp-surface-2);
  padding: 14px 16px;
  min-height: 88px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}
.kpi-card span {
  display: block;
  font-size: 14px;
  color: #51607a;
  margin-bottom: 4px;
}
.kpi-card strong {
  font-size: 42px;
  line-height: 1.05;
  letter-spacing: -0.02em;
}
.usage-card {
  border: 1px solid var(--lp-border);
  border-radius: 12px;
  background: var(--lp-surface-2);
  padding: 14px 16px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}
.usage-card p {
  margin: 0 0 10px;
}
.usage-line {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  align-items: center;
  gap: 10px;
  margin: 8px 0;
}
.usage-label,
.usage-val {
  font-size: 13px;
  color: #334155;
}
.usage-track {
  height: 12px;
  border-radius: 999px;
  overflow: hidden;
  background: #e2e8f4;
}
.usage-track i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--lp-blue-600) 0%, var(--lp-cyan-500) 100%);
}
.dashboard-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 24px 20px;
}
.dash-filters {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.dash-filter {
  appearance: none;
  border: 1px solid #c9d8ef;
  background: #f8fbff;
  color: var(--lp-ink-700);
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.dash-filter.is-active {
  color: #ffffff;
  border-color: var(--lp-blue-600);
  background: linear-gradient(135deg, var(--lp-blue-600), var(--lp-blue-500));
}
.create-widget-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  color: #ffffff;
  font-weight: 800;
  text-decoration: none;
  padding: 10px 16px;
  background: linear-gradient(135deg, var(--lp-blue-600), var(--lp-blue-500));
  box-shadow: 0 10px 20px rgba(29, 78, 216, 0.3);
}
.create-widget-btn:hover {
  text-decoration: none;
  filter: brightness(1.05);
}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.widget-card {
  border-radius: 14px;
  border: 1px solid var(--lp-border);
  background: var(--lp-surface-2);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.05);
}
.widget-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.widget-card-head h3 {
  margin: 0;
  font-size: 19px;
}
.live-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, #099267, #12b886);
}
.live-pill.expired {
  background: linear-gradient(135deg, #b45309, #d97706);
}
.widget-sub {
  margin: 4px 0 8px;
  min-height: 20px;
}
.widget-preview-link {
  position: relative;
  display: block;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #d5e1f2;
  background: linear-gradient(160deg, #c4c9d1, #ffffff);
}
.widget-preview-placeholder {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  background:
    radial-gradient(circle at 50% 46%, rgba(37, 99, 235, 0.08), rgba(37, 99, 235, 0) 46%),
    linear-gradient(100deg, rgba(226, 232, 240, 0.75) 40%, rgba(241, 245, 249, 0.95) 50%, rgba(226, 232, 240, 0.75) 60%),
    #e2e8f0;
  background-size: 220% 100%;
  animation: widgetShimmer 1.1s linear infinite;
}
.widget-preview-link.is-loading .widget-preview-placeholder {
  display: grid;
}
.widget-preview-logo {
  width: 58px;
  height: 58px;
  position: relative;
  display: grid;
  place-items: center;
  filter: drop-shadow(0 8px 20px rgba(4, 112, 240, 0.2));
  opacity: 0.5;
  animation: widgetLogoFloat 1.5s ease-in-out infinite;
}
.widget-preview-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: saturate(0.9);
}
.widget-preview-link.is-error .widget-preview-placeholder {
  display: grid;
  place-items: center;
  color: #64748b;
  font-size: 12px;
  letter-spacing: 0.02em;
}
.widget-preview-link.is-error .widget-preview-placeholder::after {
  content: "Preview unavailable";
}
.widget-preview {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: scale-down;
  opacity: 1;
  transition: opacity 0.2s ease;
  background: linear-gradient(160deg, #c4c9d1, #ffffff);
}
.widget-preview-link.is-loading .widget-preview {
  opacity: 0;
}
.widget-metrics {
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #334155;
  font-size: 14px;
}
.widget-actions {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  border: 1px solid #cfdbef;
  background: #f8fbff;
  color: var(--lp-ink-700);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  padding: 8px 12px;
}
.action-btn.primary {
  color: #ffffff;
  border-color: var(--lp-blue-600);
  background: linear-gradient(135deg, var(--lp-blue-600), var(--lp-blue-500));
}
.icon-action-btn {
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
}
.icon-action-btn svg,
.delete-widget-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}
.delete-widget-btn {
  margin-left: auto;
  width: 38px;
  min-width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  border: 1px solid #f6b8bc;
  background: #fff4f4;
  color: var(--lp-danger);
  cursor: pointer;
}
.delete-widget-btn:hover {
  background: #ffe5e7;
}
.confirm-delete-modal[hidden] {
  display: none;
}
.create-widget-modal[hidden] {
  display: none;
}
.create-widget-modal {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  padding: 16px;
}
.create-widget-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
}
.create-widget-dialog {
  position: relative;
  width: min(1160px, 100%);
  max-height: calc(100vh - 28px);
  overflow: auto;
  border-radius: 16px;
  border: 1px solid #d8e1ef;
  background: #ffffff;
  box-shadow: 0 26px 54px rgba(2, 6, 23, 0.28);
  padding: 14px;
}
.create-widget-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.create-widget-head h3 {
  margin: 0;
  font-size: 24px;
}
.create-widget-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.create-widget-card {
  border: 1px solid #d9e4f4;
  border-radius: 12px;
  background: #ffffff;
  padding: 10px;
  display: grid;
  gap: 8px;
}
.create-widget-card h4 {
  margin: 0;
  font-size: 18px;
}
.create-widget-card .small {
  min-height: 54px;
}
.create-widget-card .action-btn {
  width: 100%;
}
.create-widget-cta {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  font-weight: 800;
  color: #ffffff !important;
  border: 1px solid #1d4ed8 !important;
  background: linear-gradient(135deg, #2563eb, #0470f0) !important;
}
.create-widget-preview {
  height: 98px;
  border-radius: 10px;
  border: 1px solid #d6e2f2;
  background: #f7faff;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  overflow: hidden;
}
.create-widget-preview strong {
  font-size: 16px;
}
.create-widget-preview span {
  color: #475569;
  font-size: 12px;
}
.preview-countdown {
  color: #ffffff;
  border-color: #31568f;
  background: linear-gradient(135deg, #0f274f, #12407f 45%, #1f67d8);
}
.preview-social .mock-row {
  height: 9px;
  border-radius: 999px;
  background: #8fb3e7;
}
.preview-social .mock-row.short {
  width: 68%;
}
.preview-social .mock-media {
  margin-top: 2px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
}
.preview-json code {
  display: block;
  font-size: 11px;
  line-height: 1.35;
  background: #eef4ff;
  color: #1f3b69;
}
.preview-weather strong {
  color: #0f2f73;
}
.preview-critical {
  background: linear-gradient(180deg, #fff5f5, #ffe4e6);
  border-color: #fecdd3;
}
.preview-critical strong {
  color: #b91c1c;
}
.confirm-delete-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 18px;
}
.confirm-delete-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
}
.confirm-delete-dialog {
  position: relative;
  width: min(520px, 100%);
  border-radius: 14px;
  border: 1px solid var(--lp-border);
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(2, 6, 23, 0.35);
  padding: 16px;
}
.confirm-delete-dialog h3 {
  margin: 0 0 8px;
  font-size: 22px;
}
.confirm-delete-dialog p {
  margin: 6px 0;
}
.confirm-delete-dialog form {
  margin-top: 12px;
}
.confirm-delete-dialog input[type="text"] {
  width: 100%;
  margin-top: 4px;
}
.confirm-delete-dialog input[type="text"].has-error {
  border-color: #dc2626;
  box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.16);
}
.modal-error {
  margin: 8px 0 0;
}
.widget-link-modal[hidden] {
  display: none !important;
}
.widget-link-modal {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: grid;
  place-items: center;
  padding: 16px;
}
.widget-link-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.58);
}
.widget-link-dialog {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  background: #ffffff;
  border: 1px solid #d5e1f2;
  border-radius: 14px;
  box-shadow: 0 18px 44px rgba(15, 23, 42, 0.26);
  padding: 16px;
}
.widget-link-dialog h3 {
  margin: 0 0 8px;
}
.widget-link-dialog p {
  margin: 0 0 12px;
}
.widget-link-actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}
.confirm-delete-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
@keyframes widgetShimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -20% 0;
  }
}
@keyframes widgetLogoFloat {
  0% {
    transform: translateY(0) scale(0.98);
    opacity: 0.45;
  }
  50% {
    transform: translateY(-3px) scale(1.02);
    opacity: 0.72;
  }
  100% {
    transform: translateY(0) scale(0.98);
    opacity: 0.45;
  }
}
.more-menu {
  position: relative;
}
.more-menu summary {
  list-style: none;
  cursor: pointer;
  user-select: none;
  border-radius: 9px;
  border: 1px solid #d0daea;
  background: #f8fbff;
  color: #334155;
  font-weight: 700;
  font-size: 14px;
  padding: 8px 12px;
}
.more-menu summary::-webkit-details-marker {
  display: none;
}
.more-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 160px;
  z-index: 8;
  border: 1px solid #d8e1ef;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.16);
  padding: 8px;
}
.more-menu-panel a,
.more-menu-panel button {
  width: 100%;
  display: block;
  text-align: left;
  border-radius: 8px;
  border: 0;
  background: transparent;
  padding: 7px 8px;
  font-size: 14px;
  color: #1f2937;
  text-decoration: none;
}
.more-menu-panel a:hover,
.more-menu-panel button:hover {
  background: #f3f7fd;
}
.more-menu-panel form {
  margin: 0;
}
@media (max-width: 1180px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .create-widget-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 980px) {
  .lp-brand-wordmark-img {
    width: min(100%, 420px);
    min-width: 220px;
  }
  .dashboard-hero-grid h2 {
    font-size: 34px;
  }
  .dashboard-hero-grid {
    grid-template-columns: 1fr;
  }
  .kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .create-widget-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .dashboard-topbar,
  .dashboard-hero-grid,
  .dashboard-toolbar {
    padding-left: 14px;
    padding-right: 14px;
  }
  .lp-brand {
    width: 100%;
  }
  .lp-brand-wordmark-img {
    width: 100%;
    min-width: 0;
    max-width: 340px;
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .kpi-row {
    grid-template-columns: 1fr;
  }
  .dashboard-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .create-widget-btn {
    width: 100%;
  }
  .create-widget-grid {
    grid-template-columns: 1fr;
  }
}
