:root {
  --bg: #fbf6f1;
  --bg-soft: #f6eee7;
  --panel: #fffdfa;
  --ink: #2e2622;
  --muted: #6a5950;
  --line: #e2d6cb;
  --brand: #9b6a4d;
  --brand-dark: #6e4a35;
  --ok-bg: #e9f8ef;
  --ok-text: #1f7a43;
  --danger: #c0392b;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Manrope", "Segoe UI", Tahoma, sans-serif;
  background:
    radial-gradient(circle at 10% 8%, #ffffff 0%, transparent 28%),
    radial-gradient(circle at 90% 6%, #f4e3d7 0%, transparent 26%),
    linear-gradient(165deg, var(--bg), var(--bg-soft));
}

.topbar {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(130deg, rgba(46, 27, 17, 0.93), rgba(107, 68, 44, 0.9)),
    url("https://images.unsplash.com/photo-1519741497674-611481863552?auto=format&fit=crop&w=1800&q=80")
      center / cover no-repeat;
  color: #fff;
}

.topbar::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.topbar-inner {
  position: relative;
  z-index: 1;
  max-width: 1160px;
  margin: 0 auto;
  padding: 30px 18px 36px;
  text-align: center;
}

.eyebrow {
  margin: 0;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.73rem;
  opacity: 0.9;
}

.topbar h1 {
  margin: 8px 0 0;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.15rem);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.topbar-script {
  margin: 4px 0 0;
  font-family: "Great Vibes", cursive;
  font-size: clamp(1.4rem, 3vw, 2rem);
}

.topbar-sub {
  margin: 8px auto 0;
  max-width: 650px;
  opacity: 0.9;
}

.link-back {
  color: #fff;
  font-weight: 600;
}

.auth-actions {
  display: inline-flex;
  gap: 10px;
}

.auth-actions-corner {
  position: absolute;
  top: 18px;
  right: 400px;
  gap: 6px;
  z-index: 5;
}

.auth-actions-corner .btn,
.auth-actions-corner .btn-soft {
  background: none !important;
  color: #1f3b2f;
  border: none;
  box-shadow: none;
  padding: 0 8px;
  border-radius: 0;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  line-height: 1.6;
}

.auth-actions-corner .btn:hover,
.auth-actions-corner .btn-soft:hover {
  background: none;
  text-decoration: underline;
  filter: none;
}

.auth-actions-corner .logout-inline {
  margin: 0;
}

.auth-actions-corner .logout-inline .user-pill {
  background: transparent;
  border: 1px solid rgba(58, 67, 85, 0.2);
  color: #3a4355;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 12px;
}

.auth-actions-corner .logout-inline .btn-soft {
  background: transparent !important;
  color: #3a4355;
  border: 1px solid rgba(58, 67, 85, 0.2);
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 14px;
  border-radius: 12px;
  text-decoration: none;
}

.auth-actions-corner .logout-inline .btn-soft:hover {
  background: rgba(58, 67, 85, 0.08) !important;
  text-decoration: none;
}

.logout-inline {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.admin-editor .topbar-inner {
  position: relative;
}

.admin-editor .logout-inline {
  position: absolute;
  top: 16px;
  right: 24px;
  margin-top: 0;
}

.user-pill {
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #f0f7f3;
  font-size: 0.9rem;
}

.page-wrap {
  max-width: 1160px;
  margin: 20px auto 70px;
  padding: 0 16px;
}

.panel {
  background: linear-gradient(180deg, #fffefa, var(--panel));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 16px;
  box-shadow: 0 10px 26px rgba(120, 85, 60, 0.08);
}

.panel h2 {
  margin: 0 0 12px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.7rem;
  font-weight: 600;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}

.template-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.template-content {
  padding: 14px 14px 10px;
}

.template-content h3 {
  margin: 0 0 4px;
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.4rem;
}

.template-content p {
  margin: 0;
  color: var(--muted);
}

.template-actions {
  padding: 0 14px 14px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.template-preview {
  position: relative;
  height: 230px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #f3f0ed;
}

.template-preview-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 1280px;
  height: 820px;
  border: 0;
  transform: scale(0.28);
  transform-origin: 0 0;
  pointer-events: none;
}

.template-preview-fade {
  position: absolute;
  inset: auto 0 0;
  height: 52px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.94));
}

.btn {
  display: inline-block;
  border: 0;
  border-radius: 8px;
  background: linear-gradient(130deg, var(--brand), var(--brand-dark));
  color: #fff;
  text-decoration: none;
  padding: 6px 11px;
  font-weight: 600;
  cursor: pointer;
}

.btn:hover {
  filter: brightness(1.03);
}

.btn-soft {
  background: #efe6de;
  color: #201a16;
}

.btn-danger {
  background: linear-gradient(130deg, #d85647, #b83425);
}

.editor-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.editor-grid .full {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 600;
  font-size: 0.92rem;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 11px;
  font-size: 0.94rem;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
}

textarea {
  resize: vertical;
}

input[type="file"] {
  padding: 8px;
  background: #fff;
}

.font-dropdown {
  font-weight: 600;
}

.font-preview-panel {
  border: 1px dashed #d8c8bc;
  background: #fff9f4;
  border-radius: 12px;
  padding: 10px 12px;
}

.font-preview-label {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 600;
}

.font-preview-sample {
  margin: 6px 0 0;
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  color: #4a3428;
  line-height: 1.1;
}

.color-circle-label {
  display: grid;
  gap: 6px;
  align-content: start;
}

.color-circle-title {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.94rem;
}

.color-circle-note {
  color: #8b7568;
  font-size: 0.8rem;
  line-height: 1.3;
}

.color-circle-picker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.color-circle-input {
  width: 44px;
  height: 44px;
  border: 0;
  padding: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.color-circle-input::-webkit-color-swatch-wrapper {
  padding: 0;
  border-radius: 999px;
}

.color-circle-input::-webkit-color-swatch {
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(78, 59, 47, 0.25);
}

.color-circle-input::-moz-color-swatch {
  border: 2px solid #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(78, 59, 47, 0.25);
}

.color-circle-value {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  color: #5f4a3d;
  text-transform: lowercase;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggle input {
  width: auto;
}

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

.notice {
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 12px;
}

.notice.success {
  background: var(--ok-bg);
  color: var(--ok-text);
  border: 1px solid #bee5cb;
}

.notice.error {
  background: #fdecea;
  color: #8a1f0f;
  border: 1px solid #f5c2bf;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #e8fff2, #f5fbff);
  margin: 0;
}

.auth-card {
  width: min(420px, 90vw);
  background: #fff;
  border: 1px solid #e0ece5;
  border-radius: 16px;
  box-shadow: 0 16px 32px rgba(40, 70, 55, 0.1);
  padding: 24px;
  font-family: "Manrope", "Segoe UI", sans-serif;
}

.auth-card h1 {
  margin: 0 0 12px;
  font-family: "Marcellus", serif;
  color: #1f3b2f;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: #425a4f;
  font-weight: 600;
  font-size: 0.95rem;
}

.auth-form input {
  width: 100%;
  border: 1px solid #dceee3;
  border-radius: 10px;
  padding: 10px 11px;
  font-size: 0.95rem;
}

.auth-btn {
  width: 100%;
  margin-top: 6px;
}

.auth-switch {
  margin: 12px 0 0;
  color: #425a4f;
  font-size: 0.9rem;
}

.auth-switch a {
  color: #2f5a45;
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 700px;
}

th,
td {
  text-align: left;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
}

th {
  color: #6a4b39;
}

.badge {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  background: #efe7df;
  color: #4c3b31;
  font-size: 0.8rem;
}

.badge-live {
  background: #dff7e6;
  color: #166534;
}

.badge-pending {
  background: #fff3d6;
  color: #8a5a00;
}

.badge-paid {
  background: #e5efff;
  color: #1f4f9f;
}

.inline-action-form {
  margin: 0;
}

.danger-zone {
  border-color: #efc4bf;
  background: #fff8f7;
}

/* Home-specific redesign */
.admin-home {
  background:
    radial-gradient(circle at 20% -8%, rgba(255, 255, 255, 0.9) 0%, transparent 38%),
    radial-gradient(circle at 78% -10%, rgba(210, 245, 225, 0.35) 0%, transparent 36%),
    radial-gradient(circle at 48% 115%, rgba(224, 255, 238, 0.48) 0%, transparent 50%),
    linear-gradient(125deg, #e8fff2 0%, #f4fff8 40%, #f5fbff 75%, #e9fff0 100%);
}

.admin-home .topbar {
  min-height: 360px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(120deg, #bfe9d2 0%, #d6f7e6 40%, #e1fff3 72%, #f4fff9 100%);
}

.admin-home .topbar-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 32px 24px 36px;
  border-radius: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  position: relative;
}

.admin-home .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(26, 62, 49, 0.12);
  border: 1px solid rgba(26, 62, 49, 0.22);
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  color: #1f3b2f;
  text-transform: uppercase;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.06);
}

.admin-home .topbar h1 {
  font-size: clamp(2.7rem, 4.6vw, 4.1rem);
  line-height: 1;
  margin-top: 6px;
  font-family: "Marcellus", "Cormorant Garamond", serif;
  font-weight: 400;
  letter-spacing: 0.01em;
  color: #1f3b2f;
  text-shadow: 0 4px 16px rgba(255, 255, 255, 0.5);
}

.admin-home .topbar-script {
  margin-top: 6px;
  font-size: clamp(1.45rem, 2.8vw, 2.35rem);
  color: #2f5a45;
  font-family: "Allura", cursive;
}

.admin-home .topbar-sub {
  margin-top: 10px;
  font-size: 0.99rem;
  color: #2b4f3f;
  opacity: 0.9;
}

.admin-home .page-wrap {
  margin-top: 24px;
  max-width: 1180px;
}

.admin-home .panel {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0 0 22px;
}

.admin-home .panel:first-of-type {
  padding-top: 8px;
}

.admin-home .panel h2 {
  font-size: clamp(1.7rem, 2.7vw, 2.1rem);
  margin-bottom: 18px;
  color: #2e4b3b;
  font-family: "Marcellus", "Cormorant Garamond", serif;
}

.admin-home .template-grid {
  grid-template-columns: repeat(auto-fit, minmax(480px, 1fr));
  gap: 28px;
}

.admin-home .template-card {
  position: relative;
  min-height: 500px;
  border: 0;
  border-radius: 24px;
  background: linear-gradient(180deg, #ffffff 0%, #f5fff7 100%);
  box-shadow: 0 16px 32px rgba(50, 90, 70, 0.1);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.admin-home .template-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px rgba(40, 78, 60, 0.16);
}

.admin-home .template-preview {
  height: 320px;
  border-bottom: 0;
  background: #f5fbf7;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  overflow: hidden;
  position: relative;
}

.admin-home .template-preview-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  transform: none;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.admin-home .template-preview::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(50, 80, 65, 0.05), rgba(50, 80, 65, 0)),
    radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.25), transparent 42%);
  pointer-events: none;
  z-index: 1;
}

.admin-home .template-preview-fade {
  height: 70px;
  background: linear-gradient(180deg, rgba(245, 255, 247, 0), rgba(245, 255, 247, 0.98));
}

.admin-home .template-content {
  padding: 18px 18px 12px;
}

.admin-home .template-content h3 {
  font-size: 1.8rem;
  margin-bottom: 6px;
  color: #2f4137;
  font-family: "Gilda Display", "Cormorant Garamond", serif;
  font-weight: 400;
  letter-spacing: 0.002em;
}

.admin-home .template-content p {
  font-size: 1rem;
  color: #30453b;
  line-height: 1.48;
  font-family: "Lora", "Manrope", serif;
}

.admin-home .template-actions {
  padding: 8px 18px 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.admin-home .btn {
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 0.93rem;
  letter-spacing: 0.01em;
  text-align: center;
  background: linear-gradient(130deg, #6fbf9b, #4f9f7e);
}

.admin-home .btn-soft {
  border: 1px solid #d9ede2;
  background: #f5fcf8;
  color: #2f5a45;
}

.admin-home table {
  min-width: 740px;
}

.admin-home th,
.admin-home td {
  padding: 13px 10px;
  border-bottom: 1px solid #dceee3;
}

.admin-home th {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #4f6a5b;
}

.admin-home td code {
  background: #effaf4;
  border: 1px solid #d6ebdf;
  border-radius: 8px;
  padding: 3px 7px;
  font-size: 0.8rem;
  color: #395b48;
}

.admin-home .badge {
  background: #e5f4ec;
  color: #2f5a45;
}

.admin-home .badge-live {
  background: #dff5e4;
  color: #1d6f3e;
}

.admin-home .badge-pending {
  background: #fff2d8;
  color: #8b5a08;
}

.admin-home .badge-paid {
  background: #e7efff;
  color: #2452a7;
}

.admin-editor {
  background:
    radial-gradient(circle at 20% -8%, rgba(255, 255, 255, 0.9) 0%, transparent 38%),
    radial-gradient(circle at 78% -10%, rgba(210, 245, 225, 0.35) 0%, transparent 36%),
    linear-gradient(125deg, #e8fff2 0%, #f4fff8 55%, #f5fbff 100%);
  color: #1f3b2f;
}

.admin-editor .page-wrap {
  margin: 0;
  padding: 0;
  max-width: none;
}

.editor-layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 320px 1fr;
}

.editor-sidebar {
  background: #f9fffb;
  border-right: 1px solid #dceee3;
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

.editor-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-weight: 700;
  color: #2f5a45;
  font-size: 1.1rem;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6fbf9b, #4f9f7e);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.sidebar-preview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, #6fbf9b, #4f9f7e);
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
}

.sidebar-preview.is-disabled {
  background: #e6f2ea;
  color: #8fb7a3;
  cursor: not-allowed;
}

.editor-steps {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 16px;
}

.editor-step {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
  color: #4f6a5b;
  font-size: 0.95rem;
  cursor: pointer;
}

.editor-step .step-num {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: #effaf4;
  color: #2f5a45;
  display: grid;
  place-items: center;
  font-weight: 700;
}

.editor-step.is-active .step-num {
  background: #6fbf9b;
  color: #fff;
  box-shadow: 0 10px 22px rgba(79, 159, 126, 0.3);
}

.editor-step.is-active .step-title {
  color: #1f3b2f;
}

.editor-step:focus {
  outline: 2px solid rgba(111, 191, 155, 0.35);
  border-radius: 14px;
}

.step-title {
  font-weight: 600;
  color: #2f5a45;
}

.step-sub {
  font-size: 0.85rem;
  color: #7a9588;
  margin-top: 2px;
}

.editor-content {
  position: relative;
  padding: 42px 64px 70px;
  background:
    radial-gradient(circle at 100% 10%, rgba(255, 255, 255, 0.8) 0%, transparent 48%),
    linear-gradient(180deg, #f7fff9 0%, #f1f9f4 100%);
}

.editor-actions {
  position: absolute;
  top: 28px;
  right: 46px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.admin-editor .link-back {
  color: #2f5a45;
  font-weight: 600;
  text-decoration: none;
}

.admin-editor .link-back:hover {
  color: #1f3b2f;
}

.admin-editor .logout-inline {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: static;
  top: auto;
  right: auto;
}

.admin-editor .user-pill {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid #dceee3;
  color: #2f5a45;
}

.editor-title {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 28px;
}

.editor-title h1 {
  margin: 0;
  font-size: 1.6rem;
  color: #1f3b2f;
  font-family: "Manrope", "Segoe UI", sans-serif;
}

.editor-title p {
  margin: 8px 0 0;
  color: #6a8a79;
  font-size: 0.95rem;
}

.admin-editor .notice {
  max-width: 700px;
  margin: 0 auto 16px;
}

.editor-card {
  max-width: 700px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 18px;
  border: 1px solid #dceee3;
  padding: 26px 28px;
  box-shadow: 0 20px 40px rgba(47, 90, 69, 0.12);
}

.step-panel {
  display: none;
}

.step-panel.is-active {
  display: contents;
}

.step-summary {
  background: #f5fcf8;
  border: 1px dashed #d9ede2;
  border-radius: 14px;
  padding: 16px;
  color: #4f6a5b;
}

.step-summary h3 {
  margin: 0 0 6px;
  font-size: 1.1rem;
  color: #2f5a45;
}

.checkout-hint {
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff8e8;
  border: 1px solid #f1e0ae;
  color: #76571c;
  font-size: 0.92rem;
  line-height: 1.5;
}

.step-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.step-actions .step-prev {
  margin-right: auto;
}

.is-hidden {
  display: none !important;
}

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

.admin-editor label {
  font-weight: 600;
  color: #3f5f50;
}

.admin-editor .step-group-title {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid #dceee3;
  font: 600 0.8rem/1 var(--font-ui, "Manrope", sans-serif);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: #5c7f6d;
}

.admin-editor input,
.admin-editor textarea,
.admin-editor select {
  border: 1px solid #dceee3;
  background: #f7fffb;
  border-radius: 12px;
  padding: 12px 12px;
  font-size: 0.95rem;
}

.admin-editor input:focus,
.admin-editor textarea:focus,
.admin-editor select:focus {
  outline: 2px solid rgba(111, 191, 155, 0.25);
  border-color: #b9dfcc;
}

.admin-editor .font-preview-panel {
  border-style: solid;
  border-color: #d9ede2;
  background: #f5fcf8;
}

.admin-editor .color-circle-title {
  color: #3f5f50;
}

.admin-editor .actions {
  justify-content: flex-end;
}

.admin-editor .btn {
  background: linear-gradient(135deg, #6fbf9b, #4f9f7e);
  border-radius: 12px;
  padding: 10px 16px;
}

.admin-editor .btn[disabled],
.admin-editor .btn.is-disabled {
  background: #e6f2ea;
  color: #8fb7a3;
  cursor: not-allowed;
  box-shadow: none;
}

.admin-editor .btn-soft {
  background: #f5fcf8;
  color: #2f5a45;
  border: 1px solid #d9ede2;
}

.admin-editor .btn-danger {
  background: linear-gradient(135deg, #ff6b6b, #ff8b8b);
}

.admin-editor .panel {
  max-width: 700px;
  margin: 24px auto 0;
  border-radius: 18px;
}

.auth-modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 50;
}

.auth-modal.is-open {
  display: flex;
}

.auth-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(18, 40, 30, 0.35);
  backdrop-filter: blur(6px);
}

.auth-dialog {
  position: relative;
  width: min(420px, 92vw);
  border-radius: 18px;
  padding: 22px 24px 26px;
  background: #ffffff;
  border: 1px solid #d7eadf;
  box-shadow: 0 26px 60px rgba(18, 40, 30, 0.25);
  z-index: 1;
}

.auth-dialog h2 {
  margin: 0 0 12px;
  font-family: "Marcellus", "Cormorant Garamond", serif;
  font-size: 1.5rem;
  color: #1f3b2f;
}

.auth-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 0;
  background: #f1faf5;
  color: #2f5a45;
  font-size: 1.2rem;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.auth-tabs {
  display: flex;
  gap: 8px;
  padding: 4px;
  border-radius: 999px;
  background: #f3fbf6;
  border: 1px solid #d7eadf;
  margin-bottom: 16px;
}

.auth-tab {
  flex: 1;
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 600;
  font-size: 0.95rem;
  color: #3b5a4a;
  background: transparent;
  cursor: pointer;
}

.auth-tab.is-active {
  background: #ffffff;
  color: #1f3b2f;
  box-shadow: 0 6px 14px rgba(18, 40, 30, 0.12);
}

.auth-panel {
  display: none;
}

.auth-panel.is-active {
  display: block;
}

.auth-error {
  margin: 0 0 12px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #fdecea;
  color: #8a1f0f;
  border: 1px solid #f5c2bf;
  font-size: 0.9rem;
}

.modal-open {
  overflow: hidden;
}

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

  .editor-sidebar {
    border-right: 0;
    border-bottom: 1px solid #dceee3;
    padding: 24px 20px;
  }

  .editor-content {
    padding: 24px 20px 48px;
  }

  .editor-actions {
    position: static;
    margin-bottom: 16px;
    justify-content: center;
    flex-wrap: wrap;
  }

  .editor-title {
    text-align: left;
    margin-bottom: 20px;
  }

  .editor-grid {
    grid-template-columns: 1fr;
  }

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

  .admin-home .page-wrap {
    margin-top: 16px;
  }

  .admin-home .topbar {
    min-height: 252px;
  }

  .admin-home .topbar-inner {
    border-radius: 18px;
    padding: 20px 14px 22px;
  }

  .admin-home .template-grid {
    grid-template-columns: 1fr;
  }

  .admin-home .template-preview {
    height: 292px;
  }

  .admin-home .template-preview-frame {
    width: 1280px;
    height: 820px;
    transform: translateX(-50%) scale(0.33);
  }

  .admin-home .template-actions {
    grid-template-columns: 1fr;
  }
}
