:root {
  --bg: #0f1115;
  --panel: #171a21;
  --line: #262b36;
  --fg: #e8eaef;
  --muted: #949cad;
  --accent: #3f8cff;
  --ok: #2fbf71;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 14px/1.45 "Segoe UI", system-ui, sans-serif;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 10px 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.brand { font-weight: 700; letter-spacing: .2px; }
.status { color: var(--muted); font-size: 12px; }
.spacer { flex: 1; }

.btn {
  background: #222735;
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 12px;
  cursor: pointer;
  font-size: 13px;
}
.btn:hover { border-color: #3a4152; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn.sm { padding: 4px 8px; font-size: 12px; }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 14px;
  padding: 14px 16px;
  align-items: start;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}

.panel-head { display: flex; align-items: baseline; gap: 10px; }
.panel-head h2 { font-size: 15px; margin: 0 0 8px; }
.muted { color: var(--muted); font-size: 12px; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.filters input[type=search] { flex: 1 1 220px; }
.bulk { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.inline { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); font-size: 12px; }

input, select {
  background: #10131a;
  color: var(--fg);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 6px 8px;
  font: inherit;
  min-width: 0;
}
input[type=checkbox] { accent-color: var(--accent); }
input.qty { width: 56px; }

.table-wrap { max-height: 58vh; overflow: auto; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  position: sticky; top: 0;
  background: #1c2029;
  text-align: left;
  padding: 7px 8px;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
tbody td { padding: 5px 8px; border-bottom: 1px solid #1e222b; }
tbody tr:hover { background: #1b1f28; }
tbody tr.sel { background: #1a2740; }
th.c, td.c { text-align: center; width: 1%; white-space: nowrap; }
th.r, td.r { text-align: right; white-space: nowrap; }
td.code { font-family: Consolas, monospace; color: #9fd0ff; }

.settings fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 0 0 10px;
  padding: 8px 10px 10px;
}
.settings legend { color: var(--muted); font-size: 12px; padding: 0 4px; }
.settings label { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 5px 0; font-size: 13px; }
.settings label input[type=number] { width: 78px; }
.settings label input[type=text], .settings label select { flex: 1 1 140px; }
.settings label.chk { justify-content: flex-start; }
.hint { color: var(--muted); font-size: 12px; line-height: 1.5; }

.preview-title { font-size: 15px; margin: 4px 16px; color: var(--muted); }
.preview-note { padding: 8px 0 12px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---------- giriş ---------- */

.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.login-card {
  width: 100%;
  max-width: 340px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 20px;
}
.login-card h1 { font-size: 19px; margin: 0 0 4px; }
.login-card p { margin: 0 0 16px; }
.login-card label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.login-card input { width: 100%; margin-top: 5px; padding: 9px 10px; }
.btn.wide { width: 100%; padding: 10px; margin-top: 4px; }
.err { color: #ff7676; font-size: 13px; min-height: 18px; margin-top: 10px; }
.user-chip { color: var(--muted); font-size: 12px; }

/* ---------- Etiket / sayfa ---------- */

.sheet-area { padding: 0 16px 40px; }

.page {
  background: #fff;
  color: #000;
  margin: 0 auto 14px;
  box-shadow: 0 2px 14px rgba(0,0,0,.5);
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
}

.label {
  overflow: hidden;
  display: flex;
  align-items: stretch;
  gap: 2mm;
  font-family: "Segoe UI", Arial, sans-serif;
  color: #000;
  background: #fff;
}
.label.bordered { outline: 0.2mm dashed #b0b0b0; outline-offset: -0.1mm; }

.lbl-qr { flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
.lbl-qr svg { display: block; width: 100%; height: 100%; }

.lbl-img { flex: 0 0 auto; display: flex; align-items: center; }
.lbl-img img { object-fit: cover; border-radius: 0.5mm; }

.lbl-main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 0.6mm; }
.lbl-head { font-weight: 700; letter-spacing: .3px; text-transform: uppercase; color: #444; }
.lbl-title { font-weight: 700; line-height: 1.12; overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.lbl-meta { color: #333; line-height: 1.15; }
.lbl-url { color: #555; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.lbl-foot { color: #555; }

.lbl-side { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 0.8mm; }
.lbl-price { font-weight: 800; line-height: 1; white-space: nowrap; }
.lbl-bc { display: block; }
.lbl-bc svg { display: block; }

@media print {
  .no-print { display: none !important; }
  body { background: #fff; }
  .sheet-area { padding: 0; }
  .page { box-shadow: none; margin: 0; break-after: page; page-break-after: always; }
  .page:last-child { break-after: auto; page-break-after: auto; }
  .label { break-inside: avoid; page-break-inside: avoid; }
}
