/* COSMIQ CRM — tasarım dokümanındaki değerlerden türetilmiş token'lar */
:root {
  --bg: #F7F8FA;
  --surface: #FFFFFF;
  --surface-2: #F9FAFB;
  --column: #F1F3F6;
  --border: #E6E8EC;
  --border-strong: #D5D9E0;
  --border-row: #F0F1F4;
  --border-dashed: #C3C9D2;
  --text: #111827;
  --text-2: #1F2937;
  --text-3: #374151;
  --muted: #4B5563;
  --faint: #6B7280;
  --primary: #2563EB;
  --primary-soft: #EEF3FF;
  --primary-text: #1D4ED8;
  --primary-deep: #1E3A8A;
  --primary-tint: #F5F8FF;
  --danger: #B42318;
  --danger-soft: #FDECEC;
  --success: #15803D;
  --warn-soft: #FFF8EB;
  --warn-border: #FDE7C2;
  --ink: #0F172A;
  --radius: 12px;
  --radius-sm: 8px;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
a { color: var(--primary-text); text-decoration: none; }
a:hover { color: var(--primary-deep); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3 { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.nowrap { white-space: nowrap; }
.strong { font-weight: 600; }
.right { text-align: right; }
.grow { flex: 1; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; }
.row.wrap { flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ml-auto { margin-left: auto; }
.link-btn { border: 0; background: transparent; padding: 0; color: var(--primary-text); font-size: 13px; font-weight: 500; }
.link-btn:hover { color: var(--primary-deep); }
.link-btn.danger { color: var(--danger); }

/* ---------- Kabuk ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 240px; flex: none; background: var(--surface); border-right: 1px solid var(--border);
  padding: 22px 14px; display: flex; flex-direction: column; gap: 24px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.brand { padding: 0 10px; display: flex; align-items: center; gap: 10px; color: inherit; }
.brand:hover { color: inherit; }
.brand img { width: 34px; height: 34px; flex: none; }
.brand > span { display: flex; flex-direction: column; gap: 2px; }
.brand b { font-size: 20px; font-weight: 700; letter-spacing: 0.06em; color: var(--ink); }
.brand span { font-size: 12px; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 0 10px; border-radius: 8px;
  color: var(--text-3); font-size: 14px;
}
.nav a:hover { background: var(--surface-2); color: var(--text); }
.nav a[aria-current="page"] { background: var(--primary-soft); color: var(--primary-text); font-weight: 600; }
.nav a .count { margin-left: auto; font-size: 12px; color: var(--muted); font-weight: 400; }
.nav-bottom { margin-top: auto; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 14px 28px;
  background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20;
}
.topbar .search-wrap { position: relative; flex: 1 1 280px; max-width: 460px; }
.topbar input[type=search] {
  width: 100%; height: 40px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg);
  padding: 0 14px; font-size: 14px;
}
.topbar .actions { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.topbar .menu-btn { display: none; }

.page { display: flex; flex-direction: column; gap: 16px; padding: 24px 28px 40px; min-width: 0; }
.page-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; }
.page-head .titles { display: flex; flex-direction: column; gap: 4px; }
.page-head .titles.inline { flex-direction: row; align-items: baseline; gap: 10px; }
.title { font-size: 22px; font-weight: 700; }
.subtitle { font-size: 14px; color: var(--muted); }
.crumbs { font-size: 13px; color: var(--muted); }

/* ---------- Butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 14px;
  border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text);
  font-size: 14px; font-weight: 500; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); color: var(--text); }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; padding: 0 16px; }
.btn.primary:hover { background: #1D4ED8; }
.btn.soft { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-text); font-weight: 600; }
.btn.danger { color: var(--danger); }
.btn.sm { height: 36px; font-size: 13px; padding: 0 12px; }
.btn.xs { height: 32px; font-size: 12px; padding: 0 12px; }
.btn.dashed { border: 1px dashed var(--border-dashed); background: transparent; color: var(--text-3); font-size: 13px; }
.btn.ghost { border: 0; background: transparent; color: var(--primary-text); font-weight: 600; font-size: 13px; }
.btn:disabled { opacity: .55; cursor: default; }
.icon-btn {
  width: 36px; height: 36px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
  color: var(--text-3); display: inline-flex; align-items: center; justify-content: center;
}
.chip {
  height: 34px; padding: 0 12px; border-radius: 17px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); font-size: 13px;
}
.chip.on, .tabbtn.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-text); font-weight: 600; }
.tabbtn {
  height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface);
  color: var(--text-2); font-size: 13px;
}
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 8px; overflow: hidden; }
.seg > * {
  display: inline-flex; align-items: center; height: 38px; padding: 0 14px; background: var(--surface);
  color: var(--text-3); font-size: 13px; border: 0;
}
.seg > .on { background: var(--primary-soft); color: var(--primary-text); font-weight: 600; }

/* ---------- Form öğeleri ---------- */
.input, .select {
  height: 36px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); padding: 0 12px;
  font-size: 13px; color: var(--text);
}
.select { background: var(--surface); padding: 0 8px; }
.input.white { background: var(--surface); }

/* ---------- Kartlar ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); min-width: 0; }
.card.pad { padding: 20px; }
.card.pad-sm { padding: 16px 18px; }
.card > h2, .card-title { font-size: 15px; font-weight: 600; }
.card h2.sm, .card-title.sm { font-size: 14px; }
.card .head { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.card-foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 16px; border-top: 1px solid var(--border); font-size: 13px; color: var(--muted);
}
.grid-auto { display: grid; gap: 16px; }
.list { list-style: none; margin: 0; padding: 0; }
.list > li { border-top: 1px solid var(--border-row); }
.section-label { font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.empty { padding: 18px; font-size: 13px; color: var(--muted); text-align: center; }

/* ---------- Tablo ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { background: var(--surface-2); text-align: left; color: var(--text-3); font-weight: 600; padding: 12px 10px; white-space: nowrap; }
.table td { padding: 10px; border-top: 1px solid var(--border-row); color: var(--text-3); vertical-align: middle; }
.table th:first-child, .table td:first-child { padding-left: 16px; }
.table th:last-child, .table td:last-child { padding-right: 16px; }
.table tr.sel td { background: var(--primary-tint); }
.table tbody tr:hover td { background: #FAFBFC; }
.table .name-link { font-weight: 600; color: var(--text); }
.table .name-link:hover { color: var(--primary-text); }
.table th.sortable { padding-top: 0; padding-bottom: 0; }
.table .th-btn {
  display: inline-flex; align-items: center; gap: 4px; padding: 12px 0; border: 0; background: none;
  font: inherit; color: inherit; white-space: nowrap; cursor: pointer;
}
.table .th-btn:hover, .table th.on .th-btn { color: var(--text); }
.table .sort-ind { font-size: 11px; color: var(--faint, #9CA3AF); }
.table th.on .sort-ind { color: var(--primary-text); }
.table .th-btn .caret { font-size: 10px; color: var(--muted); }
.table th.filtered .th-btn { color: var(--primary-text); }
.table .filter-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
/* Sağdaki Sorumlu kolonu taşmasın: içeriği kadar yer kaplar, uzun e-postalar alt satıra iner */
.table td.owner-col, .table th.owner-col { width: 1%; white-space: nowrap; }
.table td.contact-info { max-width: 230px; overflow-wrap: anywhere; font-size: 12px; line-height: 1.5; }
.table td.num { font-variant-numeric: tabular-nums; }
.due-late { color: var(--danger); font-weight: 600; }
.due-today { color: var(--primary-text); font-weight: 600; }
.net-facts { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.net-facts dt { font-size: 12px; color: var(--muted); }
.net-facts dd { margin: 2px 0 0; font-size: 14px; color: var(--text); word-break: break-word; }
.note-box { margin: 0; font-size: 14px; line-height: 1.6; color: var(--text-2); white-space: pre-line; }
.cb { width: 18px; height: 18px; accent-color: var(--primary); }

/* ---------- Rozetler & avatarlar ---------- */
.pill { display: inline-block; font-size: 12px; font-weight: 500; padding: 3px 9px; border-radius: 12px; white-space: nowrap; }
.pill.sm { font-size: 11px; padding: 2px 8px; border-radius: 10px; }
.pill.lg { padding: 5px 10px; }
.c-blue { background: #EEF3FF; color: #1D4ED8; }
.c-purple { background: #F3EEFF; color: #6D28D9; }
.c-green { background: #E7F7EE; color: #166534; }
.c-amber { background: #FFF4E5; color: #9A4A00; }
.c-yellow { background: #FEF3C7; color: #92400E; }
.c-red { background: #FDECEC; color: #B42318; }
.c-sky { background: #E0F2FE; color: #075985; }
.c-slate { background: #F1F5F9; color: #334155; }
.c-indigo { background: #E0E7FF; color: #3730A3; }
.c-teal { background: #CCFBF1; color: #115E59; }
.c-pink { background: #FCE7F3; color: #9D174D; }
.c-white { background: #FFFFFF; color: #4B5563; }
.av {
  border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; flex: none;
  width: 34px; height: 34px; font-size: 12px;
}
.av.sq { border-radius: 8px; font-weight: 700; }
.av.s26 { width: 26px; height: 26px; font-size: 11px; }
.av.s30 { width: 30px; height: 30px; font-size: 11px; }
.av.s32 { width: 32px; height: 32px; }
.av.s36 { width: 36px; height: 36px; font-size: 13px; }
.av.s44 { width: 44px; height: 44px; border-radius: 10px; }
.av.s52 { width: 52px; height: 52px; border-radius: 12px; font-size: 18px; }
.av.gray { background: #E5E7EB; color: #1F2937; }
.owner { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }

/* ---------- Dashboard ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.kpi {
  display: flex; justify-content: space-between; gap: 12px; padding: 18px 20px; background: var(--surface);
  border: 1px solid var(--border); border-radius: 12px; color: var(--text);
}
.kpi:hover { border-color: var(--border-strong); color: var(--text); }
.kpi .label { font-size: 13px; color: var(--muted); }
.kpi .value { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; }
.kpi .delta { font-size: 12px; font-weight: 600; color: var(--success); }
.bars { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; align-items: end; height: 200px; border-bottom: 1px solid var(--border); }
.bars > div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.bars .bar { width: 70%; max-width: 44px; border-radius: 6px 6px 0 0; min-height: 2px; }
.bar-labels { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; text-align: center; }
.bar-labels span { display: block; }
.donut { width: 160px; height: 160px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.donut > div { width: 96px; height: 96px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.upcoming li { display: grid; grid-template-columns: 48px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; }
.upcoming .what { display: flex; flex-direction: column; gap: 2px; min-width: 0; padding-left: 10px; border-left: 2px solid #BFDBFE; }
.task-li { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.task-li label { flex: 1; display: flex; flex-direction: column; gap: 2px; cursor: pointer; min-width: 0; }
.is-done { text-decoration: line-through; color: var(--faint); }
.late { color: var(--danger); font-weight: 600; }

/* ---------- Kayıt sayfası ---------- */
.record { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.record > .side { flex: 1 1 280px; max-width: 100%; display: flex; flex-direction: column; gap: 14px; }
.record > .center { flex: 999 1 420px; min-width: 0; }
.quick-actions { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.quick-actions button {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 0; border: 0; background: transparent;
  font-size: 11px; color: var(--text-3);
}
.quick-actions .circle {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border-strong); display: flex;
  align-items: center; justify-content: center; color: var(--primary-text);
}
.quick-actions button:hover .circle { background: var(--primary-soft); border-color: var(--primary); }
.props { margin: 0; display: flex; flex-direction: column; }
.props > div { display: flex; flex-direction: column; gap: 3px; padding: 9px 0; border-top: 1px solid var(--border-row); }
.props dt { font-size: 12px; color: var(--muted); }
.props dd { margin: 0; font-size: 14px; color: var(--text); word-break: break-word; }
.tabs { display: flex; gap: 4px; padding: 0 18px; border-bottom: 1px solid var(--border); overflow-x: auto; }
.tabs button {
  height: 48px; padding: 0 12px; border: 0; border-bottom: 2px solid transparent; background: transparent;
  font-size: 14px; color: var(--text-3); white-space: nowrap;
}
.tabs button.on { border-bottom-color: var(--primary); color: var(--text); font-weight: 600; }
.highlights { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.highlights > div { padding: 14px; border: 1px solid var(--border); border-radius: 10px; display: flex; flex-direction: column; gap: 4px; }
.highlights .k { font-size: 12px; color: var(--muted); }
.highlights .v { font-size: 18px; font-weight: 700; }
.callout { padding: 14px 16px; border-radius: 10px; background: var(--warn-soft); border: 1px solid var(--warn-border); display: flex; gap: 12px; }
.callout .label { font-size: 12px; font-weight: 600; color: #92400E; }
.event {
  display: flex; gap: 12px; padding: 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
}
.event.upcoming-ev { border-color: var(--warn-border); background: var(--warn-soft); }
.event .ic { width: 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex: none; }
.event .body { flex: 1; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.event .ev-actions { display: flex; gap: 10px; opacity: 0; transition: opacity .15s; }
.event:hover .ev-actions { opacity: 1; }
.mini-card {
  display: flex; align-items: center; gap: 10px; padding: 8px; border: 1px solid var(--border-row); border-radius: 8px; color: var(--text);
}
.mini-card:hover { border-color: var(--border-strong); color: var(--text); }
.deal-mini { display: flex; flex-direction: column; gap: 6px; padding: 12px; border: 1px solid var(--border-row); border-radius: 8px; color: var(--text); }
.deal-mini:hover { border-color: var(--border-strong); color: var(--text); }
.chain { margin: 0; font-size: 13px; line-height: 1.7; color: var(--text-2); }

/* ---------- Fırsat panosu ---------- */
.board-scroll { overflow-x: auto; padding-bottom: 8px; }
.board { display: grid; grid-auto-flow: column; gap: 10px; align-items: start; }
.board.six { grid-auto-columns: minmax(190px, 1fr); }
.board.eight { grid-auto-columns: 236px; }
.col { display: flex; flex-direction: column; gap: 8px; background: var(--column); border-radius: 12px; padding: 8px; min-height: 620px; }
.col.drop { outline: 2px dashed var(--primary); outline-offset: -2px; background: #E9EEF8; }
.col-head { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 8px; }
.col-head.row-head { flex-direction: row; justify-content: space-between; align-items: center; }
.col-head h2 { font-size: 13px; font-weight: 600; }
.deal-card {
  display: flex; flex-direction: column; gap: 6px; padding: 12px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; color: var(--text); cursor: grab;
}
.deal-card:hover { border-color: var(--border-strong); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.deal-card.dragging { opacity: .5; }
.deal-card .next { font-size: 12px; color: var(--text-2); padding: 6px 8px; border-radius: 6px; background: var(--warn-soft); }
.deal-card .foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.deal-card .foot.line { border-top: 1px solid var(--border-row); padding-top: 8px; }

/* ---------- Takvim ---------- */
.cal { display: grid; column-gap: 6px; min-width: 820px; position: relative; }
.cal .day-head { display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 8px; color: var(--text-3); }
.cal .day-head.today { background: var(--primary); color: #fff; }
.cal .hour { font-size: 11px; color: var(--muted); padding-top: 2px; }
.cal .today-col { background: var(--primary-tint); border-radius: 6px; }
.cal .ev {
  margin: 1px 0; padding: 4px 8px; border-radius: 6px; overflow: hidden; display: flex; flex-direction: column; gap: 1px;
  font-size: 11px; line-height: 1.3; z-index: 1; cursor: pointer;
}
.cal .ev b { font-size: 12px; font-weight: 600; }
.cal .ev.done { opacity: .55; text-decoration: line-through; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--text-3); }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ---------- Network ---------- */
.net-item {
  width: 100%; min-height: 60px; display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px;
  border: 1px solid transparent; background: transparent; text-align: left;
}
.net-item:hover { background: var(--surface-2); }
.net-item.on { border-color: var(--primary); background: var(--primary-tint); }
.funnel { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; }
.funnel > div { padding: 14px; border: 1px solid var(--border); border-radius: 10px; display: flex; flex-direction: column; gap: 6px; }
.funnel .track { height: 6px; background: #EEF0F3; border-radius: 3px; overflow: hidden; }
.funnel .track > div { height: 100%; }
.map-wrap { overflow: auto; }
.map { position: relative; }
.map .node {
  position: absolute; height: 56px; padding: 8px 12px; display: flex; align-items: center; gap: 8px; border-radius: 10px;
  font-size: 13px; line-height: 17px; background: #fff; color: var(--text); border: 1px solid #E2E5EA; cursor: pointer;
  overflow: hidden; text-align: left;
}
.map .node b { font-weight: 600; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map .node small { font-size: 12px; color: var(--muted); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.map .node.root { background: var(--ink); color: #fff; border: 0; }
.map .node.root small { color: #CBD5E1; }
.map .node.net { background: #F3EEFF; color: #4C1D95; border-color: #DDD6FE; }
.map .node.sel { border: 2px solid var(--primary); }
.map .node.dim { opacity: .35; }
.map .col-label { position: absolute; top: 8px; font-size: 12px; font-weight: 600; letter-spacing: .06em; color: var(--muted); }
.map svg { position: absolute; left: 0; top: 0; pointer-events: none; overflow: visible; }

/* ---------- İçe aktarma ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; }
.steps li { display: flex; flex-direction: column; gap: 8px; }
.steps .bar { height: 4px; border-radius: 2px; background: var(--border); }
.steps .bar.on { background: var(--primary); }
.steps button { display: flex; align-items: center; gap: 8px; padding: 0; border: 0; background: transparent; text-align: left; min-height: 44px; }
.steps .num { flex: none; width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; background: var(--column); color: var(--text-3); }
.steps .num.on { background: var(--primary); color: #fff; }
.obj-btn {
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start; padding: 14px; border-radius: 10px; text-align: left;
  border: 1px solid var(--border); background: var(--surface);
}
.obj-btn.on { border: 2px solid var(--primary); background: #F8FAFF; }
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 240px;
  border: 2px dashed #BFCBE3; border-radius: 12px; background: #F8FAFF; cursor: pointer; text-align: center; padding: 24px;
}
.dropzone.over { border-color: var(--primary); background: var(--primary-soft); }
.stat-box { padding: 16px; border-radius: 10px; display: flex; flex-direction: column; gap: 4px; }
.stat-box .v { font-size: 26px; font-weight: 700; }
.stat-box .l { font-size: 12px; }
.issue-row { display: grid; grid-template-columns: 80px 1fr auto; gap: 12px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--border-row); font-size: 13px; }
.opt-row { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; cursor: pointer; }

/* ---------- Modal, menü, bildirim ---------- */
.backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .4); display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px; z-index: 100; overflow-y: auto; }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 640px; box-shadow: 0 20px 50px rgba(0,0,0,.2); display: flex; flex-direction: column; }
.modal.wide { max-width: 860px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.modal-head h2 { font-size: 17px; font-weight: 700; }
.modal-body { padding: 18px 22px; display: flex; flex-direction: column; gap: 14px; }
.modal-foot { display: flex; justify-content: space-between; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--border); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 14px; }
.field { display: flex; flex-direction: column; gap: 5px; grid-column: span 2; }
.field.half { grid-column: span 1; }
.field label { font-size: 12px; font-weight: 600; color: var(--text-3); }
.field input, .field select, .field textarea {
  height: 38px; border: 1px solid var(--border-strong); border-radius: 8px; padding: 0 10px; font-size: 14px; background: #fff;
}
.field textarea { height: auto; min-height: 90px; padding: 8px 10px; resize: vertical; line-height: 1.5; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus, .select:focus { outline: 2px solid #BFDBFE; border-color: var(--primary); }
.field.check { flex-direction: row; align-items: center; gap: 8px; }
.field .hint { font-size: 12px; color: var(--muted); }
.form-error { padding: 10px 12px; border-radius: 8px; background: var(--danger-soft); color: var(--danger); font-size: 13px; }
.dropdown {
  position: absolute; top: calc(100% + 6px); right: 0; min-width: 200px; background: #fff; border: 1px solid var(--border);
  border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,.12); padding: 6px; z-index: 50; display: flex; flex-direction: column;
}
.dropdown.left { left: 0; right: auto; }
.dropdown.floating { position: fixed; top: auto; right: auto; z-index: 200; overflow-y: auto; max-width: calc(100vw - 16px); }
.dropdown button, .dropdown a {
  display: flex; align-items: center; gap: 10px; text-align: left; border: 0; background: transparent; padding: 9px 10px;
  border-radius: 6px; font-size: 14px; color: var(--text);
}
.dropdown button:hover, .dropdown a:hover, .dropdown .active { background: var(--surface-2); color: var(--text); }
.dropdown .group { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px 4px; }
.dropdown .sub { font-size: 12px; color: var(--muted); }
.search-results { left: 0; right: 0; max-height: 70vh; overflow-y: auto; }
.search-results a { flex-direction: column; align-items: flex-start; gap: 1px; }
.toasts { position: fixed; bottom: 18px; right: 18px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 10px; font-size: 13px; box-shadow: 0 8px 24px rgba(0,0,0,.2); max-width: 380px; }
.toast.error { background: var(--danger); }
.loading { padding: 40px; text-align: center; color: var(--muted); }

/* ---------- Giriş ---------- */
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.login { width: 100%; max-width: 380px; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 28px; display: flex; flex-direction: column; gap: 16px; }
.login .login-logo { width: 150px; align-self: center; margin-bottom: 4px; }

/* ---------- Duyarlı ---------- */
@media (max-width: 960px) {
  .sidebar { position: fixed; left: 0; top: 0; z-index: 90; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.15); }
  .sidebar.open { transform: none; }
  .topbar .menu-btn { display: inline-flex; }
  .page { padding: 18px 16px 32px; }
  .topbar { padding: 12px 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .field.half { grid-column: span 2; }
}
