/* Dijimod CRM — Flat, yoğun dashboard. Fira Sans. Açık/koyu tema. */
:root {
  --primary: #2563EB; --primary-hover: #1D4ED8; --on-primary: #fff; --primary-soft: #EFF4FF;
  --bg: #F6F8FB; --fg: #0F172A; --card: #fff; --muted: #F1F5F9; --muted-fg: #52607A;
  --border: #E3E8F0; --border-strong: #CBD5E1; --ring: #2563EB;
  --danger: #DC2626; --danger-soft: #FEF2F2;
  --t-slate-bg: #F1F5F9; --t-slate-fg: #475569; --t-slate: #94A3B8;
  --t-blue-bg: #EFF4FF;  --t-blue-fg: #1D4ED8;  --t-blue: #3B82F6;
  --t-amber-bg: #FFF7E6; --t-amber-fg: #A15C07; --t-amber: #F59E0B;
  --t-green-bg: #ECFDF3; --t-green-fg: #047857; --t-green: #10B981;
  --t-red-bg: #FEF2F2;   --t-red-fg: #B91C1C;   --t-red: #EF4444;
  --t-purple-bg: #F5F3FF; --t-purple-fg: #6D28D9; --t-purple: #8B5CF6;
  --radius: 12px; --radius-sm: 8px;
  --shadow: 0 1px 2px rgb(15 23 42 / .04);
  --sidebar: 248px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --primary: #3B82F6; --primary-hover: #60A5FA; --on-primary: #fff; --primary-soft: #172554;
    --bg: #0B1120; --fg: #E2E8F0; --card: #111a2e; --muted: #1A2439; --muted-fg: #94A3B8;
    --border: #1F2A40; --border-strong: #334155; --ring: #60A5FA;
    --danger: #F87171; --danger-soft: #2A1215;
    --t-slate-bg: #1E293B; --t-slate-fg: #CBD5E1; --t-slate: #64748B;
    --t-blue-bg: #172554;  --t-blue-fg: #93C5FD;  --t-blue: #3B82F6;
    --t-amber-bg: #2B1D05; --t-amber-fg: #FCD34D; --t-amber: #F59E0B;
    --t-green-bg: #052E1C; --t-green-fg: #6EE7B7; --t-green: #10B981;
    --t-red-bg: #2A1215;   --t-red-fg: #FCA5A5;   --t-red: #EF4444;
    --t-purple-bg: #2E1065; --t-purple-fg: #C4B5FD; --t-purple: #8B5CF6;
    --shadow: none;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font: 400 15px/1.5 "Fira Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-variant-numeric: tabular-nums; -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -.01em; }
h1 { font-size: 1.6rem; font-weight: 700; }
h2 { font-size: 1rem; font-weight: 600; }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
small, .small { font-size: .82rem; }
.muted { color: var(--muted-fg); }
.text-danger { color: var(--danger) !important; font-weight: 500; }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.grow { flex: 1; }
.ml-auto { margin-left: auto; }
.mt { margin-top: 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; border-radius: 8px; z-index: 99; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.i { width: 18px; height: 18px; flex: none; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 16px;
  padding: 20px 14px; background: var(--card); border-right: 1px solid var(--border); overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; color: var(--fg); padding: 2px 6px; }
.brand:hover { text-decoration: none; }
.brand b { font-weight: 700; }
.logo {
  display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px;
  background: var(--primary); color: #fff; font-weight: 700;
}
.brand-lg { font-size: 1.2rem; margin-bottom: 28px; }
.brand-lg .logo { width: 40px; height: 40px; font-size: 1.2rem; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-link {
  display: flex; align-items: center; gap: 12px; min-height: 42px; padding: 0 12px; border-radius: var(--radius-sm);
  color: var(--muted-fg); font-weight: 500; transition: background-color .15s, color .15s;
}
.side-link:hover { background: var(--muted); color: var(--fg); text-decoration: none; }
.side-link.is-active { background: var(--primary-soft); color: var(--primary); }
.side-link.small { min-height: 36px; font-size: .88rem; font-weight: 400; }
.side-link .count, .bn-link .count {
  margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px;
  background: var(--danger); color: #fff; font-size: .72rem; font-weight: 600; display: grid; place-items: center;
}
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 2px; }
.side-group-title { font-size: .72rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted-fg); padding: 0 12px 4px; }
.me { display: flex; align-items: center; gap: 10px; border-top: 1px solid var(--border); margin-top: 12px; padding: 14px 6px 0; }
.me-name { font-weight: 500; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me form { margin: 0; }

.content { min-width: 0; display: flex; flex-direction: column; }
.main { padding: 24px 32px 48px; max-width: 1360px; width: 100%; margin: 0 auto; display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.bottom-nav { display: none; }

/* ---------- Avatar ---------- */
.avatar {
  display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: var(--primary-soft); color: var(--primary); font-weight: 600; font-size: .8rem;
}
.avatar.sm { width: 26px; height: 26px; font-size: .7rem; }
.avatar.sq { border-radius: 9px; }
.avatar.lg { width: 56px; height: 56px; font-size: 1.15rem; border-radius: 14px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 16px;
  border: 1px solid transparent; border-radius: var(--radius-sm); font: inherit; font-weight: 500; cursor: pointer;
  white-space: nowrap; transition: background-color .15s, border-color .15s, color .15s; text-decoration: none !important;
}
.btn .i { width: 17px; height: 17px; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary { background: var(--card); color: var(--fg); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--muted); }
.btn-ghost { background: transparent; color: var(--muted-fg); }
.btn-ghost:hover { background: var(--muted); color: var(--fg); }
.btn-danger-ghost { background: transparent; color: var(--danger); border-color: var(--border); }
.btn-danger-ghost:hover { background: var(--danger-soft); border-color: var(--danger); }
.btn-block { width: 100%; }
.btn-lg { min-height: 46px; padding: 0 22px; font-size: 1rem; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: .85rem; }
.btn:disabled { opacity: .6; cursor: progress; }
.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: transparent; color: var(--muted-fg); cursor: pointer; transition: background-color .15s, color .15s;
}
.icon-btn:hover { background: var(--muted); color: var(--fg); }
.icon-btn.ok:hover { background: var(--t-green-bg); color: var(--t-green-fg); }
.icon-btn.sm { width: 32px; height: 32px; }

/* ---------- Page head ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-title { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--muted-fg); font-size: .88rem; min-height: 32px; width: fit-content; }
.back .i { width: 16px; height: 16px; }

/* ---------- Card ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.stack { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* ---------- Flash ---------- */
.flash { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--radius-sm); font-weight: 500; }
.flash-ok { background: var(--t-green-bg); color: var(--t-green-fg); }
.flash-err { background: var(--t-red-bg); color: var(--t-red-fg); }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px;
  font-size: .76rem; font-weight: 600; white-space: nowrap; vertical-align: middle;
}
.badge-slate { background: var(--t-slate-bg); color: var(--t-slate-fg); }
.badge-blue { background: var(--t-blue-bg); color: var(--t-blue-fg); }
.badge-amber { background: var(--t-amber-bg); color: var(--t-amber-fg); }
.badge-green { background: var(--t-green-bg); color: var(--t-green-fg); }
.badge-red { background: var(--t-red-bg); color: var(--t-red-fg); }
.badge-outline { border: 1px solid var(--border-strong); color: var(--muted-fg); font-weight: 500; }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex: none; }
.dot-slate { background: var(--t-slate); } .dot-blue { background: var(--t-blue); } .dot-amber { background: var(--t-amber); }
.dot-green { background: var(--t-green); } .dot-red { background: var(--t-red); }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi { padding: 18px 20px; }
.kpi-top { display: flex; justify-content: space-between; align-items: center; }
.kpi-label { color: var(--muted-fg); font-size: .88rem; font-weight: 500; }
.kpi-ic { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; background: var(--primary-soft); color: var(--primary); }
.kpi-value { font-size: 2rem; font-weight: 700; margin: 6px 0 2px; letter-spacing: -.02em; }
.kpi-extra { font-size: .84rem; color: var(--muted-fg); }
.kpi-danger { border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); }
.kpi-danger .kpi-ic { background: var(--danger-soft); color: var(--danger); }
.kpi-danger .kpi-value { color: var(--danger); }

/* ---------- Bars ---------- */
.bars { display: grid; grid-template-columns: repeat(12, 1fr); gap: 8px; height: 200px; align-items: end; }
.bar-col { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 6px; min-width: 0; }
.bar { width: 100%; max-width: 34px; background: var(--primary); border-radius: 6px 6px 2px 2px; min-height: 3px; transition: background-color .15s; }
.bar-col:hover .bar { background: var(--primary-hover); }
.bar-col:last-child .bar { background: var(--t-green); }
.bar-n { font-size: .75rem; color: var(--muted-fg); font-weight: 600; min-height: 1em; }
.bar-l { font-size: .72rem; color: var(--muted-fg); }

/* ---------- Pipeline ---------- */
.pipe { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.pipe a { display: grid; grid-template-columns: 130px 1fr 36px; align-items: center; gap: 12px; padding: 8px; border-radius: var(--radius-sm); color: var(--fg); }
.pipe a:hover { background: var(--muted); text-decoration: none; }
.pipe-label { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.pipe-track { height: 8px; background: var(--muted); border-radius: 4px; overflow: hidden; }
.pipe-fill { display: block; height: 100%; border-radius: 4px; }
.fill-slate { background: var(--t-slate); } .fill-blue { background: var(--t-blue); } .fill-amber { background: var(--t-amber); }
.fill-green { background: var(--t-green); } .fill-red { background: var(--t-red); }
.pipe-n { text-align: right; font-weight: 600; }
.team { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.team li { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: var(--muted); border-radius: var(--radius-sm); font-size: .9rem; }
.team b { margin-left: auto; }

/* ---------- Lists ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.row { display: flex; align-items: center; gap: 14px; padding: 12px 4px; border-top: 1px solid var(--border); }
.row:first-child { border-top: 0; padding-top: 2px; }
.row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; color: var(--fg); }
.row-main:hover { text-decoration: none; }
.row-main:hover .row-title { color: var(--primary); }
.row-title { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-sub { font-size: .85rem; color: var(--muted-fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row-note { font-size: .85rem; color: var(--muted-fg); margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.row-actions { display: flex; align-items: center; gap: 4px; }
.row-actions form { margin: 0; }
.date-chip {
  width: 48px; flex: none; text-align: center; border-radius: var(--radius-sm); padding: 6px 0;
  background: var(--muted); display: flex; flex-direction: column; line-height: 1.1;
}
.date-chip b { font-size: 1.1rem; }
.date-chip span { font-size: .7rem; color: var(--muted-fg); text-transform: uppercase; }
.date-chip.late { background: var(--danger-soft); color: var(--danger); }
.date-chip.late span { color: var(--danger); }

/* ---------- Empty ---------- */
.empty { text-align: center; padding: 28px 16px; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.empty-ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--muted); color: var(--muted-fg); margin-bottom: 6px; }
.empty .btn { margin-top: 10px; }

/* ---------- Filters ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 14px; }
.search { position: relative; flex: 1 1 260px; }
.search .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-fg); pointer-events: none; }
.search input { padding-left: 38px; }
.filters select, .filters input[type=date] { width: auto; }
.filters .inline { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted-fg); }

/* ---------- Inputs ---------- */
input, select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; font: inherit; font-size: 16px; color: var(--fg);
  background: var(--card); border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
  transition: border-color .15s, box-shadow .15s;
}
textarea { resize: vertical; min-height: 96px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ring) 22%, transparent); }
input::placeholder, textarea::placeholder { color: color-mix(in srgb, var(--muted-fg) 75%, transparent); }
select { cursor: pointer; }
.listbox { min-height: 180px; padding: 4px; }
.listbox option { padding: 8px 10px; border-radius: 6px; }
input[type=checkbox] { width: 20px; min-height: 20px; height: 20px; accent-color: var(--primary); }
.check { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }

/* ---------- Forms ---------- */
.form { display: flex; flex-direction: column; gap: 20px; max-width: 920px; }
.form-section { margin: 0; }
.form-section > legend {
  float: left; width: 100%; font-weight: 600; font-size: 1rem; padding: 0; margin-bottom: 16px;
}
.form-section > legend + * { clear: both; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; margin: 0; border: 0; padding: 0; }
.field > label, .field > legend { font-size: .88rem; font-weight: 500; padding: 0; }
.field .req { color: var(--danger); }
.hint { color: var(--muted-fg); font-size: .8rem; }
.span-2 { grid-column: 1 / -1; }
.form-actions { flex-direction: row; justify-content: flex-end; }
.form-bar {
  position: sticky; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 10px; justify-content: flex-end;
  padding: 12px 0; background: linear-gradient(to top, var(--bg) 70%, transparent);
}

.segmented { display: flex; flex-wrap: wrap; gap: 8px; }
.segmented.big { margin-bottom: 16px; }
.seg { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); font-size: .9rem; font-weight: 500; background: var(--card); transition: all .15s;
}
.seg:hover span { background: var(--muted); }
.seg input:focus-visible + span { outline: 2px solid var(--ring); outline-offset: 2px; }
.seg input:checked + span { border-color: transparent; }
.seg-slate input:checked + span { background: var(--t-slate-bg); color: var(--t-slate-fg); box-shadow: inset 0 0 0 2px var(--t-slate); }
.seg-blue input:checked + span { background: var(--t-blue-bg); color: var(--t-blue-fg); box-shadow: inset 0 0 0 2px var(--t-blue); }
.seg-amber input:checked + span { background: var(--t-amber-bg); color: var(--t-amber-fg); box-shadow: inset 0 0 0 2px var(--t-amber); }
.seg-green input:checked + span { background: var(--t-green-bg); color: var(--t-green-fg); box-shadow: inset 0 0 0 2px var(--t-green); }
.seg-red input:checked + span { background: var(--t-red-bg); color: var(--t-red-fg); box-shadow: inset 0 0 0 2px var(--t-red); }
.seg input:disabled + span { opacity: .45; cursor: not-allowed; }

/* ---------- Table ---------- */
.table-card { padding: 0; overflow: hidden; }
.table { width: 100%; border-collapse: collapse; }
.table th {
  text-align: left; font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em;
  color: var(--muted-fg); padding: 12px 16px; background: var(--muted); border-bottom: 1px solid var(--border);
}
.table td { padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table td small { display: block; }
.table tbody tr { transition: background-color .15s; }
.table tbody tr:hover { background: color-mix(in srgb, var(--muted) 60%, transparent); }
.table tbody tr:last-child td { border-bottom: 0; }
.cell-firm { display: flex; align-items: center; gap: 12px; color: var(--fg); min-width: 0; }
.cell-firm:hover { text-decoration: none; }
.cell-firm:hover b { color: var(--primary); }
.cell-firm > span:last-child { min-width: 0; }
.td-go { width: 48px; text-align: right; }

/* ---------- Detail ---------- */
.detail-head { display: flex; flex-direction: column; gap: 14px; }
.dh-main { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.dh-text { flex: 1; min-width: 220px; }
.dh-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.quick { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--border); padding-top: 14px; }
.quick-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: var(--radius-sm);
  background: var(--muted); color: var(--fg); font-weight: 500; font-size: .9rem; transition: background-color .15s;
}
.quick-btn:hover { background: var(--primary-soft); color: var(--primary); text-decoration: none; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.callout { display: flex; align-items: center; gap: 14px; background: var(--t-amber-bg); border-color: color-mix(in srgb, var(--t-amber) 40%, var(--border)); }
.callout > .i { color: var(--t-amber-fg); width: 22px; height: 22px; }
.callout > div { flex: 1; }
.callout form { margin: 0; }
.callout-danger { background: var(--danger-soft); border-color: color-mix(in srgb, var(--danger) 45%, var(--border)); }
.callout-danger > .i { color: var(--danger); }

.info { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.info li { display: flex; gap: 12px; align-items: flex-start; overflow-wrap: anywhere; }
.info .i { color: var(--muted-fg); margin-top: 3px; }
.dl { display: grid; grid-template-columns: 100px 1fr; gap: 8px 12px; margin: 0; font-size: .92rem; }
.dl dt { color: var(--muted-fg); }
.dl dd { margin: 0; overflow-wrap: anywhere; }
.notes { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.meta { padding: 0 4px; }

.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.tl-item { position: relative; padding: 0 0 22px 26px; }
.tl-item::before { content: ""; position: absolute; left: 5px; top: 16px; bottom: 0; width: 2px; background: var(--border); }
.tl-item:last-child { padding-bottom: 0; }
.tl-item:last-child::before { display: none; }
.tl-dot { position: absolute; left: 0; top: 5px; width: 12px; height: 12px; border-radius: 50%; box-shadow: 0 0 0 3px var(--card); }
.tl-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-title { font-weight: 600; margin-top: 4px; }
.tl-body p { margin-top: 6px; }
.next { display: flex; gap: 8px; align-items: center; margin-top: 10px; padding: 8px 12px; border-radius: var(--radius-sm); background: var(--t-blue-bg); color: var(--t-blue-fg); font-size: .88rem; }
.next .i { width: 16px; height: 16px; }
.next.done { background: var(--t-green-bg); color: var(--t-green-fg); }

/* ---------- Auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(1200px 600px at 10% -10%, var(--primary-soft), transparent 60%), var(--bg); }
.auth-card { width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 32px; }
.auth-card h1 { font-size: 1.4rem; }
.auth-card > .muted { margin: 4px 0 20px; }
.auth-card .flash { margin-bottom: 16px; }
.auth-card .stack { gap: 16px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .grid-2 { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .shell { display: block; }
  .sidebar { display: none; }
  .main { padding: 16px 16px calc(96px + env(safe-area-inset-bottom)); gap: 16px; }
  h1 { font-size: 1.35rem; }
  .card { padding: 16px; }
  .page-actions .btn-secondary { display: none; }

  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--card); border-top: 1px solid var(--border); padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  }
  .bn-link {
    position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; min-height: 52px; justify-content: center;
    color: var(--muted-fg); font-size: .7rem; font-weight: 500; border-radius: 10px;
  }
  .bn-link:hover { text-decoration: none; }
  .bn-link .i { width: 22px; height: 22px; }
  .bn-link.is-active { color: var(--primary); }
  .bn-link .count { position: absolute; top: 2px; left: 55%; margin: 0; }
  .bn-fab {
    justify-self: center; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; margin-top: -22px;
    background: var(--primary); color: #fff; box-shadow: 0 6px 16px color-mix(in srgb, var(--primary) 40%, transparent);
  }
  .bn-fab .i { width: 26px; height: 26px; }

  .form-grid { grid-template-columns: 1fr; }
  .form-bar { padding-bottom: calc(80px + env(safe-area-inset-bottom)); margin-bottom: -80px; }
  .form-bar .btn-lg { flex: 1; }

  .filters { padding: 12px; }
  .filters select, .filters .inline, .filters .btn { flex: 1 1 calc(50% - 5px); }
  .filters .inline input { flex: 1; }

  /* Tablo → kart */
  .table-card { background: transparent; border: 0; box-shadow: none; }
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; }
  .table tr { position: relative; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 10px; }
  .table td { border: 0; padding: 3px 0; display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; }
  .table td::before { content: attr(data-l); color: var(--muted-fg); font-size: .8rem; flex: none; }
  .table td small { display: inline; margin-left: 6px; }
  .table td[data-l="Firma"] { padding-bottom: 8px; margin-bottom: 4px; border-bottom: 1px solid var(--border); padding-right: 40px; }
  .table td[data-l="Firma"]::before { display: none; }
  .table td[data-l="Firma"] small { display: block; margin: 0; }
  .table .cell-v { text-align: right; display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 4px 6px; }
  .td-go { position: absolute; top: 12px; right: 8px; width: auto; padding: 0 !important; }
  .td-go::before { display: none; }

  .dh-actions { width: 100%; }
  .dh-actions .btn { flex: 1; }
  .quick-btn { flex: 1 1 calc(50% - 4px); justify-content: center; }
  .pipe a { grid-template-columns: 110px 1fr 30px; }
  .bars { height: 160px; gap: 4px; }
  .bar-n { font-size: .65rem; }
  .bar-l { font-size: .62rem; }
}
@media (max-width: 420px) {
  .kpi-value { font-size: 1.6rem; }
  .kpi { padding: 14px; }
  .kpis { gap: 10px; }
}

/* =====================================================================
   v2 — üst çubuk, bildirimler, sekmeler, takvim, modüller
   ===================================================================== */
.dot-purple { background: var(--t-purple); } .fill-purple { background: var(--t-purple); }
.badge-purple { background: var(--t-purple-bg); color: var(--t-purple-fg); }
.text-warn { color: var(--t-amber-fg); }
.mt-sm { margin-top: 12px; }
.pad { padding: 12px 16px; }
.stack-sm { display: flex; flex-direction: column; gap: 8px; }
.stack-sm form { margin: 0; }
.align-start { align-items: start; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.inline-form { display: flex; gap: 8px; align-items: center; margin: 0; }
.inline-form input, .inline-form select { width: auto; }
.btn.is-busy { opacity: .7; cursor: progress; }
.no-scroll { overflow: hidden; }
code { font-family: ui-monospace, "Fira Code", Consolas, monospace; font-size: .85em; background: var(--muted); padding: 2px 6px; border-radius: 5px; }
code.wrap { word-break: break-all; }
details > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; min-height: 28px; }
details > summary::-webkit-details-marker { display: none; }
details > summary::before { content: "▸"; color: var(--muted-fg); transition: transform .15s; }
details[open] > summary::before { transform: rotate(90deg); }

/* Sidebar v2 */
.sidebar { gap: 12px; }
.side-top { display: flex; align-items: center; justify-content: space-between; }
.side-nav { gap: 1px; overflow-y: auto; flex: 1; min-height: 0; margin: 0 -4px; padding: 0 4px; }
.side-nav .side-group-title { margin-top: 14px; }
.side-link { min-height: 38px; }
.drawer-close { display: none; }
.me { margin-top: 0; }
.me-name { display: flex; flex-direction: column; line-height: 1.2; }
.me-name small { font-weight: 400; font-size: .75rem; }

/* Üst çubuk */
.topbar {
  position: sticky; top: 0; z-index: 15; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 8px 32px;
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--border);
}
.menu-btn, .topbar-brand { display: none; }
.top-search { position: relative; flex: 0 1 380px; margin: 0; }
.top-search .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-fg); pointer-events: none; }
.top-search input { padding-left: 38px; min-height: 40px; background: var(--card); }
.notif { position: relative; margin-left: auto; }
.notif-btn { position: relative; border: 1px solid var(--border); background: var(--card); }
.notif-count {
  position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px;
  background: var(--danger); color: #fff; font-size: .68rem; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg);
}
.notif-count[hidden] { display: none; }
.notif-panel {
  position: absolute; right: 0; top: calc(100% + 8px); width: min(400px, calc(100vw - 24px)); background: var(--card);
  border: 1px solid var(--border); border-radius: var(--radius); box-shadow: 0 12px 32px rgb(15 23 42 / .16); overflow: hidden; z-index: 40;
}
.notif-panel[hidden] { display: none; }
.notif-head { display: flex; align-items: center; gap: 4px; padding: 10px 12px; border-bottom: 1px solid var(--border); }
.notif-head b { margin-right: auto; }
.notif-head .btn { min-height: 32px; padding: 0 8px; font-size: .8rem; }
.notif-head .is-off { color: var(--danger); }
.notif-list { list-style: none; margin: 0; padding: 0; max-height: 60vh; overflow-y: auto; }
.notif-empty { padding: 24px; text-align: center; }
.notif-item a { display: flex; gap: 10px; padding: 12px 14px; color: var(--fg); border-bottom: 1px solid var(--border); }
.notif-item a:hover { background: var(--muted); text-decoration: none; }
.notif-item.is-unread a { background: color-mix(in srgb, var(--primary-soft) 60%, transparent); }
.notif-text { display: flex; flex-direction: column; min-width: 0; font-size: .88rem; }
.notif-text span { color: var(--muted-fg); overflow: hidden; text-overflow: ellipsis; }
.notif-text small { color: var(--muted-fg); font-size: .72rem; margin-top: 2px; }
.notif-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; margin-top: 6px; background: var(--t-slate); }
.notif-lead, .notif-takip { background: var(--t-red); } .notif-ozel_gun, .notif-hediye { background: var(--t-purple); }
.notif-ai { background: var(--t-blue); } .notif-mesaj, .notif-anlasma { background: var(--t-green); } .notif-takvim { background: var(--t-amber); }
.notif-all { display: block; text-align: center; padding: 10px; font-size: .85rem; font-weight: 500; }

.toasts { position: fixed; right: 16px; bottom: 16px; z-index: 60; display: flex; flex-direction: column; gap: 8px; max-width: min(380px, calc(100vw - 32px)); }
.toast {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--fg); color: var(--bg);
  box-shadow: 0 10px 30px rgb(0 0 0 / .25); font-size: .9rem; animation: toast-in .25s ease-out; border-left: 4px solid var(--primary);
}
.toast:hover { text-decoration: none; }
.toast span { opacity: .8; font-size: .82rem; }
.toast-lead, .toast-takip { border-left-color: var(--t-red); } .toast-ozel_gun, .toast-hediye { border-left-color: var(--t-purple); }
.toast-mesaj, .toast-anlasma { border-left-color: var(--t-green); }
.toast.is-leaving { opacity: 0; transform: translateY(8px); transition: all .3s; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* Callout / uyarılar */
.callout-muted { background: var(--muted); border-color: var(--border); }
.callout-muted > .i { color: var(--primary); }
.lead-alert { color: var(--fg); }
.lead-alert:hover { text-decoration: none; border-color: var(--danger); }
.lead-alert > .i:first-child { color: var(--danger); }
.kpi-warn .kpi-ic { background: var(--t-amber-bg); color: var(--t-amber-fg); }

/* Sekmeler */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--border); scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs [role=tab] {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; white-space: nowrap; color: var(--muted-fg);
  font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tabs [role=tab]:hover { color: var(--fg); text-decoration: none; }
.tabs [role=tab][aria-selected=true] { color: var(--primary); border-bottom-color: var(--primary); }
.tab-n { font-size: .72rem; background: var(--muted); color: var(--muted-fg); border-radius: 10px; padding: 1px 7px; }
[role=tabpanel] { scroll-margin-top: 80px; }
[role=tabpanel][hidden] { display: none; }

.socials { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; min-height: 32px; padding: 0 12px; border-radius: 999px; background: var(--muted);
  color: var(--fg); font-size: .85rem; border: 1px solid transparent; cursor: pointer; font-family: inherit;
}
.chip:hover { border-color: var(--border-strong); text-decoration: none; }
.chip .i { width: 14px; height: 14px; color: var(--muted-fg); }
.chip b { color: var(--primary); }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.pills { display: flex; gap: 6px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--fg); font-size: .88rem; font-weight: 500; background: var(--card); }
.pill:hover { text-decoration: none; background: var(--muted); }
.pill.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* Kişiler / hesaplar / konuşma */
.people, .accounts, .convo, .audit, .stops, .pick-list, .seg-list, .criteria, .bullets { list-style: none; margin: 0; padding: 0; }
.person, .account { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--border); }
.person:first-child, .account:first-child { border-top: 0; padding-top: 0; }
.person-main, .account-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.person-main .i { width: 14px; height: 14px; vertical-align: -2px; }
.kv { display: flex; align-items: center; gap: 8px; font-size: .88rem; flex-wrap: wrap; }
.kv > .muted { width: 64px; flex: none; }
.icon-btn.is-copied { color: var(--t-green-fg); background: var(--t-green-bg); }
.convo { display: flex; flex-direction: column; gap: 10px; }
.convo-item { max-width: 85%; padding: 10px 14px; border-radius: 14px; background: var(--muted); }
.convo-gelen { align-self: flex-start; border-top-left-radius: 4px; }
.convo-giden { align-self: flex-end; background: var(--primary-soft); border-top-right-radius: 4px; }
.convo-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.convo-item p { margin: 0; }
.tl-meta { margin-top: 6px; }
.audit { display: flex; flex-direction: column; }
.audit-item { display: flex; gap: 10px; padding: 10px 0; border-top: 1px solid var(--border); font-size: .9rem; }
.audit-item:first-child { border-top: 0; }
.audit-op { color: var(--primary); font-weight: 500; }
.changes { margin: 4px 0; padding-left: 16px; font-size: .82rem; }
.changes s { color: var(--muted-fg); }

/* Toplu işlem */
.bulk-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 14px; position: sticky; top: 68px; z-index: 10; border-color: var(--primary); margin-bottom: 12px; }
.bulk-bar[hidden] { display: none; }
.bulk-bar input, .bulk-bar select { width: auto; min-height: 36px; flex: 1 1 140px; }
.td-check { width: 40px; }
.td-check input { width: 18px; height: 18px; min-height: 18px; accent-color: var(--primary); }

/* Yapay zekâ */
.ai-running { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--primary-soft); color: var(--primary); font-weight: 500; margin: 8px 0; }
.dots { display: inline-flex; gap: 4px; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: blink 1.2s infinite both; }
.dots i:nth-child(2) { animation-delay: .2s; } .dots i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.score { display: flex; gap: 18px; align-items: center; margin-bottom: 14px; }
.score-ring {
  --c: var(--t-blue); width: 92px; height: 92px; flex: none; border-radius: 50%; display: grid; place-content: center; text-align: center;
  background: radial-gradient(closest-side, var(--card) 78%, transparent 80% 100%), conic-gradient(var(--c) calc(var(--p) * 1%), var(--muted) 0);
}
.score-ring b { font-size: 1.7rem; line-height: 1; } .score-ring span { font-size: .72rem; color: var(--muted-fg); }
.score-green { --c: var(--t-green); } .score-amber { --c: var(--t-amber); } .score-red { --c: var(--t-red); }
.criteria { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.criteria li { display: grid; grid-template-columns: 150px 1fr 48px; gap: 10px; align-items: center; font-size: .88rem; }
.criteria b { text-align: right; }
.progress { display: inline-block; width: 100%; min-width: 60px; height: 8px; background: var(--muted); border-radius: 4px; overflow: hidden; vertical-align: middle; }
.progress-fill { display: block; height: 100%; border-radius: 4px; }
.bullets { display: flex; flex-direction: column; gap: 4px; }
.bullets li { position: relative; padding-left: 16px; }
.bullets li::before { content: ""; position: absolute; left: 2px; top: .6em; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.small-h { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted-fg); margin-bottom: 6px; }
.grid-2.tight { gap: 16px; margin-bottom: 12px; }
.draft { background: var(--muted); border-radius: var(--radius-sm); padding: 14px; }
.draft textarea { background: var(--card); }
.md { line-height: 1.6; overflow-wrap: anywhere; }
.md h2, .md h3, .md h4 { margin: 18px 0 8px; font-size: 1.02rem; }
.md h2:first-child, .md h3:first-child { margin-top: 8px; }
.md p { margin: 6px 0; }
.md ul, .md ol { margin: 6px 0; padding-left: 22px; }
.md li { margin: 3px 0; }
.md-table { overflow-x: auto; margin: 8px 0; }
.md table { border-collapse: collapse; font-size: .88rem; width: 100%; }
.md th, .md td { border: 1px solid var(--border); padding: 6px 10px; text-align: left; }
.md th { background: var(--muted); }

/* Sohbet */
.chat { display: flex; flex-direction: column; padding: 0; height: calc(100vh - 230px); min-height: 440px; }
.chat-log { flex: 1; overflow-y: auto; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.msg { display: flex; }
.msg-user { justify-content: flex-end; }
.bubble { max-width: min(760px, 88%); padding: 12px 16px; border-radius: 16px; background: var(--muted); }
.msg-user .bubble { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.msg-ai .bubble { border-bottom-left-radius: 4px; }
.is-thinking .bubble { color: var(--muted-fg); display: flex; align-items: center; gap: 10px; }
.chat-empty { margin: auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--muted-fg); }
.chat-empty > .i { width: 36px; height: 36px; color: var(--primary); }
.chat-empty h3 { color: var(--fg); }
.suggest { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 620px; }
.chat-form { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--border); align-items: flex-end; }
.chat-form textarea { min-height: 48px; max-height: 200px; resize: vertical; }
.chat-form .btn { min-height: 48px; min-width: 52px; }

/* Takvim */
.cal-card { padding: 0; overflow: hidden; }
.cal-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.cal-head h2 { min-width: 150px; text-align: center; font-size: 1.1rem; }
.cal-legend { display: flex; gap: 12px; margin-left: auto; flex-wrap: wrap; color: var(--muted-fg); }
.cal-legend span { display: inline-flex; align-items: center; gap: 5px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.cal-dow { padding: 8px; font-size: .75rem; font-weight: 600; text-transform: uppercase; color: var(--muted-fg); background: var(--muted); text-align: center; }
.cal-day { min-height: 118px; padding: 6px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-day:nth-child(7n) { border-right: 0; }
.cal-day.is-empty { background: color-mix(in srgb, var(--muted) 40%, transparent); }
.cal-day.is-past .cal-num { color: var(--muted-fg); }
.cal-num { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; font-size: .85rem; font-weight: 600; color: var(--fg); align-self: flex-end; }
.cal-num:hover { background: var(--muted); text-decoration: none; }
.is-today .cal-num { background: var(--primary); color: #fff; }
.cal-item { display: block; font-size: .74rem; line-height: 1.3; padding: 3px 6px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-left: 3px solid; }
.cal-item:hover { text-decoration: none; filter: brightness(.96); }
.cal-green { background: var(--t-green-bg); color: var(--t-green-fg); border-color: var(--t-green); }
.cal-red { background: var(--t-red-bg); color: var(--t-red-fg); border-color: var(--t-red); }
.cal-blue { background: var(--t-blue-bg); color: var(--t-blue-fg); border-color: var(--t-blue); }
.cal-amber { background: var(--t-amber-bg); color: var(--t-amber-fg); border-color: var(--t-amber); }
.cal-purple { background: var(--t-purple-bg); color: var(--t-purple-fg); border-color: var(--t-purple); }
.cal-more { font-size: .72rem; color: var(--muted-fg); padding-left: 4px; }

/* Segment / rapor / hedef */
.seg-list { display: flex; flex-direction: column; gap: 2px; }
.seg-list a, .seg-row { display: grid; grid-template-columns: minmax(110px, 180px) 1fr auto; gap: 12px; align-items: center; padding: 8px; border-radius: var(--radius-sm); color: var(--fg); }
.seg-list a:hover { background: var(--muted); text-decoration: none; }
.seg-label { display: flex; align-items: center; gap: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg-n { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; min-width: 90px; }
.table-scroll { overflow-x: auto; }
.table-plain th, .table-plain td { white-space: nowrap; }
.table-plain .avatar.sm { vertical-align: middle; margin-right: 4px; }
.table-plain .progress { width: 80px; }
.bars-6 { grid-template-columns: repeat(6, 1fr); height: 170px; }
.target-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.target { background: var(--muted); border-radius: var(--radius-sm); padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.target-top { display: flex; justify-content: space-between; gap: 8px; font-size: .88rem; }
.prim-total { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.2; }
.prim-total b { font-size: 1.3rem; color: var(--t-green-fg); }
.card-head h2 .avatar { vertical-align: middle; margin-right: 4px; }
.form-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span-4 { grid-column: 1 / -1; }

/* Rut */
.stops { display: flex; flex-direction: column; margin-bottom: 12px; }
.stop { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid var(--border); }
.stop:first-child { border-top: 0; }
.stop-n { width: 32px; height: 32px; border-radius: 50%; background: var(--primary); color: #fff; display: grid; place-items: center; font-weight: 700; flex: none; }
.stop-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.pick-list { display: flex; flex-direction: column; margin: 12px 0; max-height: 560px; overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.pick { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--border); cursor: pointer; }
.pick-list li:first-child .pick { border-top: 0; }
.pick:hover { background: var(--muted); }
.pick input { width: 20px; height: 20px; min-height: 20px; accent-color: var(--primary); flex: none; }
.pick-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pick-why { color: var(--t-amber-fg); }
.pick-score { font-weight: 700; color: var(--primary); min-width: 32px; text-align: right; }
[data-route-maps][aria-disabled=true] { opacity: .5; pointer-events: none; }

/* İçe / dışa aktarma */
.form-wide { max-width: none; }
.upload-card { display: flex; flex-direction: column; gap: 14px; }
.dropzone {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 200px; padding: 24px; text-align: center;
  border: 2px dashed var(--border-strong); border-radius: var(--radius); cursor: pointer; transition: border-color .15s, background-color .15s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--primary); background: var(--primary-soft); }
.dropzone > .i { width: 36px; height: 36px; color: var(--primary); }
.dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.dropzone:focus-within { outline: 2px solid var(--ring); outline-offset: 2px; }
.import-table select { min-width: 150px; font-size: .85rem; min-height: 36px; padding: 4px 8px; }
.import-table td { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.export-item { display: flex; gap: 14px; align-items: center; color: var(--fg); }
.export-item:hover { border-color: var(--primary); text-decoration: none; }
.export-item > .i { width: 26px; height: 26px; color: var(--primary); }

.row.is-new { background: color-mix(in srgb, var(--danger-soft) 50%, transparent); margin: 0 -8px; padding-left: 8px; padding-right: 8px; border-radius: var(--radius-sm); }

@media (max-width: 1100px) {
  .target-grid, .form-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 820px) {
  .topbar { padding: 8px 12px; gap: 8px; }
  .menu-btn { display: inline-grid; }
  .topbar-brand { display: flex; }
  .topbar-brand span:last-child { display: none; }
  .top-search { flex: 1; }
  .sidebar {
    display: flex; position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); height: 100%; z-index: 50; transform: translateX(-105%);
    transition: transform .22s ease-out; box-shadow: 0 0 40px rgb(0 0 0 / .25); padding-bottom: calc(20px + env(safe-area-inset-bottom));
  }
  .sidebar.is-open { transform: none; }
  .drawer-close { display: inline-grid; }
  .drawer-backdrop { position: fixed; inset: 0; background: rgb(15 23 42 / .45); z-index: 45; }
  .drawer-backdrop[hidden] { display: none; }
  .bottom-nav .bn-link { background: none; border: 0; font: inherit; font-size: .7rem; cursor: pointer; }
  .bulk-bar { top: 64px; }
  .table .td-check { position: absolute; top: 16px; left: 12px; width: auto; padding: 0 !important; }
  .table .td-check::before { display: none; }
  .table td[data-l="Firma"] { padding-left: 28px; }
  .convo-item { max-width: 95%; }
  .criteria li { grid-template-columns: 110px 1fr 40px; }
  .chat { height: calc(100vh - 260px); }
  .cal-day { min-height: 64px; padding: 3px; }
  .cal-item { font-size: 0; padding: 0; height: 6px; border-left: 0; border-radius: 3px; }
  .cal-more { font-size: .6rem; }
  .cal-num { width: 24px; height: 24px; font-size: .75rem; align-self: center; }
  .cal-legend { margin-left: 0; width: 100%; }
  .seg-list a, .seg-row { grid-template-columns: 100px 1fr auto; }
  .kv > .muted { width: 52px; }
  .toasts { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .notif-panel { position: fixed; top: 64px; right: 8px; left: 8px; width: auto; }
}
@media (max-width: 520px) {
  .target-grid, .form-grid-4 { grid-template-columns: 1fr; }
}
@media print {
  .sidebar, .topbar, .bottom-nav, .page-actions, .toasts, .filters { display: none !important; }
  .shell { display: block; } .main { padding: 0; }
  .card { break-inside: avoid; box-shadow: none; }
}

/* Özel gün "+" butonu */
.summary-btn { list-style: none; }
.summary-btn::before { display: none; }
.summary-btn .btn { pointer-events: none; }
details[open] > .summary-btn .btn { background: var(--muted); color: var(--fg); }
select:disabled { opacity: .6; cursor: not-allowed; }

/* Mobil uygulama (PWA) */
.install-btn { margin-top: 4px; }
.notif-push { border-bottom: 1px solid var(--border); gap: 8px; color: var(--muted-fg); }
.notif-push .i { width: 16px; height: 16px; }
[data-push-btn].is-on { color: var(--t-green-fg); }
@media (display-mode: standalone) {
  .install-btn { display: none; }
  .topbar { padding-top: max(8px, env(safe-area-inset-top)); }
}
