/* ============================================================
   AŞAMA 1 — DESIGN TOKENS (Legatus AI / Ivory + Ink palette)
   ------------------------------------------------------------
   Bu dosyayı static/ altına koy ve style.css'ten ÖNCE veya
   SONRA include et. style.css'in :root ve [data-theme="light"]
   bloklarını OVERRIDE eder; HTML değişmez.

   Kurulum:
   1) Bu dosyayı  static/tokens.css  olarak kaydet
   2) Tüm template'lerde <link href="/static/style.css"> SATIRINDAN
      SONRA   <link href="/static/tokens.css">   ekle
   3) Default tema artık IVORY (light). Dark tema ismini "ink"
      olarak yeniden tanımladık ama style.css'teki localStorage
      anahtarı 'hukuk_theme' === 'light' kontrolü uyumlu kalsın
      diye [data-theme="light"]'ı ivory olarak bıraktık.
   ============================================================ */

/* ---- Default = INK (dark, premium) ---- */
:root {
    /* Surfaces */
    --bg-primary:    #14161b;   /* canvas */
    --bg-secondary:  #1b1e25;   /* sidebar / cards */
    --bg-tertiary:   #242832;   /* inputs, hover */

    /* Text */
    --text-primary:   #e8e4d8;  /* warm ivory */
    --text-secondary: #9b9588;  /* muted parchment */

    /* Brand */
    --accent:        #c8a96a;   /* warm gold */
    --accent-hover:  #b89556;

    /* Lines */
    --border:        #2c313d;

    /* Chat */
    --user-bubble:   #2a2f3d;   /* slightly lifted */
    --ai-bubble:     #1b1e25;   /* same as sidebar */

    /* Status */
    --success: #6b9b6b;
    --danger:  #c87a6a;

    /* Layout */
    --sidebar-width: 260px;

    /* Aliases */
    --bg:         var(--bg-primary);
    --sidebar-bg: var(--bg-secondary);
    --text:       var(--text-primary);
    --text-muted: var(--text-secondary);
    --hover-bg:   var(--bg-tertiary);

    /* Typography — Inter önde (Dejure-benzeri görünüm) */
    --font-sans:  "Inter", ui-sans-serif, -apple-system, "Söhne", "Helvetica Neue", Arial, sans-serif;
    --font-serif: ui-serif, Georgia, "Tiempos Text", "Charter", serif;

    /* Radius scale */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;

    /* Shadow */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.25);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.35);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.45);
}

/* ---- Light = VARSAYILAN (Dejure-benzeri: beyaz zemin, siyah vurgu,
        soğuk griler, Inter). Koyu tema (INK) tercih olarak kalır. ---- */
[data-theme="light"] {
    --bg-primary:    #ffffff;   /* canvas — saf beyaz */
    --bg-secondary:  #ffffff;   /* sidebar / kartlar (ince gri çizgiyle ayrılır) */
    --bg-tertiary:   #f4f4f5;   /* inputs, hover */

    --text-primary:   #18181b;  /* near-black */
    --text-secondary: #71717a;  /* zinc gri */

    --accent:        #18181b;   /* siyah butonlar / aktif vurgu */
    --accent-hover:  #000000;

    --border:        #e4e4e7;

    --user-bubble:   #f4f4f5;
    --ai-bubble:     #ffffff;

    --success: #3f8f5f;
    --danger:  #c0564a;

    --bg:         var(--bg-primary);
    --sidebar-bg: var(--bg-secondary);
    --text:       var(--text-primary);
    --text-muted: var(--text-secondary);
    --hover-bg:   var(--bg-tertiary);

    --shadow-sm: 0 1px 2px rgba(24,24,27,0.05);
    --shadow-md: 0 4px 16px rgba(24,24,27,0.07);
    --shadow-lg: 0 12px 40px rgba(24,24,27,0.10);
}

/* Açık temada sidebar/kart ayrımı ince çizgiyle sağlanır (Dejure deseni) */
[data-theme="light"] .sidebar { border-right: 1px solid var(--border); }

/* Body font swap (style.css'teki -apple-system stack'ini geçer) */
body {
    font-family: var(--font-sans);
}

/* H1/H2 ve welcome başlıkları için serif vurgu */
.welcome-message h1,
.login-card h1,
h1.serif,
.hero-headline {
    font-family: var(--font-serif);
    font-weight: 500;
    letter-spacing: -0.01em;
}

/* ============================================================
   Brand logo (theme-aware)
   - .brand-logo wraps two <img> variants; CSS shows the right one.
   - icon_dark_without_bg.png  = light wordmark (used on dark theme)
   - icon_light_without_bg.png = dark  wordmark (used on light theme)
   ============================================================ */
.brand-logo { display: inline-flex; align-items: center; line-height: 0; }
.brand-logo img { display: block; height: 100%; width: auto; }
.brand-logo .logo-light { display: none; }
.brand-logo .logo-dark  { display: block; }
[data-theme="light"] .brand-logo .logo-light { display: block; }
[data-theme="light"] .brand-logo .logo-dark  { display: none; }
