/* =====================================================================
   Görünüm temaları. <html data-theme="…" data-style="…"> ile seçilir (bkz. theme.js).
   - anadolu  : markanın varsayılan görünümü (anadolu.css). Bu dosya ona dokunmaz.
   - kurumsal : açık mavi yan menü, beyaz kartlar, yumuşak köşeler. Ferah; uzun mesaide göz yormaz.
   - lacivert : koyu lacivert yan menü (eski kurumsal).
   - adacayi / lavanta / seftali : kurumsal düzenin yumuşak renk seçenekleri (yeşil, mor, sıcak şeftali).
   - klasik   : beyaz yan menü, petrol yeşili vurgu. Sade ofis görünümü.
   - gece     : kurumsal düzenin koyu renkleri; loş ortam ve akşam vardiyası için.
   Anadolu dışındakiler "formal" biçemi paylaşır: Anadolu süslemeleri kapanır, yalnız renkler değişir.
   Zeminler saf beyaz değil, hafif renkli: uzun süre bakınca parlamaz; düğme yazısı zeminine en az 4.5:1.
   ===================================================================== */

:root[data-theme="kurumsal"] {
  --primary: #2f64c0; --primary-strong: #2552a0; --primary-soft: #e8effb;
  --accent: #d9663f; --yellow: #e8effb; --cream: #eef3fa;
  --bg: #f4f7fb; --surface: #ffffff; --surface-2: #eff3f9;
  --ink: #1d2939; --muted: #5d6b7e; --line: #e1e7f0; --line-strong: #c9d3e0;
  --ok: #217a52; --ok-soft: #e1f2e9; --warn: #a76a12; --warn-soft: #fbf0db; --danger: #b93a2b; --danger-soft: #fbe5e1; --info: #1d6f8b; --info-soft: #e0eef3;
  --sidebar-bg: #eaf1fa; --sidebar-ink: #22324a; --sidebar-muted: #6f7f95; --sidebar-active: #d9e6f8; --sidebar-mark: #2f64c0;
  color-scheme: light;
}

:root[data-theme="lacivert"] {
  --primary: #1f4e79; --primary-strong: #163a5b; --primary-soft: #e7eef6;
  --accent: #b5523b; --yellow: #dce7f3; --cream: #e9eef5;
  --bg: #f3f5f8; --surface: #ffffff; --surface-2: #f1f4f8;
  --ink: #1b2533; --muted: #5f6b7a; --line: #e2e7ee; --line-strong: #c8d1dc;
  --ok: #217a52; --ok-soft: #e1f2e9; --warn: #a76a12; --warn-soft: #fbf0db; --danger: #b93a2b; --danger-soft: #fbe5e1; --info: #1d6f8b; --info-soft: #e0eef3;
  --sidebar-bg: #13283f; --sidebar-ink: #dfe7f1; --sidebar-muted: rgba(223, 231, 241, .55); --sidebar-active: rgba(255, 255, 255, .11); --sidebar-mark: #6fa8dc;
  color-scheme: light;
}

:root[data-theme="adacayi"] {
  --primary: #2f7552; --primary-strong: #245e41; --primary-soft: #e4f1e9;
  --accent: #c4673a; --yellow: #e4f1e9; --cream: #eef4f0;
  --bg: #f4f8f5; --surface: #ffffff; --surface-2: #eef4f0;
  --ink: #1e2b25; --muted: #5d6d64; --line: #e0e9e3; --line-strong: #c7d5cc;
  --ok: #217a52; --ok-soft: #e1f2e9; --warn: #a76a12; --warn-soft: #fbf0db; --danger: #b93a2b; --danger-soft: #fbe5e1; --info: #1d6f8b; --info-soft: #e0eef3;
  --sidebar-bg: #e9f2ec; --sidebar-ink: #213229; --sidebar-muted: #6d8075; --sidebar-active: #d4e8db; --sidebar-mark: #2f7552;
  color-scheme: light;
}

:root[data-theme="lavanta"] {
  --primary: #5d4cb0; --primary-strong: #4b3c94; --primary-soft: #eeebf9;
  --accent: #c4527f; --yellow: #eeebf9; --cream: #f3f1fa;
  --bg: #f7f6fb; --surface: #ffffff; --surface-2: #f2f0f8;
  --ink: #241f36; --muted: #665f7c; --line: #e7e3f1; --line-strong: #d0c9e2;
  --ok: #217a52; --ok-soft: #e1f2e9; --warn: #a76a12; --warn-soft: #fbf0db; --danger: #b93a2b; --danger-soft: #fbe5e1; --info: #1d6f8b; --info-soft: #e0eef3;
  --sidebar-bg: #f0edf9; --sidebar-ink: #2a2440; --sidebar-muted: #7a7294; --sidebar-active: #e2dcf5; --sidebar-mark: #5d4cb0;
  color-scheme: light;
}

:root[data-theme="seftali"] {
  --primary: #a84a28; --primary-strong: #8c3b1e; --primary-soft: #fbeae1;
  --accent: #2f7d8a; --yellow: #fbeae1; --cream: #fbf2ec;
  --bg: #fbf8f5; --surface: #ffffff; --surface-2: #f8f1eb;
  --ink: #2e211b; --muted: #74635a; --line: #efe4dc; --line-strong: #dccbbf;
  --ok: #217a52; --ok-soft: #e1f2e9; --warn: #a76a12; --warn-soft: #fbf0db; --danger: #b93a2b; --danger-soft: #fbe5e1; --info: #1d6f8b; --info-soft: #e0eef3;
  --sidebar-bg: #fbefe7; --sidebar-ink: #36251c; --sidebar-muted: #8a766a; --sidebar-active: #f6ddd0; --sidebar-mark: #a84a28;
  color-scheme: light;
}

:root[data-theme="klasik"] {
  --primary: #0f6e66; --primary-strong: #0a5751; --primary-soft: #e3f1ef;
  --accent: #c2562f; --yellow: #f3e3b5; --cream: #f7f7f4;
  --bg: #f6f6f3; --surface: #ffffff; --surface-2: #f2f2ee;
  --ink: #1f2a2a; --muted: #66706f; --line: #e4e4de; --line-strong: #cdcdc4;
  --ok: #2f795b; --ok-soft: #e2f0e7; --warn: #a96d14; --warn-soft: #faefd8; --danger: #b8432b; --danger-soft: #f9e3dc; --info: #1d6f8b; --info-soft: #e0eef3;
  --sidebar-bg: #ffffff; --sidebar-ink: #26302f; --sidebar-muted: #8a9291; --sidebar-active: #e3f1ef; --sidebar-mark: #0f6e66;
  color-scheme: light;
}

:root[data-theme="gece"] {
  --primary: #4a8fd4; --primary-strong: #3a7bbd; --primary-soft: #1b2a3b;
  --accent: #e08158; --yellow: #2b3a4d; --cream: #e6ebf2;
  --bg: #0e131a; --surface: #161d26; --surface-2: #1d2631;
  --ink: #e4e9f0; --muted: #94a2b4; --line: #27323f; --line-strong: #3a4757;
  --ok: #4fbf8b; --ok-soft: #173327; --warn: #e2a640; --warn-soft: #36290f; --danger: #ef7a62; --danger-soft: #3a1b16; --info: #5cb3d1; --info-soft: #14303a;
  --sidebar-bg: #0a0f15; --sidebar-ink: #d5dde8; --sidebar-muted: rgba(213, 221, 232, .5); --sidebar-active: rgba(255, 255, 255, .08); --sidebar-mark: #4a8fd4;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4); --shadow-lg: 0 16px 40px rgba(0, 0, 0, .5);
  color-scheme: dark;
}

/* ---------- Ortak "formal" biçem ---------- */
:root[data-style="formal"] {
  --radius: 10px; --radius-sm: 6px;
  --display: "Inter", "Segoe UI", system-ui, sans-serif;
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
:root[data-style="formal"]:not([data-theme="gece"]) {
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .07);
  --shadow-lg: 0 14px 34px rgba(16, 24, 40, .16);
}

[data-style="formal"] body { font-size: 14.5px; }
[data-style="formal"] ::selection { background: var(--primary-soft); color: var(--ink); }
[data-style="formal"] :focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
[data-style="formal"] a { font-weight: 600; }
[data-style="formal"] h1 { font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
[data-style="formal"] .kicker { color: var(--primary); letter-spacing: .12em; }

[data-style="formal"] .page-head { padding-bottom: 14px; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
[data-style="formal"] .page-head::after,
[data-style="formal"] .page-head > div:first-child::before { content: none; display: none; }
[data-style="formal"] .page-head h1 { font-size: clamp(1.45rem, 2.2vw, 1.85rem); }
[data-style="formal"] .page-head h1 .icon { width: 24px; height: 24px; color: var(--primary); }

[data-style="formal"] label { font-size: .8rem; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--muted); }
[data-style="formal"] label.check { color: var(--ink); }
[data-style="formal"] input, [data-style="formal"] select, [data-style="formal"] textarea { border-radius: var(--radius-sm); border-color: var(--line-strong); background: var(--surface); }
[data-style="formal"] input:focus, [data-style="formal"] select:focus, [data-style="formal"] textarea:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent); }

[data-style="formal"] .btn { border-radius: var(--radius-sm); font-weight: 600; min-height: 38px; background: var(--surface); border-color: var(--line-strong); }
[data-style="formal"] .btn:hover { border-color: var(--primary); background: var(--primary-soft); }
[data-style="formal"] .btn.primary { clip-path: none; background: var(--primary); border-color: var(--primary); color: #fff; }
[data-style="formal"] .btn.primary:hover { background: var(--primary-strong); border-color: var(--primary-strong); }
[data-style="formal"] .btn.ghost { background: transparent; border-color: transparent; }
[data-style="formal"] .btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
[data-style="formal"] .btn.sm { min-height: 30px; }
[data-style="formal"] .icon-btn, [data-style="formal"] .segmented, [data-style="formal"] .segmented button { border-radius: var(--radius-sm); }
[data-style="formal"] .segmented button.on { box-shadow: var(--shadow); }
[data-style="formal"] .chip { border-radius: 999px; font-weight: 600; }

[data-style="formal"] .card, [data-style="formal"] .stat, [data-style="formal"] .pos-catalog, [data-style="formal"] .pos-ticket, [data-style="formal"] .res-card,
[data-style="formal"] .cal-scroll, [data-style="formal"] .editor-panel, [data-style="formal"] .center-card, [data-style="formal"] .product,
[data-style="formal"] .table-tile, [data-style="formal"] .template, [data-style="formal"] .setting-link.card {
  border-radius: var(--radius); border-color: var(--line); box-shadow: var(--shadow);
}
[data-style="formal"] .card-head h3 { font-weight: 700; }
[data-style="formal"] .card-head h3 .icon { color: var(--primary); }
[data-style="formal"] .stat::after { content: none; display: none; }
[data-style="formal"] .stat-value { font-weight: 700; color: var(--ink); }
[data-style="formal"] .hero-card { border-radius: var(--radius); box-shadow: var(--shadow-lg); }
[data-style="formal"] .hero-card::after { content: none; display: none; }
[data-style="formal"] .big-number { font-family: var(--font); font-weight: 700; }
[data-style="formal"] .meter, [data-style="formal"] .meter div, [data-style="formal"] .bar div { border-radius: 999px; }
[data-style="formal"] .meter div { background: var(--primary); }
[data-style="formal"] .modal { border-radius: 14px; border-color: var(--line); box-shadow: var(--shadow-lg); }
[data-style="formal"] .modal header h2 { font-family: var(--font); font-weight: 700; font-size: 1.15rem; letter-spacing: -.01em; }
[data-style="formal"] .toast { border-radius: 10px; box-shadow: var(--shadow-lg); }
[data-style="formal"] .tabs { border-bottom-color: var(--line); }
[data-style="formal"] .tab.on { color: var(--primary); border-bottom-color: var(--primary); }
[data-style="formal"] .empty-icon { border-radius: 50%; background: var(--primary-soft); color: var(--primary); }
[data-style="formal"] .alert, [data-style="formal"] .banner, [data-style="formal"] .note, [data-style="formal"] .clickable, [data-style="formal"] .dot,
[data-style="formal"] .slot, [data-style="formal"] .picker-list, [data-style="formal"] .picked, [data-style="formal"] .search-box, [data-style="formal"] .date-nav,
[data-style="formal"] .stepper, [data-style="formal"] .pos-tabs, [data-style="formal"] .pos-tabs button, [data-style="formal"] .w-option, [data-style="formal"] .kv,
[data-style="formal"] .thumb, [data-style="formal"] .cal-appt, [data-style="formal"] .module-tick, [data-style="formal"] .module-icon, [data-style="formal"] .hours-mode,
[data-style="formal"] .action-card, [data-style="formal"] .pe-mode, [data-style="formal"] .license-lock, [data-style="formal"] .time-chip { border-radius: var(--radius-sm); }
[data-style="formal"] .module-tick.on, [data-style="formal"] .hours-mode.on { background: var(--primary-soft); box-shadow: var(--shadow); }
[data-style="formal"] .module-total, [data-style="formal"] .license-lock { box-shadow: var(--shadow-lg); border-radius: var(--radius); }
[data-style="formal"] .module-total strong, [data-style="formal"] .mp-group-head strong, [data-style="formal"] .sub-total strong { font-family: var(--font); font-weight: 700; }
[data-style="formal"] .module-icon { color: #fff; }
[data-style="formal"] .badge { background: var(--primary); color: #fff; }
[data-style="formal"] .avatar.yellow { background: var(--primary-soft); color: var(--primary); }
[data-style="formal"] .pill { font-weight: 700; letter-spacing: .03em; }

/* Kabuk: yan menü */
[data-style="formal"] .sidebar { background: var(--sidebar-bg); color: var(--sidebar-ink); border-right: 1px solid var(--line); }
[data-style="formal"] .manifesto, [data-style="formal"] .pattern { display: none; }
[data-style="formal"] .brand-row { padding: 22px 22px 18px; }
[data-style="formal"] .wordmark { font-size: 30px; letter-spacing: -1.6px; color: var(--sidebar-ink); }
[data-style="formal"] .brand-row .icon-btn, [data-style="formal"] .user-card .icon-btn { color: var(--sidebar-ink); }
[data-style="formal"] .ws-picker { color: var(--sidebar-ink); margin: 0 16px 12px; }
[data-style="formal"] .ws-picker span, [data-style="formal"] .nav-title { color: var(--sidebar-muted); }
[data-style="formal"] .ws-picker select, [data-style="formal"] .ws-picker strong { color: var(--sidebar-ink); border-color: color-mix(in srgb, var(--sidebar-ink) 22%, transparent); background: color-mix(in srgb, var(--sidebar-ink) 5%, transparent); border-radius: var(--radius-sm); }
[data-style="formal"] .nav-title { margin: 16px 24px 6px; }
[data-style="formal"] .nav-item { min-height: 40px; margin: 1px 10px; padding: 0 12px; grid-template-columns: 28px 1fr; border-radius: var(--radius-sm); color: var(--sidebar-ink); font-weight: 500; font-size: 13.5px; }
[data-style="formal"] .nav-item::before { inset: 8px auto 8px 0; width: 3px; border-radius: 3px; }
[data-style="formal"] .nav-item:hover { background: var(--sidebar-active); }
[data-style="formal"] .nav-item.active, [data-style="formal"] .nav-item.compact.active { background: var(--sidebar-active); color: var(--sidebar-ink); font-weight: 650; }
[data-style="formal"] .nav-item.active::before { background: var(--sidebar-mark); }
[data-style="formal"] .nav-item.active .icon { color: var(--sidebar-mark); }
[data-style="formal"] .user-card { background: color-mix(in srgb, var(--sidebar-ink) 6%, transparent); border-top: 1px solid color-mix(in srgb, var(--sidebar-ink) 12%, transparent); }
[data-style="formal"] .user-card .who small { color: var(--sidebar-muted); }
[data-style="formal"] .user-card .icon-btn:hover { background: var(--sidebar-active); }

/* Kabuk: üst çubuk */
[data-style="formal"] .topbar { height: 60px; background: color-mix(in srgb, var(--surface) 92%, transparent); border-bottom: 1px solid var(--line); }
[data-style="formal"] .crumb span { color: var(--muted); letter-spacing: .12em; }
[data-style="formal"] .quick-sale { background: var(--primary); border-color: var(--primary); color: #fff !important; border-radius: var(--radius-sm); box-shadow: none; height: 38px; font-weight: 600; }
[data-style="formal"] .quick-sale:hover { background: var(--primary-strong); }
[data-style="formal"] .top-link { height: 38px; border-right: 0; font-weight: 600; }
[data-style="formal"] .top-link:hover { color: var(--primary) !important; }

/* Giriş ekranları */
[data-style="formal"] .auth-side { background: var(--sidebar-bg); color: var(--sidebar-ink); }
[data-style="formal"] .auth-hero h2 { font-family: var(--font); font-weight: 700; letter-spacing: -.035em; line-height: 1.08; font-size: clamp(2rem, 3.6vw, 3.2rem); }
[data-style="formal"] .auth-features { border-radius: var(--radius); border-color: color-mix(in srgb, var(--sidebar-ink) 25%, transparent); }
[data-style="formal"] .auth-features .icon { color: var(--sidebar-mark); }
[data-style="formal"] .auth-features small, [data-style="formal"] .auth-foot small { color: var(--sidebar-muted); }
[data-style="formal"] .auth-card h1 { font-size: 2rem; }
[data-style="formal"] .auth-card .kicker { color: var(--primary); }
[data-style="formal"] .demo-accounts { background: var(--primary-soft); border-left-color: var(--primary); border-radius: var(--radius-sm); }

@media (max-width: 860px) {
  [data-style="formal"] .bottom-nav { background: var(--sidebar-bg); border-top: 1px solid var(--line); }
  [data-style="formal"] .bottom-item { color: var(--sidebar-muted); }
  [data-style="formal"] .bottom-item.active { color: var(--sidebar-mark); }
}

/* Koyu temada beyaz kalan küçük parçalar */
[data-theme="gece"] .switch span::before { background: var(--ink); }
[data-theme="gece"] img { opacity: .94; }
[data-theme="gece"] input[type=date], [data-theme="gece"] input[type=time] { color-scheme: dark; }

/* Yazı boyutu tercihi */
:root[data-size="large"] body { font-size: 16.5px; }
:root[data-size="large"] .nav-item { font-size: 14.5px; }

/* ---------- Görünüm seçici ---------- */
.theme-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .7rem; }
.theme-card { display: flex; flex-direction: column; gap: .45rem; padding: .6rem; text-align: left; font: inherit; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.theme-card.on { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 18%, transparent); }
.theme-card b { font-size: .92rem; }
.theme-card small { font-size: .76rem; }
.theme-swatch { display: grid; grid-template-columns: 26% 1fr; height: 50px; border-radius: 6px; overflow: hidden; border: 1px solid rgba(0,0,0,.08); }
.theme-swatch i { display: block; }
.theme-swatch .main { display: flex; flex-direction: column; gap: 5px; padding: 8px; min-height: 0; }
.theme-swatch .main span { display: block; height: 7px; border-radius: 3px; }
.theme-swatch .main span:first-child { width: 55%; }
.theme-swatch .main span.btn-s { width: 32%; height: 11px; margin-top: auto; }
.size-row { display: flex; gap: .5rem; margin-top: .9rem; align-items: center; }
@media (max-width: 520px) { .theme-grid { grid-template-columns: 1fr; } }
.theme-pin { display: flex; flex-direction: column; gap: .3rem; margin-top: 1rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.theme-pin input { max-width: 160px; }
[data-style="formal"] .btn.danger.ghost, [data-style="formal"] .btn.ghost.danger { background: transparent; border-color: color-mix(in srgb, var(--danger) 45%, transparent); color: var(--danger); }
[data-style="formal"] .btn.danger.ghost:hover, [data-style="formal"] .btn.ghost.danger:hover { background: var(--danger-soft); }
