/* ============================================================
   EminGrup CRM — mobil öncelikli PWA teması
   ============================================================ */
:root {
  --bg: #070d12;
  --bg-2: #0a131b;
  --panel: #0e1a23;
  --panel-2: #12222d;
  --panel-3: #172c39;
  --line: rgba(148, 180, 197, .14);
  --line-strong: rgba(148, 180, 197, .26);
  --text: #e9f3f8;
  --muted: #8aa3b2;
  --muted-2: #6b8494;
  --accent: #38bdf8;
  --accent-2: #2dd4bf;
  --accent-soft: rgba(56, 189, 248, .13);
  --danger: #fb7185;
  --danger-soft: rgba(251, 113, 133, .14);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, .14);
  --ok: #34d399;
  --ok-soft: rgba(52, 211, 153, .14);
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 18px 45px rgba(0, 0, 0, .42);
  --sidebar-w: 252px;
  --topbar-h: 64px;
  --bottom-h: 70px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(900px 480px at 88% -12%, rgba(45, 212, 191, .10), transparent 60%),
    radial-gradient(760px 420px at -8% 8%, rgba(56, 189, 248, .12), transparent 62%),
    var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
img { max-width: 100%; display: block; }
h1, h2, h3, h4, p { margin: 0; }
::selection { background: rgba(56, 189, 248, .32); }

.sprite { display: none; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ---------- Kabuk ---------- */
.app-shell { display: flex; min-height: 100dvh; }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 14px 16px;
  background: linear-gradient(180deg, rgba(13, 26, 36, .96), rgba(8, 16, 23, .98));
  border-right: 1px solid var(--line);
  z-index: 40;
}

.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 18px; }
.brand-mark {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(56, 189, 248, .22), rgba(45, 212, 191, .18));
  border: 1px solid rgba(56, 189, 248, .34);
  color: var(--accent);
  box-shadow: 0 8px 22px rgba(14, 165, 233, .18), inset 0 1px 0 rgba(255, 255, 255, .10);
}
.brand-mark svg { width: 21px; height: 21px; stroke-width: 1.8; }
.brand-mark.small { width: 34px; height: 34px; border-radius: 11px; }
.brand-mark.large { width: 66px; height: 66px; border-radius: 22px; }
.brand-mark.large svg { width: 34px; height: 34px; }
.brand-text { font-weight: 750; font-size: 16px; letter-spacing: -.2px; line-height: 1.1; }
.brand-text span { display: block; font-size: 11px; font-weight: 650; color: var(--accent); letter-spacing: 2.2px; }

.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-nav a, .side-profile {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 12px;
  border-radius: 12px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  transition: background .15s ease, color .15s ease;
}
.side-nav a svg { width: 19px; height: 19px; opacity: .85; }
.side-nav a:hover, .side-nav a.active { background: var(--accent-soft); color: var(--text); }
.side-nav a.active { color: var(--accent); }
.side-nav a.active svg { opacity: 1; }
.nav-badge {
  margin-left: auto;
  min-width: 20px; height: 20px;
  padding: 0 6px;
  display: inline-grid; place-items: center;
  font-style: normal; font-size: 11px; font-weight: 800;
  color: #04202b;
  background: var(--accent-2);
  border-radius: 999px;
}
.nav-badge:empty { display: none; }

.side-spacer { flex: 1; }
.drive-mini {
  display: flex; align-items: center; gap: 10px;
  margin: 8px 2px;
  padding: 11px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .02);
}
.drive-mini-icon {
  width: 32px; height: 32px; display: grid; place-items: center;
  border-radius: 10px; background: var(--accent-soft); color: var(--accent);
}
.drive-mini div { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.drive-mini strong { font-size: 12.5px; }
.drive-mini small { font-size: 10.5px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drive-mini .icon-btn { margin-left: auto; }

.side-profile { border-top: 1px solid var(--line); border-radius: 0; padding: 14px 8px 2px; }
.side-profile .avatar { width: 34px; height: 34px; font-size: 12px; }
.side-profile span:nth-child(2) { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.side-profile strong { font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-profile small { font-size: 10.5px; color: var(--muted-2); }
.side-profile > svg { margin-left: auto; width: 16px; height: 16px; opacity: .6; }

.app-main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-height: 100dvh; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--topbar-h);
  display: flex; align-items: center; gap: 14px;
  padding: 0 26px;
  background: rgba(7, 13, 18, .82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.mobile-brand { display: none; align-items: center; gap: 9px; }
.mobile-brand .brand-text { font-size: 14px; }
.mobile-brand .brand-text span { display: inline; font-size: 10px; letter-spacing: 1.6px; margin-left: 5px; }
.mobile-brand .brand-mark { width: 32px; height: 32px; border-radius: 10px; }
.mobile-brand .brand-mark svg { width: 17px; height: 17px; }
.topbar-page { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.topbar-title { font-size: 16px; font-weight: 720; letter-spacing: -.2px; }
.topbar-sub { font-size: 11.5px; color: var(--muted-2); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }

.icon-btn {
  position: relative;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 11px;
  color: var(--muted);
  border: 1px solid transparent;
  transition: background .15s ease, color .15s ease;
}
.icon-btn:hover { background: rgba(255, 255, 255, .055); color: var(--text); }
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn.tiny { width: 30px; height: 30px; border-radius: 9px; }
.icon-btn.tiny svg { width: 15px; height: 15px; }
.notify-btn .dot {
  position: absolute; top: 8px; right: 9px;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 2px var(--bg);
}
.avatar {
  display: inline-grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  font-size: 11px; font-weight: 800; letter-spacing: .3px;
  color: #06202c;
  background: linear-gradient(140deg, var(--accent), var(--accent-2));
  flex: none;
}
.top-avatar { width: 36px; height: 36px; font-size: 12px; border: 2px solid rgba(255, 255, 255, .12); }

main {
  flex: 1;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 22px 26px 44px;
  outline: none;
}

.bottom-nav { display: none; }

/* ---------- Sayfa başlıkları ---------- */
.page { animation: page-in .22s ease both; }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head-text { min-width: 0; }
.page-title { font-size: 23px; font-weight: 760; letter-spacing: -.5px; }
.page-sub { margin-top: 4px; font-size: 13px; color: var(--muted); }
.page-head-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, .04);
  color: var(--text);
  font-size: 13.5px; font-weight: 650;
  transition: transform .12s ease, background .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn:hover { background: rgba(255, 255, 255, .075); }
.btn:active { transform: scale(.98); }
.btn svg { width: 17px; height: 17px; }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), #0ea5e9);
  border-color: transparent;
  color: #031a25;
  box-shadow: 0 10px 24px rgba(14, 165, 233, .26);
}
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.btn.danger { background: var(--danger-soft); border-color: rgba(251, 113, 133, .3); color: var(--danger); }
.btn.compact { min-height: 34px; padding: 0 12px; font-size: 12.5px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Kartlar ve ızgara ---------- */
.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, .028), rgba(255, 255, 255, .012));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .04) inset;
}
.card.tight { padding: 14px; }
.card-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 720; margin-bottom: 12px; }
.card-title svg { width: 17px; height: 17px; color: var(--accent); }
.section-head { display: flex; align-items: center; gap: 10px; margin: 24px 0 12px; }
.section-head h2 { font-size: 15.5px; font-weight: 720; letter-spacing: -.2px; }
.section-head .link-btn { margin-left: auto; font-size: 12.5px; font-weight: 650; color: var(--accent); }
.section-head .link-btn:hover { text-decoration: underline; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat {
  position: relative;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(255, 255, 255, .035), rgba(255, 255, 255, .01));
  overflow: hidden;
}
.stat::after {
  content: ""; position: absolute; inset: auto -30px -40px auto;
  width: 110px; height: 110px; border-radius: 50%;
  background: radial-gradient(circle, rgba(56, 189, 248, .16), transparent 68%);
}
.stat-icon {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  margin-bottom: 12px;
}
.stat-icon svg { width: 17px; height: 17px; }
.stat-value { font-size: 22px; font-weight: 780; letter-spacing: -.6px; line-height: 1.1; }
.stat-label { margin-top: 3px; font-size: 11.5px; color: var(--muted-2); font-weight: 600; }
.stat.green .stat-icon { background: var(--ok-soft); color: var(--ok); }
.stat.amber .stat-icon { background: var(--warn-soft); color: var(--warn); }
.stat.rose .stat-icon { background: var(--danger-soft); color: var(--danger); }

.grid-2 { display: grid; grid-template-columns: 1.35fr 1fr; gap: 14px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 10px; }

/* ---------- Kart listeleri ---------- */
.list { display: flex; flex-direction: column; gap: 9px; }
.list-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .02);
  transition: background .15s ease, border-color .15s ease;
}
.list-row.clickable { cursor: pointer; }
.list-row.clickable:hover { background: rgba(255, 255, 255, .045); border-color: var(--line-strong); }
.list-row .grow { flex: 1; min-width: 0; }
.list-row strong { display: block; font-size: 13.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row small { display: block; font-size: 11.5px; color: var(--muted-2); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-row .chev { color: var(--muted-2); }

.empty {
  padding: 26px 16px;
  text-align: center;
  color: var(--muted-2);
  font-size: 13px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
}
.empty strong { display: block; color: var(--muted); font-size: 13.5px; margin-bottom: 4px; }

/* ---------- Etiket / rozet ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px; font-weight: 700;
  border: 1px solid var(--line-strong);
  color: var(--muted);
  white-space: nowrap;
}
.badge.blue { color: var(--accent); background: var(--accent-soft); border-color: rgba(56, 189, 248, .26); }
.badge.green { color: var(--ok); background: var(--ok-soft); border-color: rgba(52, 211, 153, .26); }
.badge.amber { color: var(--warn); background: var(--warn-soft); border-color: rgba(251, 191, 36, .26); }
.badge.rose { color: var(--danger); background: var(--danger-soft); border-color: rgba(251, 113, 133, .26); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Arama / filtre ---------- */
.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.searchbar {
  flex: 1; min-width: 190px;
  display: flex; align-items: center; gap: 9px;
  height: 42px;
  padding: 0 13px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
}
.searchbar svg { width: 17px; height: 17px; color: var(--muted-2); }
.searchbar input { flex: 1; min-width: 0; border: 0; outline: none; background: none; font-size: 13.5px; }
.searchbar input::placeholder { color: var(--muted-2); }
.filter-chip {
  height: 34px; padding: 0 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-size: 12px; font-weight: 650; color: var(--muted);
  background: rgba(255, 255, 255, .02);
}
.filter-chip.active { color: #04222d; background: var(--accent-2); border-color: transparent; }

/* ---------- Müşteriler ---------- */
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 10px; }
.client-card {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(170deg, rgba(255, 255, 255, .032), rgba(255, 255, 255, .012));
  cursor: pointer;
  transition: transform .14s ease, border-color .14s ease;
}
.client-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.client-card .avatar { width: 42px; height: 42px; font-size: 13px; }
.client-body { min-width: 0; flex: 1; }
.client-body h3 { font-size: 14px; font-weight: 680; letter-spacing: -.15px; }
.client-body p { font-size: 11.5px; color: var(--muted-2); margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-tags { margin-top: 7px; display: flex; gap: 5px; flex-wrap: wrap; }
.client-actions { display: flex; flex-direction: column; gap: 4px; }

/* ---------- Satış hattı ---------- */
.kanban { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 10px; align-items: start; }
.kanban-col {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, .017);
  padding: 10px;
  min-height: 140px;
}
.kanban-head { display: flex; align-items: center; gap: 7px; padding: 3px 4px 10px; }
.kanban-head strong { font-size: 12px; font-weight: 700; letter-spacing: .1px; }
.kanban-head .count { font-size: 10.5px; color: var(--muted-2); font-weight: 700; }
.kanban-head .sum { margin-left: auto; font-size: 10.5px; font-weight: 700; color: var(--accent); }
.kanban-head .add-mini { width: 22px; height: 22px; display: grid; place-items: center; border-radius: 7px; color: var(--muted); background: rgba(255, 255, 255, .05); }
.kanban-head .add-mini:hover { color: var(--text); }
.deal-card {
  padding: 11px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--panel);
  margin-bottom: 7px;
  cursor: pointer;
  transition: border-color .14s ease, transform .14s ease;
}
.deal-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.deal-card strong { display: block; font-size: 12.5px; font-weight: 650; line-height: 1.35; }
.deal-card small { display: block; font-size: 10.5px; color: var(--muted-2); margin-top: 3px; }
.deal-card .deal-amount { margin-top: 8px; font-size: 13px; font-weight: 760; color: var(--ok); letter-spacing: -.2px; }
.deal-card .deal-foot { display: flex; align-items: center; gap: 6px; margin-top: 7px; }

/* ---------- Görevler ---------- */
.task-item {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 12px 13px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .02);
}
.task-check {
  width: 22px; height: 22px; flex: none;
  border-radius: 7px;
  border: 1.5px solid var(--line-strong);
  display: grid; place-items: center;
  color: transparent;
  margin-top: 1px;
}
.task-check svg { width: 13px; height: 13px; stroke-width: 2.4; }
.task-item.done .task-check { background: var(--ok); border-color: var(--ok); color: #04251b; }
.task-item.done .task-title { text-decoration: line-through; color: var(--muted-2); }
.task-body { flex: 1; min-width: 0; }
.task-title { font-size: 13.5px; font-weight: 620; line-height: 1.4; }
.task-meta { display: flex; align-items: center; gap: 7px; margin-top: 4px; flex-wrap: wrap; font-size: 10.5px; color: var(--muted-2); }
.task-flag { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.task-flag.high { background: var(--danger); }
.task-flag.low { background: var(--muted-2); }
.task-group-label { margin: 16px 0 8px; font-size: 11px; font-weight: 750; letter-spacing: 1.1px; text-transform: uppercase; color: var(--muted-2); }

/* ---------- Takvim ---------- */
.calendar { padding: 14px; }
.cal-toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.cal-toolbar h2 { font-size: 15px; font-weight: 720; text-transform: capitalize; }
.cal-toolbar .nav { margin-left: auto; display: flex; gap: 4px; }
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 4px; }
.cal-week span { text-align: center; font-size: 10px; font-weight: 750; letter-spacing: .6px; color: var(--muted-2); padding: 4px 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-cell {
  position: relative;
  min-height: 54px;
  border-radius: 10px;
  border: 1px solid transparent;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 2px 4px;
  font-size: 12px;
  color: var(--muted);
  transition: background .12s ease;
}
.cal-cell:hover { background: rgba(255, 255, 255, .045); }
.cal-cell.other { opacity: .32; }
.cal-cell.today { border-color: rgba(56, 189, 248, .34); color: var(--accent); font-weight: 750; }
.cal-cell.selected { background: var(--accent-soft); border-color: rgba(56, 189, 248, .6); color: var(--text); }
.cal-cell .dots { display: flex; gap: 2.5px; }
.cal-cell .dots i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent-2); }
.cal-cell .dots i.warn { background: var(--warn); }
.day-panel { margin-top: 10px; border-top: 1px solid var(--line); padding-top: 12px; }

/* ---------- Arayan kimliği ---------- */
.caller-box {
  display: flex; gap: 14px; align-items: center;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(150deg, rgba(56, 189, 248, .08), rgba(45, 212, 191, .04) 52%, transparent);
}
.caller-orb {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid rgba(56, 189, 248, .28);
}
.caller-orb svg { width: 24px; height: 24px; }
.call-item { display: flex; align-items: center; gap: 11px; padding: 11px 13px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255, 255, 255, .02); }
.call-dir { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--ok-soft); color: var(--ok); flex: none; }
.call-dir.out { background: var(--accent-soft); color: var(--accent); }
.call-dir.missed { background: var(--danger-soft); color: var(--danger); }
.call-dir svg { width: 16px; height: 16px; }

/* ---------- Teklifler ---------- */
.quote-card {
  padding: 14px;
  border-radius: 15px;
  border: 1px solid var(--line);
  background: linear-gradient(170deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .012));
  cursor: pointer;
}
.quote-card:hover { border-color: var(--line-strong); }
.quote-top { display: flex; align-items: flex-start; gap: 10px; }
.quote-top strong { font-size: 13.5px; font-weight: 680; }
.quote-top small { display: block; margin-top: 3px; font-size: 11px; color: var(--muted-2); }
.quote-total { margin-left: auto; text-align: right; font-size: 15px; font-weight: 780; letter-spacing: -.3px; }
.quote-total small { display: block; font-weight: 600; color: var(--muted-2); font-size: 10px; margin-top: 2px; letter-spacing: 0; }
.quote-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; }

/* ---------- Ayarlar ---------- */
.settings-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; align-items: start; }
.setting-row { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.setting-row:last-child { border-bottom: 0; }
.setting-row .grow { flex: 1; min-width: 0; }
.setting-row strong { display: block; font-size: 13px; font-weight: 640; }
.setting-row small { display: block; font-size: 11.5px; color: var(--muted-2); margin-top: 2px; }
.switch { position: relative; width: 42px; height: 24px; border-radius: 999px; background: rgba(255, 255, 255, .12); transition: background .16s ease; flex: none; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .16s ease; }
.switch.on { background: var(--accent-2); }
.switch.on::after { transform: translateX(18px); }

/* ---------- Formlar ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 11.5px; font-weight: 650; color: var(--muted); }
.field input, .field select, .field textarea, .input {
  width: 100%;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: 11px;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, .035);
  color: var(--text);
  font-size: 13.5px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field textarea { min-height: 78px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus {
  border-color: rgba(56, 189, 248, .6);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, .12);
}
.field select option { background: #0e1a23; color: var(--text); }
.field .hint { font-size: 10.5px; color: var(--muted-2); }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }

.line-items { display: flex; flex-direction: column; gap: 7px; }
.line-item { display: grid; grid-template-columns: 1fr 62px 92px 30px; gap: 6px; align-items: center; }
.line-item input { min-height: 36px; padding: 6px 9px; font-size: 12.5px; }
.line-item .rm { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: var(--danger); }
.line-item .rm:hover { background: var(--danger-soft); }
.quote-sum { display: flex; justify-content: flex-end; gap: 18px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); font-size: 13px; }
.quote-sum strong { color: var(--ok); font-size: 15px; }

/* ---------- Modallar / sheet ---------- */
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 18px;
  background: rgba(2, 7, 11, .72);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: fade-in .16s ease both;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal-card {
  width: 100%;
  max-width: 520px;
  max-height: min(86dvh, 760px);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  box-shadow: var(--shadow);
  animation: sheet-in .2s cubic-bezier(.2, .9, .3, 1.1) both;
  overflow: hidden;
}
.modal-card.wide { max-width: 680px; }
.modal-card.narrow { max-width: 420px; }
@keyframes sheet-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: flex-start; gap: 10px; padding: 17px 18px 0; }
.modal-head-text { flex: 1; min-width: 0; }
.modal-head h2 { font-size: 16.5px; font-weight: 740; letter-spacing: -.25px; }
.modal-head p { margin-top: 3px; font-size: 11.5px; color: var(--muted-2); }
.modal-body { padding: 16px 18px; overflow-y: auto; overscroll-behavior: contain; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 0 18px 18px; flex-wrap: wrap; }
.modal-close { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; color: var(--muted); flex: none; }
.modal-close:hover { background: rgba(255, 255, 255, .06); color: var(--text); }

.detail-hero { display: flex; gap: 13px; align-items: center; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.detail-hero .avatar { width: 52px; height: 52px; font-size: 17px; }
.detail-hero h3 { font-size: 17px; font-weight: 720; }
.detail-hero p { margin-top: 3px; font-size: 12px; color: var(--muted-2); }
.detail-lines { display: flex; flex-direction: column; gap: 9px; }
.detail-line { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; }
.detail-line svg { width: 15px; height: 15px; color: var(--muted-2); margin-top: 1px; }
.detail-line span { color: var(--text); word-break: break-word; }
.detail-line small { display: block; color: var(--muted-2); font-size: 10px; }
.mini-title { margin: 16px 0 8px; font-size: 11px; font-weight: 750; letter-spacing: 1px; text-transform: uppercase; color: var(--muted-2); }

/* ---------- Toast ---------- */
.toast-root { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 15px;
  border-radius: 12px;
  background: #10222c;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow);
  font-size: 12.5px; font-weight: 600;
  animation: toast-in .2s ease both;
}
.toast svg { width: 15px; height: 15px; color: var(--accent-2); }
.toast.error svg { color: var(--danger); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ---------- Kurulum çubuğu ---------- */
.install-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px; z-index: 60;
  width: calc(100% - 32px); max-width: 560px;
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px;
  border-radius: 16px;
  border: 1px solid var(--line-strong);
  background: rgba(14, 31, 42, .96);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}
.install-bar[hidden] { display: none; }
.install-bar div { flex: 1; min-width: 0; line-height: 1.3; }
.install-bar strong { display: block; font-size: 12.5px; }
.install-bar small { display: block; font-size: 10.5px; color: var(--muted-2); }

/* ---------- Kilit ekranı ---------- */
.lock-screen {
  position: fixed; inset: 0; z-index: 300;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 16px;
  padding: 24px;
  background:
    radial-gradient(600px 400px at 50% 0%, rgba(56, 189, 248, .13), transparent 66%),
    var(--bg);
}
.lock-screen[hidden] { display: none; }
.lock-brand { text-align: center; margin-bottom: 6px; }
.lock-brand .brand-mark { margin: 0 auto 14px; }
.lock-brand h1 { font-size: 22px; font-weight: 780; letter-spacing: -.5px; }
.lock-brand p { margin-top: 5px; font-size: 12.5px; color: var(--muted-2); }
.pin-dots { display: flex; gap: 11px; }
.pin-dots i { width: 11px; height: 11px; border-radius: 50%; border: 1.5px solid var(--line-strong); transition: background .12s ease, border-color .12s ease; }
.pin-dots i.filled { background: var(--accent); border-color: var(--accent); }
.lock-error { min-height: 16px; font-size: 11.5px; color: var(--danger); font-weight: 600; }
.pin-pad { display: grid; grid-template-columns: repeat(3, 68px); gap: 10px; }
.pin-pad button {
  height: 58px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03);
  font-size: 19px; font-weight: 620;
}
.pin-pad button:active { background: var(--accent-soft); }
.pin-pad .pin-empty { visibility: hidden; }

/* ---------- Mobil ---------- */
@media (max-width: 1080px) {
  .grid-2 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kanban { grid-template-columns: repeat(5, minmax(200px, 1fr)); }
}

@media (max-width: 900px) {
  .sidebar { display: none; }
  .app-main { margin-left: 0; }
  .mobile-brand { display: flex; }
  .topbar { padding: 0 14px; gap: 10px; }
  .topbar-page { display: none; }
  main { padding: 14px 14px calc(var(--bottom-h) + 30px); }
  .page-title { font-size: 20px; }
  .page-sub { font-size: 12px; }
  .page-head { margin-bottom: 14px; }
  .stats { gap: 9px; }
  .stat { padding: 13px; border-radius: 15px; }
  .stat-value { font-size: 19px; }
  .client-grid { grid-template-columns: 1fr; }

  .bottom-nav {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    height: calc(var(--bottom-h) + env(safe-area-inset-bottom, 0px));
    padding: 6px 6px env(safe-area-inset-bottom, 0px);
    display: flex; align-items: center; justify-content: space-around;
    background: rgba(8, 17, 24, .95);
    border-top: 1px solid var(--line);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }
  .bottom-nav a, .bottom-nav button {
    position: relative;
    flex: 1;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 5px 0;
    font-size: 9.5px; font-weight: 650; letter-spacing: .1px;
    color: var(--muted-2);
    border-radius: 10px;
  }
  .bottom-nav a svg, .bottom-nav button svg { width: 21px; height: 21px; }
  .bottom-nav a.active { color: var(--accent); }
  .bottom-nav .nav-badge { position: absolute; top: 0; right: calc(50% - 18px); min-width: 16px; height: 16px; font-size: 9px; padding: 0 4px; }
  .bottom-nav .nav-call .call-orb {
    width: 44px; height: 44px;
    margin-top: -19px;
    display: grid; place-items: center;
    border-radius: 50%;
    background: linear-gradient(140deg, var(--accent), var(--accent-2));
    color: #03202b;
    box-shadow: 0 8px 20px rgba(45, 212, 191, .35);
    border: 3px solid var(--bg);
  }
  .bottom-nav .nav-call .call-orb svg { width: 20px; height: 20px; stroke-width: 2; }
  .bottom-nav .nav-call.active .call-orb { filter: brightness(1.08); }

  .install-bar { bottom: calc(var(--bottom-h) + 12px + env(safe-area-inset-bottom, 0px)); max-width: none; }
  .toast-root { bottom: calc(var(--bottom-h) + 16px + env(safe-area-inset-bottom, 0px)); }

  .modal-backdrop { padding: 0; align-items: flex-end; }
  .modal-card {
    max-width: none;
    max-height: 90dvh;
    border-radius: 20px 20px 0 0;
    border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    animation: mobile-sheet .24s cubic-bezier(.2, .9, .3, 1.05) both;
  }
  @keyframes mobile-sheet { from { transform: translateY(40px); opacity: .6; } to { transform: none; opacity: 1; } }
  .form-grid { grid-template-columns: 1fr; }
  .kanban { grid-template-columns: repeat(5, 78vw); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 8px; margin: 0 -14px; padding-left: 14px; padding-right: 14px; }
  .kanban-col { scroll-snap-align: start; }
  .line-item { grid-template-columns: 1fr 52px 78px 28px; }
}

@media (max-width: 420px) {
  .page-head-actions .btn span { display: none; }
  .page-head-actions .btn { width: 40px; padding: 0; }
  .topbar-actions .icon-btn { width: 34px; height: 34px; }
  .pin-pad { grid-template-columns: repeat(3, 62px); }
  .pin-pad button { height: 54px; }
}

/* ---------- Yazdırma ---------- */
@media print {
  body { background: #fff; color: #111; }
  .sidebar, .topbar, .bottom-nav, .install-bar, .toast-root, .page-head-actions, .btn, .icon-btn { display: none !important; }
  .app-main { margin: 0; }
  main { padding: 0; max-width: none; }
  .card, .quote-card { border-color: #ddd; background: #fff; box-shadow: none; }
  .detail-line span, .page-title, .list-row strong { color: #111; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
