/* ============================================================
   EBİM Tasarım Sistemi — Bileşen stilleri
   Kaynak: http://172.16.0.135/tasarim/ (stil.css §Butonlar..§Kabuk)
   Son eşitleme: stil.css?v=20261004a (2026-10-07) — okunabilirlik güncellemesi:
   kart başlığı 12→15 px, yardımcı metin 12→14 px, tablo başlığı 11→15 px.
   Sınıf adları rehberle birebir aynı tutulur (denetim kolaylığı için).
   ============================================================ */

/* ---------- Butonlar ---------- */
.btn{font:inherit;font-size:.9375rem;font-weight:600;border:none;border-radius:var(--r-md);padding:.625rem 1.125rem;cursor:pointer;display:inline-flex;align-items:center;gap:.5rem;transition:background var(--dur) var(--ease),color var(--dur) var(--ease);white-space:nowrap}
.btn svg{width:18px;height:18px;stroke-width:2.4}
.btn-primary{background:var(--primary-fill);color:var(--primary-fg)}
.btn-primary:hover{background:var(--primary-hover)}
.btn-secondary{background:var(--surface-3);color:var(--heading)}
.btn-secondary:hover{background:var(--border)}
.btn-outline{background:var(--surface);color:var(--heading);box-shadow:inset 0 0 0 1px var(--border)}
.btn-outline:hover{background:var(--surface-2)}
.btn-destructive{background:var(--red-500);color:#fff}
.btn-destructive:hover{background:var(--red-600)}
.btn-ghost{background:transparent;color:var(--link)}
.btn-ghost:hover{background:var(--alert-info-bg)}
.btn:disabled{opacity:.5;cursor:not-allowed}
.btn-sm{padding:.375rem .75rem;font-size:.8125rem}
.btn-sm svg{width:15px;height:15px}
.btn-lg{padding:.75rem 1.5rem;font-size:1.0625rem}
.btn-icon{padding:.5rem}

/* ---------- Form ---------- */
.field{display:flex;flex-direction:column;gap:.3125rem;min-width:0}
.field label{font-size:.875rem;font-weight:500;color:var(--text-2)}
.field label .req{color:var(--red-500)}
.input,select.input,textarea.input{font:inherit;font-size:.875rem;padding:.625rem .75rem;border:1px solid var(--border);border-radius:var(--r-md);background:var(--surface);color:var(--text-1);transition:border-color 120ms var(--ease),background var(--dur) var(--ease);width:100%}
.input::placeholder{color:var(--faint)}
.input:focus-visible{outline:2px solid var(--ring);outline-offset:0;border-color:var(--ring)}
.input.err{border-color:var(--red-500)}
.input:disabled{background:var(--surface-3);color:var(--faint);cursor:not-allowed}
.helper{font-size:.875rem;font-weight:500;color:var(--muted)}
.helper.err{color:var(--no-fg)}
.check{display:flex;align-items:flex-start;gap:.5rem;font-size:.8125rem;color:var(--text-2)}
.check input{width:16px;height:16px;margin-top:2px;accent-color:var(--primary)}
.input-icon{position:relative}
.input-icon svg{position:absolute;left:.625rem;top:50%;transform:translateY(-50%);width:16px;height:16px;color:var(--faint)}
.input-icon .input{padding-left:2.25rem}

.switch{position:relative;display:inline-flex;align-items:center;gap:.5rem;font-size:.8125rem;color:var(--text-2);cursor:pointer}
.switch input{appearance:none;width:38px;height:22px;border-radius:var(--r-full);background:var(--slate-300);transition:background var(--dur) var(--ease);cursor:pointer;flex:none}
[data-theme="dark"] .switch input{background:var(--slate-600)}
.switch input::after{content:"";position:absolute;width:18px;height:18px;border-radius:50%;background:#fff;margin:2px;transition:transform var(--dur) var(--ease);box-shadow:var(--shadow-sm)}
.switch input:checked{background:var(--primary-fill)}
.switch input:checked::after{transform:translateX(16px)}

/* ---------- Filtre / arama ---------- */
.filterbar{display:flex;gap:.625rem;align-items:center;flex-wrap:wrap}
.filterbar .input,.filterbar select{width:auto;min-width:150px}
.chip{font-size:.8125rem;font-weight:600;padding:.3125rem .8125rem;border-radius:var(--r-full);background:var(--surface-3);color:var(--text-2);cursor:pointer;transition:all var(--dur) var(--ease);border:none}
.chip:hover{background:var(--border)}
.chip.active{background:var(--primary-fill);color:var(--primary-fg);box-shadow:none}
.chip .n{opacity:.7;font-weight:500;margin-left:.25rem}

/* ---------- Tablo ---------- */
.table-wrap{overflow-x:auto}
table{width:100%;border-collapse:collapse;font-size:.875rem}
th{text-align:left;font-weight:600;color:var(--text-2);font-size:.9375rem;text-transform:uppercase;letter-spacing:.03em;padding:.5rem .75rem;border-bottom:1px solid var(--border);white-space:nowrap}
td{padding:.75rem;border-bottom:1px solid var(--border-soft);vertical-align:middle}
tbody tr{transition:background 120ms var(--ease)}
tbody tr:hover{background:var(--surface-3)}
tbody tr:nth-child(even){background:var(--row-alt)}
tbody tr.sel{background:var(--nav-active-bg)}
td.num,th.num{font-variant-numeric:tabular-nums;text-align:right}
th.chk,td.chk{width:2.75rem}
.table-toolbar{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap}
.table-toolbar .input-icon{flex:1;min-width:240px;max-width:420px}
.th-sort{font:inherit;font-size:inherit;font-weight:inherit;letter-spacing:inherit;text-transform:inherit;color:inherit;background:none;border:none;padding:0;display:inline-flex;align-items:center;gap:.25rem;cursor:pointer}
.th-sort svg{width:10px;height:15px;opacity:.7}
.th-sort:hover svg{opacity:1}
th[aria-sort="ascending"] .th-sort svg,th[aria-sort="descending"] .th-sort svg{opacity:1;color:var(--primary)}
.th-cell{display:inline-flex;align-items:center;gap:.25rem}
thead.has-active th{color:var(--muted)}
thead.has-active th.th-active,th.th-active{color:var(--heading);font-weight:700}
.table-scroll thead th.th-active,th.th-active{box-shadow:inset 0 -2px 0 var(--primary)}
.table-scroll{max-height:520px;overflow:auto}
.table-scroll thead th{position:sticky;top:0;background:var(--surface);border-bottom:none;box-shadow:inset 0 -1px var(--border)}
.bulk-bar{display:flex;align-items:center;gap:.75rem;padding:.625rem .875rem;border-radius:var(--r-md);background:var(--surface-3);font-size:.8125rem;font-weight:600;color:var(--heading)}
td.num{font-variant-numeric:tabular-nums;text-align:right}

/* ---------- Rozet ---------- */
.badge{display:inline-flex;align-items:center;gap:.3125rem;font-size:.875rem;font-weight:600;border-radius:var(--r-full);padding:.25rem .8125rem;white-space:nowrap}
.badge svg{width:14px;height:14px}
.badge.ok{background:var(--ok-bg);color:var(--ok-fg)}
.badge.wait{background:var(--warn-bg);color:var(--warn-fg)}
.badge.no{background:var(--no-bg);color:var(--no-fg)}
.badge.neutral{background:var(--surface-3);color:var(--text-2)}
.badge.info{background:var(--info-bg);color:var(--info-fg)}
.badge.navy{background:var(--nav-active-bg);color:var(--heading)}

/* ---------- Uyarılar (nötr zemin — renk yalnız ikon+metinde) ---------- */
.alert{border-radius:var(--r-lg);padding:.875rem 1rem;font-size:.875rem;display:flex;gap:.625rem;background:var(--surface);border:1px solid var(--border);align-items:flex-start}
.alert svg{width:17px;height:17px;flex:none;margin-top:2px}
.alert div > b:first-child{display:block;margin-bottom:1px}
.alert.info{color:var(--alert-info-fg)}
.alert.ok{color:var(--ok-fg)}
.alert.warn{color:var(--warn-fg)}
.alert.danger{color:var(--no-fg)}
.toast{position:relative;display:flex;gap:.625rem;align-items:flex-start;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);padding:.875rem 1rem;box-shadow:var(--shadow-lg);font-size:.875rem;max-width:380px}
.toast svg{width:17px;height:17px;flex:none;margin-top:2px;color:var(--heading)}

/* ---------- Sekmeler ---------- */
.tabs{display:flex;gap:.25rem;border-bottom:1px solid var(--border)}
.tab{font-size:.875rem;font-weight:500;color:var(--muted);padding:.625rem 1rem;border:none;background:none;cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-1px;transition:color var(--dur) var(--ease);font-family:inherit;white-space:nowrap}
.tab:hover{color:var(--heading)}
.tab.active{color:var(--heading);font-weight:600;border-bottom-color:var(--primary)}

/* ---------- Sayfalama ---------- */
.pager{display:flex;gap:.25rem;align-items:center;font-size:.8125rem}
.pager button{font:inherit;font-size:.8125rem;font-weight:500;min-width:32px;height:32px;border:none;border-radius:var(--r-md);background:transparent;color:var(--text-2);cursor:pointer}
.pager button:hover{background:var(--surface-3)}
.pager button.here{background:var(--primary-fill);color:var(--primary-fg);font-weight:600}
.pager .dots{color:var(--faint);padding:0 .25rem}

/* ---------- Avatar ---------- */
.avatar{width:34px;height:34px;border-radius:var(--r-full);background:var(--tile);color:var(--tile-fg);display:flex;align-items:center;justify-content:center;font-size:.8125rem;font-weight:600;flex:none}
.avatar.lg{width:48px;height:48px;font-size:1rem}
.avatar-stack{display:flex}
.avatar-stack .avatar{border:2px solid var(--surface);margin-left:-8px}
.avatar-stack .avatar:first-child{margin-left:0}

/* ---------- İskelet / yükleme ---------- */
@keyframes shimmer{0%{opacity:.55}50%{opacity:1}100%{opacity:.55}}
.skeleton{background:var(--surface-3);border-radius:var(--r-md);animation:shimmer 1.4s var(--ease) infinite}
.spinner{width:20px;height:20px;border-radius:50%;border:2.5px solid var(--surface-3);border-top-color:var(--primary);animation:spin .7s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

/* ---------- Modal / çekmece ---------- */
.modal-backdrop{position:fixed;inset:0;background:rgb(15 23 42/.45);z-index:50;display:flex;align-items:center;justify-content:center;padding:1.5rem}
[data-theme="dark"] .modal-backdrop{background:rgb(0 0 0/.55)}
.modal{background:var(--surface);border-radius:1rem;box-shadow:var(--shadow-lg);padding:1.5rem;max-width:420px;width:100%;display:flex;flex-direction:column;gap:1rem}
.modal h3{font-size:1.125rem;font-weight:600;color:var(--heading)}
.modal .foot{display:flex;flex-wrap:wrap;justify-content:flex-end;gap:.5rem;margin-top:.25rem}
.drawer{position:fixed;top:0;right:0;bottom:0;width:320px;max-width:100%;background:var(--surface);box-shadow:var(--shadow-lg);padding:1.5rem;display:flex;flex-direction:column;gap:1rem;z-index:50;overflow-y:auto}
.drawer h3{font-size:1.125rem;font-weight:600;color:var(--heading)}

/* ---------- İstatistik ---------- */
.stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:1rem}
.stat{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-card);box-shadow:var(--shadow-md);padding:.875rem 1rem;display:flex;flex-direction:column;gap:.125rem}
.stat .k{font-size:.9375rem;font-weight:600;color:var(--text-2);display:flex;align-items:center;gap:.5rem}
.stat .k svg{width:18px;height:18px;color:var(--primary)}
.stat .v{font-size:2rem;font-weight:700;color:var(--heading);line-height:1.15;font-variant-numeric:tabular-nums}
.stat .d{font-size:.9375rem;font-weight:600;color:var(--ok-fg)}
.stat .d.warn{color:var(--warn-fg)}
.stat .d.flat{color:var(--text-2);font-weight:600}

/* ---------- Grafik ---------- */
.chart svg{width:100%;height:auto;max-height:320px}
.chart .axis{font-size:.75rem;fill:var(--axis-fg)}
.chart .grid{stroke:var(--grid-line);stroke-width:1}
.chart .dlabel{font-size:.75rem;font-weight:600;fill:var(--text-2)}
.legend{display:flex;gap:1rem;flex-wrap:wrap;font-size:.8125rem;color:var(--text-2)}
.legend i{display:inline-block;width:10px;height:10px;border-radius:3px;margin-right:.375rem;vertical-align:-1px}

/* ---------- Boş durum ---------- */
.empty{text-align:center;padding:3rem 1.5rem;color:var(--muted)}
.empty svg{width:36px;height:36px;color:var(--faint);margin-bottom:.5rem}
.empty b{display:block;color:var(--text-1);font-size:1.125rem;margin-bottom:.25rem}

/* ---------- Uygulama kabuğu ---------- */
.shell{display:grid;grid-template-columns:248px 1fr;min-height:100vh}
.sidebar{background:var(--surface);border-right:1px solid var(--border);padding:1.25rem 0;display:flex;flex-direction:column;gap:.25rem;position:sticky;top:0;height:100vh;overflow-y:auto;overflow-x:hidden}
.sidebar .brand{display:flex;align-items:center;gap:.625rem;padding:0 1.25rem 1.25rem;border-bottom:1px solid var(--border-soft);margin-bottom:.75rem}
.sidebar .brand img{width:36px;height:36px;border-radius:9px;background:var(--primary-fill);padding:7px;object-fit:contain}
.sidebar .brand b{font-size:1rem;font-weight:700;color:var(--heading);letter-spacing:-.01em}
.sidebar .brand span{display:block;font-size:.75rem;color:var(--muted);font-weight:500}
.nav-group{padding:.5rem 1.25rem .25rem;font-size:.75rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;color:var(--faint)}
.nav-item{display:flex;align-items:center;gap:.625rem;margin:0 .625rem;padding:.5rem .625rem;border-radius:var(--r-md);font-size:.875rem;font-weight:500;color:var(--text-2);cursor:pointer;transition:background var(--dur) var(--ease),color var(--dur) var(--ease)}
.nav-item:hover{background:var(--surface-2);color:var(--heading);text-decoration:none}
.nav-item.active{background:var(--primary-fill);color:var(--primary-fg);font-weight:600}
.nav-item svg{width:18px;height:18px;flex:none}
.nav-item .badge{margin-left:auto}
.nav-item .chev{margin-left:auto;width:14px;height:14px;transition:transform var(--dur) var(--ease)}
.nav-item.acik .chev{transform:rotate(90deg)}
.nav-subs{display:flex;flex-direction:column;gap:2px;margin:2px 0 4px}
.nav-subs .nav-item{margin-left:2.75rem}
.main{display:flex;flex-direction:column;min-width:0}
.topbar{background:color-mix(in srgb,var(--surface) 85%,transparent);backdrop-filter:blur(8px);border-bottom:1px solid var(--border);padding:.75rem 2rem;display:flex;align-items:center;gap:1rem;position:sticky;top:0;z-index:10}
.topbar .search{flex:1;max-width:420px;position:relative}
.topbar .search input{width:100%;font:inherit;font-size:.875rem;padding:.5rem .75rem .5rem 2.25rem;border:1px solid var(--border);border-radius:var(--r-md);background:var(--surface-2);color:var(--text-1)}
.topbar .search svg{position:absolute;left:.625rem;top:50%;transform:translateY(-50%);width:16px;height:16px;color:var(--faint)}
.topbar .spacer{flex:1}
.topbar .menu-btn{display:none;background:none;border:none;cursor:pointer;color:var(--text-2);padding:.5rem}
.content{padding:2rem;display:flex;flex-direction:column;gap:1.5rem;width:100%}
.page-head{display:flex;align-items:center;gap:.875rem;flex-wrap:wrap}
.page-head h1{font-size:1.5rem;font-weight:700;color:var(--heading);letter-spacing:-.01em}
.page-head .sub{font-size:.8125rem;color:var(--muted);width:100%}
.page-head .actions{margin-left:auto;display:flex;gap:.5rem;flex-wrap:wrap}

/* ---------- Giriş ---------- */
.auth-wrap{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:1.5rem}
.auth-card{background:var(--surface);border-radius:var(--r-card);box-shadow:var(--shadow-lg);padding:2.5rem;width:100%;max-width:420px;display:flex;flex-direction:column;gap:1.25rem}
.auth-card .logo{display:flex;flex-direction:column;align-items:center;gap:.75rem;text-align:center}
.auth-card .logo img{width:56px;height:56px;border-radius:14px;background:var(--primary-fill);padding:11px;object-fit:contain}
.auth-card .logo b{font-size:1.25rem;font-weight:700;color:var(--heading)}
.auth-card .logo span{font-size:.8125rem;color:var(--muted)}
.auth-foot{text-align:center;font-size:.8125rem;color:var(--faint);margin-top:1rem}

/* ---------- Yardımcılar ---------- */
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:1.5rem;min-width:0}
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:1rem;min-width:0}
.row{display:flex;gap:.625rem;align-items:center;flex-wrap:wrap}
.col{display:flex;flex-direction:column;gap:.625rem}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.ml-auto{margin-left:auto}
.mt-2{margin-top:.5rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}
.card{background:var(--surface);border-radius:var(--r-card);box-shadow:var(--shadow-md);padding:1.5rem;min-width:0;transition:background var(--dur) var(--ease)}
.card-head{display:flex;align-items:center;gap:.75rem;margin-bottom:1rem}
.section-tile{width:40px;height:40px;border-radius:10px;background:var(--tile);color:var(--tile-fg);display:flex;align-items:center;justify-content:center;flex:none}
.num-tile{min-width:48px;height:48px;border-radius:12px;background:var(--primary-fill);color:var(--primary-fg);display:inline-flex;align-items:center;justify-content:center;font-size:1.25rem;font-weight:700;padding:0 .75rem;font-variant-numeric:tabular-nums}
.date-tile{width:56px;border-radius:12px;background:var(--primary-fill);color:var(--primary-fg);display:inline-flex;flex-direction:column;align-items:center;justify-content:center;padding:.5rem 0;line-height:1.15}
.date-tile b{font-size:1.375rem;font-weight:800}
.date-tile span{font-size:.8125rem;font-weight:600;text-transform:uppercase;letter-spacing:.04em;opacity:.85}
/* Rehber stil.css:168-171 karsiliklari. Dordu de depoda eksikti (2026-09-04, Mac notu 3.3).
   .card-head h2/h3 bugun gorunur fark uretmiyordu cunku sayfalar h3 kullaniyor ve
   eyb-tokens.css'teki genel h3 ayni degerleri veriyor; .card-head icine bir h2 yazildigi
   anda 20px cikip rehberden sapiyordu. Otekiler karti kucultup ipucunu saga itiyor. */
.section-tile svg{width:20px;height:20px}
.card-head .section-tile{width:36px;height:36px;border-radius:9px}
.card-head h2,.card-head h3{font-size:1.125rem;font-weight:600;color:var(--heading)}
.card-head .hint{font-size:.8125rem;color:var(--muted);margin-left:auto}

/* ---------- Yazdırma ---------- */
.print-sayfa{max-width:210mm;margin:0 auto;background:var(--surface);padding:2rem;display:flex;flex-direction:column;gap:1.5rem}
.print-baslik{display:flex;align-items:center;gap:.75rem;border-bottom:2px solid var(--border);padding-bottom:1rem}
.print-baslik img{width:40px;height:40px;object-fit:contain}
.print-baslik b{display:block;font-size:1rem;color:var(--heading)}
.print-baslik span{font-size:.75rem;color:var(--muted)}
.print-eylemler{display:flex;justify-content:flex-end}
@media print{
  .print-eylemler,.theme-toggle,.sidebar,.topbar{display:none !important}
  .print-sayfa{box-shadow:none;padding:0}
  body{background:#fff}
}

/* ---------- Mobil: FAB + alt çubuk (uygulama-desenleri D.2) ---------- */
.mobile-bottom-nav{display:none}
.fab{display:none;position:fixed;right:1.25rem;bottom:5.5rem;z-index:55;width:56px;height:56px;border-radius:var(--r-full);background:var(--primary-fill);color:var(--primary-fg);border:none;box-shadow:var(--shadow-lg);align-items:center;justify-content:center;cursor:pointer}
.fab svg{width:24px;height:24px}

@media (max-width:900px){
  .shell{grid-template-columns:1fr}
  .sidebar{display:none}
  .sidebar.acik{display:flex;position:fixed;inset:0 20% 0 0;z-index:40;height:100vh}
  .grid-2,.grid-3{grid-template-columns:1fr}
  .topbar .menu-btn{display:inline-flex}
  .content{padding:1rem;padding-bottom:5.5rem}
  .fab{display:flex}
  .mobile-bottom-nav{display:flex;position:fixed;left:0;right:0;bottom:0;z-index:50;background:var(--surface);border-top:1px solid var(--border);padding:.375rem .5rem env(safe-area-inset-bottom);justify-content:space-around}
  .mobile-bottom-nav .nav-item{flex-direction:column;gap:.125rem;font-size:.625rem;padding:.375rem;min-width:44px;min-height:44px;justify-content:center;text-align:center;margin:0}
  .mobile-bottom-nav .nav-item svg{width:20px;height:20px}
  .mobile-bottom-nav .nav-item.active{background:none;color:var(--primary)}
}
