/* ═══════════════════════════════════════
   Solarbiotec Ofis Harcamalari — Stiller
   ═══════════════════════════════════════ */

:root {
  --brand:      #1d4ed8;
  --brand-dark: #1e40af;
  --brand-bg:   #eff6ff;
  --surface:    #f1f5f9;
  --card-sh:    0 1px 3px rgba(0,0,0,.07), 0 1px 2px rgba(0,0,0,.04);
  --card-sh-hover: 0 4px 12px rgba(0,0,0,.1);
}

/* ── Global ── */
body { background: var(--surface); font-family: 'Inter', system-ui, sans-serif; font-size: .9rem; color: #1e293b; }
a { color: var(--brand); }

/* ── Navbar ── */
.navbar { background: #0f172a !important; border-bottom: 1px solid #1e293b; padding: .5rem 1rem; }
.navbar-brand { font-weight: 700; font-size: .95rem; letter-spacing: -.2px; display: flex; align-items: center; gap: .6rem; }
.brand-icon { background: var(--brand); color: #fff; border-radius: .4rem; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; font-size: .85rem; flex-shrink: 0; }
.brand-sub { color: #94a3b8; font-weight: 400; font-size: .75rem; }
.navbar .nav-link { color: #94a3b8 !important; font-size: .82rem; font-weight: 500; padding: .4rem .75rem !important; border-radius: .375rem; display: flex; align-items: center; gap: .35rem; transition: color .15s, background .15s; }
.navbar .nav-link:hover { color: #e2e8f0 !important; background: rgba(255,255,255,.07); }
.navbar .nav-link.active { color: #fff !important; background: var(--brand); }

/* ── Cards ── */
.card { border: 1px solid #e2e8f0; box-shadow: var(--card-sh); border-radius: .75rem; background: #fff; }
.card-header { background: #fff; border-bottom: 1px solid #e2e8f0; border-radius: .75rem .75rem 0 0 !important; font-weight: 600; font-size: .85rem; padding: .75rem 1rem; }
.card:hover { box-shadow: var(--card-sh-hover); transition: box-shadow .2s; }

/* ── Tables ── */
.table th { font-size: .72rem; text-transform: uppercase; letter-spacing: .5px; color: #64748b; font-weight: 600; border-bottom: 2px solid #e2e8f0; white-space: nowrap; }
.table td { font-size: .855rem; vertical-align: middle; color: #334155; }
.table-hover tbody tr:hover { background: #f8fafc; }
.table-light { background: #f8fafc !important; }

/* ── KPI ── */
.kpi { border-radius: .75rem; padding: 1.1rem 1.25rem; background: #fff; border: 1px solid #e2e8f0; box-shadow: var(--card-sh); }
.kpi-icon { width: 40px; height: 40px; border-radius: .5rem; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; flex-shrink: 0; }
.kpi-val { font-size: 1.45rem; font-weight: 700; letter-spacing: -.5px; line-height: 1.2; }
.kpi-label { font-size: .75rem; color: #64748b; font-weight: 500; margin-top: .15rem; }
.kpi-trend { font-size: .75rem; font-weight: 600; }
.trend-up   { color: #dc2626; }
.trend-down { color: #16a34a; }
.trend-flat { color: #64748b; }

/* ── Badges ── */
.badge-store { font-size: .68rem; font-weight: 500; border-radius: .3rem; }
.num { font-feature-settings: "tnum"; }

/* ── Page header ── */
.page-header { display: flex; align-items: center; gap: .75rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
.page-header h4 { font-size: 1.1rem; font-weight: 700; letter-spacing: -.3px; margin: 0; }
.page-header .subtitle { color: #64748b; font-size: .8rem; }

/* ── Accordion ── */
.accordion-button { font-size: .875rem; }
.accordion-button:focus { box-shadow: none; }
.accordion-button:not(.collapsed) { background: var(--brand-bg); color: var(--brand-dark); box-shadow: none; }

/* ── Misc ── */
.alert { border-radius: .625rem; font-size: .855rem; }
.btn-xs { font-size: .72rem; padding: .1rem .35rem; }
.hidden { display: none !important; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

/* ── Stok ── */
tr.kritik > td { background: #fecaca !important; }
.k-ok   { color: #15803d; font-weight: 600; }
.k-warn { color: #b45309; font-weight: 600; }
.k-low  { color: #dc2626; font-weight: 600; }
.k-zero { color: #dc2626; font-weight: 700; }

/* ── Login ── */
.login-bg { background: radial-gradient(circle at top right, #1e293b, #0f172a); min-height: 100vh; }
.login-container { min-height: calc(100vh - 100px); display: flex; align-items: center; justify-content: center; }
.login-card { background: rgba(30,41,59,.7); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,.1); border-radius: 1.5rem; padding: 2.5rem; width: 100%; max-width: 420px; box-shadow: 0 25px 50px -12px rgba(0,0,0,.5); }
.brand-logo { width: 64px; height: 64px; background: linear-gradient(135deg,#3b82f6,#1d4ed8); border-radius: 1rem; display: flex; align-items: center; justify-content: center; margin: 0 auto 1.5rem; font-size: 1.8rem; color: white; box-shadow: 0 10px 15px -3px rgba(59,130,246,.5); }
.login-card .form-control { background: rgba(15,23,42,.6); border: 1px solid rgba(255,255,255,.1); color: white; padding: .75rem 1rem; border-radius: .75rem; }
.login-card .form-control:focus { background: rgba(15,23,42,.8); border-color: #3b82f6; box-shadow: 0 0 0 2px rgba(59,130,246,.25); color: white; }
.login-card .btn-primary { background: linear-gradient(to right,#2563eb,#1d4ed8); border: none; padding: .75rem; border-radius: .75rem; font-weight: 600; margin-top: 1rem; }
.login-card .btn-primary:hover { background: linear-gradient(to right,#1d4ed8,#1e40af); transform: translateY(-1px); }
.toggle-link { color: #94a3b8; font-size: .85rem; text-decoration: none; transition: color .2s; cursor: pointer; }
.toggle-link:hover { color: #f1f5f9; }

/* ── Veri Girişi ── */
.ac-wrap { position: relative; }
.ac-drop { display: none; position: absolute; z-index: 9999; top: 100%; left: 0; right: 0; background: #fff; border: 1px solid #dee2e6; border-radius: .375rem; box-shadow: 0 4px 12px rgba(0,0,0,.12); max-height: 260px; overflow-y: auto; }
.ac-drop.show { display: block; }
.ac-item { padding: .45rem .75rem; cursor: pointer; font-size: .9rem; display: flex; align-items: center; gap: .5rem; }
.ac-item:hover, .ac-item.active { background: #f0f4ff; }
.ac-item .badge { font-size: .68rem; flex-shrink: 0; }
.ac-new { color: #0d6efd; font-style: italic; }
.ac-num { font-size: .68rem; background: #e2e8f0; border: 1px solid #cbd5e1; border-radius: 3px; padding: 1px 5px; min-width: 18px; text-align: center; flex-shrink: 0; font-family: monospace; }
.price-hint { display: none; position: absolute; top: calc(100% + 2px); left: 0; right: 0; font-size: .72rem; color: #495057; background: #fffbe6; border: 1px solid #ffc107; border-radius: .25rem; padding: 1px 5px; z-index: 300; white-space: nowrap; box-shadow: 0 2px 6px rgba(0,0,0,.1); }
.price-hint.show { display: block; cursor: pointer; }
.price-hint.show:hover { background: #fff3cd; border-color: #e6a817; }
.sortable th { cursor: pointer; user-select: none; white-space: nowrap; }
.sortable th.asc::after  { content: " \2191"; color: #0d6efd; }
.sortable th.desc::after { content: " \2193"; color: #0d6efd; }
.tr-edit td { background: #fffbf0 !important; }
.tr-edit input, .tr-edit select { font-size: .82rem; padding: .2rem .4rem; }
.cat-badge { font-size: .68rem; }
.cat-Gida        { background: #d1e7dd; color: #0a3622; }
.cat-Temizlik     { background: #cfe2ff; color: #084298; }
.cat-Icecek       { background: #fff3cd; color: #664d03; }
.cat-Atistirmalik { background: #f8d7da; color: #842029; }
.cat-Sebze        { background: #e2d9f3; color: #432874; }
#mainTable tbody tr { cursor: pointer; user-select: none; }
#mainTable tbody tr.tr-selected > td { background: #bfdbfe !important; border-top: 1px solid #60a5fa !important; border-bottom: 1px solid #60a5fa !important; }
#mainTable tbody tr.tr-selected > td:first-child { border-left: 3px solid #2563eb !important; }
@keyframes flashFill { 0%{background:#d1fae5;box-shadow:0 0 0 2px #6ee7b7} 60%{background:#d1fae5;box-shadow:0 0 0 2px #6ee7b7} 100%{background:transparent;box-shadow:none} }
.flash-fill { animation: flashFill .75s ease forwards; }
