/* ARBEN AUTO — Ortak tasarım sistemi */
:root {
  --brand: #8a4b08;
  --brand-600: #9c5710;
  --brand-700: #733d05;
  --brand-50: #fdf3e7;
  --brand-100: #fbe4cc;
  --ink: #0f172a;
  --ink-700: #1e293b;
  --text: #1a1d24;
  --muted: #667085;
  --muted-2: #98a2b3;
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --line: #e6e8ec;
  --line-2: #eef0f3;
  --green: #12805c;
  --green-50: #e8f6ef;
  --red: #d92d20;
  --red-50: #fdecea;
  --amber: #b54708;
  --amber-50: #fff6e0;
  --amber-line: #f5d38a;
  --blue: #1d4ed8;
  --blue-50: #eaf1ff;
  --violet: #6941c6;
  --violet-50: #f2edff;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow: 0 1px 3px rgba(16, 24, 40, .06), 0 4px 14px rgba(16, 24, 40, .04);
  --shadow-lg: 0 12px 40px rgba(16, 24, 40, .16);
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.02em; color: var(--ink); }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img, svg { display: block; }
.mono { font-family: var(--mono); font-feature-settings: "zero" 0; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
[hidden] { display: none !important; }

/* ---------- İkonlar ---------- */
.ico { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico-sm { width: 15px; height: 15px; }
.ico-lg { width: 22px; height: 22px; }

/* ---------- Butonlar ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 16px; border-radius: 10px;
  border: 1px solid transparent; background: var(--surface); color: var(--text);
  font-weight: 700; font-size: 13.5px; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--brand-100); outline-offset: 1px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(138, 75, 8, .3); }
.btn-primary:hover { background: var(--brand-700); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--ink-700); }
.btn-outline { border-color: var(--line); background: var(--surface); box-shadow: var(--shadow-sm); }
.btn-outline:hover { border-color: #cfd4dc; background: var(--surface-2); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--line-2); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: #0d6b4c; }
.btn-red { background: var(--red); color: #fff; }
.btn-red:hover { background: #b42318; }
.btn-soft-red { background: var(--red-50); color: var(--red); }
.btn-sm { height: 32px; padding: 0 12px; font-size: 12.5px; border-radius: 8px; }
.btn-lg { height: 50px; padding: 0 24px; font-size: 15px; border-radius: 12px; }
.btn-icon { width: 36px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }

/* ---------- Form ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 12px; font-weight: 700; color: var(--ink-700); }
.field .req { color: var(--red); }
.field .hint { font-size: 11.5px; color: var(--muted); }
.input, .select, .textarea {
  width: 100%; height: 42px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  font-size: 14px; transition: border-color .15s, box-shadow .15s;
}
.textarea { height: auto; min-height: 92px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.input-group { position: relative; display: flex; align-items: center; }
.input-group > .ico { position: absolute; left: 12px; color: var(--muted); pointer-events: none; }
.input-group > .input { padding-left: 38px; }
.input-group .addon { position: absolute; right: 8px; font-size: 11px; font-weight: 700; color: var(--muted); background: var(--line-2); border-radius: 6px; padding: 2px 6px; }
.prefix-input { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.prefix-input:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-100); }
.prefix-input span { display: grid; place-items: center; padding: 0 12px; background: var(--surface-2); border-right: 1px solid var(--line); font-weight: 700; color: var(--muted); }
.prefix-input .input { border: 0; box-shadow: none !important; }
.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; cursor: pointer; user-select: none; }
.check input { width: 17px; height: 17px; accent-color: var(--brand); }

/* ---------- Rozetler ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px;
  border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap;
  background: var(--line-2); color: var(--ink-700); border: 1px solid transparent;
}
.badge .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-green { background: var(--green-50); color: var(--green); border-color: #bfe6d2; }
.badge-red { background: var(--red-50); color: var(--red); border-color: #f7c6c1; }
.badge-amber { background: var(--amber-50); color: var(--amber); border-color: var(--amber-line); }
.badge-blue { background: var(--blue-50); color: var(--blue); border-color: #c7d7fe; }
.badge-violet { background: var(--violet-50); color: var(--violet); border-color: #d9ccfb; }
.badge-brand { background: var(--brand-50); color: var(--brand); border-color: var(--brand-100); }
.badge-square { border-radius: 6px; height: 22px; padding: 0 8px; font-size: 11px; }

/* ---------- Plaka ---------- */
.plate {
  display: inline-flex; align-items: stretch; height: 28px; border: 1.5px solid var(--ink);
  border-radius: 5px; overflow: hidden; background: #fff; font-family: var(--mono); font-weight: 700;
  letter-spacing: .06em; color: var(--ink); white-space: nowrap; flex: none;
}
.plate::before {
  content: "TR"; display: grid; place-items: center; width: 22px; background: var(--blue); color: #fff;
  font-family: var(--font); font-size: 9.5px; letter-spacing: 0; padding-top: 6px;
  background-image: radial-gradient(circle at 50% 28%, #ffd200 0 1.5px, transparent 2px);
}
.plate span { display: grid; place-items: center; padding: 0 10px; font-size: 13.5px; }
.plate-lg { height: 34px; }
.plate-lg span { font-size: 16px; padding: 0 12px; }
.plate-lg::before { width: 26px; font-size: 10.5px; }

/* ---------- Kart ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 22px 24px; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 24px 0; }
.card-head h2, .card-head h3 { font-size: 16px; }
.card-head p { color: var(--muted); font-size: 12.5px; margin-top: 3px; }
.ic-box { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--brand-50); color: var(--brand); flex: none; }
.ic-box.blue { background: var(--blue-50); color: var(--blue); }
.ic-box.green { background: var(--green-50); color: var(--green); }
.ic-box.red { background: var(--red-50); color: var(--red); }
.ic-box.dark { background: var(--line-2); color: var(--ink); }

/* ---------- Tablo ---------- */
.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
  text-align: left; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); background: var(--surface-2); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:hover td { background: #fcfcfd; }
.table .num { text-align: right; font-family: var(--mono); white-space: nowrap; }
.table .strong { font-weight: 700; color: var(--ink); }
.table .sub { display: block; font-size: 12px; color: var(--muted); }

/* ---------- Boş / yükleniyor ---------- */
.empty { padding: 48px 20px; text-align: center; color: var(--muted); }
.empty .ico { width: 34px; height: 34px; margin: 0 auto 10px; color: var(--muted-2); }
.empty strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.skeleton { background: linear-gradient(90deg, #eef0f3 25%, #f6f7f9 37%, #eef0f3 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: 8px; }
@keyframes sk { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.spinner { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.spinner.dark { border-color: var(--line); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Bildirim (toast) ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; z-index: 200; max-width: calc(100vw - 40px); }
.toast { display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 380px; padding: 12px 16px; border-radius: 12px; background: var(--ink); color: #fff; font-weight: 600; font-size: 13.5px; box-shadow: var(--shadow-lg); animation: toastIn .25s ease; }
.toast.ok .ico { color: #5ee0a8; }
.toast.err { background: #b42318; }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); backdrop-filter: blur(2px); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; z-index: 100; animation: fade .15s ease; }
.modal { width: 100%; max-width: 640px; background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); animation: pop .18s ease; }
.modal-lg { max-width: 920px; }
.modal-sm { max-width: 440px; }
.modal-head { display: flex; align-items: flex-start; gap: 14px; padding: 22px 24px 18px; border-bottom: 1px solid var(--line-2); }
.modal-head h3 { font-size: 17px; }
.modal-head p { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.modal-head .close { margin-left: auto; }
.modal-body { padding: 22px 24px; }
.modal-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 16px 24px; border-top: 1px solid var(--line-2); background: var(--surface-2); border-radius: 0 0 18px 18px; }
.modal-foot .left { margin-right: auto; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.span3 { grid-column: span 3; }
.span-all { grid-column: 1 / -1; }
.section-title { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 6px 0 2px; }
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line-2); }
.form-error { display: flex; gap: 8px; align-items: center; padding: 10px 12px; border-radius: 10px; background: var(--red-50); color: var(--red); font-weight: 600; font-size: 13px; }

@media (max-width: 720px) {
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .span2, .span3 { grid-column: auto; }
  .modal-backdrop { padding: 12px 8px; }
  .modal-head, .modal-body, .modal-foot { padding-left: 16px; padding-right: 16px; }
}
