:root {
  --navy: #17223b;
  --navy-2: #22304f;
  --accent: #f57d50;
  --accent-2: #e0663a;
  --bg: #f4f6fa;
  --line: #e6e9f0;
  --muted: #6b7489;
  --bs-body-font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --bs-body-color: #1f2433;
  --bs-primary: #2f4a7f;
  --bs-primary-rgb: 47, 74, 127;
  --bs-link-color: #2f4a7f;
  --bs-link-color-rgb: 47, 74, 127;
  --bs-border-color: var(--line);
}

body { background: var(--bg); font-size: .925rem; }

/* ---------- Layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 250px; flex-shrink: 0;
  background: linear-gradient(180deg, var(--navy) 0%, #111a2e 100%);
  color: #c9d1e3; display: flex; flex-direction: column;
}
@media (min-width: 992px) {
  .sidebar { position: sticky; top: 0; height: 100vh; }
}
.sidebar-brand { display: flex; align-items: center; gap: 12px; padding: 22px 20px; border-bottom: 1px solid rgba(255,255,255,.07); }
.brand-mark {
  width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center;
  background: var(--accent); color: #fff; font-weight: 700; font-size: .8rem; letter-spacing: .5px;
}
.brand-logo { max-width: 46px; max-height: 42px; border-radius: 8px; background: #fff; padding: 3px; object-fit: contain; }
.brand-link { text-decoration: none; display: block; }
.brand-logo-beyaz { width: 170px; max-width: 100%; display: block; }
.brand-link .brand-sub { margin-top: 8px; letter-spacing: .08em; text-transform: uppercase; font-size: .68rem; }
.brand-title { color: #fff; font-weight: 700; font-size: 1.02rem; line-height: 1.1; }
.brand-sub { font-size: .75rem; color: #8592b0; }
.sidebar-nav { padding: 14px 12px; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.sidebar-nav a, .sidebar-foot a {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 8px;
  color: #c9d1e3; text-decoration: none; font-weight: 500;
}
.sidebar-nav a i, .sidebar-foot a i { font-size: 1.1rem; opacity: .85; }
.sidebar-nav a:hover, .sidebar-foot a:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-nav a.active { background: rgba(245,125,80,.16); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.sidebar-nav a.nav-yeni { margin: 6px 0 10px; background: var(--accent); color: #fff; }
.sidebar-nav a.nav-yeni:hover { background: var(--accent-2); }
.sidebar-foot { padding: 12px; border-top: 1px solid rgba(255,255,255,.07); }

.main { flex: 1; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px; background: #fff; border-bottom: 1px solid var(--line);
}
.content { padding: 28px 32px 48px; max-width: 1400px; }
@media (max-width: 991.98px) { .content { padding: 18px 16px 40px; } }

.page-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; }
.page-head h1 { font-size: 1.5rem; font-weight: 700; margin: 0; color: var(--navy); }
.page-head p { margin: 4px 0 0; color: var(--muted); }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- Components ---------- */
.card { border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.card-header { background: #fff; border-bottom: 1px solid var(--line); font-weight: 600; padding: 14px 18px; border-radius: 12px 12px 0 0 !important; }
.card-body { padding: 18px; }

.btn { font-weight: 500; border-radius: 8px; }
.btn-accent { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-accent:hover, .btn-accent:focus { background: var(--accent-2); border-color: var(--accent-2); color: #fff; }
.btn-primary { background: var(--navy-2); border-color: var(--navy-2); }
.btn-primary:hover { background: var(--navy); border-color: var(--navy); }

.form-label { font-weight: 500; font-size: .85rem; color: #3b4357; margin-bottom: 4px; }
.form-control, .form-select { border-radius: 8px; border-color: #d9dee8; }
.form-control:focus, .form-select:focus { border-color: var(--accent); box-shadow: 0 0 0 .2rem rgba(245,125,80,.18); }

.stat { display: flex; align-items: center; gap: 14px; }
.stat-icon { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 1.3rem; flex-shrink: 0; }
.stat-label { font-size: .8rem; color: var(--muted); font-weight: 500; }
.stat-value { font-size: 1.35rem; font-weight: 700; color: var(--navy); line-height: 1.2; }
.bg-soft-blue { background: #e8eefb; color: #2f4a7f; }
.bg-soft-gold { background: #fdeee7; color: var(--accent-2); }
.bg-soft-green { background: #e3f4ea; color: #1f8a4c; }
.bg-soft-red { background: #fbe7e7; color: #c0392b; }

.table { --bs-table-hover-bg: #f7f9fc; margin-bottom: 0; }
.table > thead th {
  font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted);
  font-weight: 600; background: #f8f9fc; border-bottom-width: 1px; white-space: nowrap;
}
.table td, .table th { padding: .7rem .85rem; vertical-align: middle; }
.table a.row-link { color: inherit; text-decoration: none; font-weight: 600; }
.table a.row-link:hover { color: var(--accent-2); }
.durum-rozet { font-weight: 500; font-size: .75rem; }
.empty { text-align: center; color: var(--muted); padding: 48px 16px; }
.empty i { font-size: 2.4rem; display: block; margin-bottom: 8px; opacity: .5; }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar .form-control, .toolbar .form-select { width: auto; min-width: 180px; }
@media (max-width: 575.98px) { .toolbar .form-control, .toolbar .form-select { min-width: 0; flex: 1 1 100%; } }

/* ---------- Teklif formu ---------- */
.kalem-tablo { min-width: 900px; }
.kalem-tablo td { padding: .45rem .4rem; vertical-align: top; }
.kalem-tablo .form-control, .kalem-tablo .form-select { font-size: .85rem; padding: .35rem .5rem; }
.kalem-tablo .handle { cursor: grab; color: #a3abbd; padding-top: .8rem; text-align: center; width: 28px; }
.kalem-tablo .js-tutar { font-weight: 600; padding-top: .8rem; white-space: nowrap; }
.kalem-tablo .aciklama { color: var(--muted); font-size: .8rem !important; }
.sortable-ghost { background: #fff3ee; }
.toplam-kutu .satir { display: flex; justify-content: space-between; padding: 6px 0; }
.toplam-kutu .satir span:first-child { color: var(--muted); }
.toplam-kutu .genel { border-top: 2px solid var(--navy); margin-top: 6px; padding-top: 10px; font-size: 1.15rem; font-weight: 700; color: var(--navy); }
.sticky-actions { position: sticky; bottom: 0; background: rgba(244,246,250,.95); backdrop-filter: blur(4px); padding: 12px 0; border-top: 1px solid var(--line); z-index: 10; }

.ts-wrapper.form-select .ts-control, .ts-wrapper .ts-control { border-radius: 8px; border-color: #d9dee8; }
.ts-dropdown .optgroup-header { font-weight: 700; color: var(--accent-2); text-transform: uppercase; font-size: .72rem; letter-spacing: .05em; }
.ts-dropdown .malz-opt { display: flex; justify-content: space-between; gap: 12px; }
.ts-dropdown .malz-opt small { color: var(--muted); white-space: nowrap; }

/* ---------- Giriş ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-side {
  background: linear-gradient(135deg, rgba(23,34,59,.96), rgba(17,26,46,.92)), repeating-linear-gradient(45deg, #1d2a48 0 2px, transparent 2px 22px);
  color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between;
}
.login-side h2 { font-weight: 700; font-size: 2.2rem; line-height: 1.2; }
.login-side .accent { color: var(--accent); }
.login-side ul { list-style: none; padding: 0; margin: 28px 0 0; color: #c9d1e3; }
.login-side li { margin-bottom: 10px; display: flex; gap: 10px; }
.login-side li i { color: var(--accent); }
.login-form { display: grid; place-items: center; padding: 32px 20px; background: #fff; }
.login-box { width: 100%; max-width: 380px; }
@media (max-width: 860px) { .login-wrap { grid-template-columns: 1fr; } .login-side { display: none; } }
