/* ============================================================================
   KolayFatura · TASARIM SİSTEMİ  (unified design system)
   Tek kaynak: tum sayfalar/bilesenler buradaki TOKEN + COMPONENT'leri kullanir.
   Yeni bir element eklerken: token'lari kullan, mevcut bilesen siniflarini tercih et.
   Katmanlar: 1) TOKENS  2) BASE  3) ANIMATIONS  4) LAYOUT  5) COMPONENTS
              6) MOTION (entrance/hover/stagger)  7) UTILITIES  8) RESPONSIVE
   ============================================================================ */

/* ---------------------------------------------------------------- 1) TOKENS */
:root {
  /* renk */
  --bg: #f5f7fa;
  --bg-soft: #eef1f6;
  --card: #ffffff;
  --line: #ebeef3;
  --line-2: #e0e4ea;
  --text: #0f1626;
  --muted: #4a5568;   /* WCAG AA: ~7:1 (eski #5a6473 dusuktu) */
  --muted-2: #6b7587; /* WCAG AA: ~4.6:1 (eski #8b95a4 ~2.8:1 idi) */
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-soft: #e9f0fe;
  --accent-soft-2: #d8e5fd;
  --green-bg: #e4f7ec; --green-fg: #0c8a4b;
  --blue-bg: #e6effe;  --blue-fg: #2563eb;
  --amber-bg: #fdf0d9; --amber-fg: #b5780b;
  --red-bg: #fdeaea;   --red-fg: #d23b3b;

  /* tipografi */
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --fs-xs: 11.5px; --fs-sm: 12.5px; --fs: 14px; --fs-md: 16px; --fs-lg: 19px; --fs-xl: 22px; --fs-2xl: 28px;

  /* uzay olcegi (4px tabanli) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px; --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px;

  /* yaricap */
  --r-sm: 10px; --r-md: 14px; --r: 18px; --r-lg: 22px; --r-pill: 999px;

  /* golge */
  --shadow-sm: 0 1px 2px rgba(15,22,38,.05);
  --shadow: 0 1px 2px rgba(15,22,38,.04), 0 6px 22px rgba(15,22,38,.06);
  --shadow-md: 0 8px 28px rgba(15,22,38,.10);
  --shadow-lg: 0 24px 60px rgba(15,22,38,.18);
  --ring: 0 0 0 3px rgba(37, 99, 235, .20);

  /* HAREKET (motion) — tek kaynak */
  --t-fast: 120ms; --t: 200ms; --t-slow: 360ms;
  --ease: cubic-bezier(.4, 0, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .5, 1);

  /* z-index olcegi */
  --z-nav: 30; --z-overlay: 25; --z-topbar: 20; --z-modal: 60; --z-toast: 100;

  /* yerlesim */
  --sidebar-w: 256px;
}

/* ------------------------------------------------------------------ 2) BASE */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; font-size: var(--fs); line-height: 1.55;
}
.hidden { display: none !important; }
a { color: inherit; text-decoration: none; cursor: pointer; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; }
input, select, button { font-family: inherit; }
::selection { background: var(--accent-soft-2); }
/* odak gorunurlugu (erisilebilirlik) */
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--r-sm); }

/* ------------------------------------------------------------ 3) ANIMATIONS */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { 0% { opacity: 0; transform: translateY(8px) scale(.96); } 100% { opacity: 1; transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { 100% { background-position: -200% 0; } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }

/* ---------------------------------------------------------------- 4) LAYOUT */
.app { display: grid; grid-template-columns: var(--sidebar-w) 1fr; min-height: 100vh; min-height: 100dvh; }
.sidebar {
  background: var(--card); border-right: 1px solid var(--line);
  padding: var(--s-6) var(--s-4); display: flex; flex-direction: column; gap: var(--s-6);
  position: sticky; top: 0; height: 100vh; z-index: var(--z-nav);
}
.sidebar-brand { padding: 0 6px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: var(--s-3);
  padding: max(var(--s-5), env(safe-area-inset-top)) var(--s-8) var(--s-5) max(var(--s-8), env(safe-area-inset-left)); border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  position: sticky; top: 0; backdrop-filter: saturate(180%) blur(10px); z-index: var(--z-topbar);
}
.topbar h1 { font-size: var(--fs-xl); flex: 1; }
.topbar-actions { display: flex; gap: var(--s-2); align-items: center; }
.content { padding: var(--s-6) var(--s-8) 80px; max-width: 1200px; width: 100%; }
.nav-overlay { display: none; }

/* ------------------------------------------------------------ 5) COMPONENTS */

/* Brand */
.brand { display: flex; align-items: center; gap: var(--s-3); }
.brand-mark {
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #6d5efc); color: #fff;
  display: grid; place-items: center; font-size: var(--fs-md);
  box-shadow: 0 4px 14px rgba(80,86,255,.32); transition: transform var(--t) var(--ease-spring);
}
.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.05); }
/* KolayFatura logosu: modern geometrik (Sora); "Kolay" gradient vurgu, "Fatura" koyu */
.brand-name {
  font-family: 'Sora', 'Plus Jakarta Sans', sans-serif;
  font-weight: 700; font-size: 1.45rem; line-height: 1; letter-spacing: -0.02em;
  color: var(--text); text-transform: none;
}
.brand-accent {
  font-weight: 700;
  background: linear-gradient(120deg, #2563eb 0%, #6d5efc 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* Nav */
.nav { display: flex; flex-direction: column; gap: var(--s-1); }
.nav-item {
  display: flex; align-items: center; gap: var(--s-3);
  padding: 11px 13px; border-radius: 11px; color: var(--muted); font-weight: 600; font-size: var(--fs);
  position: relative; transition: background var(--t) var(--ease), color var(--t) var(--ease);
}
.nav-item .ni { font-size: var(--fs-md); width: 20px; text-align: center; transition: transform var(--t) var(--ease-spring); }
.nav-item:hover { background: var(--bg-soft); color: var(--text); }
.nav-item:hover .ni { transform: scale(1.15); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); }
.nav-item.active::before {
  content: ''; position: absolute; left: 4px; top: 50%; width: 3px; height: 18px; border-radius: 3px;
  background: var(--accent); transform: translateY(-50%) scaleY(0); animation: navBar var(--t-slow) var(--ease-out) forwards;
}
@keyframes navBar { to { transform: translateY(-50%) scaleY(1); } }
.sidebar-foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; padding: 0 4px; }
.muted-link { color: var(--muted); font-size: var(--fs-sm); font-weight: 600; transition: color var(--t) var(--ease); }
.muted-link:hover { color: var(--red-fg); }

/* Card */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow);
  transition: box-shadow var(--t) var(--ease), border-color var(--t) var(--ease), transform var(--t) var(--ease); }
.card-pad { padding: var(--s-5) var(--s-6); }
.card.lift { cursor: default; }
.card.lift:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--line-2); }
.grid { display: grid; gap: var(--s-4); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

/* Stat */
.stat { padding: var(--s-5) var(--s-6); }
.stat .label { color: var(--muted-2); font-size: var(--fs-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.stat .value { font-size: var(--fs-2xl); font-weight: 800; margin-top: var(--s-2); letter-spacing: -0.03em; line-height: 1.15; }
.stat .sub { color: var(--muted-2); font-size: var(--fs-sm); margin-top: 6px; font-weight: 500; }
.section-title { font-size: var(--fs-sm); font-weight: 700; color: var(--muted-2); text-transform: uppercase; letter-spacing: .06em; margin: var(--s-6) 2px var(--s-3); }

/* Button */
.btn {
  border: 1px solid var(--line-2); background: var(--card); color: var(--text);
  padding: 9px 16px; border-radius: 11px; font-weight: 650; font-size: 13.5px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px; line-height: 1; white-space: nowrap;
  transition: background var(--t) var(--ease), border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), transform var(--t-fast) var(--ease), opacity var(--t) var(--ease);
}
.btn:hover { background: var(--bg-soft); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .65; cursor: not-allowed; transform: none; background: var(--bg-soft); color: var(--muted-2); border-color: var(--line); box-shadow: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 12px rgba(37,99,235,.25); }
.btn-primary:hover { background: var(--accent-hover); box-shadow: 0 6px 18px rgba(37,99,235,.32); }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--red-fg); border-color: #f2cccc; background: #fff; }
.btn-danger:hover { background: var(--red-bg); }
.btn-sm { padding: 7px 12px; font-size: var(--fs-sm); border-radius: 9px; }
.btn-block { width: 100%; margin-top: var(--s-5); padding: 12px; border-radius: 12px; }
.icon-btn { border: none; background: none; font-size: var(--fs-md); cursor: pointer; color: var(--muted); padding: 9px; border-radius: 8px; min-width: 38px; min-height: 38px; display: inline-flex; align-items: center; justify-content: center; transition: background var(--t) var(--ease), color var(--t) var(--ease); }
.icon-btn:hover { background: var(--bg-soft); color: var(--text); }

/* Badge / pill */
.badge { background: var(--bg-soft); color: var(--muted); border-radius: var(--r-pill); padding: 4px 11px; font-size: 12px; font-weight: 650; }
.pill { border-radius: var(--r-pill); padding: 4px 11px; font-size: 12px; font-weight: 700; display: inline-block; white-space: nowrap; }
.pill-green { background: var(--green-bg); color: var(--green-fg); }
.pill-blue { background: var(--blue-bg); color: var(--blue-fg); }
.pill-amber { background: var(--amber-bg); color: var(--amber-fg); }
.pill-red { background: var(--red-bg); color: var(--red-fg); }
.pill-gray { background: var(--bg-soft); color: var(--muted); }
.stat .value.val-red { color: var(--red-fg); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* Tabs (segmented) */
.tabs { display: flex; gap: 4px; background: var(--bg-soft); padding: 4px; border-radius: 12px; margin-bottom: var(--s-5); border: 1px solid var(--line); overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tab { flex: 1 1 auto; border: none; background: transparent; color: var(--muted); font-weight: 650; font-size: 14px; padding: 9px 14px; border-radius: 9px; cursor: pointer; white-space: nowrap; min-height: 40px; transition: background var(--t) var(--ease), color var(--t) var(--ease), box-shadow var(--t) var(--ease); }
.tab:hover { color: var(--text); }
.tab.active { background: var(--card); color: var(--accent); box-shadow: var(--shadow-sm); }

/* Filter chips */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: var(--s-4); align-items: center; }
.chip { border: 1px solid var(--line-2); background: var(--card); color: var(--muted); font-weight: 600; font-size: 13px; padding: 7px 13px; border-radius: var(--r-pill); cursor: pointer; min-height: 36px; transition: background var(--t) var(--ease), color var(--t) var(--ease), border-color var(--t) var(--ease); }
.chip:hover { background: var(--bg-soft); color: var(--text); }
.chip-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip-on:hover { background: var(--accent-hover); color: #fff; }
.dot-green { background: #19b562; box-shadow: 0 0 0 3px #19b56222; animation: pulse 2.4s var(--ease) infinite; }
.dot-gray { background: #c4cad3; }

/* Table */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-2); font-weight: 700; padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 13.5px; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--t-fast) var(--ease); }
tbody tr:hover td { background: #fafbfd; }
.num, .mono { font-variant-numeric: tabular-nums; }
.right { text-align: right; }

/* Form */
.field { margin-bottom: var(--s-4); }
.field label { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--muted); margin-bottom: 7px; }
input, select, textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line-2); border-radius: 11px;
  font-size: var(--fs-md); /* 16px: iOS odakta zoom'u onler + okunur */
  color: var(--text); background: #fff; outline: none; line-height: 1.4;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease), background var(--t) var(--ease);
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: var(--ring); }
input::placeholder, textarea::placeholder { color: var(--muted-2); opacity: .85; }
input:disabled, select:disabled, textarea:disabled { background: var(--bg-soft); color: var(--muted); opacity: .85; cursor: not-allowed; border-color: var(--line); }
input.error, select.error { border-color: var(--red-fg); background: var(--red-bg); }
input.error:focus { box-shadow: 0 0 0 3px rgba(210, 59, 59, .18); }

/* Chrome autofill — beyaz zemini koru (sari/mavi olmasin) */
input:-webkit-autofill, input:-webkit-autofill:hover, input:-webkit-autofill:focus, input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 999px #fff inset !important;
  -webkit-text-fill-color: var(--text) !important; caret-color: var(--text);
}

/* Select — native ok kaldir, tutarli ozel chevron */
select {
  appearance: none; -webkit-appearance: none; cursor: pointer; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%234a5568' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; background-size: 15px;
}
option { color: var(--text); background: #fff; }
.select-compact { width: auto; min-width: 150px; }

/* Date input */
input[type="date"] { cursor: pointer; }
input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .6; }

/* Checkbox — ozel, tutarli, dokunma dostu */
input[type="checkbox"] {
  appearance: none; -webkit-appearance: none; width: 20px; height: 20px; min-width: 20px;
  flex: 0 0 20px; padding: 0; border: 2px solid var(--line-2); border-radius: 6px; background: #fff;
  cursor: pointer; display: inline-grid; place-items: center; line-height: 1;
  transition: border-color var(--t) var(--ease), background var(--t) var(--ease);
}
input[type="checkbox"]:hover { border-color: var(--accent); }
input[type="checkbox"]:checked { background: var(--accent); border-color: var(--accent); }
input[type="checkbox"]:checked::after { content: '✓'; color: #fff; font-size: 13px; font-weight: 800; }
input[type="checkbox"]:focus-visible { box-shadow: var(--ring); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.hint { font-size: 12px; color: var(--muted-2); margin-top: 5px; font-weight: 500; }

/* Modal */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15,22,38,.5); display: grid; place-items: center; z-index: var(--z-modal); padding: var(--s-5); backdrop-filter: blur(3px); animation: overlayIn var(--t) var(--ease) both; }
/* width:min(...) viewport'a gore — grid auto-column'da max-width:100% guvenilmez oldugundan. */
.modal { width: min(560px, calc(100vw - 32px)); max-height: min(92vh, calc(100dvh - 32px)); overflow: auto; background: var(--card); border-radius: var(--r-lg); box-shadow: var(--shadow-lg); animation: popIn var(--t-slow) var(--ease-spring) both; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: var(--s-5) var(--s-6); border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--card); z-index: 2; box-shadow: 0 6px 14px -12px rgba(15,22,38,.4); }
.modal-body { padding: var(--s-5) var(--s-6) var(--s-6); }
.modal-foot { position: sticky; bottom: 0; z-index: 2; display: flex; gap: var(--s-2); justify-content: flex-end; padding: var(--s-4) var(--s-6) max(var(--s-4), env(safe-area-inset-bottom)); margin: var(--s-5) calc(-1 * var(--s-6)) calc(-1 * var(--s-6)); background: var(--card); border-top: 1px solid var(--line); }

/* Login */
.login-wrap { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center;
  padding: max(var(--s-6), env(safe-area-inset-top)) var(--s-6) max(var(--s-6), env(safe-area-inset-bottom));
  background: radial-gradient(1200px 600px at 50% -10%, #e9f0fe 0%, var(--bg) 55%); }
.login-card { width: min(380px, calc(100vw - 32px)); background: var(--card); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 34px 30px; box-shadow: var(--shadow); animation: popIn var(--t-slow) var(--ease-spring) both; }
.login-card .brand { justify-content: center; }
.login-sub { text-align: center; color: var(--muted); margin: 10px 0 var(--s-6); font-weight: 500; }
.login-card label { display: block; font-size: var(--fs-sm); font-weight: 600; color: var(--muted); margin-bottom: 7px; }
.form-error { color: var(--red-fg); font-size: 13px; margin-top: var(--s-3); text-align: center; min-height: 18px; font-weight: 500; }

/* OTP girişi: kanal seçimi (SMS/WhatsApp) + kod adımı */
.seg { display: flex; gap: 6px; background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--r); padding: 5px; margin: 6px 0 16px; }
.seg-btn { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; background: transparent; color: var(--muted); font-family: inherit; font-weight: 650; font-size: 14px; padding: 10px 12px; border-radius: 9px; cursor: pointer; transition: background var(--t) var(--ease), color var(--t) var(--ease), box-shadow var(--t) var(--ease); min-height: 42px; }
.seg-btn:hover { color: var(--text); }
.seg-btn.on { background: var(--card); color: var(--accent); box-shadow: var(--shadow-sm); }
.seg-btn .fa-whatsapp { color: #25d366; }
.otp-sent { text-align: center; color: var(--muted); font-size: 13.5px; margin: 4px 0 16px; line-height: 1.5; }
.otp-sent strong { color: var(--text); }
#otpCode { text-align: center; letter-spacing: 0.4em; font-weight: 700; font-size: 18px; }
.otp-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 10px; }
.otp-actions .muted-link { cursor: pointer; display: inline-flex; align-items: center; min-height: 44px; padding: 11px 4px; }
.otp-actions .muted-link:hover { color: var(--accent); }
.otp-actions .muted-link.disabled { color: var(--muted-2); pointer-events: none; cursor: default; opacity: .7; }
.btn.is-busy { color: transparent !important; pointer-events: none; position: relative; }
.btn.is-busy::after { content: ''; position: absolute; top: 50%; left: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }

/* Empty / loading / spinner / skeleton / toast */
.empty { text-align: center; color: var(--muted); padding: 60px 20px; animation: fadeIn var(--t-slow) var(--ease) both; }
.empty .big { font-size: 34px; margin-bottom: 10px; }
.spinner { width: 18px; height: 18px; border: 2.5px solid var(--accent-soft-2); border-top-color: var(--accent); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; vertical-align: middle; }
.loading { display: flex; align-items: center; gap: var(--s-3); color: var(--muted); padding: var(--s-10); justify-content: center; font-weight: 500; }
.skeleton { background: linear-gradient(90deg, var(--bg-soft) 25%, #f3f5f9 37%, var(--bg-soft) 63%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; border-radius: var(--r-sm); }
.toast { position: fixed; bottom: max(22px, env(safe-area-inset-bottom)); right: 22px; background: #0f1626; color: #fff; padding: 13px 18px; border-radius: 13px; font-weight: 600; font-size: 13.5px; box-shadow: var(--shadow-lg); z-index: var(--z-toast); max-width: 380px; animation: toastIn var(--t-slow) var(--ease-spring) both; }
.toast.ok { background: #0c7a44; } .toast.err { background: #c0322f; }
.warn-banner { display: flex; align-items: flex-start; gap: 10px; background: #fff8ec; border: 1px solid #fbe2bd; color: #9a6a12; border-radius: 13px; padding: 13px 16px; font-size: 13px; margin-bottom: var(--s-5); font-weight: 500; }
.warn-banner::before { content: "\f071"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: 14px; line-height: 1.4; flex-shrink: 0; opacity: .9; }

/* --------------------------------------------- 6) MOTION: entrance / stagger */
/* Gorunum degisince #content yeniden olusur -> kartlar/banner/baslik akici girer. */
.content > .card,
.content > .warn-banner,
.content > .section-title,
.content > .grid > * { animation: fadeUp var(--t-slow) var(--ease-out) both; }
.content > .grid > *:nth-child(2) { animation-delay: 60ms; }
.content > .grid > *:nth-child(3) { animation-delay: 120ms; }
.content > .grid > *:nth-child(4) { animation-delay: 180ms; }
.content > .grid > *:nth-child(5) { animation-delay: 240ms; }
.content > .grid > *:nth-child(6) { animation-delay: 300ms; }
.content > *:nth-child(2) { animation-delay: 50ms; }
.content > *:nth-child(3) { animation-delay: 100ms; }
.content > *:nth-child(4) { animation-delay: 150ms; }

/* ------------------------------------------------------------- 7) UTILITIES */
.flex { display: flex; align-items: center; gap: var(--s-3); }
.between { justify-content: space-between; }
.wrap-actions { display: flex; gap: var(--s-2); flex-wrap: wrap; }
.muted { color: var(--muted); }
.menu-btn { display: none; font-size: var(--fs-xl); }

/* =================================== 8) RESPONSIVE (enterprise mobil uyum) === */
@media (max-width: 1000px) { .grid-3 { grid-template-columns: 1fr 1fr; } .grid-4 { grid-template-columns: 1fr 1fr; } }

@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: 0; left: 0; width: 280px; max-width: 84vw; height: 100vh; height: 100dvh;
    transform: translateX(-100%); transition: transform var(--t-slow) var(--ease-out); box-shadow: var(--shadow-lg);
    padding-bottom: max(var(--s-6), env(safe-area-inset-bottom));
    padding-left: max(var(--s-4), env(safe-area-inset-left));
  }
  body.nav-open .sidebar { transform: translateX(0); }
  .nav-overlay { display: block; position: fixed; inset: 0; background: rgba(15,22,38,.4); opacity: 0; pointer-events: none; transition: opacity var(--t-slow) var(--ease); z-index: var(--z-overlay); }
  body.nav-open .nav-overlay { opacity: 1; pointer-events: auto; }
  .menu-btn { display: inline-flex; }
  .topbar { padding: max(var(--s-3), env(safe-area-inset-top)) var(--s-4) var(--s-3); }
  .topbar h1 { font-size: var(--fs-lg); }
  .content { padding: var(--s-4) var(--s-4) max(90px, env(safe-area-inset-bottom)); }
  .grid-3, .grid-2, .row2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .modal { border-radius: var(--r); }
  .btn { min-height: 44px; padding: 11px 18px; }
  .btn-sm { min-height: 44px; }
  .icon-btn { min-width: 44px; min-height: 44px; }
  /* dokunma hedefleri 44px: sekme, çip, OTP kanal segmenti */
  .tab, .chip, .seg-btn { min-height: 44px; }
  .select-compact { width: 100%; }
}

/* Tablolar -> kart-satir (stacked) */
@media (max-width: 680px) {
  .resp-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .resp-table, .resp-table tbody, .resp-table tr, .resp-table td { display: block; width: 100%; }
  .resp-table tr { border: 1px solid var(--line); border-radius: var(--r-md); margin: 0 12px 12px; padding: 6px 2px; }
  .resp-table tbody tr:first-child { margin-top: 12px; } /* ilk kart-satır, kartın üst kenarına yapışmasın */
  .resp-table tbody tr:hover td { background: transparent; }
  .resp-table td { border: none; display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding: 9px 16px; text-align: right; }
  .resp-table td::before { content: attr(data-label); color: var(--muted-2); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; text-align: left; }
  .resp-table td:empty { display: none; }
  .hide-sm { display: none; }
}
@media (max-width: 430px) {
  /* dar telefon: 4'lü stat ızgarası tek kolona; değer fontu ölçeklenir (inline font kaldırıldı) */
  .grid-4 { grid-template-columns: 1fr; }
  .stat .value { font-size: 23px; }
  .stat .label { letter-spacing: .03em; }
  .field-narrow { max-width: 100%; }
  .toast { right: 12px; left: 12px; max-width: none; }
}
.field-narrow { max-width: 200px; }
@media (min-width: 681px) { .log-time { width: 150px; } }

/* ====================================== 9) HAREKET AZALTMA (erisilebilirlik) === */
@media (max-width: 600px) {
  .modal-backdrop { padding: var(--s-3); }
  .modal { border-radius: var(--r-md); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  .btn:hover, .btn:active, .card.lift:hover, .brand:hover .brand-mark, .nav-item:hover .ni { transform: none !important; }
}
