@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

/* ── DARK THEME (default) ── */
:root, [data-theme="dark"] {
  --bg-page:    #0A1628;
  --bg-surface: #0D1B2A;
  --bg-surface2:#1B2E45;
  --bg-content: #0F1E30;
  --border:     rgba(255,255,255,0.07);
  --border2:    rgba(255,255,255,0.12);
  --text:       #FFFFFF;
  --text-muted: rgba(255,255,255,0.4);
  --text-faint: rgba(255,255,255,0.25);
  --nav-text:   rgba(255,255,255,0.6);
  --nav-sec:    rgba(255,255,255,0.3);
  --nav-active-bg: rgba(2,192,154,0.12);
  --hover-bg:   rgba(255,255,255,0.05);
  --hover-bg2:  rgba(255,255,255,0.1);
  --input-bg:   rgba(255,255,255,0.06);
  --input-ph:   rgba(255,255,255,0.3);
  --card-bg:    #0D1B2A;
  --stat-bg:    #0D1B2A;
  --tbl-hover:  rgba(255,255,255,0.03);
  --tbl-alt:    rgba(255,255,255,0.02);
  --tbl-th:     rgba(255,255,255,0.35);
  --tbl-border: rgba(255,255,255,0.05);
  --progress-track: rgba(255,255,255,0.08);
  --chip-bg:    rgba(255,255,255,0.06);
  --chip-border:rgba(255,255,255,0.1);
  --drag-bg:    rgba(255,255,255,0.04);
  --drag-border:rgba(255,255,255,0.08);
  --k-count-bg: rgba(255,255,255,0.1);
  --tl-line:    rgba(255,255,255,0.1);
  --scrollbar:  rgba(255,255,255,0.1);
  --sb-notch:   #1a2a3a;
  --sb-pill:    #0A1628;
  --action-bg:  rgba(255,255,255,0.04);
  --action-border:rgba(255,255,255,0.1);
  --action-hover:rgba(255,255,255,0.1);
  --mob-card-bg:rgba(255,255,255,0.05);
  --mob-card-border:rgba(255,255,255,0.08);
  --mob-sep:    rgba(255,255,255,0.07);
  --mob-input-bg:rgba(255,255,255,0.06);
  --mob-input-border:rgba(255,255,255,0.12);
  --mob-otp-bg: rgba(255,255,255,0.06);
  --mob-otp-border:rgba(255,255,255,0.15);
  --phone-frame:#1a2a3a;
  --phone-bg:   #0A1628;
  --notif-bg:   rgba(255,255,255,0.06);
  --notif-dot-border: #0D1B2A;
  --stab-active-bg: #0F1E30;
  --stab-active-border: rgba(255,255,255,0.1);
  --stab-color: rgba(255,255,255,0.4);
  --stab-hover: rgba(255,255,255,0.7);
  --ghost-bg:   rgba(255,255,255,0.08);
  --ghost-border:rgba(255,255,255,0.12);
  --ghost-color:#FFFFFF;
  --toggle-sun: #F59E0B;
  --toggle-moon:#A78BFA;
  --teal: #028090;
  --teal2: #00A896;
  --mint: #02C39A;
  --amber: #F59E0B;
  --coral: #EF4444;
  --purple: #7C3AED;
  --green: #10B981;
  --sky: #0EA5E9;
  --font: 'IBM Plex Sans', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}

/* ── LIGHT THEME ── */
[data-theme="light"] {
  --bg-page:    #EEF2F7;
  --bg-surface: #FFFFFF;
  --bg-surface2:#F0F4F8;
  --bg-content: #EEF2F7;
  --border:     rgba(0,0,0,0.08);
  --border2:    rgba(0,0,0,0.14);
  --text:       #0D1B2A;
  --text-muted: rgba(0,0,0,0.45);
  --text-faint: rgba(0,0,0,0.28);
  --nav-text:   rgba(13,27,42,0.55);
  --nav-sec:    rgba(13,27,42,0.35);
  --nav-active-bg: rgba(2,128,144,0.09);
  --hover-bg:   rgba(0,0,0,0.04);
  --hover-bg2:  rgba(0,0,0,0.07);
  --input-bg:   rgba(0,0,0,0.04);
  --input-ph:   rgba(0,0,0,0.3);
  --card-bg:    #FFFFFF;
  --stat-bg:    #FFFFFF;
  --tbl-hover:  rgba(0,0,0,0.025);
  --tbl-alt:    rgba(0,0,0,0.015);
  --tbl-th:     rgba(0,0,0,0.4);
  --tbl-border: rgba(0,0,0,0.06);
  --progress-track: rgba(0,0,0,0.08);
  --chip-bg:    rgba(2,128,144,0.06);
  --chip-border:rgba(2,128,144,0.15);
  --drag-bg:    rgba(0,0,0,0.03);
  --drag-border:rgba(0,0,0,0.08);
  --k-count-bg: rgba(0,0,0,0.08);
  --tl-line:    rgba(0,0,0,0.1);
  --scrollbar:  rgba(0,0,0,0.15);
  --sb-notch:   #CBD5E1;
  --sb-pill:    #EEF2F7;
  --action-bg:  rgba(0,0,0,0.03);
  --action-border:rgba(0,0,0,0.1);
  --action-hover:rgba(0,0,0,0.08);
  --mob-card-bg:rgba(0,0,0,0.03);
  --mob-card-border:rgba(0,0,0,0.08);
  --mob-sep:    rgba(0,0,0,0.07);
  --mob-input-bg:rgba(0,0,0,0.04);
  --mob-input-border:rgba(0,0,0,0.12);
  --mob-otp-bg: rgba(0,0,0,0.04);
  --mob-otp-border:rgba(0,0,0,0.14);
  --phone-frame:#CBD5E1;
  --phone-bg:   #EEF2F7;
  --notif-bg:   rgba(0,0,0,0.05);
  --notif-dot-border:#FFFFFF;
  --stab-active-bg: #EEF2F7;
  --stab-active-border: rgba(0,0,0,0.1);
  --stab-color: rgba(0,0,0,0.4);
  --stab-hover: rgba(0,0,0,0.7);
  --ghost-bg:   rgba(0,0,0,0.05);
  --ghost-border:rgba(0,0,0,0.12);
  --ghost-color:#0D1B2A;
  --toggle-sun: #F59E0B;
  --toggle-moon:#7C3AED;
  --teal: #028090;
  --teal2: #017A8A;
  --mint: #019B7A;
  --amber: #D97706;
  --coral: #DC2626;
  --purple: #6D28D9;
  --green: #059669;
  --sky: #0284C7;
  --font: 'IBM Plex Sans', sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg-page); color: var(--text); min-height: 100vh; transition: background 0.3s, color 0.3s; }

/* ── APP SHELL ── */
.app { display: flex; height: 100vh; overflow: hidden; }

/* SIDEBAR */
.sidebar {
  width: 220px; flex-shrink: 0;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  transition: background 0.3s, border-color 0.3s;
}
.sidebar-logo {
  padding: 18px 16px 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
}
.logo-icon { width: 32px; height: 32px; background: var(--teal); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.logo-text { font-size: 13px; font-weight: 600; line-height: 1.2; color: var(--text); }
.logo-sub { font-size: 10px; color: var(--teal2); font-weight: 400; }

.nav { padding: 10px 0; flex: 1; overflow-y: auto; }
.nav-section { padding: 10px 14px 4px; font-size: 10px; font-weight: 600; color: var(--nav-sec); letter-spacing: 0.08em; text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 16px; cursor: pointer;
  font-size: 13px; color: var(--nav-text);
  border-left: 3px solid transparent;
  transition: all 0.15s;
}
.nav-item:hover { background: var(--hover-bg); color: var(--text); }
.nav-item.active { background: var(--nav-active-bg); color: var(--mint); border-left-color: var(--mint); font-weight: 500; }
.nav-item .icon { width: 18px; text-align: center; font-size: 14px; }
.badge { background: var(--coral); color: white; font-size: 10px; padding: 1px 6px; border-radius: 8px; margin-left: auto; font-weight: 600; }
.badge-amber { background: var(--amber); }
.badge-green { background: var(--green); }

.hub-status {
  margin: 0 12px 8px;
  padding: 4px 8px;
  font-size: 10px;
  border-radius: 6px;
  background: var(--surface-subtle, rgba(255,255,255,0.04));
  color: var(--text-muted);
  text-align: center;
}
.hub-status[data-state="connected"] { color: var(--mint); }
.hub-status[data-state="connecting"] { color: var(--text-muted); }
.hub-status[data-state="error"] { color: var(--amber); }

.sidebar-user {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  cursor: pointer;
}
.user-avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--teal); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex-shrink: 0; color: #fff; }
.user-name { font-size: 12px; font-weight: 500; color: var(--text); }
.user-role { font-size: 10px; color: var(--teal2); }

/* MAIN */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow: hidden; }

/* TOPBAR */
.topbar {
  height: 52px; flex-shrink: 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; padding: 0 20px;
  gap: 12px; transition: background 0.3s;
}
.topbar-title { font-size: 15px; font-weight: 600; flex: 1; color: var(--text); }
.topbar-sub { font-size: 11px; color: var(--text-muted); margin-left: 8px; font-weight: 400; }
.btn {
  padding: 6px 14px; border-radius: 6px; font-size: 12px; font-weight: 500;
  cursor: pointer; border: none; font-family: var(--font);
  transition: all 0.15s; display: inline-flex; align-items: center; gap: 6px;
}
.btn-primary { background: var(--teal); color: white; }
.btn-primary:hover { background: var(--teal2); }
.btn-ghost { background: var(--ghost-bg); color: var(--ghost-color); border: 1px solid var(--ghost-border); }
.btn-ghost:hover { background: var(--hover-bg2); }
.btn-danger { background: rgba(239,68,68,0.15); color: var(--coral); border: 1px solid rgba(239,68,68,0.3); }
.btn-sm { padding: 4px 10px; font-size: 11px; }
.notif-root { position: relative; }
.notif-btn { width: 34px; height: 34px; border-radius: 8px; background: var(--notif-bg); border: 1px solid var(--border2); display: flex; align-items: center; justify-content: center; cursor: pointer; position: relative; font-size: 14px; color: inherit; padding: 0; }
.notif-root.open .notif-btn { border-color: var(--teal2); background: rgba(2,128,144,0.12); }
.notif-dot { position: absolute; top: 5px; right: 5px; width: 7px; height: 7px; background: var(--coral); border-radius: 50%; border: 1.5px solid var(--notif-dot-border); }
.notif-panel {
  position: absolute; top: calc(100% + 8px); right: 0; width: 320px; max-height: 360px;
  background: var(--card-bg); border: 1px solid var(--border2); border-radius: 10px;
  box-shadow: 0 12px 32px rgba(0,0,0,0.25); z-index: 1200; overflow: hidden;
}
.notif-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-bottom: 1px solid var(--border);
  font-size: 12px; font-weight: 600; color: var(--text);
}
.notif-list { list-style: none; margin: 0; padding: 6px 0; max-height: 300px; overflow-y: auto; }
.notif-item { padding: 8px 12px; border-bottom: 1px solid var(--border); }
.notif-item:last-child { border-bottom: none; }
.notif-item-head { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 2px; }
.notif-item-title { font-size: 11px; font-weight: 600; color: var(--text); }
.notif-item-time { font-size: 10px; color: var(--text-muted); font-family: var(--mono); white-space: nowrap; }
.notif-item-msg { font-size: 11px; color: var(--text-muted); line-height: 1.35; }
.notif-item.notif-green .notif-item-title { color: var(--mint); }
.notif-item.notif-purple .notif-item-title { color: var(--purple); }
.notif-item.notif-teal .notif-item-title { color: var(--teal2); }
.notif-item.notif-amber .notif-item-title { color: var(--amber); }
.notif-empty { padding: 16px 12px; text-align: center; }

/* THEME TOGGLE */
.theme-toggle {
  width: 54px; height: 28px; border-radius: 14px;
  background: var(--bg-surface2); border: 1px solid var(--border2);
  cursor: pointer; position: relative; transition: all 0.3s;
  display: flex; align-items: center; padding: 3px;
  flex-shrink: 0;
}
.theme-toggle-thumb {
  width: 22px; height: 22px; border-radius: 11px;
  background: var(--teal); transition: transform 0.3s, background 0.3s;
  display: flex; align-items: center; justify-content: center; font-size: 11px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
[data-theme="light"] .theme-toggle-thumb { transform: translateX(26px); background: var(--amber); }
.theme-label { font-size: 10px; font-weight: 600; color: var(--text-muted); white-space: nowrap; }

/* CONTENT */
.content { flex: 1; min-width: 0; overflow-y: auto; padding: 20px; background: var(--bg-content); transition: background 0.3s; }

/* RAPOR SAYFALARI — tam genişlik */
body[data-controller="Raporlar"] .content,
.content-rapor { width: 100%; max-width: none; box-sizing: border-box; padding: 12px 16px; }
.rapor-page { width: 100%; max-width: none; }
.rapor-page .stats-grid { width: 100%; }
.rapor-page .stats-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.rapor-page .stats-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.rapor-page .card { width: 100%; }
.rapor-page .dash-toolbar { width: 100%; }
.rapor-page .rapor-yardim { width: 100%; }
.rapor-page .harita-layout { width: 100%; }
.rapor-table-wrap { width: 100%; overflow-x: auto; }
.rapor-page .tbl { width: 100%; min-width: 960px; }
.rapor-chart-body { height: 260px; width: 100%; position: relative; }
.rapor-chart-body canvas { width: 100% !important; height: 100% !important; }
.rapor-toolbar-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }

/* CARDS */
.card { background: var(--card-bg); border-radius: 10px; border: 1px solid var(--border); transition: background 0.3s, border-color 0.3s; }
.card-header { padding: 14px 16px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.card-title { font-size: 13px; font-weight: 600; color: var(--text); }
.card-body { padding: 16px; }

/* STAT CARDS */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.dash-stats-grid { grid-template-columns: repeat(4, 1fr); }
@media (min-width: 1400px) { .dash-stats-grid { grid-template-columns: repeat(9, 1fr); } }
.dash-toolbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: space-between; }
.dash-filter-group { display: flex; gap: 6px; }
.dash-filter {
  padding: 5px 12px; border-radius: 6px; font-size: 11px; font-weight: 500;
  background: var(--chip-bg); border: 1px solid var(--chip-border); color: var(--text-muted); text-decoration: none;
}
.dash-filter.active, .dash-filter:hover { background: rgba(2,128,144,0.15); border-color: var(--teal2); color: var(--teal2); }
.dash-date-form { display: flex; align-items: center; gap: 6px; }
.dash-date-form input[type="date"] {
  padding: 4px 8px; border-radius: 6px; border: 1px solid var(--border2);
  background: var(--input-bg); color: var(--text); font-size: 11px;
}
#dash-live-indicator { color: var(--mint); font-family: var(--mono); }
.dash-charts-row .col { flex: 1 1 0; min-width: 0; }
.dash-chart-card { height: 100%; display: flex; flex-direction: column; }
.dash-chart-body { padding: 8px 12px 10px; flex: 1; }
.dash-chart-wrap { position: relative; height: 150px; width: 100%; }
.dash-chart-wrap canvas { display: block; width: 100% !important; height: 100% !important; }
.kanban-5 { width: 100%; gap: 8px; }
.kanban-5 .kanban-col { flex: 1 1 0; min-width: 0; }
.kanban-5 .kanban-header { font-size: 10px; padding: 6px 8px; }
.kanban-5 .k-card { padding: 8px 9px; margin-bottom: 6px; }
.kanban-5 .k-card-no,
.kanban-5 .k-card-cust,
.kanban-5 .k-card-plate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kanban-5 .k-card-cust { font-size: 11px; }
.dash-kanban-body { max-height: 420px; overflow-y: auto; overflow-x: hidden; }
.dash-left-col { display: flex; flex-direction: column; gap: 16px; }
.dash-araclar-card .tbl { font-size: 11px; }
.dash-araclar-card .card-body { max-height: 360px; overflow: auto; }
.k-card-link { display: block; text-decoration: none; color: inherit; cursor: pointer; }
.k-card-link:hover { border-color: var(--teal2); }
.stat-card {
  background: var(--stat-bg); border-radius: 10px;
  border: 1px solid var(--border);
  padding: 16px;
  position: relative; overflow: hidden;
  transition: background 0.3s;
}
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; }
.stat-card.amber::before { background: var(--amber); }
.stat-card.teal::before { background: var(--teal); }
.stat-card.purple::before { background: var(--purple); }
.stat-card.green::before { background: var(--green); }
.stat-card.sky::before { background: var(--sky); }
.stat-label { font-size: 11px; color: var(--text-muted); font-weight: 500; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.stat-val { font-size: 32px; font-weight: 700; line-height: 1; margin-bottom: 6px; }
.stat-val.amber { color: var(--amber); }
.stat-val.teal { color: var(--teal2); }
.stat-val.purple { color: var(--purple); }
.stat-val.green { color: var(--green); }
.stat-val.sky { color: var(--sky); }
.stat-delta { font-size: 11px; color: var(--text-faint); }

/* TABLE */
.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl th { padding: 9px 12px; text-align: left; font-size: 10px; font-weight: 600; color: var(--tbl-th); text-transform: uppercase; letter-spacing: 0.06em; border-bottom: 1px solid var(--border); }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--tbl-border); vertical-align: middle; color: var(--text); }
.tbl tr:hover td { background: var(--tbl-hover); }
.tbl tr:last-child td { border-bottom: none; }

/* FORMS */
.form-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
input, select {
  background: var(--input-bg); border: 1px solid var(--border2);
  border-radius: 7px; padding: 7px 11px; color: var(--text); font-size: 12px; font-family: var(--font);
  outline: none; transition: background 0.3s, border-color 0.3s, color 0.3s;
}
input:focus, select:focus { border-color: var(--teal); }
input::placeholder { color: var(--input-ph); }
select option { background: var(--bg-surface2); color: var(--text); }
label { font-size: 11px; color: var(--text-muted); display: block; margin-bottom: 4px; }

/* GRID LAYOUT */
.row { display: flex; gap: 14px; margin-bottom: 14px; }
.col { flex: 1; min-width: 0; }
.col-2 { flex: 2; }
.col-3 { flex: 3; }

/* PROGRESS */
.progress-bar { background: var(--progress-track); border-radius: 4px; height: 8px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 4px; transition: width 0.5s; background: var(--amber); }
.progress-fill.is-teal { background: var(--teal); }
.progress-fill.is-purple { background: var(--purple); }

/* RAPOR YARDIM */
.rapor-yardim { background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px; }
.rapor-yardim-toggle {
  padding: 10px 14px; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--teal2);
  list-style: none; user-select: none;
}
.rapor-yardim-toggle::-webkit-details-marker { display: none; }
.rapor-yardim-body { padding: 0 14px 12px; border-top: 1px solid var(--border); }
.rapor-metrik-list { margin: 10px 0 0; padding-left: 18px; font-size: 11px; color: var(--text-muted); line-height: 1.7; }
.rapor-metrik-list code { font-size: 10px; color: var(--teal2); }
.col-help {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; margin-left: 4px; border-radius: 50%;
  background: var(--hover-bg); color: var(--text-muted); font-size: 9px; font-weight: 700;
  cursor: help; vertical-align: middle;
}
.rapor-row-top td { background: rgba(13, 148, 136, 0.06); }
.rapor-detail-row td { background: var(--hover-bg); font-size: 11px; padding: 10px 14px !important; }
.harita-layout { display: flex; gap: 0; min-height: 600px; }
.harita-sidebar {
  width: 280px; flex-shrink: 0; border-right: 1px solid var(--border);
  max-height: 600px; overflow-y: auto; background: var(--card-bg);
}
.harita-sidebar-section { padding: 10px 12px; border-bottom: 1px solid var(--border); }
.harita-sidebar-title { font-size: 11px; font-weight: 600; margin-bottom: 8px; color: var(--text); }
.harita-list-item {
  padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 11px;
  border: 1px solid transparent; margin-bottom: 4px;
}
.harita-list-item:hover, .harita-list-item.active { border-color: var(--teal2); background: var(--hover-bg); }
.harita-legend-item { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 11px; cursor: pointer; }
.harita-legend-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.harita-map-wrap { flex: 1; min-width: 0; position: relative; }
#harita { height: 600px; width: 100%; }
.harita-map-wrap.harita-fullscreen {
  position: fixed; inset: 0; z-index: 9000; background: var(--bg-content);
}
.harita-map-wrap.harita-fullscreen #harita { height: 100vh; width: 100vw; }
.harita-fs-btn {
  position: absolute; top: 10px; left: 10px; z-index: 1000;
  width: 32px; height: 32px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--card-bg); color: var(--text); cursor: pointer; font-size: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.harita-fs-btn:hover { background: var(--hover-bg); }
.leaflet-control-layers {
  border: 1px solid var(--border) !important; background: var(--card-bg) !important;
  color: var(--text) !important; border-radius: 6px !important;
}
.leaflet-control-layers-expanded { padding: 6px 10px !important; font-size: 11px !important; }
.rapor-tablo-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap; padding: 10px 12px; border-bottom: 1px solid var(--border);
}
.rapor-tablo-search {
  flex: 1; min-width: 180px; max-width: 320px; padding: 6px 10px; font-size: 12px;
  border: 1px solid var(--border); border-radius: 6px; background: var(--bg-surface); color: var(--text);
}
.rapor-tablo-pager { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--text-muted); }
.dash-rapor-links {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
}
.dash-rapor-links .btn { font-size: 11px; }
@media (max-width: 900px) {
  .harita-layout { flex-direction: column; }
  .harita-sidebar { width: 100%; max-height: 240px; border-right: none; border-bottom: 1px solid var(--border); }
}

/* SCREEN TABS */
.screen-tabs {
  display: flex; gap: 2px; padding: 10px 20px 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  overflow-x: auto; transition: background 0.3s;
}
.stab {
  padding: 8px 14px; font-size: 11px; font-weight: 500; cursor: pointer;
  border-radius: 6px 6px 0 0; white-space: nowrap;
  color: var(--stab-color); border: 1px solid transparent; border-bottom: none;
  transition: all 0.15s;
}
.stab:hover { color: var(--stab-hover); }
.stab.active { background: var(--stab-active-bg); color: var(--text); border-color: var(--stab-active-border); }

/* SCREEN PANELS */
.screen { display: none; }
.screen.active { display: block; }

/* MOBILE PREVIEW */
.mobile-wrap { display: flex; gap: 20px; align-items: flex-start; }
.phone {
  width: 320px; flex-shrink: 0;
  background: var(--phone-bg);
  border-radius: 36px;
  border: 8px solid var(--phone-frame);
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  overflow: hidden; position: relative;
  transition: background 0.3s, border-color 0.3s;
}
.phone-notch { background: var(--phone-frame); height: 28px; display: flex; align-items: center; justify-content: center; }
.phone-notch-inner { width: 80px; height: 14px; background: var(--phone-bg); border-radius: 8px; }
.phone-screen { background: var(--bg-surface); min-height: 580px; transition: background 0.3s; }
.phone-bar { background: var(--hover-bg); padding: 10px 14px; display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--border); }
.phone-back { width: 24px; height: 24px; border-radius: 6px; background: var(--action-bg); display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 12px; color: var(--text); }
.phone-title { font-size: 13px; font-weight: 600; flex: 1; color: var(--text); }
.phone-body { padding: 14px; }
.mobile-desc { flex: 1; }
.mobile-desc h3 { font-size: 14px; font-weight: 600; margin-bottom: 8px; color: var(--teal2); }
.mobile-desc p { font-size: 12px; color: var(--text-muted); line-height: 1.6; margin-bottom: 10px; }
.feature-list { list-style: none; }
.feature-list li { font-size: 12px; color: var(--nav-text); padding: 4px 0; display: flex; align-items: center; gap: 8px; }
.feature-list li::before { content: '→'; color: var(--mint); font-size: 11px; }

/* MOBILE COMPONENTS */
.m-card { background: var(--mob-card-bg); border-radius: 10px; border: 1px solid var(--mob-card-border); padding: 12px; margin-bottom: 10px; transition: background 0.3s; }
.m-label { font-size: 10px; color: var(--text-muted); margin-bottom: 3px; }
.m-val { font-size: 13px; font-weight: 500; color: var(--text); }
.m-btn { width: 100%; padding: 12px; border-radius: 10px; font-size: 13px; font-weight: 600; border: none; cursor: pointer; font-family: var(--font); text-align: center; }
.m-btn-primary { background: var(--teal); color: white; }
.m-btn-success { background: var(--green); color: white; }
.m-btn-danger { background: var(--coral); color: white; }
.m-input { width: 100%; background: var(--mob-input-bg); border: 1px solid var(--mob-input-border); border-radius: 8px; padding: 10px 12px; color: var(--text); font-size: 13px; font-family: var(--font); outline: none; margin-bottom: 10px; }
.m-sep { height: 1px; background: var(--mob-sep); margin: 10px 0; }
.m-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.m-tag { font-size: 10px; padding: 2px 7px; border-radius: 10px; font-weight: 600; }
.barkod-box { background: rgba(2,128,144,0.12); border: 2px dashed var(--teal); border-radius: 12px; padding: 24px; text-align: center; margin: 10px 0; cursor: pointer; transition: all 0.2s; }
.barkod-icon { font-size: 36px; margin-bottom: 8px; }
.barkod-text { font-size: 12px; color: var(--teal2); }
.otp-grid { display: flex; gap: 8px; justify-content: center; margin: 12px 0; }
.otp-cell { width: 40px; height: 48px; background: var(--mob-otp-bg); border: 1px solid var(--mob-otp-border); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; font-family: var(--mono); color: var(--text); }
.otp-cell.filled { border-color: var(--teal); color: var(--teal2); }

/* UTILS */
.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mb-12 { margin-bottom: 12px; }
.mb-16 { margin-bottom: 16px; }
.text-sm { font-size: 12px; }
.text-xs { font-size: 11px; }
.text-muted { color: var(--text-muted); }
.text-teal { color: var(--teal2); }
.text-amber { color: var(--amber); }
.text-green { color: var(--green); }
.text-sky { color: var(--sky); }
.text-red { color: var(--coral); }
.text-purple { color: var(--purple); }
.font-mono { font-family: var(--mono); }
.font-600 { font-weight: 600; }
.mt-8 { margin-top: 8px; }
.mt-12 { margin-top: 12px; }

/* CHECKBOX */
input[type=checkbox] { width: 15px; height: 15px; accent-color: var(--teal); flex-shrink: 0; }
.form-check-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.form-check-row .form-check-label {
  display: inline;
  margin: 0;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
}

/* ACTION BUTTONS */
.action-btn { width: 26px; height: 26px; border-radius: 6px; border: 1px solid var(--action-border); background: var(--action-bg); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 12px; transition: all 0.15s; }
.action-btn:hover { background: var(--action-hover); }

/* CHIP */
.chip { display: inline-flex; align-items: center; gap: 5px; background: var(--chip-bg); border: 1px solid var(--chip-border); border-radius: 6px; padding: 4px 9px; font-size: 11px; color: var(--text); }

/* DRAG CARD */
.drag-card { background: var(--drag-bg); border: 1px solid var(--drag-border); border-radius: 8px; padding: 10px 12px; margin-bottom: 7px; cursor: grab; transition: all 0.15s; }
.drag-card:hover { background: rgba(2,192,154,0.06); border-color: rgba(2,192,154,0.3); }
.drag-card .dc-plate { font-family: var(--mono); font-size: 13px; font-weight: 600; color: var(--teal2); }
.drag-card .dc-name { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* KANBAN */
.kanban { display: flex; gap: 12px; }
.kanban-col { flex: 1; min-width: 0; }
.kanban-header { font-size: 11px; font-weight: 600; padding: 8px 10px; border-radius: 7px; margin-bottom: 8px; display: flex; align-items: center; justify-content: space-between; }
.k-amber { background: rgba(245,158,11,0.12); color: var(--amber); }
.k-teal { background: rgba(2,128,144,0.12); color: var(--teal2); }
.k-purple { background: rgba(124,58,237,0.12); color: var(--purple); }
.k-sky { background: rgba(14,165,233,0.12); color: var(--sky); }
.k-green { background: rgba(16,185,129,0.12); color: var(--green); }
.k-count { background: var(--k-count-bg); border-radius: 8px; padding: 1px 7px; font-size: 11px; color: var(--text); }
.k-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; margin-bottom: 7px; transition: background 0.3s; }
.k-card-no { font-family: var(--mono); font-size: 11px; color: var(--teal2); font-weight: 600; }
.k-card-cust { font-size: 12px; font-weight: 500; margin: 3px 0; color: var(--text); }
.k-card-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 6px; }
.k-card-plate { font-size: 10px; font-family: var(--mono); color: var(--text-muted); }

/* TIMELINE */
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 7px; top: 0; bottom: 0; width: 1.5px; background: var(--tl-line); }
.tl-item { position: relative; margin-bottom: 14px; }
.tl-dot { position: absolute; left: -22px; top: 2px; width: 12px; height: 12px; border-radius: 50%; border: 2px solid; }
.tl-time { font-size: 10px; color: var(--text-faint); font-family: var(--mono); margin-bottom: 2px; }
.tl-text { font-size: 12px; color: var(--text); }

/* SCROLLBAR */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar); border-radius: 3px; }

/* BADGES / PILLS */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 20px; font-size: 10px; font-weight: 600; white-space: nowrap; }
.pill::before { content: ''; width: 5px; height: 5px; border-radius: 50%; }
.pill-amber { background: rgba(245,158,11,0.15); color: var(--amber); border: 1px solid rgba(245,158,11,0.3); }
.pill-amber::before { background: var(--amber); }
.pill-teal { background: rgba(2,128,144,0.15); color: var(--teal2); border: 1px solid rgba(2,192,154,0.3); }
.pill-teal::before { background: var(--teal2); }
.pill-purple { background: rgba(124,58,237,0.15); color: var(--purple); border: 1px solid rgba(124,58,237,0.3); }
.pill-purple::before { background: var(--purple); }
.pill-sky { background: rgba(14,165,233,0.15); color: var(--sky); border: 1px solid rgba(14,165,233,0.3); }
.pill-sky::before { background: var(--sky); }
.pill-green { background: rgba(16,185,129,0.15); color: var(--green); border: 1px solid rgba(16,185,129,0.3); }
.pill-green::before { background: var(--green); }
.pill-gray { background: rgba(100,116,139,0.15); color: #64748B; border: 1px solid rgba(100,116,139,0.3); }
.pill-gray::before { background: #64748B; }

/* LIGHT MODE SPECIFIC ADJUSTMENTS */
[data-theme="light"] .pill-purple { color: #6D28D9; }
[data-theme="light"] .pill-purple::before { background: #6D28D9; }
[data-theme="light"] .stat-val.purple { color: #6D28D9; }

/* MVC extras */
a.nav-item { text-decoration: none; color: inherit; display: flex; }
.form-group { margin-bottom: 14px; }
.form-group label { margin-bottom: 4px; }
.text-danger { color: var(--coral); font-size: 11px; margin-top: 4px; display: block; }
.validation-summary-errors { color: var(--coral); font-size: 12px; margin-bottom: 12px; }
.alert {
  padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.alert-success { background: rgba(16,185,129,0.12); border: 1px solid rgba(16,185,129,0.3); color: var(--mint); }
.alert-danger { background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3); color: var(--coral); }
.alert-info { background: rgba(2,128,144,0.12); border: 1px solid rgba(2,192,154,0.25); color: var(--teal2); }
.alert-close { background: none; border: none; color: inherit; cursor: pointer; font-size: 16px; opacity: 0.7; }
.empty-state { text-align: center; padding: 32px 16px; color: var(--text-muted); font-size: 12px; }
.w-full { width: 100%; }
@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .kanban:not(.kanban-5) { flex-direction: column; }
  .kanban-5 { overflow-x: auto; padding-bottom: 4px; }
  .kanban-5 .kanban-col { min-width: 110px; flex: 0 0 110px; }
}
@media (max-width: 768px) {
  .sidebar { width: 64px; }
  .sidebar .logo-text, .sidebar .logo-sub, .sidebar .nav-section, .sidebar .user-name, .sidebar .user-role, .sidebar .nav-item span:not(.icon), .sidebar .badge { display: none; }
  .stats-grid { grid-template-columns: 1fr; }
}

/* LOGIN */
.login-body {
  min-height: 100vh;
  background: var(--bg-page);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-page { width: 100%; max-width: 400px; }
.login-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 28px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.25);
}
.login-brand { text-align: center; margin-bottom: 28px; }
.login-logo {
  width: 56px; height: 56px; border-radius: 14px;
  background: linear-gradient(135deg, var(--teal), var(--mint));
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin: 0 auto 14px;
}
.login-brand h1 { font-size: 22px; font-weight: 600; margin: 0 0 6px; color: var(--text); }
.login-brand p { font-size: 13px; color: var(--text-muted); margin: 0; }
.login-form { display: flex; flex-direction: column; gap: 16px; }
.login-field label { display: block; font-size: 12px; font-weight: 500; margin-bottom: 6px; color: var(--text-muted); }
.login-field input {
  width: 100%; padding: 10px 12px; border-radius: 8px;
  border: 1px solid var(--border2); background: var(--input-bg);
  color: var(--text); font-family: var(--font); font-size: 14px;
}
.login-field input:focus { outline: none; border-color: var(--teal2); }
.login-remember {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-muted); cursor: pointer;
}
.login-submit { width: 100%; justify-content: center; padding: 10px; font-size: 14px; margin-top: 4px; }
.login-error {
  background: rgba(239,68,68,0.12); border: 1px solid rgba(239,68,68,0.3);
  color: var(--coral); padding: 10px 12px; border-radius: 8px; font-size: 12px;
}
.login-error:empty { display: none; }
.login-hint { text-align: center; margin-top: 20px; line-height: 1.6; }

/* ── Evrak lightbox modal ── */
.evrak-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.evrak-modal.is-open { display: flex; }
.evrak-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(4px);
}
.evrak-modal__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(920px, 100%);
  max-height: min(92vh, 900px);
  background: var(--bg-surface);
  border: 1px solid var(--border2);
  border-radius: 14px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.evrak-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: var(--bg-surface2);
  border-bottom: 1px solid var(--border2);
  flex-shrink: 0;
}
.evrak-modal__title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.evrak-modal__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.evrak-modal__matbuno {
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 600;
  color: var(--teal2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.evrak-modal__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.evrak-modal__download {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border2);
  border-radius: 8px;
  background: var(--ghost-bg);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}
.evrak-modal__download:hover:not(:disabled) {
  background: rgba(2, 192, 154, 0.12);
  border-color: var(--teal2);
  color: var(--teal2);
}
.evrak-modal__download:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.evrak-modal__download-text { line-height: 1; }
.evrak-modal__close {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border2);
  border-radius: 8px;
  background: var(--ghost-bg);
  color: var(--text);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.evrak-modal__close:hover {
  background: var(--hover-bg2);
  border-color: var(--teal2);
  color: var(--teal2);
}
.evrak-modal__body {
  position: relative;
  flex: 1;
  min-height: 200px;
  overflow: auto;
  background: #050a12;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.evrak-modal__loading {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--text-muted);
  background: rgba(5, 10, 18, 0.85);
}
.evrak-modal__loading.is-visible { display: flex; }
.evrak-modal__img {
  display: block;
  max-width: 100%;
  max-height: calc(92vh - 80px);
  width: auto;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}
.evrak-modal__img.is-hidden { display: none; }
.evrak-modal__error {
  display: none;
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--coral);
}
.evrak-modal__error.is-visible { display: block; }

/* ── SweetAlert2 (SevkiyatDialog) ── */
.sevkiyat-swal {
  border: 1px solid var(--border2) !important;
  border-radius: 12px !important;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.35) !important;
  font-family: 'IBM Plex Sans', sans-serif !important;
  padding: 24px 24px 20px !important;
}
.sevkiyat-swal-title {
  font-size: 17px !important;
  font-weight: 600 !important;
  color: var(--text) !important;
}
.sevkiyat-swal-text,
.sevkiyat-swal-prompt-msg {
  font-size: 14px !important;
  line-height: 1.5 !important;
  color: var(--text-muted) !important;
}
.sevkiyat-swal-prompt-msg { margin: 0 0 12px; }
.sevkiyat-swal-input {
  width: 100% !important;
  margin-top: 8px !important;
  padding: 10px 12px !important;
  border-radius: 8px !important;
  border: 1px solid var(--border2) !important;
  background: var(--input-bg) !important;
  color: var(--text) !important;
  font-family: inherit !important;
  font-size: 13px !important;
  resize: vertical !important;
  min-height: 72px !important;
}
.sevkiyat-swal-input:focus {
  outline: none !important;
  border-color: var(--teal) !important;
  box-shadow: 0 0 0 2px rgba(2, 128, 144, 0.25) !important;
}
.sevkiyat-swal-confirm,
.sevkiyat-swal-cancel {
  border-radius: 8px !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  padding: 9px 18px !important;
  min-width: 88px !important;
}
.sevkiyat-swal-confirm {
  background: var(--teal) !important;
  color: #fff !important;
}
.sevkiyat-swal-confirm:hover { filter: brightness(1.08); }
.sevkiyat-swal-cancel {
  background: var(--chip-bg) !important;
  color: var(--text) !important;
  border: 1px solid var(--border2) !important;
}
.sevkiyat-swal-cancel:hover { background: var(--hover-bg2) !important; }
.swal2-icon { transform: scale(0.85); margin: 8px auto 12px !important; }
[data-theme="light"] .swal2-icon.swal2-question { border-color: var(--teal); color: var(--teal); }
