:root {
  --bg: #eef4ff;
  --bg-soft: #f8fbff;
  --card: rgba(255, 255, 255, 0.96);
  --card-glass: rgba(255, 255, 255, 0.88);
  --text: #0f172a;
  --muted: #64748b;
  --muted-2: #94a3b8;
  --border: #e2e8f0;
  --line: #dbe4f0;

  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-2: #0ea5e9;

  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;

  --sidebar: #020617;

  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 28px;
  --radius-2xl: 32px;

  --shadow-sm: 0 8px 24px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 14px 34px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: Inter, Arial, Helvetica, sans-serif;
  background: linear-gradient(135deg, #f1f5f9, #dbeafe, #f8fafc);
  color: var(--text);
}

a {
  text-decoration: none;
  color: inherit;
}

button,
input,
select,
textarea {
  font: inherit;
}

img {
  max-width: 100%;
  display: block;
}

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

.sidebar {
  width: 290px;
  background: var(--sidebar);
  color: #fff;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.brand-box {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  font-size: 24px;
  color: #fff;
  flex-shrink: 0;
}

.brand-box h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
}

.brand-box p {
  margin: 4px 0 0;
  color: #94a3b8;
  font-size: 14px;
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-links a {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  color: #cbd5e1;
  transition: 0.2s ease;
}

.nav-links a.active,
.nav-links a:hover {
  background: #fff;
  color: #0f172a;
}

.sidebar-card {
  margin-top: auto;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
  padding: 18px;
  border-radius: 24px;
}

.sidebar-card .label {
  font-size: 14px;
  opacity: 0.9;
  color: #e0f2fe;
}

.sidebar-card .value {
  font-size: 28px;
  font-weight: 800;
  margin: 8px 0;
  color: #fff;
}

.sidebar-card .muted {
  font-size: 13px;
  color: #e0f2fe;
}

.content {
  flex: 1;
  padding: 20px;
}

/* TOPBAR */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  border-radius: 28px;
  margin-bottom: 20px;
}

.topbar h2 {
  margin: 0;
  font-size: 30px;
  line-height: 1.1;
}

.topbar p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.topbar-actions {
  display: flex;
  gap: 10px;
}

.icon-btn {
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #f8fafc;
  cursor: pointer;
}

/* BUTTONS */
.actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 18px;
  border: 1px solid var(--border);
  cursor: pointer;
  font-weight: 600;
  background: #fff;
  transition: 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-sm {
  padding: 8px 12px;
  border-radius: 14px;
  font-size: 13px;
}

.btn-primary {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
}

.btn-light {
  background: #fff;
  color: var(--text);
}

.btn-danger {
  background: #fff1f2;
  color: #be123c;
  border-color: #fecdd3;
}

/* GRIDS & CARDS */
.grid {
  display: grid;
  gap: 16px;
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 28px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
}

.card-soft {
  background: #f8fbff;
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 18px;
}

.stat-card {
  position: relative;
  overflow: hidden;
}

.stat-bar {
  height: 6px;
  border-radius: 10px;
  margin: -20px -20px 16px;
}

.stat-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.stat-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: #f1f5f9;
  border: 1px solid var(--border);
}

.label {
  color: var(--muted);
  font-size: 14px;
}

.value {
  font-size: 30px;
  font-weight: 800;
  margin-top: 8px;
}

.value-sm {
  font-size: 22px;
  font-weight: 700;
  margin-top: 8px;
}

.sub {
  color: var(--muted-2);
  font-size: 13px;
  margin-top: 6px;
}

/* TABLES */
.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 10px;
  text-align: left;
  border-bottom: 1px solid #eef2f7;
  font-size: 14px;
  vertical-align: top;
}

th {
  color: var(--muted);
}

/* BADGES */
.badge {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.badge-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.badge-warning {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.badge-danger {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* LISTS */
.list-stack {
  display: grid;
  gap: 12px;
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: #fff;
}

.muted {
  color: var(--muted);
  font-size: 13px;
}

/* FORMS */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.single-col {
  grid-template-columns: 1fr;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group.full {
  grid-column: 1 / -1;
}

label {
  font-weight: 600;
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  outline: none;
  transition: 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

textarea {
  min-height: 100px;
  resize: vertical;
}

.page-section {
  margin-bottom: 20px;
}

.kpi {
  font-size: 24px;
  font-weight: 700;
}

.small {
  font-size: 12px;
  color: var(--muted);
}

.actions-cell {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* ALERTS */
.alert {
  padding: 14px 16px;
  border-radius: 18px;
  margin: 0 0 18px;
  border: 1px solid var(--border);
}

.alert-success {
  background: #ecfdf5;
  color: #065f46;
  border-color: #a7f3d0;
}

.alert-danger {
  background: #fff1f2;
  color: #9f1239;
  border-color: #fecdd3;
}

/* RECEIPT / INVOICE */
.receipt-card {
  max-width: 900px;
}

.receipt-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--border);
  margin-bottom: 16px;
}

.receipt-total {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 16px;
}

.receipt-total > div {
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px;
  background: #f8fafc;
}

.right {
  text-align: right;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.sale-items-stack {
  display: grid;
  gap: 14px;
  margin-bottom: 16px;
}

.sale-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.line-summary {
  justify-content: flex-end;
}

.line-total,
.line-profit {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #fff;
  font-weight: 700;
}

.row-tools {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}

.invoice-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.invoice-summary > div {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 14px;
}

.invoice-summary span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

/* CHARTS */
.bars-chart {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  min-height: 230px;
  padding: 12px 6px 0;
}

.compact-chart {
  min-height: 190px;
}

.bar-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.bar {
  width: 18px;
  border-radius: 999px 999px 6px 6px;
  min-height: 8px;
}

.bar-sales {
  background: linear-gradient(180deg, #2563eb, #60a5fa);
}

.bar-profit {
  background: linear-gradient(180deg, #10b981, #6ee7b7);
}

.bar-label {
  font-size: 12px;
  color: var(--muted);
}

.chart-legend {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 13px;
  margin-top: 10px;
}

.legend-sales {
  color: #2563eb;
}

.legend-profit {
  color: #10b981;
}

.progress-list {
  display: grid;
  gap: 16px;
}

.progress-item {
  display: grid;
  gap: 8px;
}

.progress-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.progress-track {
  height: 10px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #2563eb, #06b6d4);
  border-radius: 999px;
}

/* THERMAL RECEIPT */
.thermal-wrap {
  display: flex;
  justify-content: center;
}

.thermal-receipt {
  width: 340px;
  max-width: 100%;
  background: #fff;
  border: 1px dashed #cbd5e1;
  border-radius: 20px;
  padding: 18px;
  font-family: "Courier New", monospace;
}

.thermal-center {
  text-align: center;
}

.thermal-center h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.thermal-meta {
  font-size: 13px;
  margin-top: 8px;
}

.thermal-divider {
  border-top: 1px dashed #94a3b8;
  margin: 12px 0;
}

.thermal-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.thermal-table {
  width: 100%;
  border-collapse: collapse;
}

.thermal-table th,
.thermal-table td {
  font-size: 12px;
  padding: 8px 0;
  border-bottom: 1px dashed #e2e8f0;
}

.thermal-item-name {
  font-weight: 700;
}

.thermal-footer {
  text-align: center;
  font-size: 12px;
  color: #475569;
  margin-top: 10px;
}

/* STATEMENT */
.statement-summary .card {
  padding: 18px;
}

/* FILTER / SEARCH */
.filter-form {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 18px;
}

.filter-form .form-group {
  min-width: 160px;
}

.search-box {
  position: relative;
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 30;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  max-height: 220px;
  overflow: auto;
  display: none;
}

.search-results.show {
  display: block;
}

.search-item {
  padding: 10px 12px;
  border-bottom: 1px solid #eef2f7;
  cursor: pointer;
}

.search-item:last-child {
  border-bottom: none;
}

.search-item:hover {
  background: #f8fafc;
}

.search-item strong {
  display: block;
}

.search-hint {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}

.customer-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: #f8fafc;
  border-radius: 18px;
}

/* POS */
.pos-layout {
  align-items: start;
}

.pos-row-selected {
  background: #eff6ff;
}

.mini-input {
  width: 88px;
  padding: 8px 10px;
  border-radius: 12px;
}

.pos-main table td,
.pos-main table th {
  white-space: nowrap;
}

.pos-main table td:first-child {
  white-space: normal;
}

/* LOGIN PAGE */
body.login-page {
  min-height: 100vh;
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(37, 99, 235, 0.10), transparent 30%),
    radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.12), transparent 30%),
    linear-gradient(135deg, #edf4ff 0%, #f7fbff 100%);
  position: relative;
  overflow-x: hidden;
}

.login-bg {
  position: fixed;
  border-radius: 999px;
  filter: blur(60px);
  z-index: 0;
  pointer-events: none;
}

.login-bg-1 {
  width: 260px;
  height: 260px;
  background: rgba(37, 99, 235, 0.16);
  top: -80px;
  left: -80px;
}

.login-bg-2 {
  width: 300px;
  height: 300px;
  background: rgba(14, 165, 233, 0.15);
  right: -100px;
  bottom: -100px;
}

.login-wrapper {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 460px;
  background: var(--card-glass);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 30px;
  box-shadow: var(--shadow-lg);
  padding: 30px 28px;
}

.login-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 18px;
}

.login-logo {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  font-size: 30px;
  box-shadow: 0 18px 30px rgba(37, 99, 235, 0.24);
  flex-shrink: 0;
}

.login-badge {
  display: inline-block;
  margin-bottom: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.10);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.login-brand-text {
  min-width: 0;
}

.login-brand-text h1 {
  margin: 0;
  font-size: 38px;
  line-height: 1.05;
  font-weight: 800;
  word-break: break-word;
}

.login-brand-text p {
  margin: 6px 0 0;
  color: #7b8ca7;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.45;
}

.login-feature-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
}

.feature-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #f8fbff;
  border: 1px solid var(--line);
  color: #334155;
  padding: 10px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
}

.login-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
  border-radius: 16px;
  padding: 14px 15px;
  margin-bottom: 18px;
  font-size: 14px;
  font-weight: 600;
}

.login-form {
  display: grid;
  gap: 18px;
}

.field {
  display: grid;
  gap: 8px;
}

.field label {
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.input-box {
  position: relative;
}

.input-box > i {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 18px;
  pointer-events: none;
}

.input-box input {
  width: 100%;
  height: 58px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 0 50px 0 48px;
  font-size: 15px;
  color: #0f172a;
  outline: none;
  transition: 0.2s ease;
}

.input-box input::placeholder {
  color: #9aa8bc;
}

.input-box input:focus {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.eye-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  border-radius: 10px;
}

.eye-btn:hover {
  background: #f1f5f9;
  color: #334155;
}

.login-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: -2px;
}

.remember-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #475569;
  font-size: 14px;
  flex-wrap: nowrap;
}

.remember-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
  margin: 0;
  flex-shrink: 0;
}

.forgot-link {
  color: var(--primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.login-btn {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
  transition: 0.2s ease;
  text-align: center;
}

.login-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(37, 99, 235, 0.28);
}

.login-footer-note {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid #e7eef8;
  color: #64748b;
  font-size: 14px;
  line-height: 1.6;
}

/* PRINT */
@media print {
  .sidebar,
  .topbar,
  .actions {
    display: none !important;
  }

  .content {
    padding: 0;
  }

  .card {
    box-shadow: none;
    border: none;
  }

  body {
    background: #fff;
  }

  .thermal-wrap {
    display: block;
  }

  .thermal-receipt {
    width: 78mm;
    border: none;
    border-radius: 0;
    padding: 0;
  }
}

/* RESPONSIVE */
@media (max-width: 1100px) {
  .grid-4,
  .grid-3 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .sale-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pos-layout {
    grid-template-columns: 1fr;
  }

  .pos-main {
    grid-column: span 1 !important;
  }
}

@media (max-width: 860px) {
  .app-shell {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    min-height: auto;
  }

  .content {
    padding: 14px;
  }

  .topbar {
    padding: 16px;
  }

  .topbar h2 {
    font-size: 24px;
  }

  .grid-4,
  .grid-3,
  .grid-2,
  .form-grid,
  .receipt-total,
  .invoice-summary,
  .sale-grid {
    grid-template-columns: 1fr;
  }

  .bars-chart {
    overflow: auto;
    justify-content: flex-start;
  }

  .bar-group {
    min-width: 48px;
  }

  .section-title-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  .login-wrapper {
    padding: 18px 14px;
    align-items: start;
    padding-top: 28px;
  }

  .login-card {
    max-width: 100%;
    padding: 22px 18px;
    border-radius: 24px;
  }

  .login-header {
    align-items: flex-start;
    gap: 12px;
  }

  .login-logo {
    width: 58px;
    height: 58px;
    font-size: 24px;
    border-radius: 18px;
  }

  .login-brand-text h1 {
    font-size: 28px;
    line-height: 1.05;
  }

  .login-brand-text p {
    font-size: 14px;
    line-height: 1.4;
  }

  .login-badge {
    font-size: 10px;
    padding: 5px 8px;
    margin-bottom: 6px;
  }

  .login-feature-row {
    gap: 8px;
    margin-bottom: 16px;
  }

  .feature-pill {
    font-size: 12px;
    padding: 8px 10px;
  }

  .login-form {
    gap: 16px;
  }

  .field label {
    font-size: 14px;
  }

  .input-box input {
    height: 52px;
    border-radius: 15px;
    padding-left: 44px;
    padding-right: 44px;
    font-size: 14px;
  }

  .input-box > i {
    left: 14px;
    font-size: 16px;
  }

  .eye-btn {
    right: 10px;
    width: 32px;
    height: 32px;
  }

  .login-meta {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .forgot-link {
    white-space: normal;
  }

  .login-btn {
    min-height: 52px;
    border-radius: 15px;
    font-size: 15px;
  }

  .login-footer-note {
    margin-top: 16px;
    padding-top: 16px;
    font-size: 13px;
    line-height: 1.5;
  }
}

@media (max-width: 420px) {
  .login-wrapper {
    padding: 12px;
    padding-top: 20px;
  }

  .login-card {
    padding: 18px 14px;
    border-radius: 20px;
  }

  .login-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .login-brand-text h1 {
    font-size: 24px;
  }

  .login-brand-text p {
    font-size: 13px;
  }

  .feature-pill {
    width: 100%;
    justify-content: center;
  }

  .remember-check,
  .forgot-link {
    font-size: 13px;
  }

  .login-btn {
    font-size: 14px;
    padding: 0 14px;
  }
}

.brand {
  display: flex;
  gap: 14px;
  align-items: center;
}

.brand-logo {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #3b82f6, #06b6d4);
  font-size: 24px;
  color: #fff;
  flex-shrink: 0;
}

.brand h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
}

.brand p {
  margin: 4px 0 0;
  color: #94a3b8;
  font-size: 14px;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
}

.sidebar-user {
  font-size: 14px;
  color: #e2e8f0;
  font-weight: 600;
}

.sidebar-close,
.mobile-menu-btn,
.install-btn {
  appearance: none;
}

.sidebar-close {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255,255,255,0.16);
  background: rgba(255,255,255,0.08);
  color: #fff;
  border-radius: 14px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.sidebar-backdrop {
  display: none;
}

.mobile-menu-btn {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #f8fafc;
  cursor: pointer;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.topbar-text {
  min-width: 0;
}

.topbar-text h2,
.topbar-text p {
  overflow-wrap: anywhere;
}

.install-btn {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1200;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  color: #fff;
  box-shadow: var(--shadow-md);
  padding: 12px 18px;
  font-weight: 700;
}

.install-btn[hidden] {
  display: none !important;
}

@media (max-width: 860px) {
  body.sidebar-open {
    overflow: hidden;
  }

  .app-shell {
    display: block;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: min(86vw, 320px);
    min-height: 100vh;
    z-index: 1100;
    transform: translateX(-102%);
    transition: transform 0.25s ease;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(2, 6, 23, 0.4);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 1090;
  }

  body.sidebar-open .sidebar-backdrop {
    display: block;
  }

  .sidebar-close,
  .mobile-menu-btn {
    display: inline-flex;
  }

  .sidebar-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .topbar {
    position: sticky;
    top: 0;
    z-index: 900;
    border-radius: 22px;
  }

  .topbar h2 {
    font-size: 22px;
  }

  .topbar p {
    font-size: 13px;
  }

  .topbar-actions {
    gap: 8px;
  }

  .icon-btn {
    width: 40px;
    height: 40px;
  }

  .content {
    width: 100%;
  }

  .actions {
    gap: 10px;
  }

  .btn,
  .actions .btn {
    width: 100%;
  }

  .btn-sm {
    width: auto;
  }

  .card,
  .card-soft {
    border-radius: 22px;
    padding: 16px;
  }

  th,
  td {
    padding: 12px 8px;
  }

  .filter-form .form-group {
    min-width: 100%;
  }
}

@media (max-width: 640px) {
  .content {
    padding: 12px;
  }

  .topbar {
    padding: 14px;
    border-radius: 18px;
    margin-bottom: 16px;
  }

  .topbar-actions .icon-btn:last-child {
    display: none;
  }

  .brand h1 {
    font-size: 20px;
  }

  .nav-links a {
    padding: 12px 14px;
    border-radius: 14px;
  }

  .table-wrap {
    margin: 0 -4px;
  }

  table {
    min-width: 640px;
  }

  .actions-cell {
    min-width: 130px;
  }

  .receipt-head,
  .list-item,
  .customer-card {
    flex-direction: column;
    align-items: flex-start;
  }

  .right {
    text-align: left;
  }

  .install-btn {
    left: 12px;
    right: 12px;
    bottom: 12px;
    justify-content: center;
  }
}
