/* TeknoShop Bilgisayar - Yönetim paneli teması
   Renkler teknoshopbilgisayar.com kurumsal paletinden alınmıştır. */
:root {
  --navy: #14165a;
  --navy-2: #1d2078;
  --navy-3: #0c0d3a;
  --blue: #3b4dff;
  --blue-d: #2a39e0;
  --blue-soft: #eceeff;
  --blue-soft-2: #dfe3ff;
  --ink: #10123a;
  --ink-2: #2c2f55;
  --muted: #5d6180;
  --bg: #ffffff;
  --bg-2: #f6f7fb;
  --bg-3: #eef0f7;
  --line: #e3e5ef;
  --line-2: #d5d8e6;
  --ok: #16803c;
  --warn: #a15c00;
  --bad: #c2302a;
  --r: 12px;
  --shadow: 0 1px 2px rgba(20,22,90,.05), 0 8px 24px rgba(20,22,90,.07);
  --sidebar-w: 256px;
  --sidebar-w-collapsed: 72px;
  --bs-primary: #3b4dff;
  --bs-primary-rgb: 59,77,255;
  --bs-link-color: #3b4dff;
  --bs-link-color-rgb: 59,77,255;
  --bs-link-hover-color: #2a39e0;
  --bs-body-color: #2c2f55;
  --bs-border-color: #e3e5ef;
  --bs-border-radius: 10px;
  --bs-body-font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html, body { height: 100%; }
body { background: var(--bg-2); color: var(--ink-2); font-size: .935rem; }
h1, h2, h3, h4, h5, h6 { color: var(--ink); font-weight: 650; letter-spacing: -.01em; }
a { text-decoration: none; }
.tiny { font-size: .72rem; }
.text-ink { color: var(--ink) !important; }

/* ---------- Butonlar ---------- */
.btn-primary { --bs-btn-bg: var(--blue); --bs-btn-border-color: var(--blue); --bs-btn-hover-bg: var(--blue-d); --bs-btn-hover-border-color: var(--blue-d); --bs-btn-active-bg: var(--blue-d); --bs-btn-disabled-bg: var(--blue); --bs-btn-disabled-border-color: var(--blue); }
.btn-navy { --bs-btn-color: #fff; --bs-btn-bg: var(--navy); --bs-btn-border-color: var(--navy); --bs-btn-hover-color: #fff; --bs-btn-hover-bg: var(--navy-2); --bs-btn-hover-border-color: var(--navy-2); }
.btn-outline-primary { --bs-btn-color: var(--blue); --bs-btn-border-color: var(--blue); --bs-btn-hover-bg: var(--blue); --bs-btn-hover-border-color: var(--blue); }
.btn-soft { background: var(--blue-soft); color: var(--blue-d); border: 1px solid transparent; }
.btn-soft:hover { background: var(--blue-soft-2); color: var(--navy); }
.btn-icon { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: #fff; color: var(--ink-2); }
.btn-icon:hover { background: var(--bg-3); }
.btn-user { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 4px 10px 4px 4px; color: var(--ink); }
.avatar { width: 30px; height: 30px; border-radius: 8px; background: var(--navy); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.form-control:focus, .form-select:focus { border-color: var(--blue); box-shadow: 0 0 0 .2rem rgba(59,77,255,.15); }
.form-label { font-weight: 550; color: var(--ink); font-size: .85rem; margin-bottom: .3rem; }
.form-text { font-size: .78rem; }
.required::after { content: " *"; color: var(--bad); }

/* ---------- Yerleşim ---------- */
.app-shell { display: flex; min-height: 100vh; }
.app-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.content { padding: 24px; flex: 1; }
.app-footer { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 14px 24px; font-size: .78rem; color: var(--muted); border-top: 1px solid var(--line); background: #fff; }

.sidebar { width: var(--sidebar-w); flex-shrink: 0; background: var(--navy); color: #c8cbf0; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; transition: width .2s ease; }
.side-brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); min-height: 72px; }
.brand-mark { width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; background: var(--blue); color: #fff; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; letter-spacing: .02em; }
.brand-logo { background: #fff; border-radius: 10px; padding: 4px 8px; display: inline-flex; align-items: center; max-width: 130px; }
.brand-logo img { max-height: 30px; max-width: 110px; object-fit: contain; }
.brand-text { font-weight: 700; line-height: 1.15; font-size: .95rem; }
.brand-text small { display: block; font-weight: 400; color: #aeb2dc; font-size: .72rem; }
.side-nav { padding: 12px 10px; display: flex; flex-direction: column; gap: 2px; }
.side-link { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; color: #c8cbf0; font-weight: 500; white-space: nowrap; position: relative; }
.side-link i { width: 20px; text-align: center; font-size: 1rem; color: #8f99ff; }
.side-link:hover { background: rgba(255,255,255,.06); color: #fff; }
.side-link.active { background: var(--blue); color: #fff; box-shadow: 0 6px 18px rgba(59,77,255,.35); }
.side-link.active i { color: #fff; }
.side-badge { margin-left: auto; background: rgba(255,255,255,.14); color: #fff; font-size: .7rem; padding: 1px 7px; border-radius: 20px; }
.side-link.active .side-badge { background: rgba(255,255,255,.25); }
.side-footer { margin-top: auto; padding: 14px 18px; font-size: .72rem; color: #7d82b8; }
.sidebar-collapsed .sidebar { width: var(--sidebar-w-collapsed); }
.sidebar-collapsed .sidebar .side-text, .sidebar-collapsed .sidebar .side-badge, .sidebar-collapsed .sidebar .brand-logo { display: none; }
.sidebar-collapsed .sidebar .side-link { justify-content: center; padding: 10px; }
.sidebar-collapsed .sidebar .side-brand { justify-content: center; padding: 18px 8px; }
.sidebar-offcanvas { background: var(--navy); color: #fff; width: 280px !important; }
.sidebar-offcanvas .side-brand { border: 0; padding: 0; min-height: 0; }

.topbar { position: sticky; top: 0; z-index: 1020; display: flex; align-items: center; gap: 10px; padding: 12px 24px; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar-search { position: relative; flex: 1; max-width: 560px; }
.topbar-search > i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.topbar-search .form-control { padding-left: 36px; background: var(--bg-2); border-color: var(--line); height: 38px; }
.search-suggest { width: 100%; max-height: 420px; overflow-y: auto; }
.search-suggest .dropdown-item { white-space: normal; }
.topbar-date { color: var(--muted); font-size: .82rem; margin-left: auto; white-space: nowrap; }
.notif-dot { position: absolute; top: -5px; right: -6px; background: var(--bad); color: #fff; font-size: .62rem; border-radius: 10px; padding: 1px 5px; font-weight: 700; }
.notif-menu { width: 340px; max-width: 92vw; }
.notif-item { border-bottom: 1px solid var(--line); padding: 10px 14px; }

/* ---------- Kartlar ve sayfa başlığı ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.page-head h1 { font-size: 1.45rem; margin: 0; }
.page-head .sub { color: var(--muted); font-size: .85rem; margin-top: 2px; }
.breadcrumb { font-size: .8rem; margin-bottom: 4px; }
.card { border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card-header { background: #fff; border-bottom: 1px solid var(--line); font-weight: 650; color: var(--ink); padding: 14px 18px; border-top-left-radius: var(--r) !important; border-top-right-radius: var(--r) !important; }
.card-body { padding: 18px; }
.stat-card { display: block; padding: 16px 18px; border-radius: var(--r); background: #fff; border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink-2); transition: transform .15s ease, box-shadow .15s ease; height: 100%; }
.stat-card:hover { transform: translateY(-2px); box-shadow: 0 2px 6px rgba(20,22,90,.06), 0 18px 40px rgba(20,22,90,.12); color: var(--ink-2); }
.stat-card .stat-icon { width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; background: var(--blue-soft); color: var(--blue); font-size: 1.05rem; }
.stat-card .stat-label { font-size: .78rem; color: var(--muted); margin-top: 10px; }
.stat-card .stat-value { font-size: 1.45rem; font-weight: 750; color: var(--ink); line-height: 1.2; }
.stat-card.warn .stat-icon { background: #fff3e0; color: var(--warn); }
.stat-card.bad .stat-icon { background: #fdeceb; color: var(--bad); }
.stat-card.ok .stat-icon { background: #e6f5ec; color: var(--ok); }
.quick-actions .btn { border-radius: 10px; }

/* ---------- Tablolar ---------- */
.table { --bs-table-bg: transparent; margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .65rem .75rem; vertical-align: middle; }
.table thead th { font-size: .74rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--bg-2); border-bottom: 1px solid var(--line); font-weight: 650; white-space: nowrap; }
.table-hover tbody tr:hover { background: #fafbff; }
.sort-link { color: inherit; }
.table-actions { white-space: nowrap; text-align: right; }
.table-actions .btn { padding: .2rem .5rem; }
.table-responsive { border-radius: var(--r); }
.filter-bar { background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px; margin-bottom: 16px; }
.filter-bar .form-label { font-size: .75rem; color: var(--muted); }

.badge { font-weight: 600; letter-spacing: .01em; }
.badge-soft-success { background: #e6f5ec; color: #11692f; }
.badge-soft-primary { background: var(--blue-soft); color: var(--blue-d); }
.badge-soft-info { background: #e3f4fb; color: #0d6a8c; }
.badge-soft-warning { background: #fff3e0; color: #8a4f00; }
.badge-soft-danger { background: #fdeceb; color: #a8231d; }
.badge-soft-secondary { background: var(--bg-3); color: var(--ink-2); }
.badge-soft-dark { background: #e4e5ec; color: #2c2f55; }

.empty-state { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty-state i { font-size: 2.2rem; color: var(--line-2); margin-bottom: 12px; display: block; }

/* ---------- Detay sayfaları ---------- */
.dl-grid { display: grid; grid-template-columns: 170px 1fr; gap: 8px 14px; font-size: .9rem; margin: 0; }
.dl-grid dt { color: var(--muted); font-weight: 500; }
.dl-grid dd { margin: 0; color: var(--ink); word-break: break-word; }
.nav-tabs .nav-link { color: var(--muted); font-weight: 550; }
.nav-tabs .nav-link.active { color: var(--blue); }
.section-title { font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; margin: 18px 0 10px; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; border-left: 2px solid var(--line); margin-left: 6px; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 2px solid var(--blue); }
.timeline li:last-child { border-left-color: transparent; }

/* ---------- Teklif kalemleri ---------- */
.items-table input, .items-table select, .items-table textarea { font-size: .85rem; }
.items-table td { padding: .35rem !important; vertical-align: top !important; }
.items-table .drag { cursor: grab; color: var(--muted); padding-top: .5rem; }
.items-table tr.dragging { opacity: .5; }
.items-table .line-total { font-weight: 650; color: var(--ink); white-space: nowrap; padding-top: .55rem !important; text-align: right; }
.totals-box { background: var(--bg-2); border-radius: var(--r); padding: 14px 18px; }
.totals-box .row-t { display: flex; justify-content: space-between; padding: 4px 0; }
.totals-box .grand { font-size: 1.2rem; font-weight: 800; color: var(--navy); border-top: 1px solid var(--line-2); margin-top: 6px; padding-top: 10px; }

/* ---------- Yükleniyor ---------- */
.loading-overlay { position: fixed; inset: 0; background: rgba(12,13,58,.55); z-index: 2000; display: none; align-items: center; justify-content: center; flex-direction: column; gap: 12px; color: #fff; }
.loading-overlay.show { display: flex; }

/* ---------- Giriş / kurulum ---------- */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: radial-gradient(1200px 600px at 10% -10%, #2a39e0 0%, transparent 55%), linear-gradient(135deg, var(--navy-3), var(--navy)); padding: 24px 16px; }
.auth-card { width: 100%; max-width: 420px; background: #fff; border-radius: 18px; box-shadow: 0 30px 80px rgba(0,0,0,.35); padding: 32px; }
.auth-card.wide { max-width: 760px; }
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.auth-brand img { max-height: 44px; max-width: 200px; }

/* Takvim */
.fc { --fc-border-color: var(--line); --fc-button-bg-color: var(--navy); --fc-button-border-color: var(--navy); --fc-button-hover-bg-color: var(--navy-2); --fc-button-active-bg-color: var(--blue); --fc-today-bg-color: #f1f3ff; --fc-event-bg-color: var(--blue); --fc-event-border-color: var(--blue); font-size: .85rem; }
.fc .fc-toolbar-title { font-size: 1.15rem; color: var(--ink); }

@media (max-width: 991.98px) {
  .content { padding: 16px; }
  .topbar { padding: 10px 16px; }
  .dl-grid { grid-template-columns: 1fr; gap: 2px; }
  .dl-grid dd { margin-bottom: 8px; }
}
@media (max-width: 575.98px) {
  .page-head h1 { font-size: 1.2rem; }
  .stat-card .stat-value { font-size: 1.2rem; }
  .table-mobile-cards thead { display: none; }
  .table-mobile-cards tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .table-mobile-cards td { display: flex; justify-content: space-between; gap: 12px; border: 0 !important; padding: .25rem .75rem !important; text-align: right; }
  .table-mobile-cards td::before { content: attr(data-label); color: var(--muted); font-size: .75rem; text-align: left; font-weight: 600; }
  .table-mobile-cards td.table-actions { justify-content: flex-end; }
  .table-mobile-cards td.table-actions::before { content: none; }
}
@media print {
  .sidebar, .topbar, .app-footer, .no-print { display: none !important; }
  .content { padding: 0; }
  body { background: #fff; }
}
