:root {
  --sidebar-w: 248px;
  --brand: #2563eb;
  --brand-600: #1d4ed8;
  --brand-700: #1e40af;
  --brand-50: #eff6ff;
  --sidebar-bg: #0f172a;
  --ink: #0f172a;
  --text: #1e293b;
  --muted: #64748b;
  --line: #e2e8f0;
  --line-soft: #eef2f7;
  --surface: #fff;
  --page: #f1f5f9;
  --radius: .75rem;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 3px rgba(15, 23, 42, .06), 0 1px 2px rgba(15, 23, 42, .04);

  --bs-body-font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --bs-body-color: var(--text);
  --bs-primary: #2563eb;
  --bs-primary-rgb: 37, 99, 235;
  --bs-link-color: #2563eb;
  --bs-link-color-rgb: 37, 99, 235;
  --bs-link-hover-color: #1d4ed8;
  --bs-link-hover-color-rgb: 29, 78, 216;
  --bs-border-color: var(--line);
  --bs-border-radius: .5rem;
  --bs-border-radius-lg: .65rem;
  --bs-border-radius-sm: .375rem;
  --bs-secondary-color: var(--muted);
}

body {
  background: var(--page);
  font-size: .925rem;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; }
a:hover { text-decoration: underline; }
.btn:hover, .nav-link:hover, .dropdown-item:hover, .page-link:hover, .qa:hover { text-decoration: none; }

h1, h2, h3, h4, h5, h6, .h5 { color: var(--ink); font-weight: 650; letter-spacing: -.01em; }
.text-muted { color: var(--muted) !important; }

.app-wrapper { display: flex; min-height: 100vh; }

/* ---------- Sol menü ---------- */
.sidebar,
.sidebar.offcanvas-lg {
  width: var(--sidebar-w);
  background-color: var(--sidebar-bg) !important;
  color: #cbd5e1;
  flex-shrink: 0;
}
.sidebar.offcanvas-lg { --bs-offcanvas-width: var(--sidebar-w); --bs-offcanvas-bg: var(--sidebar-bg); }
@media (min-width: 992px) {
  .sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; }
}
@media (max-width: 991.98px) {
  .sidebar.offcanvas-lg.show, .sidebar.offcanvas-lg.showing { display: flex; flex-direction: column; }
}
.sidebar-brand {
  height: 64px;
  padding: 0 1.25rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(148, 163, 184, .12);
  flex-shrink: 0;
}
.sidebar-brand a {
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -.01em;
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
}
.sidebar-brand a:hover { text-decoration: none; color: #fff; }
.sidebar-brand a i {
  width: 34px;
  height: 34px;
  flex-shrink: 0;
  margin: 0 !important;
  border-radius: .55rem;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  box-shadow: 0 4px 10px rgba(37, 99, 235, .35);
}
.sidebar .nav { padding: .85rem 0; gap: 2px; }
.sidebar .nav-link {
  color: #94a3b8;
  font-weight: 500;
  padding: .62rem .85rem;
  margin: 0 .75rem;
  border-radius: .55rem;
  display: flex;
  gap: .75rem;
  align-items: center;
  transition: background-color .15s, color .15s;
}
.sidebar .nav-link i { font-size: 1.1rem; width: 1.25rem; text-align: center; opacity: .9; }
.sidebar .nav-link:hover { background: rgba(148, 163, 184, .12); color: #f1f5f9; }
.sidebar .nav-link.active {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .35);
}
.sidebar .nav-link.active i { opacity: 1; }
.sidebar-footer {
  margin-top: auto;
  padding: 1rem 1.25rem;
  font-size: .8rem;
  color: #94a3b8;
  border-top: 1px solid rgba(148, 163, 184, .12);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sidebar-footer::before { content: "\F1DD"; font-family: "bootstrap-icons"; margin-right: .45rem; color: #64748b; }

/* ---------- Ana alan ---------- */
.main { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
  padding: .5rem 1.5rem;
  gap: .75rem;
  position: sticky;
  top: 0;
  z-index: 1020;
  height: 64px;
  color: var(--ink);
}
.topbar .btn-light {
  background: var(--page);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .35rem .9rem .35rem .45rem;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}
.topbar .btn-light .bi-person-circle { font-size: 1.45rem; color: var(--brand); line-height: 1; }
.topbar .btn-light:hover { background: #e2e8f0; }
.content { padding: 1.75rem 1.5rem; max-width: 1440px; width: 100%; }
@media (max-width: 575.98px) {
  .content { padding: 1rem .75rem; }
  .topbar { padding: .5rem .75rem; }
}

/* ---------- Kartlar ---------- */
.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  background: var(--surface);
}
.card-header {
  background: transparent;
  font-weight: 600;
  color: var(--ink);
  padding: .9rem 1.15rem;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.card-header:first-child { border-radius: calc(var(--radius) - 1px) calc(var(--radius) - 1px) 0 0; }
.card-header a.small { font-weight: 500; }
.card-body { padding: 1.15rem; }
.card-footer { background: #f8fafc; border-top: 1px solid var(--line); }
.card > .table-responsive:first-child { border-top-left-radius: inherit; border-top-right-radius: inherit; }
.card > .table-responsive:last-child { border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }
.card > .list-group:last-child { border-bottom-left-radius: inherit; border-bottom-right-radius: inherit; }
.list-group { --bs-list-group-border-color: var(--line-soft); }
.list-group-item { padding: .75rem 1.15rem; }

.page-header {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}
.page-header h1 { font-size: 1.5rem; margin: 0; font-weight: 700; }

/* ---------- Ana sayfa ---------- */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
  gap: .85rem;
  margin-bottom: 1.25rem;
}
.qa {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.qa:hover { border-color: #bfdbfe; box-shadow: 0 6px 16px rgba(15, 23, 42, .08); transform: translateY(-1px); color: var(--ink); }
.qa strong { display: block; font-weight: 600; line-height: 1.25; }
.qa small { display: block; color: var(--muted); font-size: .8rem; }
.qa-icon, .stat-icon {
  width: 44px;
  height: 44px;
  border-radius: .65rem;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}
.qa-primary .qa-icon { background: var(--brand); color: #fff; box-shadow: 0 4px 12px rgba(37, 99, 235, .3); }
.qa-primary { border-color: #bfdbfe; background: linear-gradient(135deg, #fff, var(--brand-50)); }
.tone-blue { background: #dbeafe; color: #1d4ed8; }
.tone-green { background: #dcfce7; color: #15803d; }
.tone-amber { background: #fef3c7; color: #b45309; }
.tone-violet { background: #ede9fe; color: #6d28d9; }
.tone-slate { background: #e2e8f0; color: #334155; }
.tone-rose { background: #ffe4e6; color: #be123c; }

.stat-card.with-icon .card-body { display: flex; gap: .9rem; align-items: flex-start; }
.stat-card .label { color: var(--muted); font-size: .82rem; font-weight: 500; margin-bottom: .15rem; }
.stat-card .value { font-size: 1.45rem; font-weight: 700; color: var(--ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat-card .value.text-success { color: #15803d !important; }
.stat-card .sub { font-size: .82rem; line-height: 1.5; font-variant-numeric: tabular-nums; }

.welcome-tip {
  display: flex;
  gap: .85rem;
  align-items: flex-start;
  background: var(--brand-50);
  border: 1px solid #bfdbfe;
  color: #1e3a8a;
  border-radius: var(--radius);
  padding: .9rem 1.1rem;
  margin-bottom: 1.25rem;
}
.welcome-tip > i { font-size: 1.25rem; color: var(--brand); line-height: 1.3; }
.welcome-tip a { font-weight: 600; text-decoration: underline; }

/* ---------- Butonlar ---------- */
.btn { font-weight: 500; border-radius: .55rem; }
.btn-lg { border-radius: .65rem; font-size: 1rem; padding: .65rem 1.15rem; }
.btn-sm { border-radius: .45rem; }
.btn i + * , .btn > i { vertical-align: -.08em; }
.btn-primary {
  --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand-600); --bs-btn-hover-border-color: var(--brand-600);
  --bs-btn-active-bg: var(--brand-700); --bs-btn-active-border-color: var(--brand-700);
  --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand);
  --bs-btn-focus-shadow-rgb: 37, 99, 235;
  box-shadow: 0 1px 2px rgba(37, 99, 235, .25);
}
.btn-outline-primary {
  --bs-btn-color: var(--brand); --bs-btn-border-color: #93c5fd;
  --bs-btn-hover-bg: var(--brand-50); --bs-btn-hover-color: var(--brand-700); --bs-btn-hover-border-color: var(--brand);
  --bs-btn-active-bg: #dbeafe; --bs-btn-active-color: var(--brand-700); --bs-btn-active-border-color: var(--brand);
  --bs-btn-focus-shadow-rgb: 37, 99, 235;
  background: #fff;
}
.btn-secondary {
  --bs-btn-bg: #334155; --bs-btn-border-color: #334155;
  --bs-btn-hover-bg: #1e293b; --bs-btn-hover-border-color: #1e293b;
  --bs-btn-active-bg: #0f172a; --bs-btn-active-border-color: #0f172a;
}
.btn-outline-secondary {
  --bs-btn-color: #334155; --bs-btn-border-color: #cbd5e1;
  --bs-btn-hover-bg: #f1f5f9; --bs-btn-hover-color: #0f172a; --bs-btn-hover-border-color: #94a3b8;
  --bs-btn-active-bg: #e2e8f0; --bs-btn-active-color: #0f172a; --bs-btn-active-border-color: #94a3b8;
  background: #fff;
}
.btn-success {
  --bs-btn-bg: #16a34a; --bs-btn-border-color: #16a34a;
  --bs-btn-hover-bg: #15803d; --bs-btn-hover-border-color: #15803d;
  --bs-btn-active-bg: #166534; --bs-btn-active-border-color: #166534;
}
.btn-outline-danger { background: #fff; }
.btn-outline-warning {
  --bs-btn-color: #b45309; --bs-btn-border-color: #fcd34d;
  --bs-btn-hover-bg: #fffbeb; --bs-btn-hover-color: #92400e; --bs-btn-hover-border-color: #f59e0b;
  --bs-btn-active-bg: #fef3c7; --bs-btn-active-color: #92400e; --bs-btn-active-border-color: #f59e0b;
  background: #fff;
}
.btn-outline-success {
  --bs-btn-color: #15803d; --bs-btn-border-color: #86efac;
  --bs-btn-hover-bg: #f0fdf4; --bs-btn-hover-color: #166534; --bs-btn-hover-border-color: #16a34a;
  --bs-btn-active-bg: #dcfce7; --bs-btn-active-color: #166534; --bs-btn-active-border-color: #16a34a;
  background: #fff;
}
.btn-light { --bs-btn-bg: #f1f5f9; --bs-btn-border-color: var(--line); --bs-btn-hover-bg: #e2e8f0; --bs-btn-hover-border-color: #cbd5e1; }

/* ---------- Formlar ---------- */
.form-label { font-weight: 500; font-size: .875rem; color: #334155; margin-bottom: .35rem; }
.form-control, .form-select {
  border-color: #d5dde8;
  border-radius: .55rem;
  padding: .5rem .8rem;
  font-size: .925rem;
}
.form-control-lg, .form-select-lg { font-size: 1rem; padding: .65rem .95rem; border-radius: .65rem; }
.form-control-sm, .form-select-sm { padding: .3rem .6rem; font-size: .85rem; border-radius: .45rem; }
.form-select { padding-right: 2.25rem; }
.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 .22rem rgba(37, 99, 235, .15);
}
.form-control::placeholder { color: #94a3b8; }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.input-group-text { background: #f8fafc; border-color: #d5dde8; color: var(--muted); }
.form-text { color: var(--muted); }

.filter-bar {
  background: var(--surface);
  padding: .85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin: 0 0 1rem 0;
}

/* ---------- Tablolar ---------- */
.table { --bs-table-hover-bg: #f8fafc; --bs-table-border-color: var(--line-soft); margin-bottom: 0; }
.table > :not(caption) > * > * { padding: .75rem 1rem; }
.table-sm > :not(caption) > * > * { padding: .55rem .85rem; }
.table td, .table th { vertical-align: middle; }
.table thead th {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  background: #f8fafc;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.table tbody tr:last-child > * { border-bottom: 0; }
.table tfoot > tr > * { border-bottom: 0; padding-top: .45rem; padding-bottom: .45rem; font-weight: 500; }
.table tfoot > tr:first-child > * { border-top: 1px solid var(--line); padding-top: .8rem; }
.table tfoot > tr:last-child > * { padding-bottom: .9rem; font-weight: 700; color: var(--ink); font-size: 1.02rem; }
.table a { font-weight: 500; }
.table td:first-child > a:first-child { white-space: nowrap; }
.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------- Rozetler ---------- */
.badge { font-weight: 600; font-size: .72rem; padding: .38em .7em; border-radius: 999px; letter-spacing: .01em; }
.badge.text-bg-success   { background-color: #dcfce7 !important; color: #166534 !important; }
.badge.text-bg-danger    { background-color: #fee2e2 !important; color: #991b1b !important; }
.badge.text-bg-warning   { background-color: #fef3c7 !important; color: #92400e !important; }
.badge.text-bg-info      { background-color: #e0f2fe !important; color: #075985 !important; }
.badge.text-bg-primary   { background-color: #dbeafe !important; color: #1e40af !important; }
.badge.text-bg-secondary { background-color: #e2e8f0 !important; color: #334155 !important; }
.badge.text-bg-light     { background-color: #f8fafc !important; color: #475569 !important; }
.badge.text-bg-dark      { background-color: #1e293b !important; color: #fff !important; }
h1 .badge { vertical-align: middle; }

/* ---------- Sekmeler, sayfalama, uyarılar ---------- */
.nav-tabs { border-bottom: 1px solid var(--line); gap: .25rem; }
.nav-tabs .nav-link {
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  color: var(--muted);
  font-weight: 500;
  padding: .65rem 1rem;
  background: none;
  border-radius: 0;
}
.nav-tabs .nav-link:hover { color: var(--ink); border-bottom-color: #cbd5e1; }
.nav-tabs .nav-link.active { color: var(--brand); border-bottom-color: var(--brand); background: none; font-weight: 600; }
.nav-pills .nav-link { border-radius: .55rem; color: var(--muted); font-weight: 500; }
.nav-pills .nav-link.active { background: var(--brand); }

.pagination { --bs-pagination-border-color: var(--line); --bs-pagination-color: #334155; --bs-pagination-active-bg: var(--brand); --bs-pagination-active-border-color: var(--brand); gap: .25rem; }
.pagination .page-link { border-radius: .45rem !important; min-width: 2.1rem; text-align: center; }

.alert { border-radius: var(--radius); border-width: 1px; padding: .85rem 1.1rem; }
.alert a { font-weight: 600; text-decoration: underline; }
.alert-info { --bs-alert-bg: var(--brand-50); --bs-alert-border-color: #bfdbfe; --bs-alert-color: #1e3a8a; }
.alert-success { --bs-alert-bg: #f0fdf4; --bs-alert-border-color: #bbf7d0; --bs-alert-color: #166534; }
.alert-danger { --bs-alert-bg: #fef2f2; --bs-alert-border-color: #fecaca; --bs-alert-color: #991b1b; }
.alert-warning { --bs-alert-bg: #fffbeb; --bs-alert-border-color: #fde68a; --bs-alert-color: #92400e; }
.alert-light { --bs-alert-bg: #fff; --bs-alert-border-color: var(--line); --bs-alert-color: var(--text); }

.dropdown-menu { border: 1px solid var(--line); border-radius: .65rem; box-shadow: 0 10px 30px rgba(15, 23, 42, .12); padding: .35rem; }
.dropdown-item { border-radius: .4rem; padding: .45rem .75rem; }
.modal-content { border: 0; border-radius: 1rem; box-shadow: 0 20px 50px rgba(15, 23, 42, .25); }
.modal-header, .modal-footer { border-color: var(--line); }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2.75rem 1rem 3rem;
}
.empty-state-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 1rem;
  border-radius: .9rem;
  background: var(--brand-50);
  color: var(--brand);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 6px #f8fafc, inset 0 0 0 1px #dbeafe;
}
.empty-state-text { color: var(--muted); font-size: .95rem; max-width: 360px; margin: 0 0 1.1rem; }
.empty-state .btn { padding: .5rem 1rem; }

@media (max-width: 575.98px) {
  .quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem; }
  .qa { padding: .7rem; gap: .6rem; }
  .qa small { display: none; }
  .qa-icon { width: 38px; height: 38px; font-size: 1.1rem; }
  .page-header h1 { font-size: 1.3rem; }
  .nav-tabs { flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .nav-tabs .nav-link { white-space: nowrap; padding: .6rem .75rem; }
  .table > :not(caption) > * > * { padding: .6rem .7rem; }
}

.product-thumb { width: 64px; height: 64px; object-fit: cover; border-radius: .6rem; border: 1px solid var(--line); background: #fff; flex-shrink: 0; }

/* ---------- Fiş satırları ---------- */
.doc-lines td { padding: .4rem; }
.doc-lines .form-control, .doc-lines .form-select { padding: .35rem .55rem; }
.doc-lines .col-product { min-width: 220px; }
.doc-lines .col-small { width: 95px; min-width: 80px; }
.doc-lines .col-total { width: 130px; }
.totals-table td { padding: .3rem .5rem; }
.totals-table .grand { font-size: 1.25rem; font-weight: 700; color: var(--ink); }

.doc-meta dt { color: var(--muted); font-weight: 500; }
.legal-note { font-size: .8rem; color: var(--muted); border-top: 1px dashed #cbd5e1; padding-top: .5rem; margin-top: 1rem; }

/* ---------- Giriş ekranları ---------- */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(59, 130, 246, .35), transparent 60%),
    radial-gradient(900px 500px at 110% 110%, rgba(37, 99, 235, .45), transparent 60%),
    #0f172a;
}
.auth-card { width: 100%; max-width: 430px; }
.auth-card .card { border: 0; border-radius: 1rem; box-shadow: 0 25px 60px rgba(2, 6, 23, .45) !important; }
.auth-card .card-body { padding: 2rem !important; }
.auth-brand {
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .65rem;
}
.auth-brand i {
  width: 44px;
  height: 44px;
  margin: 0 !important;
  border-radius: .75rem;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .45);
}
.auth-card h1 { font-size: 1.3rem !important; font-weight: 700; }

/* ---------- Üst çubuk arama ---------- */
.topbar-search { position: relative; width: min(380px, 40vw); }
.topbar-search > i { position: absolute; left: .75rem; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.topbar-search .form-control { padding-left: 2.2rem; background: #f1f5f9; border-color: transparent; border-radius: 999px; }
.topbar-search .form-control:focus { background: #fff; border-color: #93c5fd; }

/* ---------- Ana sayfa satış grafiği ---------- */
.bar-chart { display: flex; align-items: stretch; gap: .35rem; height: 190px; }
.bar-col { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; text-decoration: none; color: var(--muted); border-radius: .4rem; padding: 0 1px; }
.bar-col:hover { background: #f1f5f9; }
.bar-col .bar { width: 100%; max-width: 34px; background: linear-gradient(180deg, #93c5fd, #60a5fa); border-radius: .35rem .35rem 0 0; transition: background .15s; }
.bar-col:hover .bar { background: linear-gradient(180deg, #60a5fa, var(--brand)); }
.bar-col.today .bar { background: linear-gradient(180deg, #3b82f6, #1d4ed8); }
.bar-col .bar-val { font-size: .62rem; color: #64748b; white-space: nowrap; margin-bottom: 2px; min-height: .8rem; }
.bar-col .bar-day { font-size: .78rem; font-weight: 600; color: var(--ink); line-height: 1.1; margin-top: 4px; text-align: center; }
.bar-col .bar-day small { display: block; font-size: .62rem; font-weight: 500; color: var(--muted); }
.bar-col.today .bar-day { color: var(--brand); }
@media (max-width: 575.98px) {
  .bar-chart { gap: .15rem; height: 150px; }
  .bar-col .bar-val { display: none; }
}

/* ---------- Yazdırma ---------- */
.print-page { background: #fff; max-width: 210mm; margin: 0 auto; padding: 12mm; color: #000; }
.print-page table { font-size: .85rem; }
.print-logo { max-height: 70px; max-width: 200px; }
.print-toolbar { max-width: 210mm; margin: 1rem auto; display: flex; gap: .5rem; justify-content: flex-end; }

.settle-sum { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; }
.settle-sum > div { display: flex; justify-content: space-between; align-items: baseline; padding: .6rem .8rem; border-radius: .5rem; background: #f8fafc; border: 1px solid #e5e7eb; }
.settle-sum strong { font-size: 1.1rem; font-variant-numeric: tabular-nums; }
.check-col { width: 36px; padding-right: 0 !important; }
.select-bar { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .55rem 1rem; background: #eef4ff; border-bottom: 1px solid #d6e4ff; position: sticky; top: 0; z-index: 3; }
.select-bar.d-none { display: none !important; }
.count-table input { max-width: 130px; margin-left: auto; }
.row-flash > td { background: #d1fae5 !important; transition: background .2s; }

/* Raf / barkod etiketleri */
.labels { display: grid; gap: 0; }
.labels-shelf { grid-template-columns: repeat(auto-fill, 63mm); grid-auto-rows: 38mm; }
.labels-small { grid-template-columns: repeat(auto-fill, 38mm); grid-auto-rows: 21mm; }
/* Ekranda barkod çubukları en az 2 piksel olsun ki okuyucu ekrandan da okuyabilsin; baskı ölçüsü değişmez */
@media screen { .labels { zoom: 1.6; } }
@media print { .labels-shelf { grid-template-columns: repeat(3, 63mm); } .labels-small { grid-template-columns: repeat(5, 38mm); } }
.labels .label { border: 1px dashed #cbd5e1; padding: 2mm 2.5mm; overflow: hidden; display: flex; flex-direction: column; break-inside: avoid; page-break-inside: avoid; color: #000; }
.label-name { font-weight: 700; line-height: 1.15; overflow: hidden; }
.label-price { font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.label-price small { font-size: .5em; font-weight: 700; }
.label-unit { font-size: 7pt; color: #333; }
.label-barcode { margin-top: auto; display: flex; justify-content: center; }
.label-barcode .barcode-svg { display: block; flex: none; }
.label-code { font-size: 7pt; text-align: center; letter-spacing: .08em; font-family: "Courier New", monospace; line-height: 1.1; }
.labels-shelf .label { padding: 2mm 2.5mm; }
.labels-shelf .label-name { font-size: 9pt; max-height: 2.3em; }
.labels-shelf .label-price { font-size: 20pt; margin: .8mm 0 .3mm; }
.labels-small .label { padding: 1mm 1.5mm; }
.labels-small .label-name { font-size: 6.5pt; white-space: nowrap; text-overflow: ellipsis; flex: none; }
.labels-small .label-price { font-size: 10pt; }
.labels-small .label-code { font-size: 6pt; }

@media print {
  .labels .label { border-color: #e5e7eb; }
}

@media print {
  @page { size: A4; margin: 10mm; }
  body { background: #fff !important; }
  .sidebar, .topbar, .no-print, .alert, .filter-bar, .pagination, .print-toolbar { display: none !important; }
  .content { padding: 0 !important; max-width: none; }
  .card { box-shadow: none !important; border: 0 !important; }
  .print-page { padding: 0; max-width: none; }
  a { text-decoration: none !important; color: inherit !important; }
  .badge, .badge[class*="text-bg-"] { border: 1px solid #000; color: #000 !important; background: none !important; }
  .table thead th { background: none !important; color: #000; }
}

/* 80 mm termal fiş */
body.receipt-body { background: #f4f6f9; }
.receipt { width: 72mm; margin: 1rem auto; background: #fff; padding: 3mm; font-family: "Courier New", monospace; font-size: 12px; color: #000; }
.receipt .center { text-align: center; }
.receipt hr { border: 0; border-top: 1px dashed #000; margin: 4px 0; opacity: 1; }
.receipt table { width: 100%; border-collapse: collapse; }
.receipt td { padding: 1px 0; vertical-align: top; }
.receipt .r { text-align: right; white-space: nowrap; }
.receipt .big { font-size: 15px; font-weight: bold; }
.receipt-logo { max-width: 50mm; max-height: 20mm; }
@media print {
  @page { size: 80mm auto; margin: 0; }
  body.receipt-body { background: #fff; }
  .receipt { margin: 0; width: 76mm; padding: 2mm; }
}
