/* ============================================================
   Frema Web App — Design Tokens (dark theme, Fotify-style SaaS)
   ============================================================ */

:root {
  /* ─── Colors ─────────────────────────────────────────────── */
  /* Base zemin (en koyu) */
  --bg-deepest: #0a0a14;
  --bg-deep:    #0f0f1a;
  --bg-base:    #131322;
  --bg-raised:  #1a1a2e;
  --bg-elevated:#22223c;
  --bg-hover:   rgba(255,255,255,0.04);

  /* Borders + dividers */
  --border-subtle:  rgba(255,255,255,0.06);
  --border-default: rgba(255,255,255,0.10);
  --border-strong:  rgba(255,255,255,0.15);

  /* Text */
  --text-primary:   #FFFFFF;
  --text-secondary: rgba(255,255,255,0.72);
  --text-tertiary:  rgba(255,255,255,0.50);
  --text-muted:     rgba(255,255,255,0.35);
  --text-disabled:  rgba(255,255,255,0.20);

  /* Brand */
  /* Frema gerçek brand kit (mor disc + altın merkez logosu ile match)
     Flutter app/lib/theme.dart FremaColors.primary ile aynı değer */
  --brand:           #6750A4;  /* mor primary — gerçek brand */
  --brand-light:     #9A82DB;
  --brand-dark:      #4F378B;
  --brand-bg:        rgba(103,80,164,0.10);
  --brand-bg-strong: rgba(103,80,164,0.20);
  --brand-gradient:  linear-gradient(135deg, #6750A4 0%, #4F378B 100%);

  /* Accents (Fotify color-coded sections) */
  --gold:        #FFD23F;
  --gold-warm:   #FFB800;
  --green:       #10B981;
  --green-bg:    rgba(16,185,129,0.12);
  --red:         #EF4444;
  --red-bg:      rgba(239,68,68,0.12);
  --blue:        #3B82F6;
  --blue-bg:     rgba(59,130,246,0.12);
  --pink:        #EC4899;
  --pink-bg:     rgba(236,72,153,0.12);

  /* Status */
  --status-live:    #10B981;
  --status-pending: #FFB800;
  --status-error:   #EF4444;

  /* ─── Tipografi ──────────────────────────────────────────── */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-display: 'Fraunces', 'Inter', -apple-system, system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', Menlo, monospace;

  /* Font size scale */
  --text-xs:   11px;
  --text-sm:   12.5px;
  --text-base: 14px;
  --text-md:   15px;
  --text-lg:   17px;
  --text-xl:   20px;
  --text-2xl:  24px;
  --text-3xl:  32px;
  --text-4xl:  40px;
  --text-hero: 48px;

  /* Weights */
  --fw-regular: 400;
  --fw-medium:  500;
  --fw-semibold:600;
  --fw-bold:    700;
  --fw-extra:   800;
  --fw-black:   900;

  /* Line heights */
  --lh-tight: 1.1;
  --lh-snug:  1.3;
  --lh-base:  1.5;
  --lh-loose: 1.7;

  /* ─── Spacing (4px base) ─────────────────────────────────── */
  --s-1:  4px;
  --s-2:  8px;
  --s-3:  12px;
  --s-4:  16px;
  --s-5:  20px;
  --s-6:  24px;
  --s-8:  32px;
  --s-10: 40px;
  --s-12: 48px;
  --s-16: 64px;
  --s-20: 80px;

  /* ─── Radius ──────────────────────────────────────────── */
  --r-sm:    6px;
  --r-md:    10px;
  --r-lg:    14px;
  --r-xl:    18px;
  --r-2xl:   24px;
  --r-pill:  999px;

  /* ─── Shadows (dark theme uyumlu) ───────────────────────── */
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.30);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.40);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.50);
  --shadow-glow-brand: 0 0 32px rgba(103,80,164,0.25);
  --shadow-glow-gold:  0 0 24px rgba(255,210,63,0.20);
  --shadow-glow-mixed: 0 0 48px rgba(103,80,164,0.20), 0 0 24px rgba(255,210,63,0.10);

  /* ─── Signature gradients ───────────────────────────────── */
  --aurora-conic: conic-gradient(from 220deg at 30% 30%, rgba(103,80,164,0.35) 0deg, rgba(255,210,63,0.18) 90deg, rgba(15,15,26,0) 200deg, rgba(103,80,164,0.20) 360deg);
  --aurora-radial: radial-gradient(circle at 80% 30%, rgba(103,80,164,0.20), transparent 55%), radial-gradient(circle at 15% 85%, rgba(255,210,63,0.10), transparent 60%);

  /* ─── Layout sabitleri ──────────────────────────────────── */
  --sidebar-width: 240px;
  --topbar-height: 60px;
  --content-max:   1680px;
  --content-pad:   32px;

  /* ─── Transitions ───────────────────────────────────────── */
  --t-fast:   120ms;
  --t-base:   180ms;
  --t-slow:   320ms;
  --ease:     cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Global reset + body ─────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--lh-base);
  color: var(--text-primary);
  background: var(--bg-deepest);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; background: none; border: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul, ol { list-style: none; }

::selection {
  background: var(--brand-bg-strong);
  color: var(--text-primary);
}

/* ──────────────────────────────────────────────────────────────────
   Tier-aware UI (shell.js loadTier set'ler)
   data-tier="free" / "pro" / "proplus" / "guest_pro" body'de
   .tier-locked → düşük tier user'a "kilitli" görünüm (opacity + lock icon)
   .tier-badge  → nav item'a "Pro+" çipi
   ────────────────────────────────────────────────────────────────── */
.tier-locked {
  position: relative;
  opacity: 0.55;
  cursor: pointer;
}
.tier-locked::after {
  content: '🔒';
  font-size: 11px;
  margin-left: 6px;
  vertical-align: middle;
}
.sidebar-nav a.tier-locked {
  opacity: 0.85;
}
.tier-badge {
  display: inline-block;
  font-size: 9.5px;
  font-weight: 700;
  background: linear-gradient(135deg, #FFD700, #F59E0B);
  color: #1a1a1a;
  padding: 1px 6px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 0.3px;
}

/* Scrollbar (dark) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-deepest); }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.08);
  border-radius: var(--r-pill);
  border: 2px solid var(--bg-deepest);
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }
