/* ============================================================
   Threadline — Clothing Store Management
   Dashboard UI
   ============================================================ */

:root {
  --sidebar-bg: #101320;
  --sidebar-bg-2: #161a2b;
  --sidebar-text: #aab0c4;
  --sidebar-heading: #5c647d;
  --accent: #6366f1;
  --accent-2: #8b5cf6;
  --accent-soft: #eef0ff;
  --bg: #f4f6fb;
  --card: #ffffff;
  --text: #1b2030;
  --muted: #6b7280;
  --border: #e9ecf5;
  --success: #10b981;
  --success-soft: #e7f8f1;
  --danger: #ef4444;
  --danger-soft: #fdecec;
  --warning: #f59e0b;
  --warning-soft: #fef5e7;
  --info: #0ea5e9;
  --info-soft: #e6f6fe;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 30px rgba(23, 30, 65, 0.06);
  --shadow-lg: 0 20px 55px rgba(23, 30, 65, 0.14);
  --sidebar-w: 264px;
}

* { box-sizing: border-box; }

body.app {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14.5px;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; }
h1, h2, h3, h4, h5 { color: var(--text); font-weight: 700; letter-spacing: -0.02em; }

/* ---------------- Shell ---------------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg-2) 100%);
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  z-index: 1040;
  transition: transform 0.28s ease;
  overflow-y: auto;
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: #2a2f45; border-radius: 20px; }

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 10px 22px;
  color: #fff;
}
.brand-mark {
  width: 42px; height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  display: grid; place-items: center;
  font-weight: 800; font-size: 20px; color: #fff;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.45);
  flex-shrink: 0;
}
.brand-name { font-size: 19px; font-weight: 800; line-height: 1; color: #fff; }
.brand-sub { font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sidebar-heading); margin-top: 4px; }

.nav-heading {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sidebar-heading);
  padding: 18px 12px 8px;
  font-weight: 700;
}
.side-nav { display: flex; flex-direction: column; gap: 3px; }
.side-nav a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 11px;
  color: var(--sidebar-text);
  font-weight: 600;
  font-size: 13.6px;
  transition: all 0.16s ease;
  position: relative;
}
.side-nav a i { font-size: 17px; width: 20px; text-align: center; opacity: 0.85; }
.side-nav a:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.side-nav a.active {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.95), rgba(139, 92, 246, 0.9));
  color: #fff;
  box-shadow: 0 8px 18px rgba(99, 102, 241, 0.35);
}
.side-nav a .pill {
  margin-left: auto;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 700;
}
.side-nav a.active .pill { background: rgba(255, 255, 255, 0.25); }
.side-nav a .pill.danger { background: var(--danger); }
.sidebar-foot {
  margin-top: auto;
  padding: 16px 8px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  color: var(--sidebar-heading);
  font-size: 11.5px;
}

.app-main { flex: 1; margin-left: var(--sidebar-w); min-width: 0; display: flex; flex-direction: column; }

/* ---------------- Topbar ---------------- */
.topbar {
  height: 72px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 1020;
}
.topbar .page-title { font-size: 19px; font-weight: 700; margin: 0; letter-spacing: -0.02em; }
.topbar .page-sub { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.topbar-search {
  margin-left: auto;
  position: relative;
  width: 280px;
  max-width: 38vw;
}
.topbar-search input {
  width: 100%;
  border: 1px solid var(--border);
  background: #f7f8fc;
  border-radius: 10px;
  padding: 9px 14px 9px 38px;
  font-size: 13.5px;
  outline: none;
  transition: 0.15s;
}
.topbar-search input:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px var(--accent-soft); }
.topbar-search i { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); color: #9aa1b5; }
.icon-btn {
  width: 40px; height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  display: grid; place-items: center;
  color: var(--muted);
  position: relative;
  transition: 0.15s;
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); }
.icon-btn .dot {
  position: absolute; top: 8px; right: 9px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--danger); border: 2px solid #fff;
}
.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px 6px 6px;
  border-radius: 40px;
  border: 1px solid var(--border);
  background: #fff;
  transition: 0.15s;
  cursor: pointer;
}
.user-chip:hover { border-color: var(--accent); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 13px; flex-shrink: 0;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.user-chip .u-name { font-size: 13px; font-weight: 700; line-height: 1.1; }
.user-chip .u-role { font-size: 11px; color: var(--muted); }

.sidebar-toggle { display: none; }

/* ---------------- Content ---------------- */
.app-content { padding: 26px 28px 48px; flex: 1; }

.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-header h2 { font-size: 24px; margin: 0; }
.page-header p { margin: 3px 0 0; color: var(--muted); font-size: 13.5px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------------- Cards ---------------- */
.card-x {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-x .card-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 18px 20px; border-bottom: 1px solid var(--border);
}
.card-x .card-head h3 { font-size: 15.5px; margin: 0; }
.card-x .card-body { padding: 20px; }
.card-x .card-body.tight { padding: 8px 0; }

/* Stat cards */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; margin-bottom: 22px; }
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-card .stat-top { display: flex; align-items: center; justify-content: space-between; }
.stat-icon {
  width: 46px; height: 46px; border-radius: 13px;
  display: grid; place-items: center; font-size: 21px;
}
.stat-icon.i-indigo { background: var(--accent-soft); color: var(--accent); }
.stat-icon.i-green { background: var(--success-soft); color: var(--success); }
.stat-icon.i-amber { background: var(--warning-soft); color: var(--warning); }
.stat-icon.i-red { background: var(--danger-soft); color: var(--danger); }
.stat-icon.i-blue { background: var(--info-soft); color: var(--info); }
.stat-value { font-size: 26px; font-weight: 800; margin: 14px 0 2px; letter-spacing: -0.03em; }
.stat-label { color: var(--muted); font-size: 13px; font-weight: 500; }
.stat-trend { font-size: 12px; font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.stat-trend.up { color: var(--success); }
.stat-trend.down { color: var(--danger); }

/* ---------------- Tables ---------------- */
.table-x { width: 100%; border-collapse: separate; border-spacing: 0; }
.table-x thead th {
  text-align: left;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  padding: 12px 20px;
  background: #fafbfe;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.table-x tbody td {
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  font-size: 13.6px;
  vertical-align: middle;
}
.table-x tbody tr:last-child td { border-bottom: none; }
.table-x tbody tr { transition: background 0.12s; }
.table-x tbody tr:hover { background: #fafbff; }
.table-x .row-title { font-weight: 600; color: var(--text); }
.table-x .sub { color: var(--muted); font-size: 12px; }
.table-responsive { overflow-x: auto; }

/* ---------------- Badges ---------------- */
.badge-x {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; font-weight: 700;
  padding: 4px 10px; border-radius: 20px;
  line-height: 1.4;
}
.badge-x.paid { background: var(--success-soft); color: #0a8f65; }
.badge-x.partial { background: var(--warning-soft); color: #b5750a; }
.badge-x.unpaid { background: var(--danger-soft); color: #c23333; }
.badge-x.refunded { background: #eef0ff; color: #5546d6; }
.badge-x.cancelled { background: #eef0f5; color: #6b7280; }
.badge-x.neutral { background: #eef0f5; color: #4b5163; }
.badge-x.online { background: var(--info-soft); color: #0b7fb5; }
.badge-x.low { background: var(--danger-soft); color: var(--danger); }
.badge-x.ok { background: var(--success-soft); color: var(--success); }

/* ---------------- Buttons ---------------- */
.btn-x {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: 0.16s ease;
  white-space: nowrap;
}
.btn-x i { font-size: 15px; }
.btn-x.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 8px 18px rgba(99, 102, 241, 0.32); }
.btn-x.primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn-x.ghost { background: #fff; border-color: var(--border); color: var(--text); }
.btn-x.ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn-x.soft { background: var(--accent-soft); color: var(--accent); }
.btn-x.soft:hover { background: #e3e6ff; }
.btn-x.danger { background: var(--danger-soft); color: var(--danger); }
.btn-x.danger:hover { background: #fbdada; }
.btn-x.success { background: var(--success); color: #fff; }
.btn-x.success:hover { filter: brightness(1.05); }
.btn-x.sm { padding: 7px 12px; font-size: 12.5px; }
.btn-x.block { width: 100%; }

/* ---------------- Forms ---------------- */
.form-label { font-size: 12.8px; font-weight: 600; color: #3a4152; margin-bottom: 6px; }
.form-control, .form-select {
  border-radius: 10px;
  border: 1px solid var(--border);
  padding: 10px 13px;
  font-size: 13.6px;
  background: #fbfcff;
  transition: 0.15s;
}
.form-control:focus, .form-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  background: #fff;
}
.form-check-input:checked { background-color: var(--accent); border-color: var(--accent); }
.form-text { font-size: 11.5px; color: var(--muted); }
.invalid-feedback, .errorlist { color: var(--danger); font-size: 12px; }
.errorlist { list-style: none; padding: 0; margin: 4px 0 0; }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 4px 20px; }
.form-grid .full { grid-column: 1 / -1; }

/* Filter bar */
.filter-bar {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}
.filter-bar .form-control, .filter-bar .form-select { padding: 8px 12px; font-size: 13px; min-width: 130px; }
.filter-bar .grow { flex: 1; min-width: 180px; }

/* ---------------- Alerts / Messages ---------------- */
.alerts { display: flex; flex-direction: column; gap: 10px; margin-bottom: 18px; }
.alert-x {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; border-radius: 12px;
  font-size: 13.5px; font-weight: 500;
  border: 1px solid transparent;
}
.alert-x i { font-size: 18px; }
.alert-x.success { background: var(--success-soft); color: #0a7d5a; border-color: #c7f0e2; }
.alert-x.error { background: var(--danger-soft); color: #b93030; border-color: #f8d3d3; }
.alert-x.warning { background: var(--warning-soft); color: #a86a08; border-color: #fbe6bf; }
.alert-x.info { background: var(--info-soft); color: #0a729e; border-color: #c6ebfb; }
.alert-x .close { margin-left: auto; background: none; border: 0; color: inherit; opacity: 0.6; font-size: 16px; cursor: pointer; }

/* ---------------- Misc ---------------- */
.empty-state { text-align: center; padding: 54px 20px; color: var(--muted); }
.empty-state i { font-size: 46px; color: #c7ccdd; margin-bottom: 14px; display: block; }
.empty-state h4 { font-size: 16px; margin-bottom: 6px; }
.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.divider { height: 1px; background: var(--border); margin: 18px 0; }
.avatar-sm { width: 32px; height: 32px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color:#fff; display:grid; place-items:center; font-size:12px; font-weight:700; overflow:hidden; flex-shrink:0;}
.avatar-sm img { width:100%; height:100%; object-fit:cover; }
.flex { display: flex; }
.items-center { align-items: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.ms-auto { margin-left: auto; }
.text-right { text-align: right; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-accent { color: var(--accent) !important; }
.fw-700 { font-weight: 700; }
.price { font-variant-numeric: tabular-nums; }

/* Product thumb */
.thumb {
  width: 46px; height: 46px; border-radius: 10px; object-fit: cover;
  background: #eef0f8; flex-shrink: 0;
  display: grid; place-items: center; color: #9aa1b5; font-size: 18px;
}
.thumb.lg { width: 64px; height: 64px; border-radius: 12px; }
.thumb-xl { width: 100%; aspect-ratio: 1; border-radius: 14px; object-fit: cover; background: #eef0f8; }

/* Charts */
.chart-wrap { position: relative; height: 280px; }
.chart-wrap.sm { height: 240px; }

/* Progress bar */
.progress-x { height: 8px; background: #eef0f7; border-radius: 20px; overflow: hidden; }
.progress-x span { display: block; height: 100%; border-radius: 20px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* Pagination */
.pager { display: flex; gap: 6px; justify-content: center; margin-top: 22px; }
.pager a, .pager span {
  min-width: 36px; height: 36px; border-radius: 9px;
  display: grid; place-items: center;
  border: 1px solid var(--border); background: #fff;
  color: var(--text); font-size: 13px; font-weight: 600;
}
.pager a:hover { border-color: var(--accent); color: var(--accent); }
.pager .current { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ---------------- Login ---------------- */
.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; background: #0d0f19; }
.auth-visual {
  position: relative;
  background: radial-gradient(circle at 20% 20%, rgba(99,102,241,0.5), transparent 45%),
              radial-gradient(circle at 80% 80%, rgba(139,92,246,0.45), transparent 45%),
              linear-gradient(140deg, #10131f, #191d33);
  color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between;
  overflow: hidden;
}
.auth-visual::after {
  content: ''; position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.06) 1px, transparent 1px);
  background-size: 26px 26px; opacity: 0.5;
}
.auth-visual h1 { color: #fff; font-size: 42px; line-height: 1.1; letter-spacing: -0.03em; max-width: 460px; position: relative; z-index: 1; }
.auth-visual p { color: #b9bfd4; font-size: 15px; max-width: 420px; position: relative; z-index: 1; }
.auth-feature { display: flex; gap: 10px; align-items: center; color: #cdd2e6; font-size: 13.5px; position: relative; z-index:1; }
.auth-feature i { color: #a5b4fc; font-size: 18px; }
.auth-panel { background: #fff; display: flex; align-items: center; justify-content: center; padding: 40px; }
.auth-card { width: 100%; max-width: 390px; }
.auth-card h2 { font-size: 26px; margin-bottom: 6px; }
.auth-card .sub { color: var(--muted); margin-bottom: 28px; font-size: 14px; }
.input-icon { position: relative; }
.input-icon i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: #9aa1b5; }
.input-icon input { padding-left: 40px; }

/* ---------------- POS ---------------- */
.pos-grid { display: grid; grid-template-columns: 1fr 400px; gap: 20px; align-items: start; }
.pos-products { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 14px; }
.pos-card {
  background: #fff; border: 1px solid var(--border); border-radius: 14px;
  overflow: hidden; cursor: pointer; transition: 0.16s; box-shadow: var(--shadow);
}
.pos-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.pos-card .pc-img { aspect-ratio: 1; background: #eef0f8; display: grid; place-items: center; color: #b4bacb; font-size: 30px; overflow: hidden; }
.pos-card .pc-img img { width: 100%; height: 100%; object-fit: cover; }
.pos-card .pc-body { padding: 11px 12px; }
.pos-card .pc-name { font-weight: 600; font-size: 13px; line-height: 1.3; margin-bottom: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; height: 34px; }
.pos-card .pc-meta { display: flex; justify-content: space-between; align-items: center; }
.pos-card .pc-price { font-weight: 800; color: var(--accent); font-size: 14px; }
.pos-card .pc-stock { font-size: 11px; color: var(--muted); }
.pos-card.out { opacity: 0.55; pointer-events: none; }

.cart-panel { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); position: sticky; top: 92px; display: flex; flex-direction: column; max-height: calc(100vh - 112px); }
.cart-head { padding: 16px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.cart-items { overflow-y: auto; padding: 6px 0; flex: 1; }
.cart-line { display: flex; gap: 10px; padding: 11px 18px; border-bottom: 1px solid #f1f3f9; align-items: center; }
.cart-line .ci-name { font-weight: 600; font-size: 13px; }
.cart-line .ci-meta { font-size: 11.5px; color: var(--muted); }
.qty-ctrl { display: flex; align-items: center; gap: 6px; margin-top: 5px; }
.qty-ctrl button { width: 24px; height: 24px; border-radius: 7px; border: 1px solid var(--border); background: #fff; color: var(--text); font-weight: 700; line-height: 1; cursor: pointer; }
.qty-ctrl button:hover { border-color: var(--accent); color: var(--accent); }
.qty-ctrl span { min-width: 22px; text-align: center; font-weight: 700; font-size: 13px; }
.cart-foot { padding: 16px 18px; border-top: 1px solid var(--border); background: #fafbfe; border-radius: 0 0 var(--radius) var(--radius); }
.sum-row { display: flex; justify-content: space-between; font-size: 13.5px; margin-bottom: 7px; color: #4b5163; }
.sum-row.total { font-size: 18px; font-weight: 800; color: var(--text); margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.cart-empty { text-align: center; color: var(--muted); padding: 40px 20px; }

.searchbar-pos { position: relative; margin-bottom: 16px; }
.searchbar-pos input { width: 100%; padding: 12px 16px 12px 42px; border-radius: 12px; border: 1px solid var(--border); font-size: 14px; background:#fff; }
.searchbar-pos i { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: #9aa1b5; }

.variant-modal-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.variant-btn { border: 1px solid var(--border); background: #fff; border-radius: 9px; padding: 8px 12px; font-size: 12.5px; font-weight: 600; cursor: pointer; transition: 0.14s; text-align: left; }
.variant-btn:hover { border-color: var(--accent); color: var(--accent); }
.variant-btn:disabled { opacity: 0.45; cursor: not-allowed; text-decoration: line-through; }

/* ---------------- Profile pieces ---------------- */
.profile-head { display: flex; align-items: center; gap: 18px; }
.avatar-lg { width: 76px; height: 76px; border-radius: 20px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; display: grid; place-items: center; font-size: 26px; font-weight: 800; overflow: hidden; }
.avatar-lg img { width: 100%; height: 100%; object-fit: cover; }

/* Detail list */
.detail-list { display: grid; gap: 12px; }
.detail-list .row { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; padding-bottom: 12px; border-bottom: 1px dashed var(--border); }
.detail-list .row:last-child { border-bottom: 0; padding-bottom: 0; }
.detail-list .k { color: var(--muted); }
.detail-list .v { font-weight: 600; text-align: right; }

/* ---------------- Invoice print ---------------- */
.invoice-paper { background: #fff; max-width: 820px; margin: 0 auto; padding: 44px 48px; border-radius: 16px; box-shadow: var(--shadow); }
.invoice-tbl { width: 100%; border-collapse: collapse; margin: 22px 0; }
.invoice-tbl th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); padding: 10px 12px; border-bottom: 2px solid #eef0f7; }
.invoice-tbl td { padding: 12px; border-bottom: 1px solid #f1f3f9; font-size: 13.5px; }
.invoice-tbl .right { text-align: right; }

@media print {
  .no-print, .topbar, .sidebar { display: none !important; }
  .app-main { margin-left: 0 !important; }
  .app-content { padding: 0 !important; }
  .invoice-paper { box-shadow: none; border-radius: 0; padding: 20px; max-width: 100%; }
  body.app { background: #fff; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 1200px) {
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .pos-grid { grid-template-columns: 1fr 360px; }
}
@media (max-width: 992px) {
  .sidebar { transform: translateX(-100%); box-shadow: var(--shadow-lg); }
  body.sidebar-open .sidebar { transform: translateX(0); }
  .app-main { margin-left: 0; }
  .sidebar-toggle { display: grid; }
  .topbar-search { display: none; }
  .pos-grid { grid-template-columns: 1fr; }
  .cart-panel { position: static; max-height: none; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-visual { display: none; }
}
@media (max-width: 640px) {
  .app-content { padding: 18px 14px 40px; }
  .topbar { padding: 0 14px; gap: 10px; }
  .stat-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .topbar .page-sub { display: none; }
  .user-chip .u-name, .user-chip .u-role { display: none; }
  .invoice-paper { padding: 22px; }
}
