/* ===================== RESET & BASE ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:       #059669;
  --primary-dark:  #047857;
  --primary-light: #d1fae5;
  --accent:        #f59e0b;
  --accent-light:  #fef3c7;
  --danger:        #dc2626;
  --danger-light:  #fee2e2;
  --warning:       #d97706;
  --warning-light: #fef3c7;
  --success:       #16a34a;
  --success-light: #dcfce7;

  --bg:          #f7f6f3;
  --surface:     #ffffff;
  --surface-2:   #f7f6f3;
  --text:        #111827;
  --text-2:      #374151;
  --text-muted:  #6b7280;
  --border:      #e5e7eb;
  --border-2:    #d1d5db;

  --sidebar-bg:    #111827;
  --sidebar-text:  #9ca3af;
  --sidebar-hover: rgba(255,255,255,0.06);
  --sidebar-active:#059669;
  --sidebar-w:     230px;
  --header-h:      60px;

  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 14px;
  --radius-xl: 20px;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow:    0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===================== LAYOUT WRAPPERS ===================== */
.full-screen-center {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--sidebar-bg);
  padding: 20px;
}

/* ===================== AUTH ===================== */
.auth-wrap {
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

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

.auth-logo-mark {
  width: 84px;
  height: 46px;
  background: transparent;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.auth-logo-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.auth-logo-text {
  font-size: 22px;
  font-weight: 800;
  color: white;
  letter-spacing: -0.5px;
}

.auth-tagline {
  font-size: 13px;
  color: #6b7280;
  margin-top: 1px;
}

.auth-card {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: var(--shadow-lg);
}

.tab-group {
  display: flex;
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 4px;
  gap: 4px;
}

.tab {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  font-family: inherit;
  transition: all 0.15s;
}

.tab.active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.onboard-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.onboard-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: -4px;
}

/* ===================== FORMS ===================== */
.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-label { font-size: 12px; font-weight: 600; color: var(--text-muted); letter-spacing: 0.3px; text-transform: uppercase; }

input[type=text], input[type=email], input[type=password],
input[type=number], input[type=file], select, textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(5,150,105,0.12);
}

input[type=file] { padding: 8px 12px; cursor: pointer; }
textarea { resize: vertical; min-height: 80px; }
select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24'%3E%3Cpath fill='%236b7280' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 32px; }

/* ===================== BUTTONS ===================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.15s;
  white-space: nowrap;
  text-decoration: none;
}

.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 12px; }

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

.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover:not(:disabled) { background: var(--primary-light); }

.btn-ghost { background: transparent; color: var(--text-muted); border-color: transparent; }
.btn-ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }

.btn-danger { background: var(--danger); color: white; border-color: var(--danger); }
.btn-danger:hover:not(:disabled) { background: #b91c1c; }

.btn-success { background: var(--success); color: white; border-color: var(--success); }
.btn-success:hover:not(:disabled) { background: #15803d; }

.btn-amber { background: var(--accent); color: white; border-color: var(--accent); }
.btn-amber:hover:not(:disabled) { background: #d97706; }

/* ===================== HEADER ===================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px 0 16px;
  z-index: 300;
  box-shadow: var(--shadow-sm);
}

.header-left { display: flex; align-items: center; gap: 12px; }
.header-right { display: flex; align-items: center; gap: 12px; }

.menu-btn {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.menu-btn:hover { background: var(--surface-2); }

.menu-icon {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
}

.header-store-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 5px 10px 5px 5px;
  border-radius: 999px;
}

.user-avatar {
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: white;
  font-size: 12px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.role-pill {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--primary-light);
  color: var(--primary-dark);
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

/* ===================== SIDEBAR ===================== */
.sidebar {
  position: fixed;
  top: var(--header-h);
  left: 0;
  width: var(--sidebar-w);
  height: calc(100vh - var(--header-h));
  background: var(--sidebar-bg);
  display: flex;
  flex-direction: column;
  z-index: 200;
  transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
}

.sidebar.hidden {
  transform: translateX(-100%);
}

.sidebar-logo {
  display: none;
  align-items: center;
  gap: 10px;
  padding: 20px 20px 10px;
  color: white;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.sidebar-logo-mark {
  width: 30px;
  height: 30px;
  background: var(--primary);
  color: white;
  font-size: 14px;
  font-weight: 800;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-nav {
  flex: 1;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius);
  color: var(--sidebar-text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  border: none;
  background: none;
  transition: all 0.15s;
  text-decoration: none;
  position: relative;
}

.nav-item:hover { background: var(--sidebar-hover); color: white; }

.nav-item.active {
  background: rgba(5,150,105,0.15);
  color: #34d399;
}

.nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.nav-badge {
  position: absolute;
  right: 10px;
  width: 18px;
  height: 18px;
  background: var(--warning);
  color: white;
  font-size: 10px;
  font-weight: 800;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.sidebar-store-id {
  font-size: 10px;
  color: #4b5563;
  font-family: monospace;
  word-break: break-all;
  line-height: 1.4;
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 150;
}

/* ===================== MAIN ===================== */
.main {
  margin-top: var(--header-h);
  margin-left: var(--sidebar-w);
  padding: 28px;
  min-height: calc(100vh - var(--header-h));
  transition: margin-left 0.25s cubic-bezier(0.4,0,0.2,1);
}

/* ===================== SECTIONS ===================== */
.section { max-width: 1000px; }

.section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 12px;
}

.section-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
}

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

.section-sub-header { margin: 28px 0 14px; }
.sub-title { font-size: 15px; font-weight: 700; color: var(--text); }

/* ===================== STATS GRID ===================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s, box-shadow 0.15s;
}

.stat-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.stat-card.stat-warning {
  border-left: 3px solid var(--warning);
}

.stat-card.stat-danger {
  border-left: 3px solid var(--danger);
}

.stat-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.5px;
  line-height: 1;
  margin-bottom: 4px;
}

.stat-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* ===================== PRODUCT GRID ===================== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.product-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform 0.15s, box-shadow 0.15s;
}

.product-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.product-card img {
  width: 100%;
  height: 120px;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 12px;
}

.product-no-img {
  width: 100%;
  height: 100px;
  background: var(--surface-2);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  margin-bottom: 12px;
  border: 1px dashed var(--border-2);
}

.product-name {
  font-weight: 700;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-price {
  font-size: 18px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.5px;
  margin-bottom: 10px;
}

.stock-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}

.stock-ok  { background: var(--success-light); color: #15803d; }
.stock-low { background: var(--warning-light); color: #92400e; }
.stock-out { background: var(--danger-light);  color: #991b1b; }

.product-actions {
  display: flex;
  gap: 6px;
  margin-top: 12px;
}

.product-actions .btn { flex: 1; font-size: 12px; padding: 7px 8px; }

.low-stock-ribbon {
  position: absolute;
  top: 10px;
  right: 10px;
  background: var(--warning);
  color: white;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 7px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ===================== ITEM LIST (sales, utang, audit) ===================== */
.item-list { display: flex; flex-direction: column; gap: 10px; }

.item-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 16px 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.item-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.item-card-title { font-weight: 700; font-size: 14px; color: var(--text); }
.item-card-sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; line-height: 1.5; }
.item-card-amount { font-size: 18px; font-weight: 800; color: var(--text); letter-spacing: -0.3px; white-space: nowrap; }
.item-card-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

/* ===================== FILTER BAR ===================== */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}

.filter-tabs {
  display: flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 3px;
  gap: 2px;
}

.filter-tab {
  padding: 6px 14px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-muted);
  transition: all 0.15s;
}

.filter-tab.active {
  background: var(--primary);
  color: white;
}

.sales-total-chip {
  font-size: 13px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 6px 14px;
  border-radius: 999px;
}

/* ===================== PROGRESS BAR ===================== */
.progress-track {
  background: var(--surface-2);
  border-radius: 999px;
  height: 6px;
  margin: 10px 0 6px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--primary);
  transition: width 0.4s ease;
}

/* ===================== MEMBERS ===================== */
.info-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  margin-bottom: 20px;
}

.info-panel-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.info-panel-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.store-id-code {
  font-family: 'Courier New', monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--primary);
  background: var(--primary-light);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  flex: 1;
  word-break: break-all;
}

.info-panel-hint {
  font-size: 12px;
  color: var(--text-muted);
}

.members-list { display: flex; flex-direction: column; gap: 8px; }

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

.member-avatar {
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: white;
  font-size: 14px;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.member-info { display: flex; align-items: center; gap: 12px; flex: 1; }
.member-text { display: flex; flex-direction: column; }
.member-name { font-weight: 700; font-size: 14px; color: var(--text); }
.member-email { font-size: 12px; color: var(--text-muted); }

.role-select {
  font-size: 12px;
  font-family: inherit;
  font-weight: 600;
  padding: 5px 28px 5px 10px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  color: var(--text);
}

/* ===================== BANNERS & ALERTS ===================== */
.banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 13px;
  font-weight: 600;
}

.banner-warning { background: var(--warning-light); color: #92400e; border: 1px solid #fde68a; }

.alert { padding: 12px 16px; border-radius: var(--radius); font-size: 13px; font-weight: 600; margin-bottom: 16px; }
.alert-warning { background: var(--warning-light); color: #92400e; }

/* ===================== ACTIVITY ===================== */
.activity-list { display: flex; flex-direction: column; gap: 8px; }

.activity-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.activity-icon { font-size: 18px; flex-shrink: 0; line-height: 1.3; }
.activity-text { font-size: 13px; color: var(--text); }
.activity-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* ===================== EMPTY STATE ===================== */
.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 13px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1.5px dashed var(--border-2);
}

/* ===================== MODAL ===================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 16px;
  backdrop-filter: blur(2px);
}

.modal-box {
  background: var(--surface);
  border-radius: var(--radius-xl);
  padding: 28px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: modalIn 0.2s cubic-bezier(0.4,0,0.2,1);
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.97) translateY(8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.3px;
  margin-bottom: 20px;
}

.modal-footer {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ===================== CART ===================== */
.cart-items { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }

.cart-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border-radius: var(--radius);
  padding: 10px 12px;
}

.cart-item-name { flex: 1; font-size: 13px; font-weight: 600; color: var(--text); }
.cart-item-price { font-size: 11px; color: var(--text-muted); font-weight: 400; }

.cart-qty-controls { display: flex; align-items: center; gap: 8px; }

.qty-btn {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--border-2);
  background: var(--surface);
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text);
  transition: all 0.15s;
  line-height: 1;
}

.qty-btn:hover { border-color: var(--primary); color: var(--primary); }
.qty-display { font-size: 14px; font-weight: 700; min-width: 20px; text-align: center; }
.cart-item-subtotal { font-size: 13px; font-weight: 700; color: var(--text); min-width: 60px; text-align: right; }

.cart-total-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 12px;
  background: var(--primary-light);
  border-radius: var(--radius);
  margin: 12px 0;
  font-weight: 800;
  font-size: 16px;
  color: var(--primary-dark);
}

/* ===================== PRODUCT PICKER ===================== */
.product-picker-list {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  max-height: 260px;
  overflow-y: auto;
}

.picker-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 14px;
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
  font-size: 13px;
}

.picker-item:last-child { border-bottom: none; }
.picker-item:hover { background: var(--surface-2); }
.picker-item.disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
.picker-item-name { font-weight: 600; color: var(--text); }
.picker-item-meta { font-size: 11px; color: var(--text-muted); }

/* ===================== PAYMENT HISTORY ===================== */
.payment-history { display: flex; flex-direction: column; gap: 0; }

.payment-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.payment-row:last-child { border-bottom: none; }
.payment-amount { font-weight: 700; color: var(--success); }

/* ===================== TOAST ===================== */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: flex-end;
}

.toast {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-md);
  animation: toastIn 0.2s cubic-bezier(0.4,0,0.2,1);
  max-width: 320px;
}

@keyframes toastIn {
  from { transform: translateX(100%); opacity: 0; }
  to   { transform: translateX(0); opacity: 1; }
}

.toast-success { background: var(--success-light); color: #15803d; border: 1px solid #86efac; }
.toast-error   { background: var(--danger-light);  color: #991b1b; border: 1px solid #fca5a5; }
.toast-info    { background: #dbeafe;               color: #1e40af; border: 1px solid #93c5fd; }
.toast-warning { background: var(--warning-light);  color: #92400e; border: 1px solid #fcd34d; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    top: 0;
    height: 100vh;
  }

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

  .sidebar.open ~ .sidebar-overlay,
  .sidebar-overlay.visible {
    display: block;
  }

  .sidebar-logo { display: flex; }

  .main {
    margin-left: 0;
    padding: 16px;
  }

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

  .user-name { display: none; }
  .header-right .btn-ghost { display: none; }

  .section-header { flex-direction: column; align-items: flex-start; gap: 12px; }
  .filter-bar { flex-direction: column; align-items: flex-start; }

  .modal-box { padding: 20px; max-height: 95vh; }
}

@media (max-width: 420px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .product-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat-value { font-size: 20px; }
}
