/* ============================================================================
   EAC Admin — arayüz stilleri
   Kurumsal palet: beyaz · açık mavi · royal mavi · koyu lacivert
   Harici font veya CSS yüklenmez (CSP self); sistem font yığını kullanılır.
   ========================================================================== */

:root {
  /* Yüzeyler */
  --bg: #f4f7fc;
  --surface: #ffffff;
  --surface-2: #fafcff;
  --sky: #e8f1fe;
  --sky-2: #d6e6fd;

  /* Lacivert & royal mavi */
  --navy: #0b1b33;
  --navy-2: #132a4a;
  --navy-3: #1d3b63;
  --royal: #1c4ed8;
  --royal-2: #2563eb;
  --royal-soft: rgba(28, 78, 216, 0.1);

  /* Mürekkep */
  --ink: #0f1c33;
  --ink-2: #34486a;
  --muted: #6b7f9e;
  --faint: #9bacc6;

  /* Çizgiler */
  --line: #e2eaf5;
  --line-2: #cfdcee;

  /* Durum renkleri */
  --ok: #0f9d63;
  --ok-bg: #e6f7f0;
  --warn: #b57505;
  --warn-bg: #fdf3e0;
  --danger: #cf2f45;
  --danger-bg: #fdeef0;
  --info: #1c4ed8;
  --info-bg: #e8f1fe;
  --neutral: #64748b;
  --neutral-bg: #eef2f7;

  /* Ölçüler */
  --sidebar-w: 248px;
  --topbar-h: 60px;
  --radius: 10px;
  --radius-sm: 7px;
  --shadow-sm: 0 1px 2px rgba(11, 27, 51, 0.06);
  --shadow: 0 2px 10px rgba(11, 27, 51, 0.07);
  --shadow-lg: 0 12px 40px rgba(11, 27, 51, 0.18);

  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial,
    'Noto Sans', sans-serif;
  --mono: ui-monospace, 'Cascadia Mono', 'Segoe UI Mono', Consolas, monospace;
}

* { box-sizing: border-box; }
*::before, *::after { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--royal); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--royal); outline-offset: 2px; }

/* ── Yerleşim ─────────────────────────────────────────────────────────────── */

.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  /* Düz renk. Gradyan, ekranı "şablon" gösteren ilk şeylerden biri. */
  background: var(--navy);
  color: #dce7f7;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  min-height: var(--topbar-h);
}
.brand__mark {
  width: 32px; height: 32px; flex: 0 0 32px;
  border-radius: 8px;
  background: var(--royal-2);
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 14px; letter-spacing: -0.02em;
}
.brand__name { font-size: 14px; font-weight: 700; color: #fff; line-height: 1.2; }
.brand__sub { font-size: 11px; color: #8fa8ca; }

.nav { flex: 1; overflow-y: auto; padding: 10px 10px 20px; }
.nav__group { margin-top: 14px; }
.nav__label {
  font-size: 10px; text-transform: uppercase; letter-spacing: 0.09em;
  color: #6d86a8; padding: 0 10px 6px; font-weight: 700;
}
.nav__item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--radius-sm);
  color: #c3d3ea; font-size: 13.5px; cursor: pointer;
  border: 0; background: none; width: 100%; text-align: left;
  transition: background 0.12s, color 0.12s;
}
.nav__item:hover { background: rgba(255, 255, 255, 0.07); color: #fff; text-decoration: none; }
.nav__item.is-active { background: var(--royal); color: #fff; font-weight: 600; }
.nav__icon { width: 17px; height: 17px; flex: 0 0 17px; opacity: 0.9; }
.nav__badge {
  margin-left: auto; background: rgba(255, 255, 255, 0.16); color: #fff;
  font-size: 11px; padding: 1px 7px; border-radius: 999px; font-weight: 700;
}
.nav__badge--alert { background: var(--danger); }

.sidebar__foot {
  padding: 12px; border-top: 1px solid rgba(255, 255, 255, 0.09);
  font-size: 11.5px; color: #8fa8ca;
}

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 14px;
  padding: 0 20px; position: sticky; top: 0; z-index: 30;
}
.topbar__title { font-size: 16px; font-weight: 650; }
.topbar__spacer { flex: 1; }
.topbar__search { position: relative; width: min(340px, 40vw); }
.topbar__search input { padding-left: 32px; }
.topbar__search svg {
  position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
  width: 15px; height: 15px; color: var(--faint); pointer-events: none;
}

.user-chip {
  display: flex; align-items: center; gap: 9px; padding: 5px 9px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface);
  cursor: pointer;
}
.user-chip:hover { border-color: var(--line-2); background: var(--surface-2); }
.avatar {
  width: 27px; height: 27px; border-radius: 50%; flex: 0 0 27px;
  background: var(--navy); color: #fff; display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700;
}
.user-chip__name { font-size: 13px; font-weight: 600; line-height: 1.1; }
.user-chip__role { font-size: 10.5px; color: var(--muted); }

.content { padding: 20px; flex: 1; max-width: 1600px; width: 100%; }

.menu-toggle {
  display: none; width: 36px; height: 36px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface); cursor: pointer;
  align-items: center; justify-content: center;
}

/* ── Tipografi & yardımcılar ──────────────────────────────────────────────── */

.page-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head__text { flex: 1; min-width: 220px; }
.page-title { font-size: 19px; font-weight: 700; }
.page-sub { color: var(--muted); font-size: 13px; margin-top: 2px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.strong { font-weight: 650; }
.hidden { display: none !important; }
/* Bileşen sınıfları display kurduğu için [hidden] özniteliğini güçlendiriyoruz. */
[hidden] { display: none !important; }
.grow { flex: 1; }
.row-flex { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 4px; }

/* ── Kartlar ──────────────────────────────────────────────────────────────── */

.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.card__head {
  padding: 13px 16px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.card__title { font-size: 14px; font-weight: 650; }
.card__body { padding: 16px; }
.card__body--flush { padding: 0; }
.card + .card { margin-top: 16px; }

.grid { display: grid; gap: 14px; }
.grid--kpi { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid--form { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 15px; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
}
.kpi__label { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 650; }
.kpi__value { font-size: 25px; font-weight: 720; margin-top: 5px; letter-spacing: -0.02em; }
.kpi__meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.kpi::after {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--royal);
}
.kpi--ok::after { background: var(--ok); }
.kpi--warn::after { background: var(--warn); }
.kpi--danger::after { background: var(--danger); }
.kpi--neutral::after { background: var(--faint); }
.kpi.is-clickable { cursor: pointer; }
.kpi.is-clickable:hover { border-color: var(--line-2); box-shadow: var(--shadow); }

/* ── Butonlar ─────────────────────────────────────────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 14px; border-radius: var(--radius-sm); border: 1px solid transparent;
  background: var(--royal); color: #fff; font-size: 13.5px; font-weight: 600;
  cursor: pointer; white-space: nowrap; transition: background 0.12s, border-color 0.12s;
}
.btn:hover { background: var(--royal-2); text-decoration: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn--ghost { background: var(--surface); color: var(--ink-2); border-color: var(--line-2); }
.btn--ghost:hover { background: var(--sky); color: var(--royal); border-color: var(--royal); }
.btn--subtle { background: var(--sky); color: var(--royal); }
.btn--subtle:hover { background: var(--sky-2); }
.btn--danger { background: var(--danger); }
.btn--danger:hover { background: #b8283c; }
.btn--dangerGhost { background: var(--surface); color: var(--danger); border-color: #f0c2c9; }
.btn--dangerGhost:hover { background: var(--danger-bg); }
.btn--sm { padding: 5px 10px; font-size: 12.5px; }
.btn--icon { padding: 6px; width: 30px; height: 30px; }
.btn--block { width: 100%; }
.btn__spinner {
  width: 13px; height: 13px; border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff; border-radius: 50%; animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.btn-group { display: inline-flex; gap: 0; }
.btn-group .btn { border-radius: 0; border-color: var(--line-2); }
.btn-group .btn:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.btn-group .btn:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.btn-group .btn + .btn { margin-left: -1px; }
.btn-group .btn.is-active { background: var(--royal); color: #fff; border-color: var(--royal); z-index: 1; }

/* ── Formlar ──────────────────────────────────────────────────────────────── */

.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field__label { font-size: 12.5px; font-weight: 600; color: var(--ink-2); }
.field__label .req { color: var(--danger); }
.field__hint { font-size: 11.5px; color: var(--muted); }
.field__error { font-size: 11.5px; color: var(--danger); font-weight: 600; }

input[type='text'], input[type='password'], input[type='number'], input[type='date'],
input[type='time'], input[type='datetime-local'], input[type='email'], input[type='search'],
input[type='tel'], select, textarea {
  width: 100%; padding: 8px 11px; border: 1px solid var(--line-2);
  border-radius: var(--radius-sm); background: var(--surface); font-size: 13.5px;
  transition: border-color 0.12s, box-shadow 0.12s;
}
input:hover, select:hover, textarea:hover { border-color: #b7c9e2; }
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--royal); box-shadow: 0 0 0 3px var(--royal-soft);
}
input:disabled, select:disabled, textarea:disabled { background: var(--neutral-bg); color: var(--muted); }
input.is-invalid, select.is-invalid { border-color: var(--danger); }
textarea { resize: vertical; min-height: 68px; }
select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 4.5L6 8.5L10 4.5' stroke='%236b7f9e' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 9px center; background-size: 12px; padding-right: 28px; }

.check { display: flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--royal); cursor: pointer; }

.filters {
  display: flex; gap: 9px; flex-wrap: wrap; align-items: flex-end;
  padding: 13px 16px; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); margin-bottom: 14px;
}
.filters .field { min-width: 145px; }
.filters .field--wide { min-width: 230px; flex: 1; }

/* ── Rozetler ─────────────────────────────────────────────────────────────── */

.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px;
  border-radius: 999px; font-size: 11.5px; font-weight: 650; white-space: nowrap;
  background: var(--neutral-bg); color: var(--neutral);
}
.badge--ok { background: var(--ok-bg); color: var(--ok); }
.badge--warn { background: var(--warn-bg); color: var(--warn); }
.badge--danger { background: var(--danger-bg); color: var(--danger); }
.badge--info { background: var(--info-bg); color: var(--info); }
.badge--navy { background: #e4eaf3; color: var(--navy-3); }
.badge__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ── Tablolar ─────────────────────────────────────────────────────────────── */

.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; padding: 9px 12px; background: var(--surface-2);
  border-bottom: 1px solid var(--line); font-size: 11.5px; font-weight: 700;
  color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; white-space: nowrap;
}
.tbl th.is-sortable { cursor: pointer; user-select: none; }
.tbl th.is-sortable:hover { color: var(--royal); }
.tbl th .sort-arrow { opacity: 0.4; margin-left: 3px; }
.tbl th.is-sorted .sort-arrow { opacity: 1; color: var(--royal); }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tbody tr.is-clickable { cursor: pointer; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .cell-actions { display: flex; gap: 5px; justify-content: flex-end; }

.pagination {
  display: flex; align-items: center; gap: 10px; padding: 11px 16px;
  border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); flex-wrap: wrap;
}

.empty { padding: 44px 20px; text-align: center; color: var(--muted); }
.empty__icon { font-size: 30px; opacity: 0.35; margin-bottom: 8px; }
.empty__title { font-weight: 650; color: var(--ink-2); margin-bottom: 3px; }

.loading { padding: 40px; text-align: center; color: var(--muted); }
/* Yer tutucu blok. Parlayan ("shimmer") animasyon bilerek kaldırıldı:
   yükleme sırasında dikkat dağıtıyor ve şablon görüntüsü veriyordu. */
.skeleton {
  height: 12px; border-radius: 4px;
  background: #eef2f8;
  border: 1px solid var(--line);
}

/* ── Uyarı kutuları ───────────────────────────────────────────────────────── */

.alert {
  display: flex; gap: 10px; padding: 11px 14px; border-radius: var(--radius);
  border: 1px solid; font-size: 13px; margin-bottom: 14px; align-items: flex-start;
}
.alert--info { background: var(--info-bg); border-color: #bcd4fb; color: #17408f; }
.alert--warn { background: var(--warn-bg); border-color: #f0d49a; color: #7a4f04; }
.alert--danger { background: var(--danger-bg); border-color: #f3c3ca; color: #99202f; }
.alert--ok { background: var(--ok-bg); border-color: #b3e5cf; color: #0a6b43; }
.alert__title { font-weight: 700; margin-bottom: 2px; }
.alert__body { flex: 1; min-width: 0; }

/* ── Modal ────────────────────────────────────────────────────────────────── */

.modal-backdrop {
  position: fixed; inset: 0; background: rgba(11, 27, 51, 0.5);
  backdrop-filter: blur(2px); z-index: 100; display: flex;
  align-items: flex-start; justify-content: center; padding: 32px 16px; overflow-y: auto;
}
.modal {
  background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-lg);
  width: min(720px, 100%); animation: modal-in 0.15s ease-out;
}
.modal--wide { width: min(1040px, 100%); }
.modal--narrow { width: min(460px, 100%); }
@keyframes modal-in { from { opacity: 0; transform: translateY(-8px); } }
.modal__head {
  padding: 15px 18px; border-bottom: 1px solid var(--line);
  display: flex; align-items: center; gap: 10px;
}
.modal__title { font-size: 15.5px; font-weight: 680; flex: 1; }
.modal__close {
  width: 30px; height: 30px; border-radius: var(--radius-sm); border: 0;
  background: none; cursor: pointer; color: var(--muted); font-size: 19px; line-height: 1;
}
.modal__close:hover { background: var(--neutral-bg); color: var(--ink); }
.modal__body { padding: 18px; }
.modal__foot {
  padding: 13px 18px; border-top: 1px solid var(--line); display: flex;
  gap: 8px; justify-content: flex-end; flex-wrap: wrap; background: var(--surface-2);
  border-radius: 0 0 12px 12px;
}

/* ── Bildirim (toast) ─────────────────────────────────────────────────────── */

.toasts {
  position: fixed; right: 16px; bottom: 16px; z-index: 200;
  display: flex; flex-direction: column; gap: 8px; max-width: 380px;
}
.toast {
  background: var(--navy); color: #fff; padding: 11px 14px; border-radius: var(--radius);
  box-shadow: var(--shadow-lg); font-size: 13px; display: flex; gap: 9px;
  animation: toast-in 0.18s ease-out; align-items: flex-start;
}
@keyframes toast-in { from { opacity: 0; transform: translateX(16px); } }
.toast--ok { background: #0d7a4f; }
.toast--danger { background: #ab253a; }
.toast--warn { background: #8a5a04; }
.toast__close { margin-left: auto; background: none; border: 0; color: inherit; opacity: 0.7; cursor: pointer; }

/* ── Sekmeler ─────────────────────────────────────────────────────────────── */

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tab {
  padding: 9px 14px; border: 0; background: none; cursor: pointer; font-size: 13.5px;
  font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap;
}
.tab:hover { color: var(--ink); }
.tab.is-active { color: var(--royal); border-bottom-color: var(--royal); }

/* ── Grafikler ────────────────────────────────────────────────────────────── */

.chart { width: 100%; }
.chart__bars { display: flex; align-items: flex-end; gap: 3px; height: 150px; padding-top: 8px; }
.chart__bar { flex: 1; min-width: 3px; background: var(--royal); border-radius: 3px 3px 0 0; position: relative; transition: background 0.12s; }
.chart__bar:hover { background: var(--navy); }
.chart__bar--soft { background: var(--sky-2); }
.chart__axis { display: flex; justify-content: space-between; font-size: 10.5px; color: var(--faint); margin-top: 6px; }
.chart__legend { display: flex; gap: 14px; font-size: 12px; color: var(--muted); margin-top: 8px; flex-wrap: wrap; }
.chart__swatch { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 5px; vertical-align: -1px; }

.meter { height: 7px; background: var(--neutral-bg); border-radius: 999px; overflow: hidden; }
.meter__fill { height: 100%; background: var(--royal); border-radius: 999px; }
.meter__fill--ok { background: var(--ok); }
.meter__fill--warn { background: var(--warn); }

.rank-row { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); }
.rank-row:last-child { border-bottom: 0; }
.rank-row__bar { flex: 1; }

/* ── Takvim / zaman çizelgesi ─────────────────────────────────────────────── */

.timeline { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.timeline__grid { display: grid; min-width: 780px; font-size: 12px; }
.timeline__cell { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 38px; position: relative; }
.timeline__head {
  position: sticky; top: 0; background: var(--surface-2); z-index: 2;
  padding: 6px 4px; text-align: center; font-size: 10.5px; color: var(--muted); font-weight: 650;
}
.timeline__head--weekend { background: var(--sky); color: var(--royal); }
.timeline__head--today { background: var(--royal); color: #fff; }
.timeline__vehicle {
  position: sticky; left: 0; background: var(--surface); z-index: 3; padding: 7px 10px;
  border-right: 1px solid var(--line-2); min-width: 180px;
}
.timeline__plate { font-weight: 700; font-size: 12.5px; }
.timeline__model { font-size: 11px; color: var(--muted); }
.timeline__block {
  position: absolute; inset: 4px 1px; border-radius: 5px; padding: 2px 6px;
  font-size: 11px; color: #fff; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  cursor: pointer; font-weight: 600; z-index: 1;
}
.timeline__block:hover { filter: brightness(1.12); }
.tl-PENDING { background: #b57505; }
.tl-CONFIRMED { background: var(--royal); }
.tl-ACTIVE, .tl-VEHICLE_DELIVERED { background: #0f9d63; }
.tl-EXTENDED { background: #7c3aed; }
.tl-RETURNED { background: #64748b; }
.tl-INQUIRY { background: #94a3b8; }
.tl-NO_SHOW { background: #cf2f45; }

/* ── Detay listeleri ──────────────────────────────────────────────────────── */

.dl { display: grid; grid-template-columns: minmax(120px, auto) 1fr; gap: 7px 14px; font-size: 13px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 600; word-break: break-word; }

.sensitive {
  display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono);
  background: var(--neutral-bg); padding: 2px 8px; border-radius: 5px; font-size: 12.5px;
}
.sensitive--revealed { background: var(--warn-bg); color: #7a4f04; }
.reveal-btn {
  border: 0; background: var(--royal); color: #fff; border-radius: 4px;
  padding: 1px 7px; font-size: 10.5px; cursor: pointer; font-weight: 700;
}
.reveal-btn:hover { background: var(--royal-2); }

.money-line { display: flex; justify-content: space-between; padding: 5px 0; font-size: 13px; }
.money-line + .money-line { border-top: 1px dotted var(--line-2); }
.money-line--total { border-top: 2px solid var(--line-2); font-size: 15.5px; font-weight: 720; padding-top: 9px; margin-top: 3px; }

/* ── Giriş / kurulum sayfaları ────────────────────────────────────────────── */

.auth-page {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  /* Üç duraklı gradyan, "yapay zekâ panosu" görüntüsünün klasiğiydi. */
  background: var(--navy);
}
.auth-card {
  width: min(430px, 100%); background: var(--surface); border-radius: 14px;
  box-shadow: 0 24px 60px rgba(3, 12, 28, 0.45); overflow: hidden;
}
.auth-card--wide { width: min(560px, 100%); }
.auth-card__head { padding: 26px 28px 18px; text-align: center; }
.auth-card__mark {
  width: 46px; height: 46px; border-radius: 12px; margin: 0 auto 12px;
  background: var(--royal); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 18px;
}
.auth-card__title { font-size: 18px; font-weight: 700; }
.auth-card__sub { font-size: 13px; color: var(--muted); margin-top: 4px; }
.auth-card__body { padding: 0 28px 24px; display: flex; flex-direction: column; gap: 13px; }
.auth-card__foot {
  padding: 13px 28px; background: var(--surface-2); border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--muted); text-align: center;
}
.pw-rules { font-size: 11.5px; color: var(--muted); line-height: 1.7; }
.pw-rules li.ok { color: var(--ok); }
.pw-rules ul { margin: 4px 0 0; padding-left: 17px; }

/* ── Yazdırma ─────────────────────────────────────────────────────────────── */

@media print {
  .sidebar, .topbar, .page-actions, .filters, .btn, .pagination { display: none !important; }
  .content { padding: 0; }
  .card { border: 0; box-shadow: none; }
  body { background: #fff; }
}

/* ── Duyarlı ──────────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  :root { --sidebar-w: 220px; }
  .content { padding: 16px; }
}

@media (max-width: 860px) {
  .menu-toggle { display: flex; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%);
    transition: transform 0.2s ease; box-shadow: var(--shadow-lg);
  }
  .sidebar.is-open { transform: translateX(0); }
  .scrim { position: fixed; inset: 0; background: rgba(11, 27, 51, 0.45); z-index: 35; }
  .topbar__search { width: auto; flex: 1; }
  .topbar__title { display: none; }
  .user-chip__name, .user-chip__role { display: none; }

  /* Tablolar mobilde karta dönüşür */
  .tbl thead { display: none; }
  .tbl, .tbl tbody, .tbl tr, .tbl td { display: block; width: 100%; }
  .tbl tr {
    border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 9px;
    padding: 4px 0; background: var(--surface);
  }
  .tbl td { border: 0; padding: 6px 13px; display: flex; justify-content: space-between; gap: 12px; }
  .tbl td::before {
    content: attr(data-label); font-size: 11.5px; color: var(--muted);
    font-weight: 650; text-transform: uppercase; letter-spacing: 0.03em; flex: 0 0 auto;
  }
  .tbl td:not([data-label])::before { display: none; }
  .tbl td.cell-actions { justify-content: flex-end; border-top: 1px solid var(--line); margin-top: 4px; padding-top: 9px; }
  .tbl tbody tr:hover { background: var(--surface); }
  .dl { grid-template-columns: 1fr; gap: 2px 0; }
  .dl dt { margin-top: 7px; }
  .modal-backdrop { padding: 12px; }
  .grid--kpi { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .kpi__value { font-size: 21px; }
}

@media (max-width: 520px) {
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  .modal__foot { flex-direction: column-reverse; }
  .modal__foot .btn { width: 100%; }
}

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

/* ── Şirket logosu ────────────────────────────────────────────────────────
   Ayarlar → Şirket bölümünden logo yüklendiğinde kare "EAC" rozeti yerine
   logonun kendi en-boy oranını koruyan geniş bir alan kullanılır. Logo
   yüklenmemişse bu sınıflar hiç uygulanmaz ve mevcut rozet görünür. */
.brand__mark--logo {
  /* place-items:center ızgarası görseli kendi doğal boyutuna büyütüyordu;
     blok düzene geçip yüksekliği görselin kendisine veriyoruz. */
  display: block;
  width: auto;
  height: auto;
  flex: 0 1 auto;
  max-width: 148px;
  background: none !important;
  border-radius: 0;
  padding: 0;
}
.brand__mark--logo img {
  height: 34px;
  width: auto;
  max-width: 148px;
  object-fit: contain;
  display: block;
}

/* ── Müşteri mesajları ────────────────────────────────────────────────────
   Solda talep listesi, sağda yazışma. Sohbet balonu yönü göndereni belli
   eder; iç notlar ayrıca sarı zeminle ayrılır çünkü müşteriye gitmezler. */
.list-rows { max-height: 62vh; overflow-y: auto; }
.list-row {
  display: block; width: 100%; text-align: left;
  background: none; border: none; border-bottom: 1px solid var(--line);
  padding: 11px 14px; font: inherit; color: inherit; cursor: pointer;
}
.list-row:hover { background: var(--surface-2); }
.list-row--active { background: var(--info-bg); }
.list-row__top { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; }
.list-row__bottom { display: flex; gap: 6px; margin-top: 5px; flex-wrap: wrap; }

.thread {
  display: flex; flex-direction: column; gap: 9px;
  max-height: 52vh; overflow-y: auto;
  padding: 12px 2px; margin-top: 10px;
  border-top: 1px solid var(--line);
}
.bubble {
  max-width: 82%; padding: 9px 12px; border-radius: 11px;
  border: 1px solid var(--line); background: #fff; font-size: 13.5px;
}
.bubble--in { align-self: flex-start; }
.bubble--out { align-self: flex-end; background: var(--info-bg); }
.bubble--internal {
  align-self: stretch; max-width: 100%;
  background: var(--warn-bg); border-color: #f0d9ae;
}

/* ── Fotoğraf çekme / küçük resim ızgarası ────────────────────────────────
   Telefonda tek elle kullanılır: küçük resimler büyük, çıkarma düğmesi
   parmakla basılacak ölçüde. */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 8px;
}
.photo-grid__item { position: relative; margin: 0; }
.photo-grid__item img {
  width: 100%; aspect-ratio: 4 / 3; object-fit: cover;
  border-radius: var(--radius-sm); border: 1px solid var(--line);
  background: var(--surface-2); display: block;
}
.photo-grid__remove {
  position: absolute; top: 4px; right: 4px;
  width: 26px; height: 26px; border-radius: 50%;
  border: none; background: rgba(11, 27, 51, 0.72); color: #fff;
  font-size: 16px; line-height: 1; cursor: pointer;
}
.photo-grid__remove:hover { background: var(--danger); }
