
/* ═══════════════════════════════════════════
   SWEET SEDUCTION — Design System
   mimisy.com · your creative playground
   ═══════════════════════════════════════════ */

:root {
  /* ── Dreamy Palette ── */
  --blush: #ff8fa3;
  --blush-soft: #ffb3c1;
  --blush-deep: #e85d75;
  --peach: #ffb4a2;
  --peach-soft: #ffd4c4;
  --peach-deep: #f08080;
  --coral: #ff7f7f;
  --coral-glow: rgba(255, 127, 127, 0.25);
  --rose: #f72585;
  --rose-soft: #ff6b9d;
  --rose-glow: rgba(247, 37, 133, 0.2);
  --lavender: #e8c5f0;
  --lavender-soft: #f3e0f8;
  --berry: #b5179e;
  --honey: #ffd166;

  --bg-base: #fff5f7;
  --bg-card: rgba(255, 255, 255, 0.72);
  --bg-glass: rgba(255, 255, 255, 0.55);
  --bg-input: rgba(255, 255, 255, 0.65);
  --bg-sidebar: rgba(255, 245, 247, 0.88);
  --bg-hover: rgba(255, 143, 163, 0.12);
  --bg-active: rgba(255, 143, 163, 0.18);

  --text-main: #3d2c3a;
  --text-soft: #7a6678;
  --text-muted: #b8a0b4;
  --text-inverse: #fff5f7;

  --border-card: rgba(255, 143, 163, 0.2);
  --border-input: rgba(255, 143, 163, 0.25);
  --border-glass: rgba(255, 255, 255, 0.5);

  --shadow-sm: 0 2px 8px rgba(247, 37, 133, 0.08);
  --shadow-md: 0 6px 24px rgba(247, 37, 133, 0.12);
  --shadow-lg: 0 12px 48px rgba(247, 37, 133, 0.15);
  --shadow-glow: 0 4px 20px var(--coral-glow);
  --shadow-btn: 0 4px 18px rgba(255, 127, 127, 0.35);

  /* ── Typography ── */
  --font-display: 'Quicksand', system-ui, sans-serif;
  --font-body: 'Nunito', -apple-system, sans-serif;

  --text-xs: 0.75rem;
  --text-sm: 0.8125rem;
  --text-base: 0.9375rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;
  --text-4xl: 3rem;

  /* ── Spacing ── */
  --s-1: 0.25rem; --s-2: 0.5rem; --s-3: 0.75rem; --s-4: 1rem;
  --s-5: 1.25rem; --s-6: 1.5rem; --s-8: 2rem; --s-10: 2.5rem;
  --s-12: 3rem; --s-16: 4rem;

  /* ── Radii (extra round!) ── */
  --r-sm: 8px; --r-md: 14px; --r-lg: 20px; --r-xl: 28px; --r-full: 999px;

  /* ── Transitions ── */
  --ease-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 180ms; --dur-norm: 320ms; --dur-slow: 600ms;
}

/* ═══════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  min-height: 100dvh;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--text-main);
  line-height: 1.6;
  background: var(--bg-base);
  overflow-x: hidden;
  position: relative;
}

/* ── Animated Gradient Blobs Background ── */
.bg-blobs {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

.bg-blob:nth-child(1) {
  width: 500px; height: 500px;
  background: var(--blush-soft);
  top: -10%; left: -5%;
  animation: blob1 14s infinite alternate;
}
.bg-blob:nth-child(2) {
  width: 420px; height: 420px;
  background: var(--peach-soft);
  top: 50%; right: -8%;
  animation: blob2 12s infinite alternate;
}
.bg-blob:nth-child(3) {
  width: 360px; height: 360px;
  background: var(--lavender-soft);
  bottom: -10%; left: 30%;
  animation: blob3 16s infinite alternate;
}
.bg-blob:nth-child(4) {
  width: 300px; height: 300px;
  background: var(--honey);
  opacity: 0.35;
  top: 20%; right: 25%;
  animation: blob4 18s infinite alternate;
}

@keyframes blob1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(8%, 6%) scale(1.15); }
}
@keyframes blob2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-6%, -10%) scale(1.12); }
}
@keyframes blob3 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-4%, -8%) scale(1.1); }
}
@keyframes blob4 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(10%, -5%) scale(1.2); }
}

/* ── Floating Hearts ── */
.floating-hearts {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.heart-float {
  position: absolute;
  font-size: 18px;
  opacity: 0;
  animation: heartRise var(--rise-dur, 8s) ease-in infinite;
  animation-delay: var(--rise-delay, 0s);
  filter: blur(0.5px);
}

@keyframes heartRise {
  0% { opacity: 0; transform: translateY(0) translateX(0) scale(0.4) rotate(0deg); }
  15% { opacity: 0.5; }
  50% { opacity: 0.35; }
  85% { opacity: 0.1; }
  100% { opacity: 0; transform: translateY(-100vh) translateX(var(--drift, 40px)) scale(1.1) rotate(var(--spin, 15deg)); }
}

button, input, textarea, select { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: var(--rose); text-decoration: none; transition: color var(--dur-fast); }
a:hover { color: var(--blush-deep); }
img, video { max-width: 100%; display: block; }

.hidden { display: none !important; }

/* ═══════════════════════════════════════════
   AUTH SCREEN
   ═══════════════════════════════════════════ */
.auth-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(420px, calc(100vw - 32px));
  padding: var(--s-10) var(--s-8);
  background: var(--bg-card);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid var(--border-card);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg);
  animation: cardIn 0.5s var(--ease-bounce) both;
}

@keyframes cardIn {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.brand-row {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  margin-bottom: var(--s-6);
}

.brand-logo {
  width: 36px; height: 36px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--rose), var(--blush), var(--peach));
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: #fff;
  box-shadow: 0 4px 12px rgba(247, 37, 133, 0.3);
}

.brand-row span {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.01em;
}

.auth-card h1 {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: var(--s-1);
}

.auth-card .sub {
  color: var(--text-soft);
  font-size: var(--text-sm);
  margin-bottom: var(--s-5);
}

/* ── Auth Tabs ── */
.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 3px; padding: 4px;
  margin-bottom: var(--s-5);
  background: rgba(255, 143, 163, 0.12);
  border-radius: var(--r-full);
}

.auth-tabs button {
  padding: var(--s-2) var(--s-4);
  border-radius: var(--r-full);
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--text-soft);
  transition: all var(--dur-fast) var(--ease-smooth);
}

.auth-tabs button.active {
  background: #fff;
  color: var(--rose);
  box-shadow: 0 2px 12px rgba(247, 37, 133, 0.12);
}

/* ── OAuth ── */
.oauth-btn {
  width: 100%;
  padding: var(--s-3) var(--s-4);
  display: flex; align-items: center; justify-content: center;
  gap: var(--s-3);
  margin-bottom: var(--s-4);
  background: var(--bg-input);
  border: 1px solid var(--border-input);
  border-radius: var(--r-full);
  color: var(--text-main);
  font-size: var(--text-sm);
  font-weight: 600;
  transition: all var(--dur-fast) var(--ease-bounce);
}
.oauth-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-glow);
  border-color: var(--blush);
}
.google-dot {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid #ea4335;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 10px; color: #ea4335;
}

/* ── Divider ── */
.auth-divider {
  display: flex; align-items: center; gap: var(--s-3);
  margin-bottom: var(--s-4);
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: 600;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px;
  background: linear-gradient(90deg, transparent, var(--blush), transparent);
}

/* ── Inputs ── */
.input-group {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  margin-bottom: var(--s-3);
  background: var(--bg-input);
  border: 2px solid var(--border-input);
  border-radius: var(--r-full);
  transition: all var(--dur-fast) var(--ease-smooth);
}
.input-group:focus-within {
  border-color: var(--blush);
  box-shadow: 0 0 0 4px rgba(255, 143, 163, 0.12);
  transform: scale(1.02);
}
.input-icon { opacity: 0.45; font-size: 14px; flex-shrink: 0; }
.text-input {
  flex: 1; background: none; border: none;
  outline: none; color: var(--text-main);
  font-size: var(--text-sm); font-family: var(--font-body);
}
.text-input::placeholder { color: var(--text-muted); }

.eye-btn {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted); font-size: 14px;
  transition: all var(--dur-fast);
}
.eye-btn:hover { background: rgba(255, 143, 163, 0.1); color: var(--blush-deep); }

/* ── Auth Error ── */
.auth-error {
  padding: var(--s-2) var(--s-4); margin-bottom: var(--s-2);
  border-radius: var(--r-full);
  background: rgba(255, 127, 127, 0.1);
  color: var(--coral);
  font-size: var(--text-xs); font-weight: 600;
  display: none; align-items: center; gap: var(--s-2);
}
.auth-error:not(:empty) { display: flex; }

/* ── Register Extras ── */
.auth-hint {
  display: flex; align-items: flex-start; gap: var(--s-2);
  padding: var(--s-3) var(--s-4); margin-bottom: var(--s-3);
  background: rgba(255, 143, 163, 0.06);
  border-radius: var(--r-md);
}
.auth-hint span { color: var(--rose); font-weight: 800; flex-shrink: 0; }
.auth-hint p { color: var(--text-soft); font-size: var(--text-xs); line-height: 1.5; }

.terms-row {
  display: flex; align-items: flex-start; gap: var(--s-2);
  margin-bottom: var(--s-4); font-size: var(--text-xs);
  color: var(--text-soft); line-height: 1.5;
}
.terms-row input { accent-color: var(--rose); margin-top: 3px; }

/* ── Submit ── */
.btn-primary {
  width: 100%; padding: var(--s-3) var(--s-4);
  background: linear-gradient(135deg, var(--rose), var(--blush), var(--coral));
  border: none; border-radius: var(--r-full);
  color: #fff; font-family: var(--font-display);
  font-size: var(--text-base); font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: all var(--dur-fast) var(--ease-bounce);
}
.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 28px rgba(255, 127, 127, 0.45);
}
.btn-primary:active { transform: translateY(0) scale(0.98); }

.auth-switch {
  margin-top: var(--s-5); text-align: center;
  color: var(--text-soft); font-size: var(--text-xs);
}
.auth-switch button {
  color: var(--rose); font-weight: 700; font-size: var(--text-xs);
  transition: color var(--dur-fast);
}
.auth-switch button:hover { color: var(--blush-deep); }

/* ═══════════════════════════════════════════
   CREATOR SHELL
   ═══════════════════════════════════════════ */
.creator-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  position: relative;
  z-index: 1;
  overflow-x: hidden;
}

/* ── Sidebar ── */
.creator-sidebar {
  position: sticky; top: 0; height: 100dvh;
  padding: var(--s-5) var(--s-4);
  display: flex; flex-direction: column; gap: var(--s-5);
  background: var(--bg-sidebar);
  backdrop-filter: blur(16px);
  border-right: 1px solid var(--border-card);
  overflow-y: auto;
}

.sidebar-scrim {
  display: none;
}

.brand-row { border-bottom: 1px solid var(--border-card); padding-bottom: var(--s-4); }

.side-nav { display: flex; flex-direction: column; gap: 3px; }

.side-link {
  width: 100%; padding: var(--s-2) var(--s-4);
  display: flex; align-items: center; gap: var(--s-3);
  border-radius: var(--r-full);
  color: var(--text-soft); font-size: var(--text-sm); font-weight: 700;
  transition: all var(--dur-fast) var(--ease-bounce);
}
.side-link:hover {
  background: var(--bg-hover);
  color: var(--rose);
  transform: translateX(3px);
}
.side-link.active {
  background: var(--bg-active);
  color: var(--rose);
  box-shadow: 0 2px 8px rgba(247, 37, 133, 0.08);
}

/* ── Nav Sections ── */
.nav-section { display: flex; flex-direction: column; gap: 2px; }
.nav-section > p {
  padding: var(--s-2) var(--s-4);
  color: var(--text-muted); font-size: var(--text-xs);
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
}

.side-sub {
  width: 100%; padding: var(--s-2) var(--s-4) var(--s-2) var(--s-10);
  border-radius: var(--r-full); color: var(--text-muted);
  font-size: var(--text-sm); font-weight: 600; text-align: left;
  position: relative;
  transition: all var(--dur-fast) var(--ease-bounce);
}
.side-sub::before {
  content: '♡'; position: absolute; left: var(--s-5);
  font-size: 11px; opacity: 0.5;
}
.side-sub:hover {
  background: var(--bg-hover); color: var(--text-soft);
  transform: translateX(4px);
}
.side-sub.active {
  background: var(--bg-active); color: var(--rose);
}
.side-sub.active::before { opacity: 1; }

/* ── Sidebar Footer ── */
.sidebar-footer {
  margin-top: auto; padding-top: var(--s-4);
  border-top: 1px solid var(--border-card);
  display: flex; flex-direction: column; gap: var(--s-2);
}
.pill-outline {
  width: 100%; padding: var(--s-2) var(--s-4);
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--border-card);
  border-radius: var(--r-full); color: var(--text-soft);
  font-size: var(--text-xs); font-weight: 700; text-decoration: none;
  transition: all var(--dur-fast) var(--ease-bounce);
}
.pill-outline:hover {
  border-color: var(--blush); color: var(--rose);
  background: rgba(255, 143, 163, 0.06);
  transform: scale(1.03);
}

/* ═══════════════════════════════════════════
   MAIN CONTENT
   ═══════════════════════════════════════════ */
.creator-main { min-width: 0; display: flex; flex-direction: column; }

/* ── Top Bar ── */
.creator-topbar {
  position: sticky; top: 0; z-index: 10;
  height: 58px; padding: 0 var(--s-6);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-card);
}
.creator-topbar > span,
.topbar-title {
  font-family: var(--font-display); font-size: var(--text-lg);
  font-weight: 700; color: var(--text-main);
  min-width: 0;
}

.mobile-menu-btn {
  display: none;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: var(--r-full);
  border: 2px solid var(--border-card);
  background: var(--bg-card);
  color: var(--text-main);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  box-shadow: var(--shadow-sm);
}
.mobile-menu-btn span {
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--dur-fast) var(--ease-smooth), opacity var(--dur-fast) var(--ease-smooth);
}
.mobile-menu-btn.open {
  color: var(--rose);
  background: var(--bg-hover);
}
.mobile-menu-btn.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.mobile-menu-btn.open span:nth-child(2) { opacity: 0; }
.mobile-menu-btn.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.pills-row { display: flex; align-items: center; justify-content: flex-end; gap: var(--s-3); min-width: 0; }

.pill {
  height: 32px; padding: 0 var(--s-4);
  display: inline-flex; align-items: center;
  border-radius: var(--r-full);
  font-size: var(--text-xs); font-weight: 700;
  border: 1px solid transparent;
  min-width: 0;
  white-space: nowrap;
}
.pill-issue { background: rgba(255, 127, 127, 0.1); color: var(--coral); border-color: rgba(255, 127, 127, 0.2); }
.pill-plan { background: rgba(247, 37, 133, 0.08); color: var(--rose); border-color: rgba(247, 37, 133, 0.15); }
.pill-credits { background: rgba(255, 209, 102, 0.15); color: #b8860b; border-color: rgba(255, 209, 102, 0.3); }

.avatar-pill {
  width: 34px; height: 34px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 0;
  background: linear-gradient(135deg, var(--rose), var(--blush));
  color: #fff; font-weight: 800; font-size: var(--text-xs);
  cursor: pointer; box-shadow: 0 2px 10px rgba(247, 37, 133, 0.25);
  transition: all var(--dur-fast) var(--ease-bounce);
}
.avatar-pill:hover { transform: scale(1.1); }

.profile-modal {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: var(--s-5);
  background: rgba(61, 44, 58, 0.38);
}
.profile-card {
  position: relative;
  width: min(520px, 100%);
  padding: var(--s-6);
  border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
  background: var(--bg-base);
  box-shadow: var(--shadow-lg);
}
.profile-close {
  position: absolute;
  top: var(--s-4);
  right: var(--s-4);
  width: 34px;
  height: 34px;
  border-radius: var(--r-full);
  border: 1px solid var(--border-card);
  color: var(--text-muted);
  background: var(--bg-card);
  font-size: 20px;
  line-height: 1;
}
.profile-head {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding-right: 38px;
}
.profile-avatar {
  width: 52px;
  height: 52px;
  flex: 0 0 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--rose), var(--blush));
  color: #fff;
  font-weight: 800;
}
.profile-head h2 {
  margin: 0 0 var(--s-1);
  font-family: var(--font-display);
  font-size: var(--text-2xl);
}
.profile-head p {
  margin: 0;
  color: var(--text-soft);
  overflow-wrap: anywhere;
}
.profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--s-3);
  margin-top: var(--s-5);
}
.profile-grid div,
.profile-details div {
  display: grid;
  gap: var(--s-1);
  padding: var(--s-4);
  border: 1px solid var(--border-card);
  border-radius: var(--r-md);
  background: var(--bg-card);
}
.profile-grid span,
.profile-details span {
  color: var(--text-muted);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
}
.profile-grid strong,
.profile-details strong {
  color: var(--text-main);
  overflow-wrap: anywhere;
}
.profile-details {
  display: grid;
  gap: var(--s-3);
  margin-top: var(--s-3);
}
.profile-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--s-3);
  margin-top: var(--s-5);
}
.profile-actions button {
  padding: var(--s-2) var(--s-5);
  border-radius: var(--r-full);
  border: 1px solid var(--border-card);
  color: var(--text-main);
  background: var(--bg-card);
  font-weight: 700;
}
.profile-actions button:first-child {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--rose), var(--blush));
}

/* ═══════════════════════════════════════════
   PAGE CONTENT
   ═══════════════════════════════════════════ */
.tools-view, .tool-workspace, .billing-panel,
.assets-panel, .history-panel { padding: var(--s-8); }

.section-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: var(--s-4); margin-bottom: var(--s-8);
}
.section-head h1 {
  font-family: var(--font-display); font-size: var(--text-3xl);
  font-weight: 700; color: var(--text-main);
}
.section-head .sub { color: var(--text-soft); font-size: var(--text-base); margin-top: var(--s-1); }

.tag {
  height: 30px; padding: 0 var(--s-4);
  display: inline-flex; align-items: center;
  border-radius: var(--r-full);
  font-size: var(--text-xs); font-weight: 700;
}
.tag-ready { background: rgba(114, 191, 128, 0.12); color: #4caf50; border: 1px solid rgba(114, 191, 128, 0.2); }
.tag-off { background: rgba(255, 127, 127, 0.1); color: var(--coral); border: 1px solid rgba(255, 127, 127, 0.2); }

/* ── Tool Cards ── */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: var(--s-5);
}

.tool-card {
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  transition: all var(--dur-norm) var(--ease-bounce);
  cursor: pointer;
  position: relative;
}
.tool-card:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: var(--shadow-md);
  border-color: var(--blush);
}
.tool-card:active { transform: translateY(-2px) scale(0.99); }

.tool-card.hero-card { grid-column: span 2; }

/* ── Media Pair ── */
.media-pair {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--s-2); padding: var(--s-2);
}
.media-pair figure, .split-preview figure {
  position: relative; aspect-ratio: 3/4;
  border-radius: var(--r-md); overflow: hidden;
  background: linear-gradient(135deg, #ffe4e9, #fff0f3);
}
.split-preview {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--s-2); padding: var(--s-2);
}
.split-preview figure { aspect-ratio: 1; }

.media-pair img, .split-preview img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-smooth);
}
.tool-card:hover .media-pair img,
.tool-card:hover .split-preview img { transform: scale(1.05); }

.preview-tag {
  position: absolute; bottom: var(--s-2); left: var(--s-2);
  padding: 2px 10px;
  background: rgba(247, 37, 133, 0.75);
  backdrop-filter: blur(8px);
  border-radius: var(--r-full);
  color: #fff; font-size: 9px; font-weight: 800;
  text-transform: uppercase; letter-spacing: 0.05em;
}

.play-dot {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
}
.play-dot::after {
  content: ''; width: 46px; height: 46px;
  border-radius: 50%;
  background: rgba(247, 37, 133, 0.8);
  box-shadow: 0 0 24px rgba(247, 37, 133, 0.35);
  transition: transform var(--dur-fast) var(--ease-bounce);
}
.tool-card:hover .play-dot::after { transform: scale(1.1); }
.play-dot::before {
  content: '▶'; position: absolute; z-index: 1;
  color: #fff; font-size: 14px; margin-left: 2px;
}

/* ── Prompt Box ── */
.prompt-box {
  padding: var(--s-4); margin: var(--s-2);
  background: rgba(255, 143, 163, 0.06);
  border-radius: var(--r-md);
}
.prompt-box strong {
  display: block; font-size: var(--text-xs); font-weight: 700;
  color: var(--rose); text-transform: uppercase;
  letter-spacing: 0.06em; margin-bottom: var(--s-1);
}
.prompt-box p {
  color: var(--text-soft); font-size: var(--text-sm); line-height: 1.5;
}

/* ── Card Footer ── */
.card-foot {
  padding: var(--s-4); display: flex;
  align-items: center; justify-content: space-between;
  border-top: 1px solid var(--border-card);
}
.card-foot h2 {
  font-family: var(--font-display); font-size: var(--text-lg);
  font-weight: 700; color: var(--text-main);
}
.card-foot .open-btn {
  padding: var(--s-1) var(--s-4);
  border: 2px solid var(--rose);
  border-radius: var(--r-full);
  color: var(--rose); font-size: var(--text-xs); font-weight: 700;
  transition: all var(--dur-fast) var(--ease-bounce);
}
.card-foot .open-btn:hover {
  background: var(--rose); color: #fff;
  transform: scale(1.06);
}

/* ═══════════════════════════════════════════
   TOOL WORKSPACE
   ═══════════════════════════════════════════ */
.workspace-head {
  display: flex; align-items: center; gap: var(--s-4);
  margin-bottom: var(--s-6);
}
.workspace-head .back-btn {
  padding: var(--s-1) var(--s-4);
  border: 2px solid var(--border-card);
  border-radius: var(--r-full);
  color: var(--text-soft); font-size: var(--text-sm); font-weight: 600;
  transition: all var(--dur-fast) var(--ease-bounce);
}
.workspace-head .back-btn:hover {
  border-color: var(--blush); color: var(--rose);
  transform: translateX(-3px);
}
.workspace-head .eyebrow {
  color: var(--text-muted); font-size: var(--text-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 1px;
}
.workspace-head h1 {
  font-family: var(--font-display); font-size: var(--text-2xl); font-weight: 700;
}

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(360px, 440px) minmax(0, 1fr);
  gap: var(--s-6); align-items: start;
}

/* ── Composer ── */
.composer {
  padding: var(--s-6);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
}

.field { margin-top: var(--s-5); }
.field:first-child, .field + .field { margin-top: var(--s-5); }

.label-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--s-2);
}
.label-row label {
  color: var(--text-main); font-size: var(--text-sm); font-weight: 700;
}
.label-row .hint {
  color: var(--text-muted); font-size: var(--text-xs); font-weight: 600;
}
.label-row .hint-accent { color: var(--rose); }

/* ── Segmented ── */
.segmented {
  display: grid; gap: 2px; padding: 4px;
  background: rgba(255, 143, 163, 0.1);
  border-radius: var(--r-full);
}
.segmented.col2 { grid-template-columns: 1fr 1fr; }
.segmented.col3 { grid-template-columns: repeat(3, 1fr); }

.segmented button {
  padding: var(--s-2) var(--s-3); border-radius: var(--r-full);
  color: var(--text-soft); font-size: var(--text-sm); font-weight: 600;
  transition: all var(--dur-fast) var(--ease-bounce);
}
.segmented button.active {
  background: #fff; color: var(--rose);
  box-shadow: 0 2px 10px rgba(247, 37, 133, 0.1);
}

/* ── Dropzone ── */
.dropzone {
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: var(--s-2);
  min-height: 130px; padding: var(--s-6);
  border: 2px dashed var(--border-card);
  border-radius: var(--r-lg);
  background: rgba(255, 143, 163, 0.03);
  cursor: pointer;
  transition: all var(--dur-fast) var(--ease-bounce);
}
.dropzone:hover {
  border-color: var(--blush);
  background: rgba(255, 143, 163, 0.06);
  transform: scale(1.01);
}
.dropzone input { display: none; }
.dropzone .plus-circle {
  width: 32px; height: 32px; border-radius: 50%;
  border: 2px solid var(--blush);
  display: flex; align-items: center; justify-content: center;
  color: var(--blush); font-size: 18px; font-weight: 400;
}
.dropzone strong { color: var(--text-main); font-size: var(--text-sm); font-weight: 700; }
.dropzone small { color: var(--text-muted); font-size: var(--text-xs); }

.preview-strip {
  display: flex; gap: var(--s-2); margin-top: var(--s-3);
  flex-wrap: wrap;
}
.preview-strip img {
  width: 56px; height: 56px;
  border-radius: var(--r-md); object-fit: cover;
  border: 2px solid var(--border-card);
}

/* ── Textarea ── */
textarea {
  width: 100%; min-height: 110px; padding: var(--s-3) var(--s-4);
  background: var(--bg-input); outline: none;
  border: 2px solid var(--border-input);
  border-radius: var(--r-lg); resize: vertical;
  color: var(--text-main); font-size: var(--text-sm); line-height: 1.6;
  font-family: var(--font-body);
  transition: all var(--dur-fast) var(--ease-smooth);
}
textarea:focus {
  border-color: var(--blush);
  box-shadow: 0 0 0 4px rgba(255, 143, 163, 0.1);
}
textarea::placeholder { color: var(--text-muted); }

.text-actions { margin-top: var(--s-2); }
.text-actions button {
  padding: var(--s-1) var(--s-3); border-radius: var(--r-full);
  color: var(--text-muted); font-size: var(--text-xs); font-weight: 600;
  transition: all var(--dur-fast);
}
.text-actions button:hover { color: var(--rose); background: var(--bg-hover); }

/* ── Slider ── */
.slider-shell {
  padding: var(--s-3) var(--s-4); border-radius: var(--r-md);
  background: rgba(255, 143, 163, 0.05);
}
input[type="range"] { width: 100%; accent-color: var(--rose); height: 5px; }
.duration-marks {
  display: flex; justify-content: space-between;
  margin-top: var(--s-2); color: var(--text-muted);
  font-size: var(--text-xs); font-weight: 600;
}

/* ── Ratio Grid ── */
.ratio-grid {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 2px; padding: 4px;
  background: rgba(255, 143, 163, 0.1);
  border-radius: var(--r-full);
}
.ratio-grid button {
  padding: var(--s-1); border-radius: var(--r-full);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--text-muted); font-size: 10px; font-weight: 600;
  transition: all var(--dur-fast) var(--ease-bounce);
}
.ratio-grid button.active {
  background: #fff; color: var(--rose);
  box-shadow: 0 2px 8px rgba(247, 37, 133, 0.1);
}
.ratio-icon { border: 2px solid currentColor; border-radius: 3px; }
.ratio-icon.w16 { width: 16px; height: 9px; }
.ratio-icon.h16 { width: 9px; height: 16px; }
.ratio-icon.s14 { width: 14px; height: 14px; }
.ratio-icon.p12 { width: 12px; height: 16px; }
.ratio-icon.l16 { width: 16px; height: 11px; }
.ratio-icon.c18 { width: 18px; height: 6px; }

/* ── Switches ── */
.inline-options {
  display: flex; align-items: center; gap: var(--s-6);
  margin-top: var(--s-5);
}
.switch {
  display: inline-flex; align-items: center; gap: var(--s-2);
  color: var(--text-soft); font-size: var(--text-sm); font-weight: 600;
  cursor: pointer;
}
.switch input { display: none; }
.switch .track {
  width: 40px; height: 22px; padding: 2px; border-radius: var(--r-full);
  background: rgba(255, 143, 163, 0.2); transition: background var(--dur-fast);
}
.switch .track::after {
  content: ''; display: block; width: 18px; height: 18px;
  border-radius: 50%; background: var(--text-muted);
  transition: all var(--dur-fast) var(--ease-bounce);
}
.switch input:checked + .track {
  background: rgba(247, 37, 133, 0.25);
}
.switch input:checked + .track::after {
  background: var(--rose); transform: translateX(18px);
}

/* ── Cost Row ── */
.cost-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-3) var(--s-4); margin-top: var(--s-5);
  background: rgba(255, 143, 163, 0.05);
  border-radius: var(--r-full);
  color: var(--text-soft); font-size: var(--text-sm); font-weight: 600;
}
.cost-row strong {
  color: var(--rose); font-size: var(--text-lg);
  font-family: var(--font-display); font-weight: 700;
}

/* ── Generate ── */
.gen-btn {
  width: 100%; padding: var(--s-4) var(--s-6); margin-top: var(--s-5);
  background: linear-gradient(135deg, var(--rose), var(--blush), var(--coral));
  border: none; border-radius: var(--r-full);
  color: #fff; font-family: var(--font-display);
  font-size: var(--text-base); font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: var(--shadow-btn);
  transition: all var(--dur-fast) var(--ease-bounce);
  position: relative; overflow: hidden;
}
.gen-btn::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, transparent 40%, rgba(255,255,255,0.2), transparent 60%);
  transform: translateX(-100%); transition: transform 0.6s;
}
.gen-btn:hover::after { transform: translateX(100%); }
.gen-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 32px rgba(255, 127, 127, 0.45);
}
.gen-btn:active { transform: translateY(0) scale(0.98); }
.gen-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ═══════════════════════════════════════════
   OUTPUT PANEL
   ═══════════════════════════════════════════ */
.output-panel {
  padding: var(--s-6);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
  display: flex; flex-direction: column; gap: var(--s-5);
}
.output-head {
  display: flex; align-items: center; justify-content: space-between;
}
.output-head h2 {
  font-family: var(--font-display); font-size: var(--text-xl); font-weight: 700;
}
.output-head .btn-ghost {
  padding: var(--s-1) var(--s-4);
  border: 2px solid var(--border-card);
  border-radius: var(--r-full);
  color: var(--text-muted); font-size: var(--text-xs); font-weight: 600;
  transition: all var(--dur-fast) var(--ease-bounce);
}
.output-head .btn-ghost:hover {
  border-color: var(--blush); color: var(--rose);
  transform: scale(1.05);
}

.stage {
  position: relative; min-height: 260px;
  display: flex; align-items: center; justify-content: center;
  border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(135deg, rgba(255,143,163,0.06), rgba(255,180,162,0.08));
  border: 2px dashed var(--border-card);
}
.stage video, .stage .gen-img {
  width: 100%; height: 100%; max-height: 400px; object-fit: contain;
}

.empty-state {
  display: flex; flex-direction: column; align-items: center;
  gap: var(--s-3); text-align: center; padding: var(--s-8);
}
.empty-state .empty-icon {
  width: 60px; height: 50px;
  border: 2px solid var(--border-card); border-radius: var(--r-md);
  position: relative;
}
.empty-state .empty-icon::after {
  content: '♡'; position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: var(--blush-soft);
}
.empty-state strong { color: var(--text-main); font-size: var(--text-base); font-weight: 700; }
.empty-state small { color: var(--text-muted); font-size: var(--text-sm); max-width: 28ch; }

.task-card {
  padding: var(--s-4); border-radius: var(--r-md);
  background: rgba(255, 143, 163, 0.04);
  border: 1px solid var(--border-card);
}
.task-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--s-1);
}
.task-row label {
  color: var(--text-muted); font-size: var(--text-xs);
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
}
.task-row strong {
  color: var(--text-main); font-size: var(--text-lg);
  font-family: var(--font-display); font-weight: 700;
}

.progress-bar {
  height: 7px; margin: var(--s-3) 0;
  border-radius: var(--r-full); background: rgba(255, 143, 163, 0.12);
  overflow: hidden;
}
.progress-bar span {
  display: block; height: 100%; width: 0%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--rose), var(--blush), var(--coral));
  transition: width 0.4s var(--ease-smooth);
}
.task-card p { color: var(--text-soft); font-size: var(--text-sm); line-height: 1.5; }
.task-actions {
  display: flex; gap: var(--s-3); margin-top: var(--s-3);
}
.task-actions .btn-ghost {
  padding: var(--s-1) var(--s-4);
  border: 2px solid var(--border-card);
  border-radius: var(--r-full); color: var(--text-soft);
  font-size: var(--text-xs); font-weight: 600; text-decoration: none;
  transition: all var(--dur-fast) var(--ease-bounce);
}
.task-actions .btn-ghost:hover {
  border-color: var(--blush); color: var(--rose);
  transform: scale(1.05);
}

/* ═══════════════════════════════════════════
   BILLING
   ═══════════════════════════════════════════ */
.billing-hero {
  text-align: center; padding: var(--s-8) 0;
}
.billing-toggle {
  display: inline-flex; align-items: center; gap: var(--s-4);
  padding: var(--s-2) var(--s-5); margin-bottom: var(--s-8);
  background: var(--bg-card); backdrop-filter: blur(12px);
  border: 1px solid var(--border-card); border-radius: var(--r-full);
}
.billing-toggle strong { color: var(--text-main); font-size: var(--text-sm); font-weight: 700; }
.gift-icon { font-size: 18px; }

.payment-method-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: var(--s-2);
  width: min(100%, 430px);
  padding: var(--s-2);
  margin: 0 auto var(--s-7);
  background: var(--bg-card);
  border: 1px solid var(--border-card);
  border-radius: var(--r-xl);
}
.payment-method-switch button {
  min-height: 64px;
  padding: var(--s-3) var(--s-4);
  border: 1px solid transparent;
  border-radius: var(--r-lg);
  background: transparent;
  color: var(--text-soft);
  text-align: left;
  transition: all var(--dur-fast) var(--ease-bounce);
}
.payment-method-switch button.active {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(247, 37, 133, 0.28);
  box-shadow: var(--shadow-sm);
  color: var(--text-main);
}
.payment-method-switch strong,
.payment-method-switch span {
  display: block;
}
.payment-method-switch strong {
  font-size: var(--text-sm);
  font-weight: 800;
}
.payment-method-switch span {
  margin-top: 2px;
  font-size: var(--text-xs);
  color: var(--text-muted);
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: var(--s-5); max-width: 880px; margin: 0 auto;
}
.plan-card {
  padding: var(--s-6); text-align: left;
  background: var(--bg-card); backdrop-filter: blur(12px);
  border: 1px solid var(--border-card); border-radius: var(--r-lg);
  transition: all var(--dur-norm) var(--ease-bounce);
  position: relative;
}
.plan-card:hover {
  transform: translateY(-4px); box-shadow: var(--shadow-md);
}
.plan-card.featured {
  border-color: var(--rose);
  box-shadow: 0 0 0 4px rgba(247, 37, 133, 0.06), var(--shadow-glow);
}
.plan-card.featured::before {
  content: '♡ Most Loved';
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  padding: 3px var(--s-4);
  background: linear-gradient(135deg, var(--rose), var(--blush));
  color: #fff; border-radius: var(--r-full);
  font-size: 10px; font-weight: 800; letter-spacing: 0.04em;
  text-transform: uppercase;
  animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 2px 12px rgba(247, 37, 133, 0.25); }
  50% { box-shadow: 0 4px 24px rgba(247, 37, 133, 0.45); }
}

.plan-card h3 {
  font-family: var(--font-display); font-size: var(--text-xl);
  font-weight: 700; color: var(--text-main); margin-bottom: var(--s-2);
}
.plan-price {
  font-family: var(--font-display); font-size: var(--text-3xl);
  font-weight: 700; color: var(--rose); margin-bottom: var(--s-4);
}
.plan-price span {
  font-size: var(--text-sm); color: var(--text-muted); font-weight: 500;
}
.plan-features {
  list-style: none; display: flex; flex-direction: column;
  gap: var(--s-2); margin-bottom: var(--s-5);
}
.plan-features li {
  color: var(--text-soft); font-size: var(--text-sm);
  padding-left: var(--s-5); position: relative;
}
.plan-features li::before {
  content: '✓'; position: absolute; left: 0;
  color: var(--rose); font-weight: 800;
}
.plan-btn {
  width: 100%; padding: var(--s-3) var(--s-4);
  border: 2px solid var(--rose); border-radius: var(--r-full);
  background: transparent; color: var(--rose);
  font-family: var(--font-display); font-size: var(--text-sm);
  font-weight: 700; transition: all var(--dur-fast) var(--ease-bounce);
}
.plan-card.featured .plan-btn {
  background: linear-gradient(135deg, var(--rose), var(--blush));
  color: #fff; border-color: transparent;
  box-shadow: var(--shadow-glow);
}
.plan-btn:hover {
  background: var(--rose); color: #fff;
  transform: scale(1.04);
}
.billing-note { margin-top: var(--s-6); color: var(--text-muted); font-size: var(--text-xs); }

.order-board {
  max-width: 880px; margin: var(--s-8) auto 0;
  padding: var(--s-6); background: var(--bg-card);
  backdrop-filter: blur(12px); border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
}
.order-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-3) var(--s-4); border-radius: var(--r-full);
  background: rgba(255, 143, 163, 0.04);
  color: var(--text-soft); font-size: var(--text-sm); font-weight: 600;
  gap: var(--s-3);
}
.order-item strong { color: var(--rose); font-weight: 700; }
.pay-now-btn {
  min-height: 34px; padding: 0 var(--s-4); border-radius: var(--r-full);
  background: linear-gradient(135deg, var(--rose), var(--blush));
  color: #fff; font-size: var(--text-xs); font-weight: 800;
  white-space: nowrap;
}

/* ═══════════════════════════════════════════
   ASSETS & HISTORY
   ═══════════════════════════════════════════ */
.panel-card {
  padding: var(--s-6);
  background: var(--bg-card); backdrop-filter: blur(12px);
  border: 1px solid var(--border-card); border-radius: var(--r-lg);
}
.asset-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: var(--s-4);
}
.asset-card {
  border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(135deg, rgba(255,143,163,0.06), rgba(255,180,162,0.06));
  border: 1px solid var(--border-card);
  transition: all var(--dur-fast) var(--ease-bounce);
}
.asset-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-glow); }
.asset-card img, .asset-card video { width: 100%; aspect-ratio: 1; object-fit: cover; }
.asset-foot {
  padding: var(--s-2) var(--s-3);
  display: flex; align-items: center; justify-content: space-between;
  color: var(--text-muted); font-size: var(--text-xs); font-weight: 600;
}
.asset-foot strong { color: var(--text-soft); }

.history-item {
  padding: var(--s-3) var(--s-4); border-radius: var(--r-full);
  background: rgba(255, 143, 163, 0.04);
  border: 1px solid var(--border-card); cursor: pointer;
  transition: all var(--dur-fast) var(--ease-bounce);
  margin-bottom: var(--s-2);
}
.history-item:hover {
  border-color: var(--blush); transform: translateX(4px);
  background: var(--bg-hover);
}
.history-item strong {
  display: block; color: var(--text-main); font-size: var(--text-sm);
  font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.history-item span { color: var(--text-muted); font-size: var(--text-xs); font-weight: 600; }

/* ═══════════════════════════════════════════
   ADMIN
   ═══════════════════════════════════════════ */
.admin-shell {
  min-height: 100dvh; display: grid; grid-template-rows: auto 1fr;
  position: relative; z-index: 1;
}
.admin-header {
  position: sticky; top: 0; z-index: 10;
  height: 58px; padding: 0 var(--s-6);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-glass); backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-card);
}
.admin-nav {
  display: flex; gap: 3px; padding: 3px;
  background: rgba(255, 143, 163, 0.1);
  border-radius: var(--r-full);
}
.admin-nav button {
  padding: var(--s-1) var(--s-4); border-radius: var(--r-full);
  color: var(--text-soft); font-size: var(--text-xs); font-weight: 700;
  transition: all var(--dur-fast) var(--ease-bounce);
}
.admin-nav button.active {
  background: #fff; color: var(--rose);
  box-shadow: 0 2px 8px rgba(247, 37, 133, 0.08);
}
.admin-userbar {
  display: flex; align-items: center; gap: var(--s-3);
  color: var(--text-soft); font-size: var(--text-sm); font-weight: 600;
}

.admin-main { padding: var(--s-6); }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: var(--s-4); margin-bottom: var(--s-6);
}
.metric-card {
  padding: var(--s-5);
  background: var(--bg-card); backdrop-filter: blur(12px);
  border: 1px solid var(--border-card); border-radius: var(--r-lg);
}
.metric-card label {
  display: block; color: var(--text-muted); font-size: var(--text-xs);
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  margin-bottom: var(--s-2);
}
.metric-card strong {
  display: block; font-family: var(--font-display);
  font-size: var(--text-2xl); font-weight: 700; color: var(--text-main);
}
.metric-card small { display: block; margin-top: var(--s-1); color: var(--rose); font-size: var(--text-xs); font-weight: 700; }

.ops-panel {
  padding: var(--s-5); margin-bottom: var(--s-5);
  background: var(--bg-card); backdrop-filter: blur(12px);
  border: 1px solid var(--border-card); border-radius: var(--r-lg);
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--s-4);
}
.panel-head label {
  display: block; color: var(--text-main); font-size: var(--text-base); font-weight: 700;
}
.panel-head .sub { display: block; color: var(--text-muted); font-size: var(--text-xs); margin-top: 2px; }
.panel-head strong { color: var(--rose); font-size: var(--text-sm); font-weight: 700; }

.toolbar-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--s-3); margin-bottom: var(--s-4); flex-wrap: wrap;
}
.filter-group {
  display: flex; gap: 2px; padding: 3px;
  background: rgba(255, 143, 163, 0.1);
  border-radius: var(--r-full);
}
.filter-group button {
  padding: var(--s-1) var(--s-3); border-radius: var(--r-full);
  color: var(--text-soft); font-size: var(--text-xs); font-weight: 600;
}
.filter-group button.active {
  background: #fff; color: var(--rose);
}

.data-table {
  overflow-x: auto; border-radius: var(--r-lg);
  border: 1px solid var(--border-card);
}
.data-table table { width: 100%; border-collapse: collapse; font-size: var(--text-sm); }
.data-table th {
  padding: var(--s-3) var(--s-4); text-align: left;
  color: var(--text-muted); font-size: var(--text-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-card);
  background: rgba(255, 143, 163, 0.03);
}
.data-table td {
  padding: var(--s-3) var(--s-4); color: var(--text-soft);
  border-bottom: 1px solid var(--border-card);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg-hover); }

.badge {
  display: inline-block; padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 10px; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.03em;
}
.badge-ok { background: rgba(76,175,80,0.1); color: #4caf50; }
.badge-warn { background: rgba(255,152,0,0.1); color: #f57c00; }
.badge-err { background: rgba(244,67,54,0.1); color: #e53935; }
.badge-info { background: rgba(247,37,133,0.08); color: var(--rose); }

.admin-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-5); }

.template-form {
  display: flex; gap: var(--s-3); margin-bottom: var(--s-4); flex-wrap: wrap;
}
.template-form input, .template-form select {
  padding: var(--s-2) var(--s-4);
  background: var(--bg-input); border: 2px solid var(--border-input);
  border-radius: var(--r-full); color: var(--text-main);
  font-size: var(--text-sm); outline: none;
}
.template-form input:focus, .template-form select:focus { border-color: var(--blush); }
.template-form button {
  padding: var(--s-2) var(--s-5);
  background: linear-gradient(135deg, var(--rose), var(--blush));
  border: none; border-radius: var(--r-full);
  color: #fff; font-weight: 700; font-size: var(--text-sm);
}

.template-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--s-3);
}
.template-item {
  padding: var(--s-4); border-radius: var(--r-lg);
  background: rgba(255, 143, 163, 0.04);
  border: 1px solid var(--border-card);
}

.compact-log {
  display: flex; flex-direction: column; gap: var(--s-2);
}
.compact-log .log-line {
  padding: var(--s-2) var(--s-4); border-radius: var(--r-full);
  background: rgba(255, 143, 163, 0.03);
  display: flex; align-items: center; justify-content: space-between;
  font-size: var(--text-xs); color: var(--text-soft);
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */
@media (max-width: 1024px) {
  .creator-shell { grid-template-columns: 1fr; }
  .creator-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: min(300px, 86vw);
    z-index: 60;
    transform: translateX(-105%);
    transition: transform var(--dur-norm) var(--ease-smooth);
  }
  .creator-sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .sidebar-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(61, 44, 58, 0.32);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--dur-fast) var(--ease-smooth);
    backdrop-filter: blur(2px);
  }
  .sidebar-scrim.open {
    opacity: 1;
    pointer-events: auto;
  }
  .mobile-menu-btn { display: inline-flex; }
  .workspace-grid { grid-template-columns: 1fr; }
  .tool-card.hero-card { grid-column: span 1; }
  .admin-two-col { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .creator-topbar {
    height: 62px;
    padding: 0 var(--s-4);
    gap: var(--s-2);
  }
  .topbar-title {
    font-size: var(--text-base);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .pills-row { gap: var(--s-2); }
  .pill {
    height: 30px;
    padding: 0 var(--s-3);
    max-width: 112px;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .pill-issue { display: none; }
  .avatar-pill {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
  }
  .profile-modal { padding: var(--s-3); }
  .profile-card { padding: var(--s-5); }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-actions { justify-content: stretch; }
  .profile-actions button { flex: 1; }
  .tools-view, .tool-workspace, .billing-panel,
  .assets-panel, .history-panel { padding: var(--s-4); }
  .section-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: var(--s-3);
    align-items: start;
    margin-bottom: var(--s-5);
  }
  .section-head h1 { font-size: var(--text-2xl); }
  .section-head .sub { font-size: var(--text-sm); }
  .pricing-grid, .tool-grid { grid-template-columns: 1fr; }
  .ratio-grid { grid-template-columns: repeat(3, 1fr); }
  .workspace-head {
    align-items: flex-start;
    gap: var(--s-3);
  }
  .composer { padding: var(--s-4); }
  .billing-hero { padding: var(--s-4); }
  .billing-toggle {
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    text-align: left;
  }
  .billing-toggle strong {
    min-width: 0;
    line-height: 1.25;
  }
  .order-item {
    align-items: flex-start;
    gap: var(--s-3);
  }
  .order-item span {
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .admin-header { flex-direction: column; height: auto; padding: var(--s-3) var(--s-4); gap: var(--s-3); }
}

@media (max-width: 480px) {
  .auth-card { padding: var(--s-6) var(--s-5); }
  .topbar-title { display: none; }
  .creator-topbar { justify-content: flex-start; }
  .pills-row { margin-left: auto; }
  .pill-plan {
    max-width: 70px;
    padding: 0 var(--s-2);
  }
  .pill-credits {
    max-width: 104px;
    padding: 0 var(--s-2);
  }
  .mobile-menu-btn {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }
  .tools-view, .tool-workspace, .billing-panel,
  .assets-panel, .history-panel { padding: var(--s-4) var(--s-3); }
  .section-head {
    grid-template-columns: 1fr;
    gap: var(--s-2);
  }
  .section-head h1 { font-size: var(--text-xl); line-height: 1.16; }
  .tag { width: fit-content; }
  .tool-card .media-pair { grid-template-columns: 1fr 1fr; }
  .tool-card .media-pair figure { aspect-ratio: 4 / 5; }
  .card-foot {
    padding: var(--s-3);
    gap: var(--s-2);
  }
  .card-foot h2 { font-size: var(--text-base); }
  .card-foot .open-btn { padding: var(--s-1) var(--s-3); }
  .prompt-box { margin: 0 var(--s-2) var(--s-2); }
  .workspace-head h1 { font-size: var(--text-xl); }
  .workspace-head .back-btn { padding: var(--s-1) var(--s-3); }
  .segmented button { font-size: var(--text-xs); padding: var(--s-2); }
  .ratio-grid { border-radius: var(--r-lg); }
  .ratio-grid button { border-radius: var(--r-md); min-height: 44px; }
  .dropzone { min-height: 112px; padding: var(--s-4); }
  .metric-grid { grid-template-columns: 1fr 1fr; }
}

/* ═══════════════════════════════════════════
   ADMIN — dynamically generated by admin.js
   ═══════════════════════════════════════════ */
.admin-body{background:transparent}
.ops-panel{min-width:0;padding:18px;background:var(--bg-card);backdrop-filter:blur(12px);-webkit-backdrop-filter:blur(12px);border:1px solid var(--border-card);border-radius:20px;box-shadow:var(--shadow-sm)}
.panel-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.panel-head label{display:block;color:var(--text-main);font-size:15px;font-weight:700}
.panel-head span,.panel-head strong{color:var(--text-soft);font-size:12px;font-weight:700}
.data-table{display:grid;gap:8px}
.data-row{display:grid;gap:10px;align-items:center;padding:11px 14px;border:1px solid var(--border-card);border-radius:14px;background:var(--bg-input)}
.data-row strong,.data-row small{display:block}
.data-row small{margin-top:3px;color:var(--text-soft);font-size:11px;line-height:1.25;overflow-wrap:anywhere}
.data-head{color:var(--text-muted);background:rgba(255,143,163,0.04);font-size:12px;font-weight:800}
.data-row a{color:var(--rose);font-weight:800;text-decoration:none}
.admin-notice{padding:12px 20px;border-radius:16px;font-size:13px;font-weight:700;border:1px solid var(--border-card);background:var(--bg-card);color:var(--text-soft)}
.admin-notice[data-tone="error"]{color:#b42318;border-color:#fecaca;background:rgba(229,72,77,0.06)}
.admin-notice[data-tone="info"]{color:var(--text-main)}
.job-row{grid-template-columns:minmax(170px,1.05fr) minmax(150px,.9fr) minmax(120px,.65fr) minmax(120px,.7fr) minmax(80px,.45fr) minmax(190px,.9fr)}
.recent-job-row{grid-template-columns:minmax(170px,1.1fr) minmax(150px,.8fr) minmax(110px,.5fr) minmax(120px,.6fr)}
.user-row{grid-template-columns:minmax(180px,1.2fr) minmax(170px,1fr) minmax(110px,.55fr) minmax(130px,.7fr) minmax(90px,.45fr)}
.order-admin-row{grid-template-columns:minmax(130px,.85fr) minmax(140px,.8fr) minmax(100px,.5fr) minmax(200px,1.1fr) minmax(170px,.8fr)}
.status-chip{width:fit-content;padding:4px 10px;border-radius:999px;font-size:11px;font-weight:800;background:rgba(255,143,163,0.08);color:var(--text-soft);white-space:nowrap}
.status-chip.paid,.status-chip.active,.status-chip.completed{color:#4caf50;background:rgba(76,175,80,0.1)}
.status-chip.pending{color:#f57c00;background:rgba(255,152,0,0.1)}
.status-chip.queued,.status-chip.generating,.status-chip.draft,.status-chip.paused{color:#2196f3;background:rgba(33,150,243,0.08)}
.status-chip.cancelled,.status-chip.expired,.status-chip.failed,.status-chip.deleted,.status-chip.flagged{color:#e53935;background:rgba(244,67,54,0.08)}
.status-chip.archived{color:var(--text-muted);background:rgba(122,102,120,0.08)}
.status-stack{display:grid;gap:12px}
.status-line{display:grid;grid-template-columns:90px minmax(120px,1fr) 44px;gap:12px;align-items:center;color:var(--text-main);font-size:13px;font-weight:700}
.status-line div{height:9px;overflow:hidden;border-radius:999px;background:rgba(255,143,163,0.12)}
.status-line i{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,var(--rose),var(--blush))}
.metric-card.green{border-top:4px solid var(--rose)}.metric-card.blue{border-top:4px solid var(--blush)}.metric-card.violet{border-top:4px solid var(--lavender)}.metric-card.amber{border-top:4px solid var(--honey)}
.compact-list{display:grid;gap:8px}
.compact-item,.empty-row{min-height:46px;padding:10px 14px;display:flex;align-items:center;justify-content:space-between;gap:10px;border:1px solid var(--border-card);border-radius:14px;background:var(--bg-input)}
.compact-item strong,.compact-item small{display:block}
.compact-item small{margin-top:3px;color:var(--text-soft);font-size:11px}
.empty-row{color:var(--text-soft);font-size:13px;font-weight:700}
.credit-edit{display:grid;grid-template-columns:minmax(70px,1fr) auto auto;gap:6px}
.credit-edit input{min-width:0;height:34px;padding:0 8px;border:1px solid var(--border-card);border-radius:10px;background:var(--bg-input)}
.credit-edit button{height:34px;border:1px solid var(--border-card);border-radius:10px;background:var(--bg-input);color:var(--text-main);cursor:pointer;font-weight:800}
.order-actions{display:flex;flex-wrap:wrap;gap:6px}
.order-actions button{min-height:32px;padding:0 10px;border:1px solid var(--border-card);border-radius:10px;background:var(--bg-input);color:var(--text-main);cursor:pointer;font-weight:800}
.template-form{display:flex;gap:8px;margin-bottom:14px;flex-wrap:wrap}
.template-form input,.template-form select{min-width:0;height:38px;padding:0 14px;border:2px solid var(--border-card);border-radius:999px;background:var(--bg-input);color:var(--text-main);font-size:13px}
.template-form button{padding:0 20px;background:linear-gradient(135deg,var(--rose),var(--blush));border:none;border-radius:999px;color:#fff;font-weight:700;font-size:13px;cursor:pointer}
.template-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px}
.template-card{min-height:220px;padding:16px;display:grid;align-content:space-between;gap:14px;border:1px solid var(--border-card);border-radius:20px;background:var(--bg-card);backdrop-filter:blur(12px)}
.template-card h3{margin:12px 0 6px;font-size:18px;font-family:var(--font-display)}
.template-card p{color:var(--text-soft);font-size:13px;line-height:1.45}
.template-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.template-stats span{min-height:58px;padding:8px;display:grid;align-content:center;border-radius:10px;background:rgba(255,143,163,0.04)}
.template-stats strong,.template-stats small{display:block}
.template-stats small{color:var(--text-soft);font-size:11px;font-weight:800}
.detail-drawer{position:fixed;inset:0;z-index:200;display:grid;justify-content:end;background:rgba(61,44,58,0.36)}
.drawer-card{width:min(560px,100vw);height:100vh;padding:20px;overflow:auto;background:var(--bg-base);box-shadow:-18px 0 45px rgba(61,44,58,0.24)}
.drawer-close{float:right;padding:6px 16px;border:2px solid var(--border-card);border-radius:999px;color:var(--text-muted);font-size:12px;font-weight:700;cursor:pointer;background:transparent;transition:all var(--dur-fast) var(--ease-bounce)}
.drawer-close:hover{border-color:var(--blush);color:var(--rose)}
.drawer-head{margin-bottom:16px;padding:16px;border:1px solid var(--border-card);border-radius:20px;background:var(--bg-card);backdrop-filter:blur(12px)}
.drawer-head h2{margin:12px 0 6px;font-size:24px;font-family:var(--font-display)}
.drawer-head p{color:var(--text-soft);overflow-wrap:anywhere}
.drawer-metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:12px}
.drawer-metrics .metric-card{min-height:94px}
.drawer-metrics .metric-card strong{font-size:22px}
.drawer-form,.drawer-section{margin-top:12px;padding:14px;display:grid;gap:10px;border:1px solid var(--border-card);border-radius:20px;background:var(--bg-card);backdrop-filter:blur(12px)}
.drawer-section p{color:var(--text-main);line-height:1.45}
.seg-tabs{display:flex;flex-wrap:wrap;gap:8px}
.seg-tabs button,.row-actions button{min-height:34px;padding:0 14px;border:1px solid var(--border-card);border-radius:999px;background:var(--bg-input);color:var(--text-main);cursor:pointer;font-weight:700;transition:all var(--dur-fast) var(--ease-bounce)}
.seg-tabs button.active{background:rgba(247,37,133,0.06);color:var(--rose);border-color:var(--rose)}
.row-actions{display:flex;flex-wrap:wrap;gap:6px}
.row-actions button:disabled{cursor:not-allowed;opacity:.5}
.admin-two-column{display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,.78fr);gap:18px;align-items:start}
.admin-two-column.users-layout{grid-template-columns:minmax(0,1fr)}

/* Billing alignment with the mimisy redesign source */
.billing-panel .plan-card.featured::before {
  content: 'Most Loved';
}
.billing-panel .plan-features li::before {
  content: '✓';
}
.billing-message {
  min-height: 20px;
  margin-bottom: var(--s-3);
  color: var(--rose);
  font-size: var(--text-xs);
  font-weight: 700;
}
.order-list {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
}
.billing-panel .order-item span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.muted-text{color:var(--text-muted)}
.form-grid-3,.form-grid-4{display:grid;gap:8px}
.form-grid-3{grid-template-columns:120px minmax(90px,1fr) auto}
.form-grid-4{grid-template-columns:repeat(4,minmax(0,1fr))}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
