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

    /* ===== THEME VARIABLES ===== */
    :root, [data-theme="dark"] {
      /* Atakan 2026-06-10: "cok dark, biraz parlakligi arttiralim" — measured
         lift across bg / card / border / muted text. Navy accent ailesi korundu. */
      --bg-primary: #10131a;
      --bg-secondary: #161a22;
      --bg-tertiary: #1c2030;
      --bg-card: rgba(255, 255, 255, 0.05);
      --bg-card-hover: rgba(255, 255, 255, 0.075);
      --bg-elevated: rgba(255, 255, 255, 0.065);
      --bg-input: rgba(255, 255, 255, 0.05);
      --bg-glass: rgba(22, 28, 38, 0.55);
      --border: rgba(255, 255, 255, 0.11);
      --border-hover: rgba(80, 130, 200, 0.28);
      --border-strong: rgba(80, 130, 200, 0.36);
      --text-primary: #eef1f7;
      --text-secondary: #b6bdcc;
      --text-muted: #7e8694;
      --accent: #2f5ca8;
      --accent-hover: #3a68b0;
      --accent-subtle: rgba(47, 92, 168, 0.14);
      --accent-glow: rgba(47, 92, 168, 0.18);
      --accent-secondary: #3f6fbb;
      --accent-secondary-subtle: rgba(63, 111, 187, 0.14);
      --accent-tertiary: #284f8a;
      --success: #3fb98a;
      --success-subtle: rgba(63,185,138,0.14);
      --warning: #d9a851;
      --warning-subtle: rgba(217,168,81,0.12);
      --danger: #e0685f;
      --danger-subtle: rgba(224,104,95,0.12);
      --purple: #9b8fe0;
      --purple-subtle: rgba(155,143,224,0.12);
      --blue: #2f5ca8;
      --blue-subtle: rgba(47, 92, 168,0.12);
      --shadow-sm: 0 1px 2px rgba(0,0,0,0.5);
      --shadow-md: 0 4px 18px rgba(0,0,0,0.5);
      --shadow-lg: 0 14px 46px rgba(0,0,0,0.6);
      --glow-accent: 0 0 18px rgba(47, 92, 168,0.14), 0 0 44px rgba(47, 92, 168,0.07);
      --shadow-glow: 0 0 60px rgba(47, 92, 168, 0.10);
      --sidebar-width: 232px;
      --ease: cubic-bezier(0.4, 0, 0.2, 1);
      /* ── Motion scale (one vocabulary for the whole app) ──────────────
         --ease         standard material in/out (kept as the legacy alias)
         --ease-out     decelerate — entrances, reveals
         --ease-spring  soft Apple "pop" — button press/hover, chips
         --dur-fast     micro-interactions (hover, taps)
         --dur-base     panel/page transitions
         --dur-slow     larger reveals
         --dur-breath   slow ambient breathing / aurora drift */
      --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
      --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
      --dur-fast: 120ms;
      --dur-base: 200ms;
      --dur-slow: 320ms;
      --dur-breath: 4s;
      color-scheme: dark;
    }

    [data-theme="light"] {
      /* Warm-cream paper ground with a restrained cool-blue accent ("creamy
         background, cool ink"). The PAGE is a soft ivory; cards stay bright
         white so they lift cleanly off the cream, and the voice surfaces keep
         their cool palette. */
      --bg-primary: #f7f4ec;
      --bg-secondary: #f1ece1;
      --bg-tertiary: #e9e3d6;
      --bg-card: rgba(255,255,255,0.90);
      --bg-card-hover: rgba(255,255,255,0.98);
      --bg-elevated: rgba(255,255,255,0.94);
      --bg-input: #eef2f7;
      --bg-glass: rgba(255,255,255,0.65);
      --border: rgba(15, 23, 42,0.10);
      --border-hover: rgba(22, 58, 107,0.32);
      --border-strong: rgba(22, 58, 107,0.42);
      --text-primary: #141821;
      --text-secondary: #3d4753;
      --text-muted: #6b7280;
      --accent: #163a6b;
      --accent-hover: #1b5179;
      --accent-subtle: rgba(31, 74, 134,0.10);
      --accent-glow: rgba(31, 74, 134,0.12);
      --accent-secondary: #2e5aa0;
      --accent-secondary-subtle: rgba(46, 90, 160,0.10);
      --accent-tertiary: #1f5e8c;
      --success: #1f9d6b;
      --success-subtle: rgba(31,157,107,0.10);
      --warning: #b8852f;
      --warning-subtle: rgba(184,133,47,0.10);
      --danger: #cf4f47;
      --danger-subtle: rgba(207,79,71,0.10);
      --purple: #6d5fb8;
      --purple-subtle: rgba(109,95,184,0.10);
      --shadow-sm: 0 1px 3px rgba(20,30,50,0.05);
      --shadow-md: 0 4px 14px rgba(20,30,50,0.07);
      --shadow-lg: 0 12px 40px rgba(20,30,50,0.10);
      --glow-accent: 0 4px 14px rgba(31, 74, 134,0.12);
      --shadow-glow: 0 0 80px rgba(31, 74, 134,0.10);
      color-scheme: light;
    }

    /* Smooth theme transitions */
    body, .sidebar, .card, .stat-card, .table td, .table th,
    .input, .btn, .badge, .toast, .nav-item, .code-block {
      transition: background-color 0.2s var(--ease), color 0.15s var(--ease),
                  border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
    }

    body {
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      font-size: 14px;
      line-height: 1.5;
      background: var(--bg-primary);
      color: var(--text-primary);
      min-height: 100vh;
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
      font-feature-settings: 'cv02', 'cv03', 'cv04', 'cv11';
      position: relative;
      overflow-x: hidden;
    }

    /* Cool-accent text selection + keyboard focus ring (futuristic-minimal) */
    ::selection { background: rgba(47, 92, 168,0.30); color: var(--text-primary); }
    :focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
      border-radius: 6px;
    }

    /* Subtle dot grid background (dark mode only) */
    /* 2026-06-20 (Atakan: "arkadaki yıldızlar çok fazla ve parlak, daha sade"):
       nokta-grid seyreltildi (24→34px) + söndürüldü (0.05→0.028). */
    [data-theme="dark"] body {
      background-image: radial-gradient(rgba(74, 106, 168,0.028) 1px, transparent 1px);
      background-size: 34px 34px;
    }

    /* ===== AMBIENT BREATHING / TWISTING GRADIENT ===== */
    /* Top-right warm orange ember — slow rotate + breathe */
    body::before {
      content: '';
      position: fixed;
      top: -20vh;
      right: -20vw;
      width: 120vw;
      height: 120vh;
      background: radial-gradient(ellipse at top right,
        rgba(47, 92, 168, 0.12) 0%,
        rgba(70, 120, 175, 0.07) 25%,
        rgba(40, 70, 110, 0.03) 55%,
        transparent 78%);
      pointer-events: none;
      z-index: 0;
      animation: breatheGradient 11s ease-in-out infinite, rotateGradient 64s linear infinite;
      transform-origin: 70% 30%;
      will-change: transform, opacity;
      filter: blur(22px);
    }

    /* Bottom-left flickering ember — counter-rotating + breathe */
    body::after {
      content: '';
      position: fixed;
      bottom: -30vh;
      left: -25vw;
      width: 100vw;
      height: 100vh;
      background: radial-gradient(circle at bottom left,
        rgba(63, 111, 187, 0.09) 0%,
        rgba(70, 120, 175, 0.05) 30%,
        transparent 62%);
      pointer-events: none;
      z-index: 0;
      animation: breatheGradientAlt 15s ease-in-out -6s infinite, rotateGradientReverse 86s linear infinite;
      transform-origin: 30% 70%;
      will-change: transform, opacity;
      filter: blur(24px);
    }

    /* Light theme — warm ember tones (a touch richer so the brand palette
       reads across the whole page, still soft enough for dark text). */
    [data-theme="light"] body::before {
      background: radial-gradient(ellipse at top right,
        rgba(31, 74, 134, 0.20) 0%,
        rgba(31, 74, 134, 0.10) 25%,
        rgba(31, 74, 134, 0.04) 55%,
        transparent 78%);
    }
    [data-theme="light"] body::after {
      background: radial-gradient(circle at bottom left,
        rgba(46, 90, 160, 0.15) 0%,
        rgba(31, 74, 134, 0.07) 30%,
        transparent 62%);
    }

    /* Breathe = opacity-only (so rotateGradient owns transform exclusively) */
    @keyframes breatheGradient {
      0%, 100% { opacity: 1; }
      50%      { opacity: 0.4; }
    }
    @keyframes breatheGradientAlt {
      0%, 100% { opacity: 0.95; }
      50%      { opacity: 0.32; }
    }
    /* Twisting rotation — also has subtle scale wobble baked in */
    @keyframes rotateGradient {
      0%   { transform: rotate(0deg)   scale(1.00); }
      25%  { transform: rotate(90deg)  scale(1.08); }
      50%  { transform: rotate(180deg) scale(1.12); }
      75%  { transform: rotate(270deg) scale(1.08); }
      100% { transform: rotate(360deg) scale(1.00); }
    }
    @keyframes rotateGradientReverse {
      0%   { transform: rotate(0deg)    scale(1.00); }
      25%  { transform: rotate(-90deg)  scale(1.09); }
      50%  { transform: rotate(-180deg) scale(1.14); }
      75%  { transform: rotate(-270deg) scale(1.09); }
      100% { transform: rotate(-360deg) scale(1.00); }
    }

    /* Layer everything else above the gradient */
    .app, .login-container, .toast, .modal, .modal-overlay,
    #loginPage, #registerPage, #dashboardApp { position: relative; z-index: 1; }

    /* Respect reduced-motion preference */
    @media (prefers-reduced-motion: reduce) {
      body::before, body::after {
        animation: none;
        opacity: 0.65;
      }
    }

    /* Hide login/register instantly for returning users (token in localStorage) */
    .has-token #loginPage,
    .has-token #registerPage { display: none !important; }
    .has-token #dashboardApp { display: flex !important; }

    /* ===== LAYOUT ===== */
    .app { display: flex; min-height: 100vh; }

    /* ===== SIDEBAR ===== */
    .sidebar {
      width: var(--sidebar-width);
      background: var(--bg-secondary);
      border-right: 1px solid var(--border);
      padding: 20px 12px;
      position: fixed;
      top: 0; left: 0; bottom: 0;
      display: flex;
      flex-direction: column;
      z-index: 100;
    }

    .sidebar-logo {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 0 10px;
      margin-bottom: 28px;
    }

    .sidebar-logo-icon {
      width: 32px; height: 32px;
      border-radius: 8px;
      display: flex; align-items: center; justify-content: center;
      overflow: hidden;
    }

    .sidebar-logo-icon img { width: 32px; height: 32px; object-fit: contain; }
    .sidebar-logo-icon .brand-logo-svg { width: 32px; height: 32px; }

    .sidebar-logo-text { font-weight: 700; font-size: 15px; letter-spacing: -0.02em; }

    .sidebar-nav { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; scrollbar-width: thin; scrollbar-color: var(--border) transparent; }
    .sidebar-nav::-webkit-scrollbar { width: 7px; }
    .sidebar-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
    .sidebar-nav::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }
    .sidebar-nav::-webkit-scrollbar-track { background: transparent; }

    .nav-section { margin-bottom: 20px; }

    .nav-section-title {
      font-size: 10px; font-weight: 600; color: var(--text-muted);
      text-transform: uppercase; letter-spacing: 0.06em;
      padding: 0 10px; margin-bottom: 4px;
    }

    .nav-item {
      display: flex; align-items: center; gap: 10px;
      padding: 7px 10px; border-radius: 7px;
      color: var(--text-secondary); text-decoration: none;
      font-size: 13px; font-weight: 500;
      transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-spring); cursor: pointer;
    }

    .nav-item:hover { background: var(--bg-card-hover); color: var(--text-primary); }
    .nav-item:active { transform: scale(0.98); }
    .nav-item.active { background: var(--accent-subtle); color: var(--accent); }
    .nav-item svg { width: 16px; height: 16px; opacity: 0.6; }
    .nav-item.active svg { opacity: 1; }

    /* Collapsible nav groups */
    .nav-group { margin-bottom: 2px; }
    .nav-group-header {
      display: flex; align-items: center; gap: 10px;
      padding: 7px 10px; border-radius: 7px;
      color: var(--text-secondary); font-size: 13px; font-weight: 500;
      cursor: pointer; transition: all 100ms var(--ease);
      user-select: none;
    }
    .nav-group-header:hover { background: var(--bg-card-hover); color: var(--text-primary); }
    .nav-group-header svg { width: 16px; height: 16px; opacity: 0.6; }
    .nav-group-header.has-active { color: var(--accent); }
    .nav-group-header.has-active svg { opacity: 1; }
    .nav-group-chevron {
      margin-left: auto; width: 14px; height: 14px; opacity: 0.4;
      transition: transform 200ms var(--ease);
    }
    .nav-group.open .nav-group-chevron { transform: rotate(180deg); }
    .nav-group-items {
      overflow: hidden; max-height: 0;
      transition: max-height 250ms var(--ease), opacity 200ms var(--ease);
      opacity: 0;
    }
    .nav-group.open .nav-group-items { max-height: 300px; opacity: 1; }
    .nav-group-items .nav-item {
      padding-left: 36px; font-size: 12px;
    }

    .sidebar-footer { border-top: 1px solid var(--border); padding-top: 12px; }

    .user-info { display: flex; align-items: center; gap: 10px; padding: 6px 10px; }

    .user-avatar {
      width: 30px; height: 30px;
      background: var(--accent-subtle); border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-weight: 600; font-size: 12px; color: var(--accent);
    }

    .user-details { flex: 1; min-width: 0; }

    .user-name {
      font-size: 12px; font-weight: 600;
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }

    .user-plan { font-size: 10px; color: var(--text-muted); }

    /* Theme Toggle */
    .theme-toggle {
      display: flex; align-items: center; gap: 8px;
      padding: 6px 10px; margin-bottom: 8px;
      cursor: pointer; border-radius: 7px;
      font-size: 12px; color: var(--text-muted);
      transition: all 100ms var(--ease);
    }
    .theme-toggle:hover { background: var(--bg-card-hover); color: var(--text-secondary); }
    .theme-toggle svg { width: 15px; height: 15px; }

    /* ===== CUSTOM MODAL (replaces native alert/confirm/prompt) ===== */
    .modal-overlay {
      display: none; position: fixed; inset: 0; z-index: 9998;
      background: rgba(0,0,0,0.75);
      align-items: center; justify-content: center;
      animation: fadeIn 0.15s ease;
    }
    .modal-overlay.active { display: flex; }
    @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
    .modal-box {
      background: var(--bg-secondary); border: 1px solid var(--border);
      border-radius: 16px; padding: 24px; width: 90%; max-width: 420px;
      box-shadow: var(--shadow-lg);
    }
    .modal-box h3 { font-size: 15px; font-weight: 600; margin-bottom: 8px; }
    .modal-box p, .modal-box .modal-message { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.6; }
    .modal-box input { width: 100%; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg-input); color: var(--text-primary); font-size: 13px; margin-bottom: 16px; }
    .modal-box.modal-wide { max-width: 560px; }
    .modal-actions { display: flex; gap: 8px; justify-content: flex-end; }

    /* ===== SELECT DROPDOWN OVERRIDE ===== */
    select {
      appearance: none; -webkit-appearance: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
      background-repeat: no-repeat;
      background-position: right 10px center;
      padding-right: 28px !important;
    }

    /* ===== SKELETON LOADING ===== */
    @keyframes shimmer {
      to { background-position: -200% 0; }
    }
    .skeleton-card {
      aspect-ratio: 3/4;
      border-radius: 12px;
      background: linear-gradient(110deg, rgba(34,197,94,0.04) 8%, rgba(34,197,94,0.1) 18%, rgba(34,197,94,0.04) 33%);
      background-size: 200% 100%;
      animation: shimmer 0.8s infinite;
    }
    [data-theme="light"] .skeleton-card {
      background: linear-gradient(110deg, rgba(34,197,94,0.06) 8%, rgba(34,197,94,0.12) 18%, rgba(34,197,94,0.06) 33%);
      background-size: 200% 100%;
    }

    /* ===== MAIN CONTENT ===== */
    .main {
      flex: 1;
      margin-left: var(--sidebar-width);
      padding: 28px 32px;
      max-width: 1200px;
    }

    .page-header { margin-bottom: 24px; }

    .page-title {
      font-size: 22px; font-weight: 700;
      letter-spacing: -0.03em; margin-bottom: 4px;
    }

    .page-subtitle { color: var(--text-secondary); font-size: 13px; }

    /* Helper text below subtitles */
    .page-hint {
      color: var(--text-muted); font-size: 11px;
      margin-top: 4px; line-height: 1.6;
      max-width: 560px;
    }

    /* ===== CARDS ===== */
    .card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 12px;
      padding: 20px;
      position: relative;
      transition: all 150ms var(--ease);
    }

    .card::before {
      content: '';
      position: absolute; top: 0; left: 0; right: 0; height: 1px;
      background: linear-gradient(90deg, transparent, rgba(52,178,123,0.15), transparent);
      border-radius: 12px 12px 0 0;
    }

    .card:hover { border-color: var(--border-hover); box-shadow: var(--glow-accent); }

    .card-header {
      display: flex; justify-content: space-between; align-items: center;
      margin-bottom: 16px;
    }

    .card-title { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }

    .card-hint {
      font-size: 11px; color: var(--text-muted);
      margin-top: 2px; line-height: 1.5;
    }

    /* ===== STATS GRID ===== */
    .stats-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 12px; margin-bottom: 20px;
    }

    .stat-card {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 16px 18px;
      transition: all 150ms var(--ease);
      position: relative; overflow: hidden;
    }

    .stat-card::before {
      content: '';
      position: absolute; top: 0; left: 0; right: 0; height: 1px;
      background: linear-gradient(90deg, transparent, rgba(47, 92, 168,0.16), transparent);
    }

    .stat-card:hover { border-color: var(--border-hover); transform: translateY(-1px); box-shadow: var(--glow-accent); }

    .stat-label {
      font-size: 11px; font-weight: 500; color: var(--text-muted);
      text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px;
    }

    .stat-value {
      font-size: 24px; font-weight: 700;
      letter-spacing: -0.03em;
      font-variant-numeric: tabular-nums;
      line-height: 1.1;
    }

    .stat-change {
      font-size: 11px; margin-top: 6px;
      display: flex; align-items: center; gap: 3px;
    }

    .stat-change.positive { color: var(--success); }
    .stat-change.negative { color: var(--danger); }

    /* Progress Bar */
    .progress-bar {
      height: 4px; background: var(--bg-tertiary);
      border-radius: 2px; overflow: hidden; margin-top: 10px;
    }
    .progress-fill { height: 100%; background: var(--accent); border-radius: 2px; transition: width 0.3s; }
    .progress-fill.warning { background: var(--warning); }
    .progress-fill.danger { background: var(--danger); }

    /* ===== BUTTONS ===== */
    .btn {
      display: inline-flex; align-items: center; gap: 6px;
      padding: 7px 14px; border-radius: 7px;
      font-size: 12px; font-weight: 500; border: none;
      cursor: pointer; transition: all 100ms var(--ease);
      font-family: inherit;
      position: relative; overflow: hidden;
    }
    .btn:active { transform: scale(0.97); transition-duration: 50ms; }

    /* ── Button ripple effect ── */
    .btn .ripple {
      position: absolute;
      border-radius: 50%;
      background: rgba(255,255,255,0.18);
      transform: scale(0);
      animation: rippleEffect 0.5s ease-out forwards;
      pointer-events: none;
    }
    @keyframes rippleEffect {
      to { transform: scale(4); opacity: 0; }
    }

    .btn-primary { background: var(--accent); color: white; box-shadow: 0 0 12px var(--accent-glow); }
    .btn-primary:hover { background: var(--accent-hover); box-shadow: 0 0 20px var(--accent-glow); }

    /* Instagram Pro tabs */
    .igpro-tab {
      padding: 8px 16px; border-radius: 8px; border: 1px solid var(--border);
      background: transparent; color: var(--text-secondary); font-size: 12px; font-weight: 600;
      cursor: pointer; transition: all .15s;
    }
    .igpro-tab:hover { border-color: var(--border-hover); color: var(--text-primary); }
    .igpro-tab.active { background: var(--accent); color: white; border-color: var(--accent); }

    .igpro-competitor-card {
      background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 16px;
      transition: all .15s;
    }
    .igpro-competitor-card:hover { border-color: var(--border-hover); }
    .igpro-competitor-card h4 { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
    .igpro-tag { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 10px; font-weight: 600; margin: 2px; }
    .igpro-tag.strength { background: rgba(47, 92, 168,0.1); color: var(--accent); }
    .igpro-tag.weakness { background: rgba(248,113,113,0.1); color: #f87171; }
    .igpro-tag.content-type { background: rgba(53, 99, 187,0.1); color: #3563bb; }

    .igpro-competitor-card .section-label {
      font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px;
      color: var(--text-muted); margin-bottom: 4px; margin-top: 10px;
    }
    .igpro-summary-card {
      background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 16px;
    }
    .igpro-summary-card h4 { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
    .igpro-summary-card ul { font-size: 12px; color: var(--text-secondary); line-height: 1.8; padding-left: 16px; }

    /* Competitor Chat Interface */
    .igpro-chat-container {
      background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
      margin-top: 16px; overflow: hidden;
    }
    .igpro-chat-header {
      padding: 12px 16px; border-bottom: 1px solid var(--border);
      font-size: 13px; font-weight: 700; color: var(--accent);
      display: flex; align-items: center; gap: 8px;
    }
    .igpro-chat-messages {
      max-height: 300px; overflow-y: auto; padding: 12px 16px;
      display: flex; flex-direction: column; gap: 8px;
    }
    .igpro-chat-msg {
      max-width: 85%; padding: 8px 12px; border-radius: 10px; font-size: 12px; line-height: 1.6;
    }
    .igpro-chat-msg.user {
      align-self: flex-end; background: var(--accent); color: white; border-bottom-right-radius: 2px;
    }
    .igpro-chat-msg.assistant {
      align-self: flex-start; background: var(--bg-elevated); color: var(--text-primary);
      border: 1px solid var(--border); border-bottom-left-radius: 2px;
    }
    .igpro-chat-input-row {
      display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border);
    }
    .igpro-chat-input-row input {
      flex: 1; padding: 8px 12px; border-radius: 8px; border: 1px solid var(--border);
      background: var(--bg-input); color: var(--text-primary); font-size: 12px; outline: none;
    }
    .igpro-chat-input-row input:focus { border-color: var(--accent); }

    .calendar-day {
      background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 10px;
      min-height: 120px; transition: all .15s;
    }
    .calendar-day:hover { border-color: var(--border-hover); }
    .calendar-day-header { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
    .calendar-post {
      padding: 6px 8px; border-radius: 6px; margin-bottom: 4px; font-size: 10px;
      background: var(--bg-elevated); border-left: 3px solid var(--accent); cursor: pointer;
    }
    .calendar-post:hover { background: var(--bg-card-hover); }
    .calendar-post .post-time { font-weight: 700; color: var(--accent); }
    .calendar-post .post-type { color: var(--text-muted); }

    /* Month Calendar Grid */
    .cal-month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
    .cal-month-header { font-size: 10px; font-weight: 700; color: var(--text-muted); text-align: center; padding: 6px 0; text-transform: uppercase; letter-spacing: 0.5px; }
    .cal-month-cell {
      background: var(--bg-card); border: 1px solid var(--border); border-radius: 8px; padding: 6px;
      min-height: 80px; cursor: pointer; transition: all .15s; position: relative;
    }
    .cal-month-cell:hover { border-color: var(--accent); }
    .cal-month-cell.today { border-color: var(--accent); box-shadow: 0 0 8px var(--accent-glow); }
    .cal-month-cell.other-month { opacity: 0.35; }
    .cal-month-cell .cal-date { font-size: 11px; font-weight: 700; color: var(--text-muted); margin-bottom: 4px; }
    .cal-month-cell.today .cal-date { color: var(--accent); }
    .cal-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin: 1px; cursor: pointer; }
    .cal-dot.photo { background: var(--accent); }
    .cal-dot.carousel { background: #3563bb; }
    .cal-dot.reel { background: #f59e0b; }
    .cal-dot.pending { opacity: 0.7; }
    .cal-dot.published { box-shadow: 0 0 4px var(--accent-glow); }
    .cal-thumb { width: 28px; height: 28px; border-radius: 4px; object-fit: cover; margin: 1px; cursor: pointer; border: 1px solid var(--border); }
    .cal-nav { display: flex; align-items: center; gap: 12px; }
    .cal-nav button { background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text-primary); border-radius: 6px; padding: 4px 10px; cursor: pointer; font-size: 13px; }
    .cal-nav button:hover { border-color: var(--accent); }
    .cal-nav .cal-title { font-size: 15px; font-weight: 700; min-width: 160px; text-align: center; }

    /* Scheduled Post Cards */
    .sched-card {
      background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 14px;
      display: flex; align-items: center; gap: 14px; margin-bottom: 8px; transition: all .15s;
    }
    .sched-card:hover { border-color: var(--border-hover); }
    .sched-thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; background: var(--bg-secondary); flex-shrink: 0; }
    .sched-info { flex: 1; min-width: 0; }
    .sched-caption { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-primary); }
    .sched-meta { font-size: 10px; color: var(--text-muted); margin-top: 3px; display: flex; gap: 8px; align-items: center; }
    .sched-badge { padding: 2px 8px; border-radius: 6px; font-size: 9px; font-weight: 700; text-transform: uppercase; }
    .sched-badge.pending { background: rgba(245,158,11,0.15); color: #f59e0b; }
    .sched-badge.published { background: rgba(47, 92, 168,0.15); color: var(--accent); }
    .sched-badge.failed { background: rgba(248,113,113,0.15); color: #f87171; }
    .sched-badge.publishing { background: rgba(53, 99, 187,0.15); color: #3563bb; }
    .sched-actions { display: flex; gap: 6px; flex-shrink: 0; }
    .sched-actions button { padding: 5px 10px; border-radius: 6px; font-size: 11px; font-weight: 600; border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text-secondary); cursor: pointer; transition: all .15s; }
    .sched-actions button:hover { border-color: var(--accent); color: var(--accent); }
    .sched-actions button.danger:hover { border-color: #f87171; color: #f87171; }

    /* Schedule Modal */
    .schedule-form { display: grid; gap: 12px; }
    .schedule-form label { font-size: 11px; font-weight: 600; color: var(--text-muted); display: block; margin-bottom: 4px; }
    .schedule-form select, .schedule-form input[type="text"], .schedule-form input[type="datetime-local"], .schedule-form textarea {
      width: 100%; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
      background: var(--bg-input); color: var(--text-primary); font-size: 12px; font-family: inherit;
    }
    .schedule-form textarea { resize: vertical; }
    .trend-card {
      background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 14px;
      transition: all .15s;
    }
    .trend-card:hover { border-color: var(--accent); }
    .trend-relevance { font-size: 11px; font-weight: 700; font-family: var(--mono); }

    .trend-relevance-bar { height: 4px; border-radius: 2px; background: var(--border); overflow: hidden; margin-top: 8px; }
    .trend-relevance-bar-fill { height: 100%; border-radius: 2px; transition: width .5s ease; }
    .trend-section-title { font-size: 14px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
    .trend-section-title .ts-icon { width: 22px; height: 22px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-size: 12px; flex-shrink: 0; }

    .reel-idea-card {
      background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 14px;
      transition: all .15s; margin-bottom: 8px;
    }
    .reel-idea-card:hover { border-color: var(--accent); }
    .format-badge {
      display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 10px; font-weight: 600;
      background: linear-gradient(135deg, rgba(47, 92, 168,0.15), rgba(53, 99, 187,0.15));
      color: var(--accent);
    }
    .reach-badge { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 10px; font-weight: 600; }
    .reach-high { background: rgba(47, 92, 168,0.12); color: var(--accent); }
    .reach-medium { background: rgba(255,179,64,0.12); color: #ffb340; }

    .hashtag-group { margin-bottom: 10px; }
    .hashtag-group-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
    .hashtag-chip {
      display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 6px;
      font-size: 11px; font-weight: 600; margin: 2px; cursor: pointer; transition: all .15s; border: none;
      background: rgba(47, 92, 168,0.1); color: var(--accent);
    }
    .hashtag-chip:hover { transform: scale(1.05); }
    .hashtag-chip.niche-chip { background: rgba(53, 99, 187,0.1); color: #3563bb; }
    .hashtag-chip.evergreen-chip { background: var(--bg-elevated); color: var(--text-secondary); }

    .time-grid { display: grid; grid-template-columns: auto repeat(3, 1fr); gap: 4px; font-size: 10px; }
    .time-grid-header { font-weight: 700; text-align: center; color: var(--text-muted); padding: 6px 4px; }
    .time-slot {
      text-align: center; padding: 8px 6px; border-radius: 6px; font-weight: 600;
      background: var(--bg-elevated); color: var(--text-secondary); font-size: 11px;
    }
    .time-slot.active {
      background: linear-gradient(135deg, rgba(47, 92, 168,0.2), rgba(53, 99, 187,0.2));
      color: var(--accent); border: 1px solid rgba(47, 92, 168,0.3);
    }

    .donut-chart-wrapper { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
    .donut-chart { position: relative; width: 120px; height: 120px; border-radius: 50%; }
    .donut-center {
      position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%);
      width: 56px; height: 56px; border-radius: 50%; background: var(--bg-card);
      display: flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: var(--text-muted);
    }
    .donut-legend { font-size: 11px; line-height: 2.2; }
    .donut-legend-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }

    .trend-chat-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 14px; margin-top: 16px; }
    .trend-chat-input-row { display: flex; gap: 8px; }
    .trend-chat-input {
      flex: 1; padding: 10px 14px; border-radius: 10px; border: 1px solid var(--border);
      background: var(--bg-input); color: var(--text-primary); font-size: 12px; outline: none;
    }
    .trend-chat-input:focus { border-color: var(--accent); }
    .trend-chat-messages { max-height: 200px; overflow-y: auto; margin-top: 10px; }
    .trend-chat-msg { padding: 8px 12px; border-radius: 8px; margin-bottom: 6px; font-size: 12px; line-height: 1.6; white-space: pre-wrap; }
    .trend-chat-msg.user { background: rgba(47, 92, 168,0.1); color: var(--text-primary); text-align: right; }
    .trend-chat-msg.assistant { background: var(--bg-elevated); color: var(--text-secondary); }

    @keyframes trendPulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.4; }
    }
    .trend-loading-pulse > div { animation: trendPulse 1.5s ease-in-out infinite; }
    .trend-loading-pulse > div:nth-child(2) { animation-delay: 0.2s; }
    .trend-loading-pulse > div:nth-child(3) { animation-delay: 0.4s; }

    .btn-secondary {
      background: transparent; color: var(--accent-secondary); border: 1px solid var(--accent-secondary);
      border: 1px solid var(--border);
    }
    .btn-secondary:hover { background: var(--accent-secondary-subtle); border-color: var(--accent); color: var(--accent); }

    .btn svg { width: 14px; height: 14px; }

    /* ===== TABLE ===== */
    .table { width: 100%; border-collapse: collapse; }
    .table th, .table td { padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); }
    .table th {
      font-size: 10px; font-weight: 600; color: var(--text-muted);
      text-transform: uppercase; letter-spacing: 0.04em;
    }
    .table td { font-size: 13px; }
    .table tr:hover td { background: var(--bg-card-hover); }
    .table tr:last-child td { border-bottom: none; }

    /* API Key display */
    .api-key-display {
      display: flex; align-items: center; gap: 6px;
      background: var(--bg-input); padding: 6px 10px;
      border-radius: 6px; border: 1px solid var(--border);
      font-family: 'SF Mono', Monaco, 'Fira Code', monospace;
      font-size: 11px;
    }
    .api-key-display .key { flex: 1; color: var(--text-secondary); }
    .copy-btn {
      background: none; border: none; color: var(--text-muted);
      cursor: pointer; padding: 3px; border-radius: 4px;
      transition: all 100ms var(--ease);
    }
    .copy-btn:hover { color: var(--text-primary); background: var(--bg-card-hover); }

    /* ===== BADGE ===== */
    .badge {
      display: inline-flex; align-items: center;
      padding: 3px 8px; border-radius: 20px;
      font-size: 11px; font-weight: 500;
    }
    .badge-success { background: var(--success-subtle); color: var(--success); }
    .badge-warning { background: var(--warning-subtle); color: var(--warning); }
    .badge-primary { background: var(--accent-subtle); color: var(--accent); }

    /* Grid */
    .grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }

    /* Code block */
    .code-block {
      background: var(--bg-input); border: 1px solid var(--border);
      border-radius: 8px; padding: 14px;
      font-family: 'SF Mono', Monaco, 'Fira Code', monospace;
      font-size: 12px; overflow-x: auto; line-height: 1.6;
    }
    .code-block code { color: var(--text-secondary); }
    .code-block .hl { color: var(--accent); }

    /* Inputs */
    .input {
      width: 100%; padding: 8px 12px;
      background: var(--bg-input); border: 1px solid var(--border);
      border-radius: 7px; color: var(--text-primary);
      font-size: 13px; font-family: inherit;
      transition: border-color 150ms var(--ease), box-shadow 150ms var(--ease);
    }
    .input:focus {
      outline: none; border-color: var(--accent);
      box-shadow: 0 0 0 3px var(--accent-subtle), 0 0 12px var(--accent-glow);
    }
    .input::placeholder { color: var(--text-muted); }

    .form-group { margin-bottom: 14px; }
    .form-label { display: block; font-size: 12px; font-weight: 500; margin-bottom: 5px; color: var(--text-secondary); }
    .form-hint { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

    /* Toast — slide-in from right (solid, no glass) */
    .toast {
      position: fixed; bottom: 20px; right: 20px;
      background: #1a1a24;
      border: 1px solid rgba(255,255,255,0.12);
      padding: 14px 20px; border-radius: 10px;
      display: flex; align-items: center; gap: 10px;
      box-shadow: 0 8px 32px rgba(0,0,0,0.5);
      transform: translateX(calc(100% + 24px));
      opacity: 0;
      transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                  opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
      z-index: 1000;
      font-size: 13px;
      font-weight: 500;
      color: #f0f0f0;
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
    }
    .toast.show { transform: translateX(0); opacity: 1; }
    .toast.success { border-left: 3px solid var(--success); background: #0d2818; }
    .toast.error { border-left: 3px solid var(--danger); background: #2a1215; }
    .toast.info { border-left: 3px solid var(--blue); background: #0d1a2e; }
    [data-theme="light"] .toast { background: #ffffff; color: #1a1a1a; border-color: rgba(0,0,0,0.12); box-shadow: 0 8px 32px rgba(0,0,0,0.12); }
    [data-theme="light"] .toast.success { background: #f0fdf4; }
    [data-theme="light"] .toast.error { background: #fef2f2; }
    [data-theme="light"] .toast.info { background: #eff6ff; }

    /* ── Toggle Switch ── */
    .toggle-switch {
      position: relative; width: 40px; height: 22px;
      display: inline-block; vertical-align: middle;
    }
    .toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
    .toggle-switch .slider {
      position: absolute; inset: 0;
      background: var(--bg-tertiary);
      border: 1px solid var(--border);
      border-radius: 11px;
      cursor: pointer;
      transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
    }
    .toggle-switch .slider::before {
      content: '';
      position: absolute; width: 16px; height: 16px;
      left: 2px; top: 2px;
      background: var(--text-muted);
      border-radius: 50%;
      transition: transform 0.25s var(--ease), background 0.25s var(--ease);
    }
    .toggle-switch input:checked + .slider {
      background: var(--accent-subtle);
      border-color: var(--accent);
    }
    .toggle-switch input:checked + .slider::before {
      transform: translateX(18px);
      background: var(--accent);
    }

    /* Empty state */
    .empty-state { text-align: center; padding: 40px 20px; color: var(--text-muted); }
    .empty-state svg { width: 40px; height: 40px; margin-bottom: 12px; opacity: 0.4; }

    /* Pages — animated transitions */
    .page { display: none; opacity: 0; }
    .page.active { display: block; opacity: 1; animation: pageEnter var(--dur-slow) var(--ease-out) forwards; }
    .page.page-exit { display: block; animation: pageExit var(--dur-base) var(--ease-out) forwards; }

    /* pageEnter is a pure fade — the per-section slide-up stagger in
       motion-polish.css (.page.active > *) is the star; a whole-page translate
       on top of it read as double movement. */
    @keyframes pageEnter {
      from { opacity: 0; }
      to { opacity: 1; }
    }
    @keyframes pageExit {
      from { opacity: 1; transform: translateY(0); }
      to { opacity: 0; transform: translateY(-4px); }
    }
    @keyframes pulse {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.4; }
    }
    @keyframes spin { to { transform: rotate(360deg); } }

    /* ===== STUDIO ONBOARDING ===== */
    .studio-onboarding {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 14px;
      padding: 16px 20px;
      margin-bottom: 16px;
      position: relative;
      overflow: hidden;
      max-height: 220px;
      transition: max-height 0.35s var(--ease), opacity 0.25s var(--ease), margin 0.35s var(--ease), padding 0.35s var(--ease);
      box-shadow: 0 0 16px rgba(52,178,123,0.06);
    }
    .studio-onboarding.collapsed {
      max-height: 0;
      opacity: 0;
      margin-bottom: 0;
      padding-top: 0;
      padding-bottom: 0;
      border-width: 0;
      pointer-events: none;
    }
    .studio-onboarding-dismiss {
      position: absolute;
      top: 10px;
      right: 12px;
      background: none;
      border: none;
      color: var(--text-muted);
      cursor: pointer;
      font-size: 18px;
      line-height: 1;
      padding: 2px 6px;
      border-radius: 6px;
      transition: color 0.2s, background 0.2s;
    }
    .studio-onboarding-dismiss:hover { color: var(--text-primary); background: var(--bg-elevated); }
    .studio-onboarding-cards {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 12px;
      margin-top: 10px;
    }
    .studio-onboarding-card {
      background: var(--bg-elevated);
      border: 1px solid var(--border);
      border-radius: 10px;
      padding: 14px;
      transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
      cursor: default;
    }
    .studio-onboarding-card:hover {
      border-color: var(--accent);
      transform: translateY(-1px);
      box-shadow: 0 4px 12px rgba(52,178,123,0.08);
    }
    .studio-onboarding-card h4 { font-size: 12px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
    .studio-onboarding-card p { font-size: 11px; color: var(--text-secondary); line-height: 1.4; margin-bottom: 8px; }
    .studio-onboarding-card .obd-btn {
      display: inline-block;
      font-size: 10px;
      font-weight: 600;
      color: var(--accent);
      cursor: pointer;
      padding: 4px 10px;
      border: 1px solid var(--accent);
      border-radius: 6px;
      background: var(--accent-subtle);
      transition: background 0.2s, color 0.2s;
    }
    .studio-onboarding-card .obd-btn:hover { background: var(--accent); color: white; }
    .studio-info-toggle {
      background: var(--bg-card);
      border: 1px solid var(--border);
      border-radius: 8px;
      width: 26px;
      height: 26px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      color: var(--text-muted);
      font-size: 13px;
      font-weight: 700;
      transition: color 0.2s, border-color 0.2s;
    }
    .studio-info-toggle:hover { color: var(--accent); border-color: var(--accent); }
    @media (max-width: 768px) {
      .studio-onboarding-cards { grid-template-columns: 1fr; }
    }

    /* ===== FLOW EDITOR (Node-Based Studio) ===== */
    .flow-canvas {
      position: relative;
      width: 5000px;
      height: 5000px;
      overflow: visible;
      background-color: rgba(12,12,16,1);
      background-image: radial-gradient(circle, rgba(255,255,255,0.07) 1px, transparent 1px);
      background-size: 24px 24px;
    }
    .flow-svg {
      position: absolute;
      top: 0; left: 0;
      width: 5000px; height: 5000px;
      pointer-events: none;
      z-index: 1;
      overflow: visible;
    }
    .flow-svg path { pointer-events: stroke; }
    .flow-node {
      position: absolute;
      background: #1e1e24;
      border: 1.5px solid rgba(255,255,255,0.25);
      border-radius: 12px;
      z-index: 2;
      box-shadow: 0 4px 24px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.06);
      transition: box-shadow 0.15s, border-color 0.15s;
      min-width: 200px;
    }
    .flow-node:hover { box-shadow: 0 8px 32px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.35); }
    .flow-node.dragging { z-index: 10; opacity: 0.9; box-shadow: 0 12px 40px rgba(0,0,0,0.5); }
    .flow-node-header {
      padding: 8px 12px;
      border-bottom: 1px solid rgba(255,255,255,0.15);
      font-size: 10px;
      font-weight: 700;
      text-transform: uppercase;
      letter-spacing: 1px;
      color: #f0f0f0;
      cursor: grab;
      user-select: none;
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .flow-node.dragging .flow-node-header { cursor: grabbing; }
    .flow-node-body { padding: 10px 12px; color: #e0e0e0; }
    .flow-node-preview {
      width: 100%;
      border-radius: 8px;
      overflow: hidden;
      background: var(--bg, #09090b);
      min-height: 120px;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
    }
    .flow-node-preview img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      border-radius: 8px;
    }
    .flow-port {
      position: absolute;
      width: 26px; height: 26px;
      border-radius: 50%;
      background: var(--bg, #09090b);
      border: 3px solid var(--accent, #2f5ca8);
      cursor: crosshair;
      z-index: 5;
      transition: transform 0.15s, box-shadow 0.15s;
    }
    .flow-port:hover {
      transform: scale(1.3);
      box-shadow: 0 0 16px var(--accent, #2f5ca8);
    }
    .flow-port.connected { background: var(--accent, #2f5ca8); }
    /* Mini variation result nodes */
    .flow-node.mini-result { opacity: 0.95; border: 1px solid rgba(251,146,60,0.4); }
    .flow-node.mini-result .flow-node-header { padding: 4px 8px; font-size: 9px; }
    .flow-node.mini-result .flow-node-body { padding: 4px; }
    .flow-node.mini-result img { width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 6px; }
    .flow-connection {
      stroke: var(--accent, #2f5ca8);
      stroke-width: 2;
      fill: none;
      filter: drop-shadow(0 0 3px rgba(47, 92, 168,0.3));
      cursor: pointer;
      pointer-events: stroke;
    }
    .flow-connection:hover { stroke-width: 3; }
    .flow-connection.temp { stroke-dasharray: 6 3; opacity: 0.6; }
    .flow-node-btn {
      width: 100%;
      padding: 6px 10px;
      border: 1px dashed var(--border);
      border-radius: 6px;
      background: transparent;
      color: var(--text-2, #a1a1aa);
      font-size: 11px;
      cursor: pointer;
      transition: all 0.2s;
      margin-top: 6px;
    }
    .flow-node-btn:hover { border-color: var(--accent); color: var(--text); }
    .flow-generate-btn {
      width: 100%;
      padding: 8px;
      background: var(--accent, #2f5ca8);
      color: #000;
      border: none;
      border-radius: 6px;
      font-size: 11px;
      font-weight: 700;
      cursor: pointer;
      margin-top: 8px;
      transition: opacity 0.2s;
    }
    .flow-generate-btn:hover { opacity: 0.85; }
    .flow-generate-btn:disabled { opacity: 0.4; cursor: not-allowed; }
    .flow-node-input {
      width: 100%;
      padding: 5px 8px;
      background: var(--bg-elevated, #18181b);
      border: 1px solid var(--border);
      border-radius: 6px;
      color: var(--text, #fafafa);
      font-size: 11px;
      outline: none;
      margin-top: 6px;
    }
    .flow-node-input:focus { border-color: var(--accent); }
    .flow-node-toggle {
      display: flex;
      align-items: center;
      gap: 6px;
      font-size: 10px;
      color: var(--text-2, #a1a1aa);
      margin-top: 6px;
      cursor: pointer;
    }
    .flow-node-toggle input[type="checkbox"] { accent-color: var(--accent, #2f5ca8); }
    .flow-chip {
      display: inline-block;
      padding: 3px 8px;
      font-size: 9px;
      border-radius: 12px;
      border: 1px solid var(--border);
      color: var(--text-2);
      cursor: pointer;
      transition: all 0.15s;
    }
    .flow-chip.active { border-color: var(--accent); color: var(--accent); background: rgba(47, 92, 168,0.1); }
    .flow-chip:hover { border-color: var(--accent); }

    /* Flow Zoom Controls */
    .flow-zoom-controls {
      position: absolute;
      bottom: 12px;
      right: 12px;
      display: flex;
      gap: 4px;
      z-index: 100;
      background: var(--bg-card, rgba(255,255,255,0.06));
      border: 1px solid var(--border);
      border-radius: 8px;
      padding: 4px;
    }
    .flow-zoom-btn {
      width: 28px;
      height: 28px;
      border: none;
      border-radius: 6px;
      background: var(--bg-elevated, #18181b);
      color: var(--text-2, #a1a1aa);
      font-size: 14px;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.15s;
    }
    .flow-zoom-btn:hover { background: var(--accent); color: #000; }
    .flow-zoom-level {
      min-width: 42px;
      text-align: center;
      font-size: 10px;
      font-weight: 600;
      color: var(--text-2, #a1a1aa);
      display: flex;
      align-items: center;
      justify-content: center;
    }

    /* Flow Onboarding Overlay */
    .flow-onboarding-overlay {
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      background: rgba(0,0,0,0.85);
      z-index: 10001;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      animation: flowOnboardFadeIn 0.4s ease;
    }
    /* Onboarding wrapper — injected into body, not canvas */
    #flowOnboardingWrapper {
      position: fixed;
      top: 0; left: 0; right: 0; bottom: 0;
      z-index: 10001;
      pointer-events: auto;
    }
    @keyframes flowOnboardFadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }
    .flow-onboarding-step {
      display: flex;
      align-items: center;
      gap: 16px;
      margin-bottom: 20px;
      padding: 14px 20px;
      background: rgba(255,255,255,0.06);
      border: 1px solid var(--border);
      border-radius: 12px;
      max-width: 420px;
      width: 90%;
      animation: flowOnboardSlideIn 0.5s ease both;
    }
    .flow-onboarding-step:nth-child(2) { animation-delay: 0.15s; }
    .flow-onboarding-step:nth-child(3) { animation-delay: 0.3s; }
    @keyframes flowOnboardSlideIn {
      from { opacity: 0; transform: translateY(16px); }
      to { opacity: 1; transform: translateY(0); }
    }
    .flow-onboarding-num {
      width: 36px;
      height: 36px;
      border-radius: 50%;
      background: var(--accent, #2f5ca8);
      color: #000;
      font-weight: 700;
      font-size: 16px;
      display: flex;
      align-items: center;
      justify-content: center;
      flex-shrink: 0;
    }
    .flow-onboarding-text {
      font-size: 13px;
      color: var(--text, #fafafa);
      line-height: 1.4;
    }
    .flow-onboarding-text strong { color: var(--accent, #2f5ca8); }

    /* Flow Context Menu */
    .flow-context-menu { position:fixed; background:rgba(20,20,24,0.97); border:1px solid rgba(255,255,255,0.1); border-radius:10px; padding:6px; min-width:180px; z-index:10000; box-shadow:0 8px 32px rgba(0,0,0,0.5); }
    .flow-context-item { padding:8px 14px; font-size:12px; color:#e5e5e5; cursor:pointer; border-radius:6px; transition:background 0.15s; display:flex; align-items:center; gap:8px; }
    .flow-context-item:hover { background:rgba(255,255,255,0.08); }
    .flow-context-item.danger { color:#f87171; }
    .flow-context-separator { height:1px; background:rgba(255,255,255,0.08); margin:4px 8px; }

    /* Flow Branch System (post-generation) */
    .flow-branches { position:absolute; display:flex; flex-direction:column; gap:8px; z-index:50; }
    .flow-branch-card { background:#1e1e24; border:1.5px solid rgba(255,255,255,0.2); border-radius:10px; padding:12px 16px; cursor:pointer; transition:all 0.2s; opacity:0; transform:translateX(-20px); animation:branchSlideIn 0.3s ease forwards; min-width:180px; box-shadow:0 4px 16px rgba(0,0,0,0.4); }
    .flow-branch-card:hover { border-color:var(--accent, #2f5ca8); transform:translateX(4px); }
    .flow-branch-card .branch-title { font-size:12px; font-weight:600; color:var(--text, #f5f5f4); margin-bottom:4px; }
    .flow-branch-card .branch-desc { font-size:10px; color:var(--text-2, #a8a29e); }
    .flow-branch-card .branch-icon { font-size:16px; margin-bottom:4px; }
    @keyframes branchSlideIn { to { opacity:1; transform:translateX(0); } }
    .flow-outfit-btn { background:transparent; border:1px dashed var(--border, rgba(255,255,255,0.12)); border-radius:8px; color:var(--text-2, #a8a29e); padding:8px 16px; font-size:11px; cursor:pointer; transition:all 0.2s; margin-top:8px; width:100%; }
    .flow-outfit-btn:hover { border-color:var(--accent, #2f5ca8); color:var(--text, #f5f5f4); }
    .flow-branch-line { stroke:var(--accent, #2f5ca8); stroke-width:1.5; fill:none; opacity:0.5; }

    /* Dynamic Node Types — Prompt / Variation / Video */
    .flow-node[data-type="prompt"] { border-color: rgba(168,85,247,0.5); }
    .flow-node[data-type="prompt"]:hover { border-color: rgba(168,85,247,0.8); }
    .flow-node[data-type="prompt"] .flow-node-header { color:#c084fc; }
    .flow-node[data-type="variation"] { border-color: rgba(251,146,60,0.5); }
    .flow-node[data-type="variation"]:hover { border-color: rgba(251,146,60,0.8); }
    .flow-node[data-type="variation"] .flow-node-header { color:#fb923c; }
    .flow-node[data-type="video"] { border-color: rgba(42, 95, 172,0.5); }
    .flow-node[data-type="video"]:hover { border-color: rgba(42, 95, 172,0.8); }
    .flow-node[data-type="video"] .flow-node-header { color:#2a5fac; }
    .flow-node-textarea { width:100%; min-height:80px; padding:8px; background:var(--bg-elevated,#18181b); border:1px solid var(--border); border-radius:8px; color:var(--text,#fafafa); font-size:11px; resize:vertical; outline:none; font-family:inherit; margin-top:6px; }
    .flow-node-textarea:focus { border-color:var(--accent); }
    .flow-node-textarea::placeholder { color:var(--text-muted,#71717a); }
    /* Color variants unified to brand accent (2026-05-26) — Atakan: turuncu dışında buton istemiyoruz */
    .flow-generate-btn.purple,
    .flow-generate-btn.orange,
    .flow-generate-btn.blue { background:var(--accent); }
    .flow-variation-grid { display:grid; grid-template-columns:1fr 1fr; gap:6px; margin-top:8px; }
    .flow-variation-card { aspect-ratio:9/16; background:var(--bg-elevated,#18181b); border-radius:8px; border:1px solid var(--border); overflow:hidden; position:relative; cursor:pointer; transition:border-color 0.2s; }
    .flow-variation-card:hover { border-color:var(--accent); }
    .flow-variation-card img { width:100%; height:100%; object-fit:cover; }
    .flow-variation-label { position:absolute; bottom:0; left:0; right:0; padding:4px 6px; background:rgba(0,0,0,0.7); font-size:8px; color:#e5e5e5; text-align:center; }
    .flow-video-preview { width:100%; aspect-ratio:9/16; background:var(--bg-elevated,#18181b); border-radius:8px; overflow:hidden; position:relative; display:flex; align-items:center; justify-content:center; }
    .flow-video-preview video { width:100%; height:100%; object-fit:cover; border-radius:8px; }
    .flow-node-delete { position:absolute; top:6px; right:6px; width:20px; height:20px; background:rgba(248,113,113,0.15); border:none; border-radius:50%; color:#f87171; font-size:12px; cursor:pointer; display:flex; align-items:center; justify-content:center; opacity:0; transition:opacity 0.2s; z-index:10; }
    .flow-node:hover .flow-node-delete { opacity:1; }
    .flow-node-delete:hover { background:rgba(248,113,113,0.3); }

    /* Context menu submenu header */
    .flow-context-header { padding:6px 14px; font-size:9px; text-transform:uppercase; letter-spacing:1px; color:#71717a; font-weight:600; }

    /* Compact action buttons inside node */
    .flow-branch-container { display:flex; flex-wrap:wrap; gap:4px; padding:6px 0 0; width:100%; }
    .flow-branch-container .flow-branch-card { min-width:auto; padding:6px 8px; flex:1; min-width:calc(50% - 2px); display:flex; align-items:center; gap:4px; animation:none; opacity:1; transform:none; box-shadow:none; border-radius:8px; border-width:1px; }
    .flow-branch-container .flow-branch-card .flow-branch-icon { display:flex; }
    .flow-branch-container .flow-branch-card .flow-branch-icon svg { width:14px; height:14px; }
    .flow-branch-container .flow-branch-card .flow-branch-label { font-size:10px; font-weight:600; white-space:nowrap; }

    /* Flow Image Lightbox Enhancement */
    .flow-img-container { position:relative; }
    .flow-img-expand { position:absolute; top:4px; right:4px; width:24px; height:24px; background:rgba(0,0,0,0.6); border-radius:6px; display:none; align-items:center; justify-content:center; cursor:pointer; z-index:5; }
    .flow-img-container:hover .flow-img-expand { display:flex; }

    /* ===== WIDGET CONFIG v2 ===== */
    .widget-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
    .widget-controls { display: flex; flex-direction: column; gap: 16px; }
    .widget-preview-col { position: sticky; top: 80px; }

    /* Icon Picker */
    .icon-picker-grid {
      display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
    }
    .icon-option {
      display: flex; flex-direction: column; align-items: center; gap: 6px;
      padding: 12px 6px; border: 1px solid var(--border); border-radius: 10px;
      cursor: pointer; transition: all 150ms var(--ease); background: transparent;
    }
    .icon-option:hover { border-color: var(--border-hover); background: var(--bg-card-hover); }
    .icon-option.active { border-color: var(--accent); background: var(--accent-subtle); box-shadow: 0 0 0 1px var(--accent); }
    .icon-option svg { width: 22px; height: 22px; color: var(--text-primary); }
    .icon-option .icon-label { font-size: 10px; font-weight: 500; color: var(--text-muted); text-transform: capitalize; }
    .icon-option.active .icon-label { color: var(--accent); }

    /* Theme Toggle */
    .theme-toggle-row { display: flex; gap: 8px; }
    .theme-pill {
      flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
      padding: 10px 14px; border: 1px solid var(--border); border-radius: 10px;
      cursor: pointer; transition: all 150ms var(--ease); font-size: 13px; font-weight: 500;
      background: transparent; color: var(--text-secondary);
    }
    .theme-pill:hover { border-color: var(--border-hover); }
    .theme-pill.active { border-color: var(--accent); background: var(--accent-subtle); color: var(--accent); }
    .theme-pill svg { width: 16px; height: 16px; }

    /* Panel Mini Preview */
    .wp-panel-preview {
      margin-top: 12px; border: 1px solid var(--border); border-radius: 10px;
      overflow: hidden; padding: 16px; transition: all .3s ease;
    }
    .wp-panel-preview.dark { background: #1c1c1e; border-color: rgba(255,255,255,.08); }
    .wp-panel-preview.light { background: #ffffff; border-color: var(--border); }
    .wp-panel-preview .pp-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
    .wp-panel-preview .pp-title { font-size: 13px; font-weight: 600; }
    .wp-panel-preview.light .pp-title { color: #1d1d1f; }
    .wp-panel-preview.dark .pp-title { color: #f5f5f7; }
    .wp-panel-preview .pp-close { width: 20px; height: 20px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; }
    .wp-panel-preview.light .pp-close { background: #f2f2f7; color: #636366; }
    .wp-panel-preview.dark .pp-close { background: #2c2c2e; color: #98989d; }
    .wp-panel-preview .pp-upload {
      height: 48px; border-radius: 10px; border: 1px dashed; display: flex;
      align-items: center; justify-content: center; font-size: 11px; margin-bottom: 10px;
    }
    .wp-panel-preview.light .pp-upload { background: #f8f8fa; border-color: #e5e5ea; color: #8e8e93; }
    .wp-panel-preview.dark .pp-upload { background: #2c2c2e; border-color: rgba(255,255,255,.08); color: #636366; }
    .wp-panel-preview .pp-btn {
      width: 100%; padding: 10px; border: none; border-radius: 10px;
      font-size: 12px; font-weight: 600; color: #fff; text-align: center;
    }

    /* Widget Preview */
    .widget-preview-container { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
    .wp-browser { background: var(--bg-primary); }
    .wp-browser-bar {
      display: flex; align-items: center; gap: 10px;
      padding: 8px 12px; border-bottom: 1px solid var(--border);
    }
    .wp-dots { display: flex; gap: 4px; }
    .wp-dots span { width: 8px; height: 8px; border-radius: 50%; background: var(--bg-elevated); border: 1px solid var(--border); }
    .wp-url {
      font-size: 10px; color: var(--text-muted); background: var(--bg-input);
      padding: 3px 10px; border-radius: 4px; flex: 1; max-width: 260px;
    }
    .wp-body {
      padding: 20px; display: flex; gap: 20px; position: relative; min-height: 180px;
    }
    .wp-product-img {
      width: 140px; height: 160px; background: var(--bg-elevated);
      border: 1px dashed var(--border); border-radius: 8px; flex-shrink: 0;
    }
    .wp-product-info { flex: 1; display: flex; flex-direction: column; gap: 8px; padding-top: 8px; }
    .wp-line { height: 6px; border-radius: 3px; background: var(--bg-elevated); }
    .wp-line.w70 { width: 70%; } .wp-line.w50 { width: 50%; }
    .wp-line.gold { background: var(--accent-subtle); }
    .wp-sizes { display: flex; gap: 6px; margin-top: 4px; }
    .wp-sizes span {
      width: 28px; height: 28px; display: flex; align-items: center; justify-content: center;
      font-size: 10px; border-radius: 6px; border: 1px solid var(--border);
      color: var(--text-muted); font-weight: 500;
    }
    .wp-sizes span.active { border-color: var(--accent); color: var(--accent); background: var(--accent-subtle); }
    .wp-add-cart {
      margin-top: auto; padding: 8px 16px; background: var(--bg-elevated);
      border: 1px solid var(--border); border-radius: 6px;
      font-size: 11px; color: var(--text-secondary); text-align: center; font-weight: 500;
    }
    .wp-fab {
      position: absolute; bottom: 16px; right: 16px; width: 44px; height: 44px;
      border-radius: 50%; display: flex; align-items: center; justify-content: center;
      color: #0a0a0f; box-shadow: 0 4px 12px rgba(0,0,0,0.3); transition: transform 200ms var(--ease);
    }
    .wp-fab:hover { transform: scale(1.08); }

    @media (max-width: 768px) {
      .widget-layout { grid-template-columns: 1fr; }
      .widget-preview-col { position: static; }
      .wp-body { flex-direction: column; }
      .wp-product-img { width: 100%; height: 100px; }
      .icon-picker-grid { grid-template-columns: repeat(4, 1fr); }
    }
    @media (max-width: 480px) {
      .icon-picker-grid { grid-template-columns: repeat(2, 1fr); }
    }

    /* ===== LOGIN ===== */
    .login-container {
      min-height: 100vh; display: flex;
      align-items: center; justify-content: center;
      background: #0a0606;
      background-image: radial-gradient(ellipse 80% 50% at 50% -20%, rgba(47, 92, 168, 0.10), transparent);
      position: relative;
      overflow: hidden;
    }

    /* ── Floating gradient blobs ── */
    .login-container::before {
      content: '';
      position: absolute;
      width: 500px; height: 500px;
      border-radius: 50%;
      background: radial-gradient(circle, rgba(47, 92, 168,0.10) 0%, rgba(47, 92, 168,0.04) 40%, transparent 70%);
      top: -18%; right: -12%;
      animation: blobFloat1 22s ease-in-out infinite;
      will-change: transform;
      pointer-events: none;
    }

    .login-container::after {
      content: '';
      position: absolute;
      width: 420px; height: 420px;
      border-radius: 50%;
      background: radial-gradient(circle, rgba(120,119,198,0.09) 0%, rgba(120,119,198,0.03) 40%, transparent 70%);
      bottom: -14%; left: -10%;
      animation: blobFloat2 28s ease-in-out infinite;
      will-change: transform;
      pointer-events: none;
    }

    @keyframes blobFloat1 {
      0%, 100% { transform: translate(0, 0) scale(1); }
      25% { transform: translate(-40px, 30px) scale(1.06); }
      50% { transform: translate(-20px, -20px) scale(0.98); }
      75% { transform: translate(30px, 15px) scale(1.03); }
    }

    @keyframes blobFloat2 {
      0%, 100% { transform: translate(0, 0) scale(1); }
      25% { transform: translate(30px, -25px) scale(1.08); }
      50% { transform: translate(15px, 30px) scale(0.95); }
      75% { transform: translate(-25px, -15px) scale(1.04); }
    }

    .login-box {
      width: 100%; max-width: 400px; padding: 48px 40px;
      background: rgba(255,255,255,0.04);
      border: 1px solid rgba(255,255,255,0.10);
      border-radius: 20px;
      box-shadow:
        0 8px 32px rgba(0,0,0,0.5),
        0 2px 8px rgba(0,0,0,0.3),
        inset 0 1px 0 rgba(255,255,255,0.06),
        inset 0 -1px 0 rgba(255,255,255,0.02);
      position: relative;
      z-index: 1;
    }

    .login-logo { text-align: center; margin-bottom: 32px; }
    .login-logo-icon {
      width: 72px; height: 72px;
      display: inline-flex;
      align-items: center; justify-content: center; margin-bottom: 16px;
      background: rgba(255,255,255,0.05);
      border-radius: 18px; border: 1px solid rgba(255,255,255,0.1);
    }
    .login-logo-icon img { width: 48px; height: 48px; object-fit: contain; }
    .login-logo-icon .brand-logo-svg { width: 48px; height: 48px; }
    .login-title { font-size: 24px; font-weight: 700; letter-spacing: -0.03em; margin-bottom: 8px; color: #fff; }
    .login-subtitle { color: rgba(255,255,255,0.5); font-size: 14px; line-height: 1.5; }
    .login-form { margin-top: 28px; }
    .login-form .input {
      background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.1);
      color: #fff; padding: 12px 14px; font-size: 14px; border-radius: 12px;
    }
    .login-form .input:focus { border-color: var(--accent); background: rgba(255,255,255,0.08); }
    .login-form .input::placeholder { color: rgba(255,255,255,0.3); }
    .login-form .btn-primary {
      width: 100%; padding: 12px; font-size: 14px; font-weight: 600;
      border-radius: 12px; margin-top: 8px;
    }
    .login-footer { text-align: center; margin-top: 24px; font-size: 13px; color: rgba(255,255,255,0.4); }
    .login-footer a { color: var(--accent); text-decoration: none; font-weight: 500; }
    .login-footer a:hover { text-decoration: underline; }

    /* ── Login/Register cross-fade transition (targets .login-box) ── */
    .login-box.form-fade-out {
      opacity: 0;
      transform: scale(0.97) translateY(8px);
      transition: opacity 0.25s var(--ease), transform 0.25s var(--ease);
    }

    .login-box.form-fade-in {
      animation: loginFadeIn 0.4s var(--ease) forwards;
    }

    @keyframes loginFadeIn {
      from { opacity: 0; transform: scale(0.97) translateY(8px); }
      to { opacity: 1; transform: scale(1) translateY(0); }
    }

    /* ── OTP Input ── */
    .otp-input-container {
      display: flex; gap: 8px; justify-content: center; margin: 24px 0 20px;
    }
    .otp-input-container input {
      width: 48px; height: 56px; text-align: center; font-size: 24px; font-weight: 600;
      background: rgba(255,255,255,0.06); border: 1.5px solid rgba(255,255,255,0.10);
      border-radius: 12px; color: #fff; outline: none;
      transition: border-color 0.2s var(--ease), background 0.2s var(--ease), box-shadow 0.2s var(--ease);
      caret-color: var(--accent);
    }
    .otp-input-container input:focus {
      border-color: var(--accent); background: rgba(255,255,255,0.08);
      box-shadow: 0 0 0 3px rgba(47, 92, 168,0.15);
    }
    .otp-input-container input.filled {
      border-color: var(--accent); background: rgba(47, 92, 168,0.06);
    }
    .otp-input-container input.error {
      border-color: var(--danger); background: rgba(248,113,113,0.06);
      animation: otpShake 0.4s var(--ease);
    }
    @keyframes otpShake {
      0%, 100% { transform: translateX(0); }
      20% { transform: translateX(-6px); }
      40% { transform: translateX(6px); }
      60% { transform: translateX(-4px); }
      80% { transform: translateX(4px); }
    }
    .btn-link {
      background: none; border: none; color: var(--accent); cursor: pointer;
      font-size: 13px; font-weight: 500; padding: 0; transition: opacity 0.2s;
    }
    .btn-link:hover { opacity: 0.8; }
    .btn-link:disabled { color: var(--text-muted); cursor: not-allowed; opacity: 0.6; }
    .login-footer-link {
      color: var(--accent); text-decoration: none; font-size: 13px; font-weight: 500;
      transition: opacity 0.2s;
    }
    .login-footer-link:hover { text-decoration: underline; opacity: 0.9; }

    [data-theme="light"] .otp-input-container input {
      background: var(--bg-input); border-color: var(--border); color: var(--text-primary);
    }
    [data-theme="light"] .otp-input-container input:focus {
      border-color: var(--accent); background: #fff;
      box-shadow: 0 0 0 3px rgba(46,158,110,0.12);
    }
    [data-theme="light"] .otp-input-container input.filled {
      border-color: var(--accent); background: rgba(46,158,110,0.06);
    }

    /* ===== RESPONSIVE ===== */
    @media (max-width: 1024px) {
      .stats-grid { grid-template-columns: repeat(2, 1fr); }
    }

    /* ── Mobile Header (hamburger) ── */
    .mobile-header {
      display: none;
      position: fixed;
      top: 0; left: 0; right: 0;
      height: 56px;
      background: var(--bg-secondary);
      border-bottom: 1px solid var(--border);
      z-index: 200;
      align-items: center;
      justify-content: space-between;
      padding: 0 16px;
    }
    .mobile-header-logo { display: flex; align-items: center; gap: 8px; }
    .mobile-header-logo img { width: 28px; height: 28px; }
    .mobile-header-logo .brand-logo-svg { width: 28px; height: 28px; }
    .mobile-header-logo span { font-weight: 700; font-size: 16px; }
    .mobile-hamburger {
      width: 40px; height: 40px;
      display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
      background: none; border: none; cursor: pointer; padding: 8px; border-radius: 8px;
    }
    .mobile-hamburger span {
      display: block; width: 20px; height: 2px; background: var(--text-primary);
      border-radius: 1px; transition: all 0.3s var(--ease);
    }
    .mobile-hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
    .mobile-hamburger.active span:nth-child(2) { opacity: 0; }
    .mobile-hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

    /* ── Mobile Sidebar Overlay ── */
    .sidebar-overlay {
      display: none;
      position: fixed; inset: 0;
      background: rgba(0,0,0,0.5);
      z-index: 149;
      opacity: 0;
      transition: opacity 0.3s var(--ease);
    }
    .sidebar-overlay.active { opacity: 1; }

    /* ── Mobile Bottom Nav ── */
    .mobile-bottom-nav {
      display: none;
      position: fixed;
      bottom: 0; left: 0; right: 0;
      height: 64px;
      background: var(--bg-secondary);
      border-top: 1px solid var(--border);
      z-index: 200;
      justify-content: space-around;
      align-items: center;
      padding: 4px 0 env(safe-area-inset-bottom, 8px);
    }
    .mobile-bottom-nav-item {
      display: flex; flex-direction: column; align-items: center; gap: 2px;
      padding: 6px 12px; border-radius: 10px;
      color: var(--text-muted); font-size: 10px; font-weight: 500;
      background: none; border: none; cursor: pointer;
      transition: all 0.2s var(--ease);
      min-width: 56px;
    }
    .mobile-bottom-nav-item svg { width: 22px; height: 22px; }
    .mobile-bottom-nav-item.active { color: var(--accent); background: var(--accent-subtle); }

    @media (max-width: 768px) {
      .mobile-header { display: flex; }
      .mobile-bottom-nav { display: flex; }
      .sidebar-overlay { display: block; pointer-events: none; }
      .sidebar-overlay.active { pointer-events: auto; }

      .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s var(--ease);
        z-index: 150;
        top: 56px;
        padding-bottom: 80px;
      }
      .sidebar.mobile-open { transform: translateX(0); }

      .main {
        margin-left: 0;
        padding: 60px 10px 72px;
        max-width: 100%;
        min-height: 100dvh;
        box-sizing: border-box;
      }

      /* ── Prevent horizontal overflow globally ── */
      body, .app, .main, .page {
        max-width: 100vw;
        overflow-x: hidden;
      }

      .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 6px; margin-bottom: 12px; }
      .grid-2 { grid-template-columns: 1fr; gap: 10px; }

      .page-title { font-size: 17px; }
      .page-subtitle { font-size: 11px; }
      .page-header { margin-bottom: 10px; }

      /* ── Cards compact on mobile ── */
      .card { border-radius: 10px; padding: 12px; }
      .card-header { padding: 0; margin-bottom: 10px; }
      .card-title { font-size: 13px; }
      .card-hint { font-size: 10px; }

      /* ── Stat cards more compact ── */
      .stat-card { padding: 10px 12px; }
      .stat-value { font-size: 18px; }
      .stat-label { font-size: 10px; }
      .stat-change { font-size: 10px; }
      .progress-bar { height: 3px; }

      /* ── Quick Actions compact ── */
      .quick-actions {
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 6px !important;
        margin-bottom: 10px !important;
      }
      .quick-actions > button {
        padding: 10px 4px !important;
        border-radius: 10px !important;
      }
      .quick-actions > button > div:first-child {
        margin-bottom: 3px !important;
      }
      .quick-actions > button > div:last-child {
        font-size: 10px !important;
      }

      /* ── Onboarding card compact ── */
      #onboardingCard {
        margin-bottom: 10px !important;
        padding: 10px 12px !important;
      }
      #onboardingCard .card-title { font-size: 13px; margin-bottom: 8px !important; }
      #onboardingCard .ob-step { font-size: 11px !important; padding: 4px 8px !important; }

      /* ── Quickstart & Recent Activity compact ── */
      .code-block { padding: 10px; font-size: 11px; line-height: 1.5; }
      .empty-state { padding: 20px 12px; }
      .empty-state svg { width: 28px; height: 28px; margin-bottom: 8px; }
      .empty-state p { font-size: 11px; }

      /* ── Son Uretimler gallery compact ── */
      #page-overview > .card:last-child {
        margin-top: 10px !important;
        padding: 10px 12px !important;
      }

      /* ── Tables scroll horizontally ── */
      .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
      table { min-width: 500px; }

      /* ── Modals full-screen on mobile ── */
      .modal-overlay .modal-box,
      #campaignModal > div,
      #campaignDetailModal > div,
      #sdApproveModal > div {
        width: 95% !important;
        max-width: 95% !important;
        max-height: 90vh !important;
        padding: 16px !important;
        border-radius: 12px !important;
        overflow-y: auto;
      }

      /* ── Page headers stack vertically ── */
      .page-header[style*="display:flex"] {
        flex-direction: column !important;
        gap: 8px !important;
        align-items: flex-start !important;
      }

      /* Campaign stats grid */
      #campaignStatsGrid { grid-template-columns: repeat(2, 1fr) !important; gap: 6px !important; }

      /* Smart discount stats */
      #sdSummaryStats { grid-template-columns: repeat(2, 1fr) !important; gap: 6px !important; }

      /* ── Buttons touch-friendly (min 44px) ── */
      .btn { min-height: 44px; padding: 10px 16px; font-size: 13px; }
      .btn-secondary { min-height: 40px; }

      /* Button groups wrap */
      .btn-group, [style*="display:flex;gap:8px"] { flex-wrap: wrap; }

      /* ── Ensure no horizontal overflow on pages ── */
      .page { overflow-x: hidden; }

      /* Hide sidebar logo text on mobile */
      .sidebar-logo-text { display: block; }

      /* ── Form groups tighter ── */
      .form-group { margin-bottom: 10px; }
      .form-label { font-size: 11px; margin-bottom: 4px; }

      /* ── Page hint smaller ── */
      .page-hint { font-size: 10px; margin-top: 2px; }
    }

    /* ── GLOBAL: Kill ALL backdrop-filter/blur everywhere (causes fog/blur on devices) ── */
    * {
      backdrop-filter: none !important;
      -webkit-backdrop-filter: none !important;
    }

    /* ── Basic Mode Styles ── */
    .studio-mode-btn { background:transparent;color:var(--text-muted);transition:all 0.2s; }
    .studio-mode-btn.active { background:var(--accent);color:#000; }
    .studio-tryon-mode-btn { background:transparent;color:var(--text-muted);transition:all 0.2s;cursor:pointer; }
    .studio-tryon-mode-btn.active { background:var(--accent);color:#000; }
    .studio-tryon-mode-btn:hover:not(.active) { background:rgba(47, 92, 168,0.10);color:var(--text); }
    .basic-mode-card { transition:all 0.3s ease; }
    .basic-mode-card:hover { border-color:var(--accent) !important; }
    .basic-product-item { position:relative;border-radius:10px;overflow:hidden;cursor:pointer;border:2px solid transparent;transition:all 0.2s;aspect-ratio:1; }
    .basic-product-item:hover { border-color:var(--accent); }
    .basic-product-item.selected { border-color:var(--accent);box-shadow:0 0 0 2px rgba(16,185,129,0.3); }
    .basic-product-item img { width:100%;height:100%;object-fit:cover; }
    .basic-product-item .check { position:absolute;top:4px;right:4px;width:20px;height:20px;border-radius:50%;background:var(--accent);color:#000;display:none;align-items:center;justify-content:center;font-size:12px;font-weight:bold; }
    .basic-product-item.selected .check { display:flex; }
    .basic-vibe-chip { padding:10px 12px;border-radius:10px;border:1px solid var(--border);background:var(--bg-secondary);cursor:pointer;text-align:center;transition:all 0.2s;font-size:11px; }
    .basic-vibe-chip:hover { border-color:var(--accent);background:rgba(16,185,129,0.05); }
    .basic-vibe-chip.active { border-color:var(--accent);background:rgba(16,185,129,0.15);color:var(--accent); }
    .basic-result-card { position:relative;border-radius:12px;overflow:hidden;aspect-ratio:9/16;background:var(--bg-secondary); }
    .basic-result-card img { width:100%;height:100%;object-fit:cover; }
    .basic-result-actions { position:absolute;bottom:0;left:0;right:0;padding:8px;display:flex;gap:4px;background:linear-gradient(transparent,rgba(0,0,0,0.8)); }
    .basic-result-actions button { flex:1;padding:5px;font-size:9px;border:none;border-radius:6px;cursor:pointer;font-weight:600; }

    /* ── Basic Mode responsive ── */
    @media (max-width: 768px) {
      #studioBasicView > div {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
      }
      #basicProductGrid {
        max-height: 60vh !important;
        -webkit-overflow-scrolling: touch;
      }
    }

    /* ── AI Studio mobile fixes ── */
    @media (max-width: 768px) {
      /* Flow canvas scrollable on mobile */
      #studioCanvasView {
        min-height: calc(100vh - 200px) !important;
        overflow: auto !important;
        -webkit-overflow-scrolling: touch;
      }
      #flowCanvasWrapper {
        min-height: calc(100vh - 200px) !important;
        cursor: default !important;
      }
      .flow-onboarding-overlay {
        background: rgba(0,0,0,0.92) !important;
        padding: 20px 16px !important;
      }
      .flow-onboarding-step {
        gap: 10px !important;
        margin-bottom: 12px !important;
        padding: 10px 14px !important;
        max-width: 100% !important;
      }
      .flow-onboarding-num {
        width: 28px !important;
        height: 28px !important;
        font-size: 13px !important;
      }
      .flow-onboarding-text {
        font-size: 12px !important;
      }
      /* Flow zoom controls — bottom center on mobile */
      .flow-zoom-controls {
        bottom: 80px !important;
        right: 50% !important;
        transform: translateX(50%) !important;
      }
      /* Studio header stack on mobile */
      #page-studio > div:first-child {
        flex-direction: column !important;
        gap: 8px !important;
        align-items: flex-start !important;
      }
    }

    @media (max-width: 380px) {
      .stats-grid { grid-template-columns: 1fr; }
      .mobile-bottom-nav-item { min-width: 48px; padding: 6px 8px; font-size: 9px; }
    }

    /* Reduced motion */
    @media (prefers-reduced-motion: reduce) {
      *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
      }
    }

    /* ===== SCROLLBAR ===== */
    ::-webkit-scrollbar { width: 6px; }
    ::-webkit-scrollbar-track { background: transparent; }
    ::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
    ::-webkit-scrollbar-thumb:hover { background: var(--border-hover); }

    /* ===== ANALYTICS ===== */
    .a-period { display: flex; gap: 4px; }
    .a-period button { background: none; border: 1px solid var(--border); color: var(--text-muted); padding: 5px 12px; border-radius: 6px; font-size: 11px; cursor: pointer; transition: all 120ms var(--ease); }
    .a-period button:hover { color: var(--text-primary); border-color: var(--border-hover); }
    .a-period button.active { background: var(--accent-subtle); border-color: var(--accent); color: var(--accent); font-weight: 600; }
    .a-funnel { display: flex; align-items: flex-end; gap: 1px; height: 140px; }
    .a-funnel-step { flex: 1; text-align: center; }
    .a-funnel-bar { margin: 0 auto; width: 70%; border-radius: 4px 4px 0 0; min-height: 4px; transition: height 0.5s var(--ease); }
    .a-funnel-val { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
    .a-funnel-lbl { font-size: 10px; color: var(--text-muted); margin-top: 6px; line-height: 1.2; }
    .a-funnel-rate { font-size: 9px; color: var(--accent); font-weight: 600; margin-top: 2px; }
    .a-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
    .a-chart { display: flex; align-items: flex-end; gap: 2px; height: 120px; }
    .a-chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px; }
    .a-chart-inner { display: flex; gap: 1px; align-items: flex-end; width: 100%; height: 100px; }
    .a-chart-bar { flex: 1; border-radius: 2px; min-height: 1px; }
    .a-chart-dt { font-size: 7px; color: var(--text-muted); white-space: nowrap; }
    @media (max-width: 900px) { .a-two-col { grid-template-columns: 1fr; } .a-funnel { flex-wrap: wrap; height: auto; } }

/* ── AI Stylist Components ── */
.pose-card {
  aspect-ratio: 3/4;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s;
  padding: 3px;
  background: transparent;
}
.pose-card:hover { border-color: var(--border-hover); background: var(--bg-secondary); }
.pose-card.selected { border-color: var(--accent); background: rgba(99,102,241,0.08); }
.pose-card svg { width: 24px; height: 36px; stroke: var(--text-muted); fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.pose-card.selected svg { stroke: var(--accent); }
.pose-card span { font-size: 8px; color: var(--text-muted); text-align: center; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pose-card.selected span { color: var(--accent); font-weight: 600; }

.bg-card {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s;
  padding: 4px;
}
.bg-card:hover { border-color: var(--border-hover); }
.bg-card.selected { border-color: var(--accent); background: rgba(99,102,241,0.08); }
.bg-card .bg-dot { width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--border); }
.bg-card span { font-size: 8px; color: var(--text-muted); text-align: center; line-height: 1.1; }
.bg-card.selected span { color: var(--accent); font-weight: 600; }

.model-avatar-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  transition: all .15s;
}
.model-avatar-card:hover { background: var(--bg-secondary); border-color: var(--border-hover); }
.model-avatar-card.selected { border-color: var(--accent); background: rgba(99,102,241,0.08); }
.model-avatar-card img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
.model-avatar-card .model-info { flex: 1; min-width: 0; }
.model-avatar-card .model-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.model-avatar-card .model-meta { font-size: 10px; color: var(--text-muted); }

.result-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card-bg);
  transition: border-color .2s, box-shadow .2s;
}
.result-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-md); }
.result-card img { width: 100%; aspect-ratio: 3/4; object-fit: cover; display: block; cursor: zoom-in; max-height: 280px; }
.result-card-actions {
  position: absolute; bottom: 0; left: 0; right: 0;
  padding: 8px;
  background: linear-gradient(transparent, rgba(0,0,0,0.7));
  display: flex; gap: 4px; justify-content: center;
  opacity: 0; transition: opacity .2s;
}
.result-card:hover .result-card-actions { opacity: 1; }
.result-card-actions button {
  padding: 4px 10px;
  border-radius: 6px;
  border: none;
  background: rgba(255,255,255,0.2);
  color: white;
  font-size: 11px;
  cursor: pointer;
  transition: background .15s;
}
.result-card-actions button:hover { background: rgba(255,255,255,0.35); }

.outfit-slot-row { display: flex; flex-direction: column; gap: 4px; }
.outfit-slot-label { font-size: 11px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; letter-spacing: 0.03em; }
.outfit-products-scroll { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; }
.outfit-product-thumb {
  width: 52px; height: 52px; border-radius: 6px; border: 2px solid var(--border);
  cursor: pointer; object-fit: cover; flex-shrink: 0; transition: all .15s;
}
.outfit-product-thumb:hover { border-color: var(--border-hover); }
.outfit-product-thumb.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(99,102,241,0.2); }
.outfit-upload-btn {
  width: 52px; height: 52px; border-radius: 6px; border: 2px dashed var(--border);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all .15s; background: transparent; color: var(--text-muted); font-size: 18px;
}
.outfit-upload-btn:hover { border-color: var(--accent); color: var(--accent); }

.combo-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  transition: border-color .2s;
}
.combo-card:hover { border-color: var(--border-hover); }
.combo-card-images { display: flex; gap: 6px; margin-bottom: 8px; }
.combo-card-images img { width: 48px; height: 48px; border-radius: 6px; object-fit: cover; border: 1px solid var(--border); }

@media (max-width: 1100px) {
  #studio-tab-stylist > div { grid-template-columns: 1fr !important; }
  #studio-tab-stylist > div > div:first-child { max-height: none !important; flex-direction: row; flex-wrap: wrap; }
}

    /* ── AI Stylist Redesign ── */
    .studio-tabs-bar {
      display: flex; gap: 4px; margin-bottom: 24px; border-bottom: 2px solid var(--border); padding-bottom: 0;
    }
    .studio-tab {
      display: flex; align-items: center; gap: 6px; padding: 10px 18px; border: none; background: none;
      cursor: pointer; font-size: 13px; font-weight: 600; color: var(--text-secondary);
      border-bottom: 2px solid transparent; margin-bottom: -2px; transition: all .2s;
    }
    .studio-tab:hover { color: var(--text-primary); }
    .studio-tab.active { color: var(--accent); border-bottom-color: var(--accent); }

    .stylist-section {
      background: var(--bg-card); border: 1px solid var(--border); border-radius: 14px;
      padding: 18px 20px; margin-bottom: 12px; transition: padding .25s ease, border-color .2s;
    }
    .stylist-section-header {
      display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;
      cursor: pointer; user-select: none;
    }
    .stylist-section.collapsed { padding: 12px 20px; }
    .stylist-section.collapsed .stylist-section-header { margin-bottom: 0; }
    .stylist-section.collapsed .stylist-section-desc { display: none; }
    .stylist-section:not(.collapsed) { border-color: var(--accent); }
    .stylist-section-title { margin: 0; font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
    .stylist-section-desc { margin: 2px 0 0; font-size: 12px; color: var(--text-secondary); }
    .stylist-step-summary {
      display: none; font-size: 12px; color: var(--accent); font-weight: 600;
      margin: 4px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .stylist-section-content {
      overflow: hidden; transition: max-height .3s ease, opacity .25s ease;
    }
    .stylist-section.collapsed .stylist-section-content {
      max-height: 0; opacity: 0; overflow: hidden;
    }
    .stylist-section:not(.collapsed) .stylist-section-content {
      max-height: 2000px; opacity: 1;
    }
    .step-chevron {
      display: inline-flex; align-items: center; justify-content: center;
      width: 24px; height: 24px; flex-shrink: 0; margin-left: auto;
      transition: transform .25s ease; color: var(--text-muted);
    }
    .stylist-section:not(.collapsed) .step-chevron { transform: rotate(180deg); }

    /* Vibe grid — compact 80x80 cards */
    .vibe-grid {
      display: grid; grid-template-columns: repeat(auto-fill, 80px); gap: 6px; justify-content: start;
    }
    .vibe-card {
      width: 80px; height: 80px; border-radius: 10px; overflow: hidden;
      border: 2px solid var(--border); cursor: pointer;
      transition: all .2s ease; position: relative;
    }
    .vibe-card:hover { border-color: var(--accent); transform: scale(1.08); z-index: 5; box-shadow: 0 6px 20px rgba(0,0,0,0.35); }
    .vibe-card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-subtle); }
    .vibe-card-visual {
      width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
      background-size: cover; background-position: center; position: relative;
    }
    .vibe-card-visual::after {
      content: ''; position: absolute; inset: 0;
      background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.1) 60%, transparent 100%);
    }
    .vibe-card-name {
      position: relative; z-index: 1; font-size: 11px; font-weight: 800; color: #fff;
      text-shadow: 0 1px 4px rgba(0,0,0,0.8), 0 0 8px rgba(0,0,0,0.4);
      text-align: center; line-height: 1.15; padding: 4px;
      word-break: break-word; letter-spacing: 0.2px;
    }

    /* Character horizontal scroll */
    .character-scroll {
      display: flex; gap: 10px; overflow-x: auto; padding: 4px 0 8px;
      scrollbar-width: thin; scrollbar-color: var(--border) transparent;
    }
    .character-scroll::-webkit-scrollbar { height: 4px; }
    .character-scroll::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

    .character-card {
      flex-shrink: 0; width: 100px; cursor: pointer; text-align: center;
      border: 2px solid transparent; border-radius: 12px; padding: 8px 6px;
      transition: all .15s; background: var(--bg-elevated);
    }
    .character-card:hover { border-color: var(--border-hover); background: var(--bg-card-hover); }
    .character-card.selected { border-color: var(--accent); background: var(--accent-subtle); }
    .character-card img {
      width: 64px; height: 85px; border-radius: 8px; object-fit: cover; display: block; margin: 0 auto 6px;
    }
    .character-card .char-name { font-size: 11px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .character-card .char-meta { font-size: 9px; color: var(--text-muted); }
    .character-card .char-placeholder {
      width: 64px; height: 85px; border-radius: 8px; background: var(--bg-secondary);
      display: flex; align-items: center; justify-content: center; margin: 0 auto 6px; font-size: 28px;
    }

    /* Outfit selection grid */
    .outfit-select-grid {
      display: flex; flex-direction: column; gap: 8px; padding: 4px 0 8px;
    }
    .outfit-select-card {
      flex-shrink: 0; width: 140px; height: 140px; cursor: pointer;
      border: 2px solid var(--border); border-radius: 12px; overflow: hidden;
      transition: all .15s; background: var(--bg-elevated); position: relative;
    }
    .outfit-select-card:hover { border-color: var(--border-hover); }
    .outfit-select-card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-subtle); }
    .outfit-select-card img { width: 100%; height: 100%; object-fit: cover; }
    .outfit-select-card .outfit-label {
      position: absolute; bottom: 0; left: 0; right: 0; padding: 4px 8px;
      background: linear-gradient(transparent, rgba(0,0,0,0.7)); color: white;
      font-size: 10px; font-weight: 600;
    }

    /* Saved Combos section in AI Stylist Step 2 */
    .stylist-saved-combos-label {
      font-size: 11px; font-weight: 700; color: var(--text-secondary);
      text-transform: uppercase; letter-spacing: 0.5px;
      margin-bottom: 8px; display: flex; align-items: center; gap: 6px;
    }
    .stylist-saved-combos-label svg { width: 14px; height: 14px; opacity: 0.6; }
    .stylist-combo-card {
      flex-shrink: 0; width: 180px; background: var(--bg-elevated);
      border: 2px solid var(--border); border-radius: 12px; overflow: hidden;
      cursor: pointer; transition: all .15s; padding: 10px;
      display: flex; flex-direction: column; gap: 8px;
    }
    .stylist-combo-card:hover { border-color: var(--border-hover); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
    .stylist-combo-card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-subtle); }
    .stylist-combo-thumbs { display: flex; gap: 4px; flex-wrap: wrap; }
    .stylist-combo-thumbs img { width: 38px; height: 38px; border-radius: 6px; object-fit: cover; border: 1px solid var(--border); }
    .stylist-combo-name { font-size: 12px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .stylist-combo-meta { font-size: 10px; color: var(--text-muted); }
    .stylist-combo-use-btn {
      font-size: 10px; padding: 3px 10px; border-radius: 6px;
      background: var(--accent); color: #fff; border: none; cursor: pointer;
      font-weight: 600; transition: opacity .15s; width: 100%;
    }
    .stylist-combo-use-btn:hover { opacity: 0.85; }
    .stylist-combos-divider { width: 100%; height: 1px; background: var(--border); margin: 8px 0; }

    /* Pose grid - compact thumbnails ~60x60 */
    .pose-grid {
      display: grid; grid-template-columns: repeat(auto-fill, 60px); gap: 5px; justify-content: start;
    }
    .pose-card {
      cursor: pointer; border: 2px solid var(--border); border-radius: 8px;
      overflow: hidden; transition: all .2s var(--ease); background: var(--bg-elevated);
      width: 60px; height: 60px; position: relative;
    }
    .pose-card:hover { border-color: var(--accent); transform: scale(1.08); z-index: 5; box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
    .pose-card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-subtle); }
    .pose-card img { width: 100%; height: 100%; object-fit: cover; loading: lazy; }
    .pose-card .pose-label {
      position: absolute; bottom: 0; left: 0; right: 0; padding: 2px 4px;
      background: linear-gradient(transparent, rgba(0,0,0,0.7)); color: white;
      font-size: 8px; font-weight: 600; text-align: center; opacity: 0; transition: opacity .15s;
    }
    .pose-card:hover .pose-label { opacity: 1; }
    .pose-card .pose-placeholder {
      width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
      background: var(--bg-secondary); color: var(--text-muted); font-size: 9px;
    }

    /* Background grid - compact 6-col */
    .bg-grid {
      display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px;
    }
    .bg-card {
      cursor: pointer; border: 2px solid var(--border); border-radius: 8px;
      padding: 8px 4px; text-align: center; transition: all .2s var(--ease);
      background: var(--bg-elevated);
    }
    .bg-card:hover { border-color: var(--accent); transform: scale(1.08); z-index: 5; box-shadow: 0 8px 24px rgba(0,0,0,0.4); }
    .bg-card.selected { border-color: var(--accent); background: var(--accent-subtle); }
    .bg-card .bg-emoji { font-size: 20px; margin-bottom: 2px; }
    .bg-card .bg-label { font-size: 8px; font-weight: 600; color: var(--text-secondary); }
    .bg-card.selected .bg-label { color: var(--accent); }

    /* Image lightbox overlay */
    .img-lightbox {
      display: none; position: fixed; inset: 0; z-index: 9999;
      background: rgba(0,0,0,0.92);
      align-items: center; justify-content: center; cursor: zoom-out;
    }
    .img-lightbox.active { display: flex; animation: fadeIn .2s; }
    .img-lightbox img { max-width: 90vw; max-height: 90vh; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.6); }

    /* Results grid */
    .results-grid {
      display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px;
    }
    .result-card {
      border-radius: 12px; overflow: hidden; position: relative;
      border: 1px solid var(--border); background: var(--bg-secondary);
      transition: all .2s;
    }
    .result-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-md); }
    .result-card img {
      width: 100%; display: block; cursor: zoom-in;
    }
    .result-card-actions {
      position: absolute; bottom: 8px; right: 8px; display: flex; gap: 4px;
      opacity: 0; transition: opacity .2s;
    }
    .result-card:hover .result-card-actions { opacity: 1; }
    .result-card-actions button {
      width: 32px; height: 32px; border-radius: 8px; border: none;
      background: rgba(0,0,0,0.7); color: white; cursor: pointer;
      font-size: 14px; display: flex; align-items: center; justify-content: center;
      transition: background .15s;
    }
    .result-card-actions button:hover { background: var(--accent); }

    /* Product card */
    .product-card {
      border: 2px solid var(--border); border-radius: 12px; overflow: hidden;
      background: var(--bg-card); transition: all .15s; position: relative; cursor: pointer;
      /* 2026-05-07 (Atakan: 'ürünler üst üste binmiş'): explicit
         dimensions so cards keep their footprint even before images
         load. Without this, cards collapse to text-height → grid rows
         pack tightly → visual overlap from absolute-positioned action
         buttons (delete/fav/check) bleeding into adjacent rows. */
      min-height: 200px;
      display: flex;
      flex-direction: column;
    }
    .product-card:hover { border-color: var(--border-hover); box-shadow: var(--shadow-sm); transform: translateY(-2px); z-index: 10; }
    .product-card.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-subtle); }
    .product-card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
    .product-card-info { padding: 8px 10px; }
    .product-card-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .product-card-cat { font-size: 10px; color: var(--text-muted); text-transform: uppercase; }
    .product-card-delete {
      position: absolute; top: 6px; right: 6px; width: 24px; height: 24px;
      border-radius: 6px; border: none; background: rgba(0,0,0,0.6); color: white;
      cursor: pointer; font-size: 12px; display: none; align-items: center; justify-content: center;
    }
    .product-card:hover .product-card-delete { display: flex; }
    .product-card-check {
      position: absolute; bottom: 42px; left: 6px; width: 22px; height: 22px;
      border-radius: 6px; border: 2px solid rgba(255,255,255,0.5); background: transparent;
      display: flex; align-items: center; justify-content: center; transition: all .15s;
      cursor: pointer; color: white; font-size: 12px;
    }
    .product-card.selected .product-card-check {
      background: var(--accent); border-color: var(--accent);
    }
    .product-card-fav {
      position: absolute; top: 4px; left: 4px; background: none; border: none;
      cursor: pointer; font-size: 14px; z-index: 2;
      filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5)); color: gold;
    }
    .product-card-fav:hover { transform: scale(1.2); }
    .product-card-fav { opacity: 0; transition: opacity 0.15s; }
    .product-card:hover .product-card-fav { opacity: 1; }
    .product-card-fav.active { opacity: 1; }
    .product-card-check { opacity: 0; transition: opacity 0.15s; }
    .product-card:hover .product-card-check { opacity: 1; }
    .product-card.selected .product-card-check { opacity: 1; }

    /* ── Favorites Strip ── */
    #favoritesStrip::-webkit-scrollbar { display: none; }
    #favoritesStrip { scrollbar-width: none; }

    /* ── Mobile Storyboard Link Sheet — Liquid Glass ── */
    @media (max-width: 768px) {
      #sbProductSidebar { display: none !important; }
      #sbStoryboardGrid { grid-template-columns: 1fr !important; gap: 10px !important; min-height: auto !important; }
      #sbFeedGrid { grid-template-columns: repeat(2, 1fr) !important; }
      #sbMobileLinkBtn { display: flex !important; }
    }
    #sbMobileLinkBtn {
      display: none; position: fixed; bottom: 80px; right: 16px; z-index: 999;
      background: linear-gradient(135deg, rgba(47, 92, 168,0.85), rgba(64, 110, 165,0.9));
      -webkit-backdrop-filter: blur(16px) saturate(1.6);
      backdrop-filter: blur(16px) saturate(1.6);
      color: white; border: 1px solid rgba(47, 92, 168,0.35); border-radius: 50%;
      width: 56px; height: 56px; align-items: center; justify-content: center;
      cursor: pointer;
      box-shadow:
        0 2px 8px rgba(47, 92, 168,0.3),
        0 8px 32px rgba(0,0,0,0.2),
        inset 0 1px 0 rgba(255,255,255,0.25);
      transition: transform 0.2s, box-shadow 0.2s;
    }
    #sbMobileLinkBtn:active {
      transform: scale(0.92);
      box-shadow: 0 2px 12px rgba(47, 92, 168,0.4), inset 0 1px 0 rgba(255,255,255,0.15);
    }
    .mobile-link-sheet {
      position: fixed; bottom: 0; left: 0; right: 0; z-index: 10001;
      background: rgba(18,18,24,0.72);
      -webkit-backdrop-filter: blur(40px) saturate(1.8) brightness(1.1);
      backdrop-filter: blur(40px) saturate(1.8) brightness(1.1);
      border-radius: 24px 24px 0 0;
      border-top: 1px solid rgba(47, 92, 168,0.18);
      box-shadow:
        0 -4px 40px rgba(0,0,0,0.35),
        inset 0 1px 0 rgba(255,255,255,0.08);
      max-height: 85vh; display: flex; flex-direction: column;
      animation: sheetSlideUp 0.32s cubic-bezier(0.32, 0.72, 0, 1);
    }
    [data-theme="light"] .mobile-link-sheet {
      background: rgba(255,255,255,0.68);
      border-top-color: rgba(47, 92, 168,0.25);
      box-shadow: 0 -4px 40px rgba(0,0,0,0.1), inset 0 1px 0 rgba(255,255,255,0.6);
    }
    @keyframes sheetSlideUp {
      from { transform: translateY(100%); opacity: 0.5; }
      to { transform: translateY(0); opacity: 1; }
    }
    .mobile-link-sheet-backdrop {
      position: fixed; inset: 0; z-index: 10000;
      background: rgba(0,0,0,0.4);
      -webkit-backdrop-filter: blur(4px);
      backdrop-filter: blur(4px);
      animation: fadeIn 0.2s;
    }
    .mobile-link-sheet-handle {
      width: 36px; height: 4px;
      background: rgba(255,255,255,0.2); border-radius: 2px;
      margin: 10px auto 6px;
    }
    [data-theme="light"] .mobile-link-sheet-handle { background: rgba(0,0,0,0.15); }
    .mobile-link-sheet-header {
      display: flex; align-items: center; gap: 10px; padding: 8px 16px 12px;
      border-bottom: 1px solid rgba(47, 92, 168,0.12);
    }
    .mobile-link-sheet-products {
      flex: 1; overflow-y: auto; padding: 12px; display: grid;
      grid-template-columns: repeat(3, 1fr); gap: 10px;
      align-content: start;
      -webkit-overflow-scrolling: touch;
    }
    .mobile-link-product-card {
      position: relative; border-radius: 14px; overflow: hidden;
      border: 1.5px solid rgba(255,255,255,0.1);
      cursor: pointer; transition: all 0.25s cubic-bezier(0.32, 0.72, 0, 1);
      background: rgba(255,255,255,0.05);
      box-shadow: 0 2px 8px rgba(0,0,0,0.15);
      /* padding-bottom trick — more reliable than aspect-ratio in split-view */
      height: 0; padding-bottom: 133.33%;
    }
    @media (max-width: 500px) {
      .mobile-link-sheet-products { grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 8px; }
      .mobile-link-product-card { border-radius: 10px; }
    }
    @media (max-width: 380px) {
      .mobile-link-sheet-products { grid-template-columns: repeat(2, 1fr); }
    }
    [data-theme="light"] .mobile-link-product-card {
      border-color: rgba(0,0,0,0.08);
      background: rgba(255,255,255,0.5);
      box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    }
    .mobile-link-product-card.linked {
      border-color: rgba(47, 92, 168,0.5);
      box-shadow:
        0 0 0 1px rgba(47, 92, 168,0.2),
        0 4px 16px rgba(47, 92, 168,0.15),
        inset 0 0 20px rgba(47, 92, 168,0.05);
    }
    .mobile-link-product-card:active { transform: scale(0.94); }
    .mobile-link-product-card img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; }
    .mobile-link-badge {
      position: absolute; top: 5px; right: 5px; width: 22px; height: 22px;
      border-radius: 50%;
      background: linear-gradient(135deg, rgba(47, 92, 168,0.9), rgba(64, 110, 165,0.95));
      -webkit-backdrop-filter: blur(8px);
      backdrop-filter: blur(8px);
      color: white; display: flex; align-items: center; justify-content: center;
      box-shadow: 0 2px 8px rgba(47, 92, 168,0.35), inset 0 1px 0 rgba(255,255,255,0.2);
    }

    /* ── Auto-Match Review Modal (Liquid Glass) ── */
    .auto-match-overlay {
      position: fixed; inset: 0; z-index: 10002;
      background: rgba(0,0,0,0.6);
      -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
      display: flex; align-items: center; justify-content: center;
      animation: fadeIn 0.2s;
    }
    .auto-match-modal {
      background: rgba(18,18,24,0.85);
      -webkit-backdrop-filter: blur(40px) saturate(1.8);
      backdrop-filter: blur(40px) saturate(1.8);
      border-radius: 20px;
      border: 1px solid rgba(47, 92, 168,0.15);
      box-shadow: 0 20px 60px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.08);
      max-width: 460px; width: 92vw; max-height: 85vh;
      overflow-y: auto;
    }
    [data-theme="light"] .auto-match-modal {
      background: rgba(255,255,255,0.82);
      border-color: rgba(47, 92, 168,0.2);
      box-shadow: 0 20px 60px rgba(0,0,0,0.12), inset 0 1px 0 rgba(255,255,255,0.7);
    }
    .auto-match-banner {
      width: 100%; height: 160px; object-fit: cover;
      border-radius: 20px 20px 0 0;
    }
    .auto-match-header {
      padding: 12px 16px; border-bottom: 1px solid rgba(255,255,255,0.08);
      display: flex; align-items: center; gap: 10px;
    }
    .auto-match-products {
      display: flex; gap: 8px; flex-wrap: wrap; justify-content: center;
    }
    .auto-match-product {
      position: relative; width: 80px; text-align: center; cursor: pointer;
      border-radius: 12px; padding: 6px; border: 2px solid var(--accent);
      background: rgba(47, 92, 168,0.08); transition: all 0.2s;
    }
    .auto-match-product.deselected {
      border-color: var(--border); background: var(--bg-card); opacity: 0.5;
    }
    .auto-match-product img {
      width: 68px; height: 80px; border-radius: 8px; object-fit: cover;
    }
    .auto-match-actions {
      padding: 12px 16px; border-top: 1px solid rgba(255,255,255,0.08);
      display: flex; gap: 8px;
    }
    .auto-match-hint {
      text-align: center; font-size: 9px; color: var(--text-muted);
      padding: 0 16px 10px; opacity: 0.7;
    }

    /* ── Product Detail Modal ── */
    .product-detail-overlay {
      position: fixed; inset: 0; background: rgba(0,0,0,0.75); z-index: 10000;
      display: flex; align-items: center; justify-content: center; animation: fadeIn .2s;
      backdrop-filter: none; -webkit-backdrop-filter: none;
    }
    .product-detail-modal {
      background: #14141e; border: 1px solid rgba(255,255,255,0.10); border-radius: 20px;
      width: 90vw; max-width: 720px; max-height: 85vh; overflow: hidden;
      display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.6);
    }
    .product-detail-header {
      display: flex; align-items: center; padding: 16px 20px;
      border-bottom: 1px solid rgba(255,255,255,0.08); background: #0c0c12;
    }
    .product-detail-header h3 { flex: 1; font-size: 16px; margin: 0; }
    .product-detail-close {
      width: 32px; height: 32px; border-radius: 8px; border: none;
      background: var(--bg-elevated); cursor: pointer; font-size: 18px; color: var(--text-secondary);
    }
    .product-detail-body { overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 20px; }
    .product-detail-gallery { display: flex; gap: 12px; }
    .product-detail-main-img {
      flex: 1; min-height: 280px; max-height: 400px; border-radius: 12px; overflow: hidden; background: var(--bg-elevated);
      display: flex; align-items: center; justify-content: center;
    }
    .product-detail-main-img img { width: 100%; height: 100%; object-fit: contain; }
    .product-detail-thumbs {
      display: flex; flex-direction: column; gap: 8px; max-height: 400px; overflow-y: auto;
    }
    .product-detail-thumb {
      width: 64px; height: 64px; border-radius: 8px; overflow: hidden; cursor: pointer;
      border: 2px solid transparent; flex-shrink: 0; transition: border-color .15s;
    }
    .product-detail-thumb.active { border-color: var(--accent); }
    .product-detail-thumb img { width: 100%; height: 100%; object-fit: cover; }
    .product-detail-info { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
    .product-detail-field { display: flex; flex-direction: column; gap: 2px; }
    .product-detail-field label { font-size: 10px; text-transform: uppercase; color: var(--text-muted); font-weight: 600; }
    .product-detail-field span { font-size: 13px; color: var(--text-primary); }
    .product-detail-actions { display: flex; gap: 10px; padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.08); background: #0c0c12; }
    .product-detail-actions button { flex: 1; padding: 10px; border-radius: 10px; border: none; font-weight: 600; cursor: pointer; font-size: 13px; transition: all .15s; }
    .product-detail-select { background: var(--accent); color: white; }
    .product-detail-select:hover { background: var(--accent-hover); }
    .product-detail-link { background: #1a1a24; color: var(--text-primary); border: 1px solid rgba(255,255,255,0.10) !important; }
    .product-detail-link:hover { background: #222230; }
    .product-detail-feed-link { background: rgba(40, 84, 178,0.15); color: #3563bb; border: 1px solid rgba(40, 84, 178,0.25) !important; }
    .product-detail-feed-link:hover { background: rgba(40, 84, 178,0.25); }

    /* ── Feed Link Picker (inside product detail) ── */
    .feed-link-picker {
      background: #0c0c12; border: 1px solid rgba(255,255,255,0.10); border-radius: 12px;
      padding: 14px; margin-top: 12px;
    }
    .feed-link-picker h4 { font-size: 13px; font-weight: 600; margin: 0 0 10px; color: var(--text-primary); }
    .feed-link-grid {
      display: grid; grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); gap: 8px;
      max-height: 200px; overflow-y: auto;
    }
    .feed-link-post {
      aspect-ratio: 1; border-radius: 8px; overflow: hidden; cursor: pointer;
      border: 2px solid transparent; transition: all .15s; position: relative;
    }
    .feed-link-post:hover { border-color: rgba(40, 84, 178,0.5); transform: scale(1.05); }
    .feed-link-post.linked { border-color: var(--accent); }
    .feed-link-post img { width: 100%; height: 100%; object-fit: cover; }
    .feed-link-post .feed-link-check {
      position: absolute; top: 3px; right: 3px; width: 18px; height: 18px;
      background: var(--accent); border-radius: 50%; display: none;
      align-items: center; justify-content: center; font-size: 11px; color: white;
    }
    .feed-link-post.linked .feed-link-check { display: flex; }

    /* ── Product Category Sections ── */
    .product-category-section {
      margin-bottom: 16px; border: 1px solid var(--border); border-radius: 14px;
      background: var(--bg-card); overflow: hidden; transition: all .2s;
    }
    .product-category-header {
      display: flex; align-items: center; gap: 10px; padding: 14px 18px;
      cursor: pointer; user-select: none; transition: background .15s;
    }
    .product-category-header:hover { background: var(--bg-elevated); }
    .product-category-icon { font-size: 20px; flex-shrink: 0; }
    .product-category-label { font-size: 14px; font-weight: 700; color: var(--text-primary); flex: 1; }
    .product-category-count {
      font-size: 11px; font-weight: 600; color: var(--accent); background: var(--accent-subtle);
      padding: 2px 8px; border-radius: 10px;
    }
    .product-category-chevron {
      color: var(--text-muted); font-size: 14px; transition: transform .2s;
    }
    .product-category-section.collapsed .product-category-chevron { transform: rotate(-90deg); }
    .product-category-section.collapsed .product-category-body { display: none; }
    .product-category-body {
      padding: 0 14px 14px; display: grid;
      grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 10px;
    }


    /* Skeleton loading for results */
    .skeleton-card {
      background: var(--bg-secondary); border-radius: 12px; min-height: 300px;
      position: relative; overflow: hidden;
    }
    .skeleton-card::after {
      content: ''; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
      background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
      animation: skeleton-shimmer 1.5s infinite;
    }
    @keyframes skeleton-shimmer { to { left: 100%; } }

    /* Combo card */
    .combo-card {
      background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px;
      padding: 12px; transition: all .15s;
    }
    .combo-card:hover { border-color: var(--border-hover); }
    .combo-card-images { display: flex; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }

    /* Outfit slot rows */
    .outfit-slot-row { display: flex; align-items: center; gap: 10px; }
    .outfit-slot-label { font-size: 10px; font-weight: 700; color: var(--text-muted); width: 80px; text-transform: uppercase; flex-shrink: 0; }
    .outfit-products-scroll { display: flex; gap: 6px; overflow-x: auto; flex: 1; padding: 4px 0; }
    .outfit-product-thumb {
      width: 52px; height: 52px; border-radius: 8px; object-fit: cover; cursor: pointer;
      border: 2px solid var(--border); transition: all .15s; flex-shrink: 0;
    }
    .outfit-product-thumb:hover { border-color: var(--border-hover); }
    .outfit-product-thumb.selected { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-subtle); }
    .outfit-upload-btn {
      width: 52px; height: 52px; border-radius: 8px; border: 2px dashed var(--border);
      display: flex; align-items: center; justify-content: center; cursor: pointer;
      color: var(--text-muted); font-size: 20px; transition: all .15s; flex-shrink: 0;
    }
    .outfit-upload-btn:hover { border-color: var(--accent); color: var(--accent); }

    /* Product picker popup */
    .product-picker-popup {
      position: absolute; z-index: 10001;
      background: var(--bg-secondary); border: 1px solid var(--border);
      border-radius: 12px; padding: 10px; width: 280px; max-height: 320px;
      box-shadow: 0 8px 32px rgba(0,0,0,0.4); overflow-y: auto;
    }
    .product-picker-popup .pp-header {
      display: flex; justify-content: space-between; align-items: center;
      margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--border);
    }
    .product-picker-popup .pp-header span { font-size: 11px; font-weight: 600; color: var(--text-secondary); text-transform: uppercase; }
    .product-picker-popup .pp-close { background: none; border: none; color: var(--text-muted); font-size: 16px; cursor: pointer; padding: 2px 6px; }
    .product-picker-popup .pp-grid {
      display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px;
    }
    .product-picker-popup .pp-item {
      cursor: pointer; border-radius: 8px; border: 2px solid var(--border);
      overflow: hidden; transition: all 0.15s; position: relative;
      aspect-ratio: 1;
    }
    .product-picker-popup .pp-item:hover { border-color: var(--accent); transform: scale(1.05); }
    .product-picker-popup .pp-item img { width: 100%; height: 100%; object-fit: cover; }
    .product-picker-popup .pp-item .pp-label {
      position: absolute; bottom: 0; left: 0; right: 0;
      font-size: 8px; color: white; background: rgba(0,0,0,0.6);
      padding: 2px 4px; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .product-picker-popup .pp-upload-btn {
      cursor: pointer; border-radius: 8px; border: 2px dashed var(--border);
      display: flex; align-items: center; justify-content: center; flex-direction: column;
      color: var(--text-muted); font-size: 18px; transition: all 0.15s; aspect-ratio: 1;
    }
    .product-picker-popup .pp-upload-btn:hover { border-color: var(--accent); color: var(--accent); }
    .product-picker-popup .pp-upload-btn span { font-size: 8px; margin-top: 2px; }
    .product-picker-popup .pp-empty {
      grid-column: 1 / -1; text-align: center; color: var(--text-muted);
      font-size: 11px; padding: 16px 8px;
    }

    /* Model avatar card (old style, keep for compat) */
    .model-avatar-card {
      display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 8px;
      cursor: pointer; border: 1px solid transparent; transition: all .15s;
    }
    .model-avatar-card:hover { background: var(--bg-card-hover); }
    .model-avatar-card.selected { border-color: var(--accent); background: var(--accent-subtle); }
    .model-avatar-card img { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; }
    .model-info { flex: 1; min-width: 0; }
    .model-name { font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .model-meta { font-size: 10px; color: var(--text-muted); }

    @media (max-width: 768px) {
      .pose-grid { grid-template-columns: repeat(auto-fill, 55px); }
      .bg-grid { grid-template-columns: repeat(3, 1fr); }
      .results-grid { grid-template-columns: 1fr; }
    }

    /* Lightbox overlay for image zoom */
    .lightbox-overlay {
      display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
      background: rgba(0,0,0,0.85); z-index: 10000; cursor: zoom-out;
      justify-content: center; align-items: center; padding: 24px;
      animation: lbFadeIn .2s;
    }
    .lightbox-overlay.active { display: flex; }
    @keyframes lbFadeIn { from { opacity: 0; } to { opacity: 1; } }
    .lightbox-overlay img {
      max-width: 90vw; max-height: 90vh; object-fit: contain;
      border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.5);
    }
    .lightbox-actions {
      position: absolute; top: 16px; right: 16px;
      display: flex; gap: 8px;
    }
    .lightbox-actions button {
      padding: 8px 16px; border-radius: 8px; border: none;
      background: rgba(255,255,255,0.15); color: white;
      font-size: 12px; font-weight: 600; cursor: pointer;
      transition: background .15s;
    }
    .lightbox-actions button:hover { background: rgba(255,255,255,0.3); }

    /* ═══ CAMPAIGN WIZARD STYLES ═══ */
    .campaign-wizard { padding: 4px 0; }

    .campaign-step-indicator {
      display: flex; align-items: center; gap: 0; margin-bottom: 24px;
    }
    .campaign-step-circle {
      width: 36px; height: 36px; border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      font-size: 13px; font-weight: 700;
      background: var(--bg-card); border: 2px solid var(--border);
      color: var(--text-muted); transition: all .2s;
      flex-shrink: 0;
    }
    .campaign-step-circle.active {
      background: var(--accent); border-color: var(--accent); color: white;
    }
    .campaign-step-circle.done {
      background: var(--accent-subtle); border-color: var(--accent); color: var(--accent);
    }
    .campaign-step-line {
      flex: 1; height: 2px; background: var(--border); margin: 0 4px;
      transition: background .2s;
    }
    .campaign-step-line.active { background: var(--accent); }
    .campaign-step-label {
      font-size: 10px; color: var(--text-muted); text-align: center;
      margin-top: 4px; font-weight: 600;
    }
    .campaign-step-label.active { color: var(--accent); }

    .campaign-step-content { display: none; }
    .campaign-step-content.active { display: block; }

    .campaign-product-grid {
      display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
      gap: 12px;
    }
    .campaign-product-card {
      background: var(--bg-card); border: 2px solid var(--border);
      border-radius: 12px; padding: 10px; cursor: pointer;
      transition: all .15s; text-align: center;
    }
    .campaign-product-card:hover {
      border-color: var(--border-hover); background: var(--bg-card-hover);
    }
    .campaign-product-card.selected {
      border-color: var(--accent); box-shadow: 0 0 12px var(--accent-glow);
    }
    .campaign-product-card img {
      width: 100%; aspect-ratio: 1; object-fit: cover;
      border-radius: 8px; margin-bottom: 8px; background: var(--bg-input);
    }
    .campaign-product-card .name {
      font-size: 12px; font-weight: 600; color: var(--text-primary);
      white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .campaign-product-card .category {
      font-size: 10px; color: var(--text-muted); margin-top: 2px;
    }

    .campaign-template-cards {
      display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
      gap: 12px; margin-bottom: 20px;
    }
    .campaign-template-card {
      background: var(--bg-card); border: 2px solid var(--border);
      border-radius: 12px; padding: 20px; cursor: pointer;
      transition: all .15s; text-align: center; min-height: 120px;
      display: flex; flex-direction: column; align-items: center;
      justify-content: center; gap: 8px;
    }
    .campaign-template-card:hover {
      border-color: var(--accent); background: var(--bg-card-hover);
      transform: translateY(-2px);
    }
    .campaign-template-card.selected {
      border-color: var(--accent); box-shadow: 0 0 16px var(--accent-glow);
      background: var(--accent-subtle);
    }
    .campaign-template-card .icon { font-size: 32px; }
    .campaign-template-card .title {
      font-size: 13px; font-weight: 700; color: var(--text-primary);
    }
    .campaign-template-card .subtitle {
      font-size: 11px; color: var(--text-muted); line-height: 1.3;
    }

    .campaign-shot-grid {
      display: grid; grid-template-columns: repeat(3, 1fr);
      gap: 12px; margin-top: 16px;
    }
    .campaign-shot-card {
      background: var(--bg-card); border: 1px solid var(--border);
      border-radius: 12px; overflow: hidden; transition: all .15s;
    }
    .campaign-shot-card:hover { border-color: var(--border-hover); }
    .campaign-shot-card .image-area {
      aspect-ratio: 9/16; background: var(--bg-input);
      display: flex; align-items: center; justify-content: center;
      color: var(--text-muted); font-size: 11px; position: relative;
      overflow: hidden;
    }
    .campaign-shot-card .image-area img {
      width: 100%; height: 100%; object-fit: cover;
    }
    .campaign-shot-card .image-area .placeholder-icon {
      font-size: 28px; opacity: 0.4;
    }
    .campaign-shot-card .shot-info { padding: 10px; }
    .campaign-shot-card .shot-name {
      font-size: 12px; font-weight: 600; color: var(--text-primary);
      margin-bottom: 4px; white-space: nowrap; overflow: hidden;
      text-overflow: ellipsis;
    }
    .campaign-shot-card .shot-desc {
      font-size: 10px; color: var(--text-muted); line-height: 1.3;
      margin-bottom: 6px; display: -webkit-box; -webkit-line-clamp: 2;
      -webkit-box-orient: vertical; overflow: hidden;
    }
    .campaign-shot-card .badges { display: flex; gap: 4px; flex-wrap: wrap; }
    .campaign-shot-card .badge {
      display: inline-block; padding: 2px 6px; border-radius: 4px;
      font-size: 9px; font-weight: 600;
      background: var(--accent-subtle); color: var(--accent);
    }
    .campaign-shot-card .badge.mood {
      background: rgba(168,85,247,0.12); color: #a855f7;
    }
    .campaign-shot-card .regen-btn {
      width: 100%; padding: 6px; border: none; border-top: 1px solid var(--border);
      background: transparent; color: var(--text-muted); font-size: 11px;
      cursor: pointer; transition: all .15s;
    }
    .campaign-shot-card .regen-btn:hover {
      background: var(--bg-card-hover); color: var(--accent);
    }

    .campaign-progress {
      width: 100%; height: 8px; background: var(--bg-card);
      border-radius: 4px; overflow: hidden; margin: 12px 0;
    }
    .campaign-progress-bar {
      height: 100%; background: var(--accent); border-radius: 4px;
      transition: width .4s ease; width: 0%;
    }

    @media (max-width: 768px) {
      .campaign-shot-grid { grid-template-columns: repeat(2, 1fr); }
      .campaign-template-cards { grid-template-columns: repeat(2, 1fr); }
      .campaign-product-grid { grid-template-columns: repeat(2, 1fr); }
    }
    @media (max-width: 480px) {
      .campaign-shot-grid { grid-template-columns: 1fr; }
      .campaign-template-cards { grid-template-columns: 1fr; }
    }

    /* ============================================ */
    /* UX POLISH — Card Scroll Reveal              */
    /* ============================================ */
    .reveal-card {
      opacity: 0;
      transform: translateY(20px);
      transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
    }
    .reveal-card.revealed {
      opacity: 1;
      transform: translateY(0);
    }

    /* ============================================ */
    /* UX POLISH — Reduced Motion                  */
    /* ============================================ */
    @media (prefers-reduced-motion: reduce) {
      .page.active { animation: none; opacity: 1; }
      .page.page-exit { animation: none; }
      .reveal-card { opacity: 1; transform: none; transition: none; }
      .login-container::before,
      .login-container::after { animation: none; }
      .login-box.form-fade-out { transition: none; }
      .login-box.form-fade-in { animation: none; opacity: 1; transform: none; }
      .btn .ripple { animation: none; display: none; }
    }

/* ===== PRODUCT QUALITY CARDS ===== */
.pq-card { margin-bottom: 8px; padding: 0 !important; overflow: hidden; transition: all 200ms var(--ease); }
.pq-card-header { display: flex; align-items: center; gap: 12px; padding: 14px 18px; cursor: pointer; transition: background 120ms var(--ease); }
.pq-card-header:hover { background: var(--bg-card-hover, rgba(0,0,0,0.02)); }
.pq-card-rank { flex: 0 0 24px; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--bg-tertiary); font-size: 11px; font-weight: 600; color: var(--text-muted); }
.pq-card-info { flex: 1; min-width: 0; }
.pq-card-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-primary); }
.pq-card-meta { font-size: 10px; color: var(--text-muted); margin-top: 1px; }
.pq-subscores { display: flex; gap: 6px; flex-shrink: 0; }
.pq-subscore { font-size: 11px; font-weight: 600; min-width: 30px; text-align: center; }
.pq-card-score { font-size: 22px; font-weight: 700; flex-shrink: 0; min-width: 36px; text-align: center; }
.pq-chevron { width: 16px; height: 16px; flex-shrink: 0; color: var(--text-muted); transition: transform 200ms var(--ease); }
.pq-card.expanded .pq-chevron { transform: rotate(180deg); }
.pq-card-body { max-height: 0; overflow: hidden; transition: max-height 300ms var(--ease), padding 200ms var(--ease); padding: 0 18px; }
.pq-card.expanded .pq-card-body { max-height: 900px; padding: 0 18px 18px; overflow-y: auto; }
.pq-ghost-indicator { flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.pq-ghost-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--text-muted); opacity: 0.3; }
.pq-ghost-active .pq-ghost-dot { background: var(--success); opacity: 1; animation: ghostBreathing 2s ease-in-out infinite; }
.pq-ghost-inactive .pq-ghost-dot { background: var(--text-muted); opacity: 0.3; }
@keyframes ghostBreathing {
  0%, 100% { box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.4); transform: scale(1); }
  50% { box-shadow: 0 0 0 6px rgba(46, 204, 113, 0); transform: scale(1.15); }
}
.pq-ref-item { display: flex; align-items: center; gap: 8px; padding: 6px 10px; background: var(--warning-subtle, rgba(243,156,18,0.08)); border-left: 3px solid var(--warning); border-radius: 6px; font-size: 12px; color: var(--text-primary); }
.pq-ghost-regen-btn:hover { background: var(--bg-card-hover, rgba(0,0,0,0.02)) !important; border-color: var(--accent) !important; color: var(--accent) !important; }
.pq-ghost-regen-btn:disabled { opacity: 0.5; cursor: not-allowed !important; }
@media (max-width: 900px) {
  .pq-subscores { display: none; }
  .pq-card-header { gap: 8px; padding: 10px 12px; }
  .pq-card-score { font-size: 18px; }
  .pq-card.expanded .pq-card-body .a-two-col { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════
   Generation Activity Pill (genActivity.js) — Batch G
   Floating cross-page "crafting…" indicator while a
   generation runs in the background on another page.
   ════════════════════════════════════════════ */
.gen-activity-pill {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 9000;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 16px;
  border-radius: 999px;
  background: var(--bg-elevated, #1a1a1a);
  border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.28),
              0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent),
              0 0 18px color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--text-primary, #fff);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  opacity: 0;
  transform: translateY(14px) scale(0.96);
  pointer-events: none;
  transition: opacity 260ms var(--ease, cubic-bezier(0.4, 0, 0.2, 1)),
              transform 260ms var(--ease, cubic-bezier(0.4, 0, 0.2, 1));
}
.gen-activity-pill.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.gen-activity-pill:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.34),
              0 0 24px color-mix(in srgb, var(--accent) 34%, transparent);
}
.gen-activity-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-top-color: var(--accent);
  animation: genActivitySpin 0.8s linear infinite;
  flex-shrink: 0;
}
.gen-activity-text {
  background: linear-gradient(90deg,
    var(--text-primary, #fff) 0%,
    var(--accent) 50%,
    var(--text-primary, #fff) 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: genActivityShimmer 2.4s linear infinite;
}
@keyframes genActivitySpin {
  to { transform: rotate(360deg); }
}
@keyframes genActivityShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) {
  .gen-activity-spinner { animation-duration: 1.6s; }
  .gen-activity-text {
    animation: none;
    -webkit-text-fill-color: var(--text-primary, #fff);
    background: none;
  }
  .gen-activity-pill { transition: opacity 200ms linear; transform: none; }
  .gen-activity-pill.visible { transform: none; }
}
@media (max-width: 640px) {
  .gen-activity-pill { bottom: 80px; right: 14px; padding: 9px 14px; font-size: 12px; }
}

/* ════════════════════════════════════════════
   Animated Brand Logo (brandLogo.js) — Batch G
   Neon inverted-triangle SVG, brand orange. Lines draw on first paint
   then settle into a soft glow breathe. Default size fills its container;
   per-context sizes are set next to the old img rules above.
   ════════════════════════════════════════════ */
.brand-logo-svg {
  color: var(--accent, #2f5ca8);
  display: block;
  overflow: visible;
  filter: drop-shadow(0 0 2px rgba(47, 92, 168, 0.6))
          drop-shadow(0 0 6px rgba(47, 92, 168, 0.28));
  animation: brandLogoGlow 3.6s ease-in-out infinite;
}
.brand-logo-tri {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: brandLogoDraw 1.7s cubic-bezier(0.65, 0, 0.35, 1) forwards;
}
.brand-logo-tri-inner {
  animation-delay: 0.32s;
  animation-duration: 1.5s;
}
@keyframes brandLogoDraw {
  to { stroke-dashoffset: 0; }
}
@keyframes brandLogoGlow {
  0%, 100% {
    filter: drop-shadow(0 0 2px rgba(47, 92, 168, 0.55))
            drop-shadow(0 0 6px rgba(47, 92, 168, 0.26));
  }
  50% {
    filter: drop-shadow(0 0 4px rgba(47, 92, 168, 0.85))
            drop-shadow(0 0 11px rgba(47, 92, 168, 0.44));
  }
}
@media (prefers-reduced-motion: reduce) {
  .brand-logo-tri { animation: none; stroke-dashoffset: 0; }
  .brand-logo-svg {
    animation: none;
    filter: drop-shadow(0 0 3px rgba(47, 92, 168, 0.6));
  }
}

/* Nav item "Coming soon" (Design Your Clothes) — visible but not navigable */
.nav-item-soon { opacity: 0.5; cursor: default; pointer-events: none; }
.nav-soon-badge { margin-left: auto; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--accent, #2f5ca8); background: rgba(47, 92, 168,0.14); padding: 2px 6px; border-radius: 5px; }

/* ─── PALETTE NOTE (2026-06-09, Atakan) ──────────────────────────────
   Dashboard accent = VIVID DEEP NAVY. Atakan: "tüm mavileri koyultalım
   laciverte kaysın" → "canlı koyu bi lacivert". Primary --accent #2f5ca8
   (hue ~217°, kept saturated to stay vivid, not muddy/turquoise).
   DO NOT revert toward the old #5fa3d0 sky-blue. Semantic amber/red
   (gate-amber #d97706, error #ff6b6b, success green) are intentionally
   kept warm — they signal state, not brand accent.
   ──────────────────────────────────────────────────────────────────── */

/* ─── Sidebar view toggle — Klasik ↔ Akış nav lens (B, 2026-06-09, no emoji) ─── */
.sidebar-view-toggle {
  display: flex;
  margin: 10px 12px 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}
.svt-btn {
  flex: 1;
  padding: 5px 0;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-muted, rgba(255, 255, 255, 0.5));
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 160ms ease, color 140ms ease;
}
.svt-btn--active {
  background: var(--bg-card, rgba(255, 255, 255, 0.10));
  color: var(--text-primary, #fff);
}
.svt-btn:hover:not(.svt-btn--active) { color: var(--text-secondary, rgba(255, 255, 255, 0.75)); }
.nav-akis-section + .nav-akis-section { margin-top: 6px; }
[data-theme="light"] .sidebar-view-toggle { background: rgba(20, 30, 48, 0.04); }
[data-theme="light"] .svt-btn--active { background: #fff; box-shadow: 0 1px 3px rgba(20, 30, 48, 0.10); }
