/* ============================================================
   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 */
    --font-sans:  ui-sans-serif, -apple-system, "Inter", "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 = IVORY (parchment, default visual) ---- */
[data-theme="light"] {
    --bg-primary:    #f7f3ea;   /* ivory paper */
    --bg-secondary:  #fffdf7;   /* card / sidebar */
    --bg-tertiary:   #efe9d9;   /* inputs, hover */

    --text-primary:   #1c1a16;  /* near-black ink */
    --text-secondary: #6b6457;  /* muted ink */

    --accent:        #8a6a2f;   /* deep gold/bronze */
    --accent-hover:  #6e5325;

    --border:        #e2dac6;

    --user-bubble:   #ede4ce;
    --ai-bubble:     #fffdf7;

    --success: #4f7a4f;
    --danger:  #a85c4d;

    --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(28,26,22,0.06);
    --shadow-md: 0 4px 16px rgba(28,26,22,0.08);
    --shadow-lg: 0 12px 40px rgba(28,26,22,0.10);
}

/* 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; }
