/* IOCli Yönetim Paneli — login.arbis.com.tr
   Renkler tek yerde (token). Koyu tema: sistem ayarı ya da sağ üstteki düğme. */

:root {
  --bg: #f3f6fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --surface-3: #eef2f7;
  --border: #e3e8ef;
  --border-strong: #cfd8e3;
  --text: #0f172a;
  --text-2: #334155;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-soft: #e8efff;
  --primary-text: #ffffff;
  --success: #15803d;
  --success-soft: #dcfce7;
  --warning: #b45309;
  --warning-soft: #fef3c7;
  --danger: #b91c1c;
  --danger-soft: #fee2e2;
  --info: #1d4ed8;
  --info-soft: #dbeafe;
  --sidebar: #0b1d30;
  --sidebar-2: #102841;
  --sidebar-text: #b8c6d6;
  --sidebar-active: #ffffff;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
  --shadow: 0 1px 3px rgba(15, 23, 42, .07), 0 8px 24px rgba(15, 23, 42, .06);
  --shadow-lg: 0 24px 64px rgba(15, 23, 42, .22);
  --radius: 12px;
  --radius-sm: 8px;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Mono", "Consolas", ui-monospace, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1220;
    --surface: #101a2c;
    --surface-2: #0d1626;
    --surface-3: #16233a;
    --border: #1d2a40;
    --border-strong: #2a3a55;
    --text: #e5edf6;
    --text-2: #c6d2e0;
    --muted: #8ea0b6;
    --primary: #60a5fa;
    --primary-hover: #93c5fd;
    --primary-soft: #14213d;
    --primary-text: #071433;
    --success: #4ade80;
    --success-soft: #0f2e1d;
    --warning: #fbbf24;
    --warning-soft: #33270b;
    --danger: #f87171;
    --danger-soft: #3a1515;
    --info: #93c5fd;
    --info-soft: #14254a;
    --sidebar: #070f1b;
    --sidebar-2: #0c1828;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 1px 3px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .25);
    --shadow-lg: 0 24px 64px rgba(0, 0, 0, .55);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #0a1220;
  --surface: #101a2c;
  --surface-2: #0d1626;
  --surface-3: #16233a;
  --border: #1d2a40;
  --border-strong: #2a3a55;
  --text: #e5edf6;
  --text-2: #c6d2e0;
  --muted: #8ea0b6;
  --primary: #60a5fa;
  --primary-hover: #93c5fd;
  --primary-soft: #14213d;
  --primary-text: #071433;
  --success: #4ade80;
  --success-soft: #0f2e1d;
  --warning: #fbbf24;
  --warning-soft: #33270b;
  --danger: #f87171;
  --danger-soft: #3a1515;
  --info: #93c5fd;
  --info-soft: #14254a;
  --sidebar: #070f1b;
  --sidebar-2: #0c1828;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 1px 3px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .25);
  --shadow-lg: 0 24px 64px rgba(0, 0, 0, .55);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
#root { min-height: 100vh; }
body {
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--primary); }
.hidden { display: none !important; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.grow { flex: 1; min-width: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------ giriş */
.login {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
}
.login-hero {
  position: relative;
  overflow: hidden;
  background: radial-gradient(1200px 600px at -10% -20%, #12456a 0%, transparent 60%),
              radial-gradient(900px 500px at 120% 120%, #0e5b6b 0%, transparent 55%),
              var(--sidebar);
  color: #e6f0fa;
  padding: 56px 64px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.login-hero h1 { font-size: 40px; line-height: 1.15; margin: 0 0 16px; font-weight: 650; letter-spacing: -.02em; max-width: 520px; }
.login-hero p { color: #a9bccf; font-size: 16px; line-height: 1.6; max-width: 470px; margin: 0; }
.login-hero h1 .accent { color: #3cc9de; }
.hero-eyebrow { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #3cc9de; background: rgba(34, 184, 207, .12); border: 1px solid rgba(34, 184, 207, .25); padding: 5px 11px; border-radius: 99px; margin-bottom: 20px; }
.hero-points { display: grid; gap: 16px; margin-top: 40px; max-width: 460px; padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, .08); }
.hero-point { display: flex; gap: 14px; align-items: center; color: #d5e1ec; font-size: 15px; font-weight: 500; }
.hero-point svg { flex: none; color: #3cc9de; box-sizing: content-box; padding: 8px; border-radius: 10px; background: rgba(34, 184, 207, .1); }
.hero-foot { color: #6f869d; font-size: 12.5px; }
.login-side { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: var(--surface); }
.login-card { width: 100%; max-width: 380px; }
.login-card h2 { font-size: 24px; margin: 18px 0 6px; letter-spacing: -.01em; }
.login-card .lead { color: var(--muted); margin: 0 0 26px; }

/* ------------------------------------------------------------ marka */
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand > span { display: flex; flex-direction: column; line-height: 1.15; }
.brand-word { font-size: 20px; font-weight: 700; letter-spacing: -.01em; }
.brand-word .arb { background: linear-gradient(135deg, #38bdf8, #6366f1); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-word .io { color: currentColor; }
.brand-sub { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 600; }

/* ------------------------------------------------------------ uygulama iskeleti */
.app { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 20px 14px;
}
.sidebar .brand { color: #fff; padding: 4px 10px 22px; }
.sidebar .brand-sub { color: #6f869d; display: block; margin-top: -2px; }
.nav { display: grid; gap: 2px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; border-radius: 9px;
  color: var(--sidebar-text); background: none; border: 0; cursor: pointer;
  text-align: left; width: 100%; font-weight: 500; position: relative;
}
.nav-item svg { flex: none; opacity: .85; }
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.nav-item.active { background: rgba(34, 184, 207, .14); color: var(--sidebar-active); }
.nav-item.active::before { content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: #60a5fa; }
.nav-item:focus-visible { outline: 2px solid #60a5fa; outline-offset: 1px; }
.nav-badge { margin-left: auto; min-width: 9px; height: 9px; border-radius: 99px; background: transparent; }
.nav-item.alert-critical .nav-badge { background: #f05252; box-shadow: 0 0 0 0 rgba(240, 82, 82, .7); animation: pulse 1.4s infinite; }
.nav-item.alert-warning .nav-badge { background: #f59e0b; box-shadow: 0 0 0 0 rgba(245, 158, 11, .7); animation: pulse 1.8s infinite; }
.nav-item.alert-critical { color: #ffd4d4; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(240, 82, 82, .6); } 70% { box-shadow: 0 0 0 8px rgba(240, 82, 82, 0); } 100% { box-shadow: 0 0 0 0 rgba(240, 82, 82, 0); } }
@media (prefers-reduced-motion: reduce) { .nav-item .nav-badge { animation: none !important; } }
.nav-section { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: #5f7790; padding: 16px 12px 6px; font-weight: 600; }
.sidebar-foot { margin-top: auto; border-top: 1px solid rgba(255, 255, 255, .08); padding: 14px 6px 0; display: grid; gap: 10px; }
.who { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: #1d4a63; color: #dff6fb; display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.who-name { color: #fff; font-weight: 600; line-height: 1.2; }
.who-role { font-size: 12px; color: #7f97ae; }
.side-actions { display: flex; gap: 6px; }
.side-actions .btn { flex: 1; background: rgba(255, 255, 255, .06); color: #d3dfeb; border-color: rgba(255, 255, 255, .08); }
.side-actions .btn:hover { background: rgba(255, 255, 255, .12); color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
.content { padding: 28px 32px 48px; max-width: 1480px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { margin: 0; font-size: 26px; letter-spacing: -.02em; font-weight: 650; }
.page-head p { margin: 4px 0 0; color: var(--muted); max-width: 720px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ------------------------------------------------------------ düğmeler & formlar */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: 9px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text-2);
  font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, color .15s;
}
.btn:hover { background: var(--surface-3); }
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-text); }
.btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn-danger { color: var(--danger); border-color: color-mix(in srgb, var(--danger) 35%, var(--border)); }
.btn-danger:hover { background: var(--danger-soft); }
.btn-danger-solid { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger-solid:hover { filter: brightness(1.08); background: var(--danger); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-ghost:hover { background: var(--surface-3); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; height: 42px; }
.btn .spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span, .label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.field .hint { font-size: 12px; color: var(--muted); font-weight: 400; }
.input, .select, textarea.input {
  width: 100%; height: 38px; padding: 0 12px; border-radius: 9px;
  border: 1px solid var(--border-strong); background: var(--surface); color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
textarea.input { height: auto; min-height: 80px; padding: 9px 12px; resize: vertical; }
.input:focus, .select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 22%, transparent); }
.input[readonly] { background: var(--surface-2); color: var(--muted); }
.input:disabled, .select:disabled { background: var(--surface-2); color: var(--muted); }
.select.select-sm { height: 30px; width: auto; min-width: 140px; padding: 0 8px; font-size: 13px; border-radius: 8px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check { display: flex; align-items: flex-start; gap: 9px; margin: 6px 0 10px; cursor: pointer; line-height: 1.4; }
.check input { margin: 2px 0 0; width: 16px; height: 16px; accent-color: var(--primary); flex: none; }
.check.disabled { opacity: .55; cursor: not-allowed; }
.search { position: relative; }
.search svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.search .input { padding-left: 36px; width: 300px; max-width: 100%; }
.form-error { background: var(--danger-soft); color: var(--danger); border-radius: 9px; padding: 9px 12px; margin-bottom: 14px; font-size: 13px; }

/* ------------------------------------------------------------ kartlar & göstergeler */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 0; flex-wrap: wrap; }
.card-head h2 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -.005em; }
.card-head p { margin: 2px 0 0; color: var(--muted); font-size: 13px; }
.card-body { padding: 14px 18px 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.grid-2 .card + .card { margin-top: 0; }

.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.stat-value { font-size: 26px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 11.5px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.stat.tone-success .stat-value { color: var(--success); }
.stat.tone-warning .stat-value { color: var(--warning); }
.stat.tone-danger .stat-value { color: var(--danger); }
.stat.tone-primary .stat-value { color: var(--primary); }

.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 650; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-success { background: var(--success-soft); color: var(--success); }
.pill-warning { background: var(--warning-soft); color: var(--warning); }
.pill-danger { background: var(--danger-soft); color: var(--danger); }
.pill-info { background: var(--info-soft); color: var(--info); }
.pill-neutral { background: var(--surface-3); color: var(--muted); }
.tag { display: inline-block; padding: 1px 8px; border-radius: 6px; background: var(--surface-3); color: var(--text-2); font-size: 12px; font-weight: 600; white-space: nowrap; }
.tag-cloud { background: var(--primary-soft); color: var(--primary); }

.banner { border-radius: var(--radius); padding: 16px 18px; display: flex; gap: 14px; align-items: flex-start; margin-bottom: 16px; border: 1px solid transparent; }
.banner svg { flex: none; margin-top: 2px; }
.banner h3 { margin: 0; font-size: 16px; }
.banner p { margin: 3px 0 0; color: var(--text-2); font-size: 13px; }
.banner-success { background: var(--success-soft); color: var(--success); }
.banner-warning { background: var(--warning-soft); color: var(--warning); }
.banner-danger { background: var(--danger-soft); color: var(--danger); }
.banner-info { background: var(--info-soft); color: var(--info); }
.banner-neutral { background: var(--surface-3); color: var(--text-2); }

.checklist { display: grid; gap: 8px; }
.checklist div { display: flex; gap: 10px; align-items: flex-start; }
.checklist .ok { color: var(--success); }
.checklist .bad { color: var(--danger); }
.checklist svg { flex: none; margin-top: 2px; }

.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 74px 1fr 36px; gap: 10px; align-items: center; font-size: 13px; }
.bar-track { height: 12px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--primary); border-radius: 99px; min-width: 0; }
.bar-row .n { text-align: right; font-weight: 650; font-variant-numeric: tabular-nums; }
.meter { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.meter > div { height: 100%; border-radius: 99px; background: var(--success); }
.meter.warn > div { background: var(--warning); }
.meter.bad > div { background: var(--danger); }

/* ------------------------------------------------------------ tablolar */
.table-wrap { overflow: auto; border-top: 1px solid var(--border); }
.card-body > .table-wrap { margin: 0 -18px -18px; border-radius: 0 0 var(--radius) var(--radius); }
.table-wrap.tall { max-height: 560px; }
.table-wrap.medium { max-height: 380px; }
table.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13.5px; }
.table th {
  position: sticky; top: 0; z-index: 1; background: var(--surface-2); color: var(--muted);
  font-size: 11.5px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase;
  text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); white-space: nowrap;
}
.table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr.clickable { cursor: pointer; }
.table tbody tr.clickable:hover td { background: var(--surface-2); }
.table tbody tr.selected td { background: var(--primary-soft); }
.table tbody tr.row-danger td { color: var(--danger); font-weight: 600; }
.table tbody tr.row-danger td:first-child { box-shadow: inset 3px 0 0 var(--danger); }
.table .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table td:not(.wrap) .mono { white-space: nowrap; }
.cell-title { font-weight: 600; color: var(--text); }
.cell-sub { font-size: 12.5px; color: var(--muted); }
.table td.wrap { white-space: normal; min-width: 260px; }
.empty { padding: 36px 18px; text-align: center; color: var(--muted); }
.empty svg { color: var(--border-strong); margin-bottom: 8px; }
.loading { padding: 40px; display: grid; place-items: center; color: var(--muted); gap: 10px; }
.loading .spin { width: 26px; height: 26px; border: 3px solid var(--border-strong); border-right-color: var(--primary); border-radius: 50%; animation: spin .8s linear infinite; }

/* ------------------------------------------------------------ yan çekmece (lisans ayrıntısı) */
.drawer-backdrop { position: fixed; inset: 0; background: rgba(8, 15, 28, .35); z-index: 40; opacity: 0; transition: opacity .18s; }
.drawer-backdrop.open { opacity: 1; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); z-index: 41;
  background: var(--surface); border-left: 1px solid var(--border); box-shadow: var(--shadow-lg);
  transform: translateX(100%); transition: transform .22s ease; display: flex; flex-direction: column;
}
.drawer.open { transform: none; }
.drawer-head { padding: 20px 22px 14px; border-bottom: 1px solid var(--border); display: flex; gap: 12px; align-items: flex-start; }
.drawer-head h2 { margin: 0; font-size: 19px; line-height: 1.25; }
.drawer-head p { margin: 4px 0 0; color: var(--muted); word-break: break-all; }
.drawer-body { padding: 18px 22px; overflow: auto; flex: 1; }
.drawer-foot { padding: 14px 22px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 8px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 9px 14px; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 550; word-break: break-word; }
.keybox { display: flex; gap: 8px; align-items: center; background: var(--surface-2); border: 1px dashed var(--border-strong); border-radius: 9px; padding: 10px 12px; margin: 4px 0 16px; }
.keybox code { font-family: var(--mono); font-size: 15px; font-weight: 600; letter-spacing: .04em; flex: 1; word-break: break-all; }

/* ------------------------------------------------------------ modal */
dialog.modal {
  border: 0; padding: 0; border-radius: 16px; background: var(--surface); color: var(--text);
  box-shadow: var(--shadow-lg); width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px);
}
dialog.modal.wide { width: min(980px, calc(100vw - 32px)); }
dialog.modal.xwide { width: min(1180px, calc(100vw - 32px)); }
dialog.modal::backdrop { background: rgba(8, 15, 28, .5); backdrop-filter: blur(2px); }
.modal-inner { display: flex; flex-direction: column; max-height: calc(100vh - 48px); }
.modal-head { padding: 20px 22px 6px; display: flex; gap: 12px; align-items: flex-start; }
.modal-head h2 { margin: 0; font-size: 18px; letter-spacing: -.01em; flex: 1; }
.modal-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.modal-body { padding: 12px 22px 8px; overflow-x: hidden; overflow-y: auto; }
dialog.modal { overflow: hidden; }
.modal-inner { overflow: hidden; }
.modal-foot { padding: 14px 22px 20px; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.icon-btn { width: 32px; height: 32px; border-radius: 8px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.confirm-text { white-space: pre-line; color: var(--text-2); margin: 0 0 6px; }
.callout { border-radius: 10px; padding: 10px 12px; font-size: 13px; margin: 6px 0 12px; }
.callout-info { background: var(--info-soft); color: var(--info); }
.callout-warning { background: var(--warning-soft); color: var(--warning); }
.callout-danger { background: var(--danger-soft); color: var(--danger); }
.perm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.diag { background: var(--warning-soft); border-radius: 10px; padding: 12px 16px; }
.diag li { margin: 4px 0; color: var(--text); }
.diag li.critical { color: var(--danger); font-weight: 650; }

/* ------------------------------------------------------------ bildirimler */
.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 100; display: grid; gap: 8px; width: min(380px, calc(100vw - 36px)); }
.toast {
  background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--primary);
  border-radius: 10px; padding: 11px 14px; box-shadow: var(--shadow); font-size: 13.5px;
  animation: toast-in .2s ease;
}
.toast.success { border-left-color: var(--success); }
.toast.error { border-left-color: var(--danger); }
.toast.warning { border-left-color: var(--warning); }
@keyframes toast-in { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ------------------------------------------------------------ müşteri paneli */
.spacer-16 { height: 16px; }
.text-warning { color: var(--warning); font-weight: 650; }
.link-btn { background: none; border: 0; padding: 0; color: var(--primary); font-weight: 600; cursor: pointer; }
.link-btn:hover { text-decoration: underline; }
.login-links { display: flex; justify-content: flex-end; margin-top: 12px; min-height: 20px; }
.captcha-note { font-size: 11.5px; color: var(--muted); margin: 16px 0 0; line-height: 1.45; }
.grecaptcha-badge { visibility: hidden !important; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline .input { width: auto; flex: 1; min-width: 150px; }
.seg { display: inline-flex; gap: 4px; }
.boxed .table-wrap, .boxed > .empty { border: 1px solid var(--border); border-radius: 10px; }
.section-title { margin: 20px 0 8px; font-size: 15px; }
.kv.spaced { margin-top: 14px; }
.grid-2.no-top { margin-top: 0; }
.center-pad { display: flex; justify-content: center; padding: 14px 0 0; }
.pager { display: flex; justify-content: flex-end; align-items: center; gap: 10px; padding: 14px 0 0; }
.card + .card, .card + .spacer-16 + .card { margin-top: 16px; }

/* grafik */
.cols { display: flex; align-items: stretch; gap: 4px; height: 170px; padding-top: 6px; }
.col { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.col-bar { flex: 1; display: flex; align-items: flex-end; background: var(--surface-2); border-radius: 6px; overflow: hidden; }
.col-stack { width: 100%; display: flex; flex-direction: column; min-height: 0; border-radius: 6px 6px 0 0; overflow: hidden; }
.col-stack > div { min-height: 3px; }
.col-label { font-size: 10.5px; color: var(--muted); text-align: center; height: 18px; line-height: 18px; white-space: nowrap; }
.seg-success { background: var(--success); }
.seg-partial { background: var(--warning); }
.seg-failed { background: var(--danger); }
.legend { display: flex; gap: 16px; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.legend .lg { background: none !important; display: inline-flex; align-items: center; gap: 6px; }
.legend .lg::before { content: ""; width: 10px; height: 10px; border-radius: 3px; }
.legend .lg.seg-success::before { background: var(--success); }
.legend .lg.seg-partial::before { background: var(--warning); }
.legend .lg.seg-failed::before { background: var(--danger); }

/* makineler */
.machine-title { display: flex; gap: 12px; align-items: center; }
.machine-icon { width: 42px; height: 42px; border-radius: 11px; background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; flex: none; }
.mini-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.mini-stat { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; }
.mini-label { font-size: 11px; font-weight: 650; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.mini-value { font-weight: 650; margin-top: 2px; font-variant-numeric: tabular-nums; }
.machine .card-body > .table-wrap { margin-top: 4px; }

/* dosya yöneticisi */
.fm-pickers { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; align-items: end; }
.fm-pickers .field { margin-bottom: 10px; }
.fm-point { grid-column: span 1; }
.fm-point-info { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; font-size: 13px; color: var(--text-2); padding-top: 4px; }
.fm-point-info svg { vertical-align: -2px; margin-right: 4px; color: var(--primary); }
.fm-point-info:empty { display: none; }
.fm-head { flex-direction: column; align-items: stretch; padding-bottom: 12px; gap: 10px; }
.fm-head .page-actions { justify-content: flex-end; }
.fm-head .search { flex: 1; min-width: 200px; }
.fm-head .search .input { width: 100%; }
.fm-nav { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; }
.fm-nav .icon-btn:disabled { opacity: .4; cursor: default; }
.crumbs { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; min-width: 0; }
.crumb { background: none; border: 0; padding: 4px 7px; border-radius: 7px; cursor: pointer; color: var(--text-2); font-weight: 600; display: inline-flex; gap: 6px; align-items: center; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.crumb:hover { background: var(--surface-3); color: var(--text); }
.crumb.current { color: var(--muted); cursor: default; }
.crumb-sep { color: var(--muted); }
.fm-name { display: flex; align-items: center; gap: 10px; }
.fm-name svg { flex: none; color: var(--muted); }
.fm-folder .fm-name svg { color: #e0a526; }
.table th.chk, .table td.chk { width: 40px; padding-right: 0; }
.table td.chk input, .table th.chk input { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; vertical-align: middle; }
.table td.act { width: 1%; white-space: nowrap; text-align: right; }
.fm-foot { padding: 12px 0 0; font-size: 12.5px; }
.card-body > .table-wrap + .fm-foot, .card-body > .table-wrap + .center-pad { border-top: 1px solid var(--border); margin-top: 18px; }
.fm .card-body > .table-wrap { margin-bottom: 0; }

@media (max-width: 880px) {
  .fm-head .page-actions { width: 100%; }
  .fm-head .search { flex: 1 1 100%; }
  .cols { height: 130px; gap: 2px; }
  .crumb { max-width: 140px; }
}

/* ------------------------------------------------------------ dar ekran */
@media (max-width: 1100px) {
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 880px) {
  .login { grid-template-columns: 1fr; }
  .login-hero { display: none; }
  .app { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 50; width: 268px; transform: translateX(-100%); transition: transform .2s; height: 100%; }
  .app.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
  .topbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--sidebar); color: #fff; position: sticky; top: 0; z-index: 30; }
  .topbar .brand { color: #fff; }
  .topbar .icon-btn { color: #cfe0ee; }
  .topbar .icon-btn:hover { background: rgba(255, 255, 255, .1); color: #fff; }
  .content { padding: 18px 16px 40px; }
  .page-head h1 { font-size: 22px; }
  .search .input { width: 100%; }
  .page-actions { width: 100%; }
  .row-2, .perm-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px 0; }
  .kv dd { margin-bottom: 8px; }
}
.nav-scrim { display: none; }
@media (max-width: 880px) {
  .app.nav-open .nav-scrim { display: block; position: fixed; inset: 0; z-index: 45; background: rgba(8, 15, 28, .45); }
}
.card-body > .table-wrap + .pager { margin-top: 18px; border-top: 1px solid var(--border); }

/* ================================================================== Program İndir */
.dl-hero { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: 30px 32px; margin-bottom: 16px;
  background: radial-gradient(120% 140% at 0% 0%, #13365a 0%, var(--sidebar) 55%, #08172a 100%); color: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid rgba(255, 255, 255, .06); }
.dl-brand { display: flex; align-items: center; gap: 20px; min-width: 0; flex: 1 1 420px; }
.dl-logo { flex: none; width: 72px; height: 72px; border-radius: 18px; display: grid; place-items: center; color: #3cc9de; background: rgba(34, 184, 207, .12); border: 1px solid rgba(34, 184, 207, .3); }
.dl-eyebrow { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #3cc9de; background: rgba(34, 184, 207, .12); border: 1px solid rgba(34, 184, 207, .25); padding: 4px 10px; border-radius: 99px; margin-bottom: 10px; }
.dl-title { margin: 0; font-size: 26px; font-weight: 800; letter-spacing: -.01em; color: #fff; }
.dl-sub { margin-top: 6px; color: #b8c6d6; font-size: 14.5px; }
.dl-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.dl-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #d5e1ec; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12); padding: 4px 10px; border-radius: 99px; }
.dl-chip svg { color: #3cc9de; }
.dl-action { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.btn.btn-xl { font-size: 16px; font-weight: 700; padding: 14px 28px; border-radius: 10px; }
.dl-hero .btn-primary { background: #3b82f6; border-color: #3b82f6; color: #ffffff; box-shadow: 0 8px 24px rgba(59, 130, 246, .28); }
.dl-hero .btn-primary:hover { background: #3cc9de; border-color: #3cc9de; }
.dl-note { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #8ea0b6; }
.dl-notes { flex: 1 1 100%; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .08); }
.dl-notes-title { font-size: 13px; font-weight: 700; color: #3cc9de; margin-bottom: 4px; }
.dl-notes p { margin: 0; color: #d5e1ec; font-size: 14px; line-height: 1.6; }
.dl-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; margin-bottom: 16px; }
.dl-grid > .card + .card { margin-top: 0; }
.dl-steps { list-style: none; margin: 0; padding: 4px 0 6px; display: grid; gap: 16px; }
.dl-step { display: flex; gap: 14px; align-items: flex-start; }
.dl-num { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; color: var(--primary); background: var(--primary-soft); }
.dl-step b { display: block; color: var(--text); margin-bottom: 2px; }
.dl-step span { color: var(--muted); font-size: 14px; line-height: 1.55; }
.dl-req { list-style: none; margin: 0; padding: 4px 0 6px; display: grid; gap: 12px; }
.dl-req li { display: flex; gap: 10px; align-items: flex-start; color: var(--text-2); font-size: 14px; line-height: 1.5; }
.dl-req svg { flex: none; margin-top: 2px; color: var(--success); }
.dl-list { margin: 0 -18px -18px; }
.dl-row { display: flex; align-items: center; gap: 14px; padding: 13px 18px; border-top: 1px solid var(--border); }
.dl-row-icon { flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--primary); background: var(--primary-soft); }
.dl-row-main { flex: 1; min-width: 0; }
.dl-row-title { font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.dl-row-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.dl-help { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; margin: 18px 2px 0; }
@media (max-width: 880px) {
  .dl-hero { padding: 22px 20px; }
  .dl-title { font-size: 21px; }
  .dl-logo { width: 56px; height: 56px; border-radius: 14px; }
  .dl-action { align-items: stretch; width: 100%; }
  .dl-grid { grid-template-columns: 1fr; }
}
