/* ═══════════════════════════════════════════════════
   ÖZGÜR BİLİŞİM ERP — app.css  (v6 Visual Refresh)
═══════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
  /* Core palette */
  --bg:          #06080f;
  --bg-2:        #090d1a;
  --panel:       #0e1526;
  --panel-2:     #111c31;
  --line:        rgba(99,130,200,.14);
  --line-soft:   rgba(99,130,200,.07);
  --text:        #dde8f8;
  --text-2:      #8aa4c8;
  --muted:       #4d6285;

  /* Brand accent */
  --blue:        #3b82f6;
  --blue-h:      #60a5fa;
  --blue-glow:   rgba(59,130,246,.22);
  --indigo:      #6366f1;
  --cyan:        #22d3ee;
  --violet:      #a855f7;
  --emerald:     #10b981;
  --amber:       #f59e0b;
  --rose:        #f43f5e;

  --radius:      14px;
  --radius-sm:   9px;
  --radius-xs:   6px;
  --shadow:      0 8px 32px rgba(0,4,20,.55);
  --shadow-lg:   0 20px 60px rgba(0,4,20,.70);
  --font:        'Plus Jakarta Sans', system-ui, sans-serif;
  --mono:        'JetBrains Mono', monospace;

  /* Sidebar width */
  --sidebar-w:   252px;
}

/* ── RESET ── */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { font-size:14px; scroll-behavior:smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  /* Animated mesh background */
  background-image:
    radial-gradient(ellipse 80% 60% at 80% -10%, rgba(99,102,241,.13), transparent),
    radial-gradient(ellipse 50% 50% at -5%  80%, rgba(59,130,246,.09), transparent),
    radial-gradient(ellipse 40% 40% at 50% 110%, rgba(168,85,247,.07), transparent);
}
a { text-decoration:none; color:inherit; }
img { display:block; max-width:100%; }
button,input,select,textarea { font:inherit; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width:5px; height:5px; }
::-webkit-scrollbar-track { background:transparent; }
::-webkit-scrollbar-thumb { background:rgba(99,130,200,.20); border-radius:99px; }
::-webkit-scrollbar-thumb:hover { background:rgba(99,130,200,.40); }

/* ─────────────────────────────────────────────────
   LAYOUT
───────────────────────────────────────────────── */
.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  min-height: 100vh;
}

/* ══════ SIDEBAR ══════ */
.sidebar {
  background: linear-gradient(170deg, #070c1b 0%, #0a1025 55%, #07091a 100%);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0 0 16px;
  z-index: 50;
}

/* Brand */
.brand-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 16px 16px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.brand-mark {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 50%, #a855f7 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 14px; letter-spacing:-.3px;
  box-shadow: 0 4px 18px rgba(99,102,241,.45), 0 0 0 1px rgba(255,255,255,.10) inset;
  flex-shrink: 0;
}
.brand-mark.large { width:46px; height:46px; font-size:17px; }
.brand-logo { width:38px; height:38px; object-fit:contain; border-radius:10px; background:#fff; padding:3px; }

.brand-title   { font-size:13px; font-weight:800; color:var(--text); letter-spacing:.01em; line-height:1.2; }
.brand-subtitle { font-size:11px; color:var(--muted); margin-top:2px; }

/* Nav */
.nav { flex:1; padding:10px 10px; display:flex; flex-direction:column; gap:2px; }

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all .14s ease;
  white-space: nowrap;
  position: relative;
}

.nav-link:hover {
  background: rgba(59,130,246,.09);
  border-color: rgba(59,130,246,.14);
  color: var(--text);
  transform: translateX(2px);
}

.nav-link.active {
  background: linear-gradient(90deg, rgba(59,130,246,.18), rgba(99,102,241,.08));
  border-color: rgba(59,130,246,.25);
  color: #93c5fd;
  font-weight: 600;
}

.nav-link.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%; bottom: 20%;
  width: 3px;
  background: linear-gradient(180deg, #3b82f6, #6366f1);
  border-radius: 0 3px 3px 0;
}

.nav-link--danger { color: #f87171; }
.nav-link--danger:hover { background:rgba(244,63,94,.09); border-color:rgba(244,63,94,.18); color:#fca5a5; }

.nav-ico {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px;
  opacity: .75;
  transition: opacity .14s;
  flex-shrink: 0;
}
.nav-link:hover .nav-ico,
.nav-link.active .nav-ico { opacity: 1; }

/* Sidebar footer */
.sidebar-footer {
  padding: 10px 10px 0;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}
.mini-kpi {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}
.mini-kpi-label { display:block; color:var(--muted); font-size:11px; margin-bottom:2px; }
.mini-kpi strong { font-size:12px; color:var(--text); }

/* ══════ CONTENT ══════ */
.content { padding: 18px 22px 32px; min-width: 0; }

/* ── TOPBAR ── */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  background: rgba(9,13,26,.80);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 13px 18px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  position: sticky;
  top: 14px;
  z-index: 40;
}

.eyebrow {
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue-h);
  font-weight: 700;
  margin-bottom: 3px;
  opacity: .85;
}

.topbar-title { font-size: 19px; font-weight: 800; color: var(--text); line-height: 1; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }

.searchbox { position: relative; }
.searchbox input {
  width: 260px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 8px 14px 8px 36px;
  color: var(--text);
  font-size: 13px;
  outline: none;
  transition: all .15s;
}
.searchbox input:focus {
  border-color: rgba(59,130,246,.5);
  background: rgba(59,130,246,.06);
  box-shadow: 0 0 0 3px rgba(59,130,246,.10);
}
.searchbox input::placeholder { color: var(--muted); }
.searchbox::before {
  content: '⌕';
  position: absolute;
  left: 11px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 16px;
  pointer-events: none;
}

.user-pill {
  display: flex; align-items: center; gap: 7px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  background: rgba(59,130,246,.10);
  border: 1px solid rgba(59,130,246,.20);
  color: #93c5fd;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

/* ─────────────────────────────────────────────────
   PANELS & CARDS
───────────────────────────────────────────────── */
.panel {
  background: linear-gradient(145deg, var(--panel) 0%, #090e1e 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  transition: box-shadow .2s;
}
.panel:hover { box-shadow: 0 12px 48px rgba(0,4,20,.65); }

.hero-panel {
  background: linear-gradient(135deg, #0d1830 0%, #0a1020 50%, #0c1128 100%);
  border: 1px solid rgba(99,102,241,.18);
  border-radius: var(--radius);
  padding: 28px 28px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}
.hero-panel::before {
  content: '';
  position: absolute;
  top: -40%; right: -10%;
  width: 400px; height: 300px;
  background: radial-gradient(ellipse, rgba(99,102,241,.18), transparent 70%);
  pointer-events: none;
}
.hero-panel::after {
  content: '';
  position: absolute;
  bottom: -50%; left: 20%;
  width: 300px; height: 250px;
  background: radial-gradient(ellipse, rgba(59,130,246,.10), transparent 70%);
  pointer-events: none;
}
.hero-panel h1 { font-size: 28px; font-weight: 800; margin-bottom: 8px; }
.hero-panel p  { color: var(--text-2); font-size: 14px; max-width: 560px; line-height: 1.6; }

.glass { backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); }
.page-head, .panel-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 14px; margin-bottom: 18px;
}
.page-head h1, .panel-head h2 { margin: 0; }
.page-head.compact { margin-bottom: 12px; }

/* ── STAT GRID ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.stat-card {
  padding: 18px 20px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: linear-gradient(145deg, var(--panel-2) 0%, #080d1c 100%);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform .18s, box-shadow .18s;
  cursor: default;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }

/* Top accent line */
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  border-radius: var(--radius) var(--radius) 0 0;
  transition: height .2s;
}
.stat-card:hover::before { height: 3px; }

/* Glow orb behind value */
.stat-card::after {
  content: '';
  position: absolute;
  bottom: -20px; right: -20px;
  width: 100px; height: 100px;
  border-radius: 50%;
  opacity: .07;
  pointer-events: none;
}

.accent-blue::before   { background: linear-gradient(90deg, var(--blue), transparent); }
.accent-blue::after    { background: var(--blue); }
.accent-cyan::before   { background: linear-gradient(90deg, var(--cyan), transparent); }
.accent-cyan::after    { background: var(--cyan); }
.accent-indigo::before { background: linear-gradient(90deg, var(--indigo), transparent); }
.accent-indigo::after  { background: var(--indigo); }
.accent-violet::before { background: linear-gradient(90deg, var(--violet), transparent); }
.accent-violet::after  { background: var(--violet); }
.accent-amber::before  { background: linear-gradient(90deg, var(--amber), transparent); }
.accent-amber::after   { background: var(--amber); }
.accent-red::before    { background: linear-gradient(90deg, var(--rose), transparent); }
.accent-red::after     { background: var(--rose); }

.stat-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}
.stat-value {
  font-size: 30px;
  font-weight: 800;
  color: var(--text);
  line-height: 1;
  letter-spacing: -.5px;
}

/* ── QUICK GRID ── */
.grid-2 { display:grid; grid-template-columns:1.5fr 1fr; gap:18px; }
.quick-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; }

.quick-card {
  padding: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(14,21,38,.95), rgba(8,13,28,.95));
  display: flex;
  flex-direction: column;
  gap: 5px;
  transition: all .16s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}
.quick-card::before {
  content:'';
  position:absolute; inset:0;
  background: linear-gradient(135deg, rgba(59,130,246,.05), transparent);
  opacity:0;
  transition: opacity .16s;
}
.quick-card:hover { border-color:rgba(59,130,246,.30); transform:translateY(-2px); box-shadow: 0 8px 28px rgba(0,4,20,.40); }
.quick-card:hover::before { opacity:1; }
.quick-card.active-filter { border-color:rgba(59,130,246,.35); background:linear-gradient(145deg,rgba(59,130,246,.12),rgba(8,13,28,.95)); }
.quick-card strong { font-size:14px; font-weight:700; color:var(--text); }
.quick-card span   { font-size:12px; color:var(--text-2); }

/* ─────────────────────────────────────────────────
   TABLES
───────────────────────────────────────────────── */
.table-wrap { overflow-x:auto; border-radius:var(--radius-sm); }
.data-table { width:100%; border-collapse:collapse; }

.data-table th {
  font-size: 10.5px;
  letter-spacing: .10em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  padding: 11px 14px;
  background: rgba(255,255,255,.02);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 13.5px;
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom:0; }
.data-table tbody tr { transition: background .10s; }
.data-table tbody tr:hover td { background: rgba(59,130,246,.05); }

/* ─────────────────────────────────────────────────
   FORMS
───────────────────────────────────────────────── */
input, select, textarea {
  width: 100%;
  padding: 10px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255,255,255,.04);
  color: var(--text);
  outline: none;
  transition: border-color .15s, background .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: rgba(59,130,246,.55);
  background: rgba(59,130,246,.06);
  box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
input::placeholder, textarea::placeholder { color: var(--muted); }
textarea { min-height:100px; resize:vertical; }
select option { background: var(--panel-2); color: var(--text); }

.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.form-grid label { display:grid; gap:6px; color:var(--text-2); font-size:13px; font-weight:600; }
.form-grid .full { grid-column:1/-1; }
.form-actions { margin-top:20px; display:flex; gap:10px; flex-wrap:wrap; }

.checkbox-line { display:flex; align-items:center; gap:10px; min-height:44px; }
.checkbox-line input { width:auto; }

/* ─────────────────────────────────────────────────
   BUTTONS
───────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700; font-size: 13px;
  white-space: nowrap;
  border: 0;
  cursor: pointer;
  transition: all .15s ease;
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(99,102,241,.30);
  letter-spacing: .01em;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(99,102,241,.45);
  filter: brightness(1.08);
}
.btn:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(99,102,241,.25); }

.btn-soft {
  background: rgba(59,130,246,.12);
  border: 1px solid rgba(59,130,246,.22);
  color: #93c5fd;
  box-shadow: none;
}
.btn-soft:hover { background:rgba(59,130,246,.20); border-color:rgba(59,130,246,.35); box-shadow:none; filter:none; }

.btn-ghost {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  color: var(--text-2);
  box-shadow: none;
}
.btn-ghost:hover { background:rgba(255,255,255,.08); color:var(--text); box-shadow:none; filter:none; }

.btn-danger {
  background: rgba(244,63,94,.10);
  border: 1px solid rgba(244,63,94,.22);
  color: #fca5a5;
  box-shadow: none;
}
.btn-danger:hover { background:rgba(244,63,94,.18); box-shadow:none; filter:none; }

.btn-sm { padding:5px 10px; font-size:12px; }
.actions { display:flex; gap:6px; align-items:center; flex-wrap:wrap; }
.actions form { margin:0; }
.text-link { color:var(--blue-h); }

/* ─────────────────────────────────────────────────
   BADGES & PILLS
───────────────────────────────────────────────── */
.pill, .status-badge {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11.5px; font-weight: 700; letter-spacing: .02em;
  border: 1px solid rgba(59,130,246,.20);
  background: rgba(59,130,246,.10);
  color: #93c5fd;
  white-space: nowrap;
}
.pill-ok     { background:rgba(16,185,129,.10); border-color:rgba(16,185,129,.25); color:#6ee7b7; }
.pill-danger { background:rgba(244,63,94,.10);  border-color:rgba(244,63,94,.25);  color:#fca5a5; }
.pill-warn   { background:rgba(245,158,11,.10); border-color:rgba(245,158,11,.25); color:#fcd34d; }

/* ─────────────────────────────────────────────────
   ALERTS
───────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  border: 1px solid transparent;
  font-weight: 500;
  font-size: 13.5px;
  animation: slideDown .22s ease;
}
@keyframes slideDown { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }
.alert.success { background:rgba(16,185,129,.10); color:#6ee7b7; border-color:rgba(16,185,129,.22); }
.alert.error   { background:rgba(244,63,94,.10);  color:#fca5a5; border-color:rgba(244,63,94,.22); }

/* ─────────────────────────────────────────────────
   LOGIN PAGE
───────────────────────────────────────────────── */
.login-wrap {
  display: flex; min-height: 100vh;
  align-items: center; justify-content: center; padding: 24px;
  background:
    radial-gradient(ellipse 70% 55% at 65% 20%, rgba(99,102,241,.20), transparent),
    radial-gradient(ellipse 50% 50% at 10% 80%, rgba(59,130,246,.10), transparent),
    var(--bg);
}
.login-card {
  width: 100%; max-width: 440px;
  background: linear-gradient(160deg, #0e1526 0%, #09101e 100%);
  border: 1px solid rgba(99,102,241,.20);
  border-radius: 20px;
  padding: 36px;
  box-shadow: 0 24px 80px rgba(0,0,30,.70), 0 0 0 1px rgba(99,102,241,.10) inset;
}
.login-brand { display:flex; align-items:center; gap:14px; margin-bottom:28px; }
.login-card h1 { font-size:20px; font-weight:800; margin-bottom:4px; }
.login-card p  { color:var(--muted); font-size:13px; }
.login-form { display:grid; gap:14px; }
.login-note { margin-top:16px; color:var(--muted); font-size:12px; text-align:center; }

/* ─────────────────────────────────────────────────
   MODALS
───────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(2,4,18,.80);
  backdrop-filter: blur(5px); -webkit-backdrop-filter:blur(5px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; z-index: 120;
  animation: fadeIn .15s ease;
}
@keyframes fadeIn  { from { opacity:0; } to { opacity:1; } }
@keyframes slideUp { from { opacity:0; transform:translateY(16px); } to { opacity:1; transform:translateY(0); } }

.modal-card {
  width: min(940px, 96vw); max-height: 88vh; overflow-y: auto;
  background: linear-gradient(145deg, var(--panel), #09101e);
  border: 1px solid var(--line);
  border-radius: 18px; padding: 24px;
  box-shadow: var(--shadow-lg);
  animation: slideUp .18s ease;
}
.modal-body { margin-top: 14px; }

/* ── Detail grid ── */
.detail-grid {
  display: grid; grid-template-columns: repeat(2,minmax(0,1fr));
  gap: 12px; margin-bottom: 18px;
}
.detail-grid div, .detail-block {
  background: rgba(255,255,255,.03);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 14px;
}
.detail-grid span { display:block; color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.06em; margin-bottom:5px; }
.detail-block h3  { margin:0 0 8px; font-size:14px; }
.detail-block p   { margin:0; color:#c8deff; }

/* ── Customer picker ── */
.customer-picker-card { border:1px solid var(--line); background:linear-gradient(145deg,var(--panel-2),var(--panel)); border-radius:var(--radius); padding:18px; }
.customer-picker-head { display:flex; justify-content:space-between; align-items:center; gap:14px; margin-bottom:14px; }
.customer-picker-head h2 { margin:0; }
.customer-search-wrap { position:relative; margin-bottom:14px; }
.customer-search-results {
  position:absolute; top:100%; left:0; right:0;
  background:var(--panel-2); border:1px solid var(--line);
  border-radius:var(--radius-sm); overflow:hidden; z-index:50;
  box-shadow:var(--shadow-lg); max-height:260px; overflow-y:auto;
}
.customer-search-item {
  width:100%; display:flex; flex-direction:column; gap:3px;
  text-align:left; padding:11px 14px;
  background:transparent; color:var(--text);
  border-bottom:1px solid var(--line-soft);
  cursor:pointer; transition:background .12s;
}
.customer-search-item:hover { background:rgba(59,130,246,.10); }
.customer-search-item span { font-size:11px; color:var(--muted); }
.customer-search-item.muted { color:var(--muted); }
.quick-customer-box { margin-top:14px; border-top:1px solid var(--line); padding-top:14px; }
.customer-quick-actions { display:flex; gap:8px; flex-wrap:wrap; }
.customer-history-box { margin-top:16px; border-top:1px solid var(--line); padding-top:16px; }
.mini-history { display:grid; gap:10px; }
.mini-history.empty { color:var(--muted); background:rgba(255,255,255,.02); border:1px dashed var(--line); border-radius:var(--radius-sm); padding:14px; }
.history-item { background:rgba(255,255,255,.03); border:1px solid var(--line); border-radius:var(--radius-sm); padding:12px 14px; transition:background .12s; }
.history-item:hover { background:rgba(255,255,255,.05); }
.history-item-top { display:flex; justify-content:space-between; align-items:center; gap:12px; margin-bottom:6px; }
.history-item-meta { color:var(--muted); font-size:12px; margin-top:3px; }
.history-item--button { width:100%; text-align:left; background:rgba(255,255,255,.03); color:var(--text); }

/* ── Offer/Invoice ── */
.offer-builder { margin-top:24px; }
.offer-edit-table input,.offer-edit-table select { min-width:90px; }
.offer-summary { margin-top:18px; margin-left:auto; max-width:360px; display:grid; gap:10px; background:rgba(255,255,255,.03); border:1px solid var(--line); border-radius:var(--radius); padding:16px; }
.offer-summary div { display:flex; justify-content:space-between; gap:18px; }
.offer-summary .grand { padding-top:12px; border-top:1px solid var(--line); font-size:17px; font-weight:700; }

/* ── Print offer ── */
.print-body { background:#eef2f7; color:#0f172a; }
.print-toolbar { padding:14px 18px; display:flex; gap:10px; justify-content:flex-end; background:#fff; border-bottom:1px solid #e5e7eb; }
.print-page { padding:24px; }
.offer-doc { max-width:960px; margin:0 auto; background:#fff; color:#111827; padding:40px; border-radius:18px; box-shadow:0 20px 60px rgba(0,0,0,.12); }
.offer-doc__head { display:flex; justify-content:space-between; gap:28px; align-items:flex-start; padding-bottom:22px; border-bottom:2px solid #e5e7eb; }
.offer-doc__brand { display:flex; gap:16px; align-items:flex-start; }
.offer-doc__logo { width:88px; max-height:68px; object-fit:contain; }
.offer-doc__brand h1 { margin:0 0 6px; font-size:26px; }
.offer-doc__brand p { margin:0 0 8px; color:#475569; font-size:13px; }
.offer-doc__meta-line { color:#475569; font-size:12px; margin-top:4px; }
.offer-doc__customer,.offer-doc__title { margin-top:22px; }
.offer-doc__info { background:#f8fafc; border:1px solid #e5e7eb; border-radius:12px; padding:14px; min-width:220px; font-size:13px; }
.offer-doc__info div { margin-bottom:6px; }
.offer-lines { width:100%; border-collapse:collapse; margin-top:18px; }
.offer-lines th,.offer-lines td { border:1px solid #e5e7eb; padding:9px 10px; text-align:left; font-size:13px; }
.offer-lines th { background:#f8fafc; font-weight:700; }
.offer-totals { margin-left:auto; margin-top:20px; max-width:300px; display:grid; gap:8px; }
.offer-totals div { display:flex; justify-content:space-between; background:#f8fafc; border:1px solid #e5e7eb; padding:10px 13px; border-radius:9px; font-size:13px; }
.offer-totals .grand { background:#eaf1ff; border-color:#bfd3ff; font-weight:700; font-size:14px; }
.offer-footer-note { margin-top:24px; padding-top:18px; border-top:1px dashed #cbd5e1; color:#475569; font-size:13px; }

/* ── Inline payment ── */
.inline-payment-form { margin-top:8px; }
.inline-payment-grid { display:grid; grid-template-columns:1fr 180px 1fr auto; gap:10px; align-items:center; }

/* ── Receipt ── */
.receipt-narrow { max-width:820px; margin:0 auto; }
.receipt-signatures { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:28px; }
.receipt-signatures div { border-top:1px solid #cbd5e1; padding-top:12px; }
.receipt-signatures span { display:block; font-size:12px; color:#64748b; margin-bottom:6px; }

/* ── Settings ── */
.brand-logo { width:46px; height:46px; object-fit:contain; border-radius:12px; background:#fff; padding:4px; box-shadow:0 6px 20px var(--blue-glow); }
.settings-logo-preview { max-width:220px; max-height:90px; object-fit:contain; background:#fff; padding:8px; border-radius:12px; }

/* ── Service label ── */
.service-label { width:100mm; min-height:65mm; background:#fff; color:#111827; border-radius:10px; padding:6mm; margin:0 auto; box-shadow:0 10px 30px rgba(0,0,0,.12); }
.service-label__top { display:flex; gap:10px; align-items:center; border-bottom:1px solid #e5e7eb; padding-bottom:8px; margin-bottom:8px; }
.service-label__logo { width:28mm; max-height:15mm; object-fit:contain; }
.service-label__company { display:grid; gap:2px; font-size:11px; }
.service-label__barcode-wrap { text-align:center; margin:8px 0; }
.service-label__code { font-weight:700; font-size:14px; letter-spacing:1px; margin-top:4px; font-family:var(--mono); }
.service-label__grid { display:grid; gap:6px; font-size:12px; }
.service-label__grid span { display:block; font-size:10px; color:#475569; }

/* ─────────────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────────────── */
@media (max-width:1280px) { .stat-grid { grid-template-columns:repeat(4,minmax(0,1fr)); } }
@media (max-width:1100px) { .stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } .grid-2 { grid-template-columns:1fr; } }
@media (max-width:960px) {
  .app-shell { grid-template-columns:1fr; }
  .sidebar { position:relative; height:auto; border-right:0; border-bottom:1px solid var(--line); flex-direction:row; flex-wrap:wrap; padding:12px 14px; overflow-x:auto; }
  .nav { flex-direction:row; flex:none; overflow-x:auto; padding:0; }
  .nav-link.active::before { display:none; }
  .sidebar-footer { display:none; }
  .brand-wrap { border-bottom:0; padding-bottom:0; margin-bottom:0; }
  .topbar { position:relative; top:auto; flex-wrap:wrap; }
  .searchbox input { width:100%; }
  .content { padding:12px 14px; }
  .inline-payment-grid { grid-template-columns:1fr; }
}
@media (max-width:720px) {
  .stat-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .form-grid { grid-template-columns:1fr; }
  .quick-grid { grid-template-columns:1fr; }
  .detail-grid { grid-template-columns:1fr; }
  .page-head { flex-direction:column; align-items:flex-start; }
  .hero-panel { flex-direction:column; }
  .hero-panel h1 { font-size:22px; }
}

/* ─────────────────────────────────────────────────
   PRINT
───────────────────────────────────────────────── */
@media print {
  .no-print { display:none !important; }
  .print-body { background:#fff; }
  .print-page { padding:0; }
  .offer-doc { box-shadow:none; border-radius:0; max-width:none; padding:0; }
  .service-label { box-shadow:none; border-radius:0; }
  body.print-body { background:#fff; }
}
