:root {
  --green: #22c55e;
  --green-dark: #16a34a;
  --green-light: #dcfce7;
  --green-glow: rgba(34, 197, 94, 0.25);
  --navy: #0f172a;
  --slate: #475569;
  --muted: #94a3b8;
  --border: #e2e8f0;
  --bg: #f1f5f9;
  --white: #ffffff;
  --sidebar-w: 272px;
  --header-h: 62px;
  --radius: 12px;
  --radius-lg: 16px;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.07), 0 4px 12px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 8px 30px rgba(15, 23, 42, 0.12);
  --shadow-xl: 0 20px 60px rgba(15, 23, 42, 0.18);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  color: var(--navy);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

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

/* ─── Utility classes ─── */
.desktop-only { display: flex; }
.mobile-only { display: none; }

@media (max-width: 767px) {
  .desktop-only { display: none !important; }
  .mobile-only { display: flex !important; }
}

/* ─── Login ─── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, #e2e8f0 0%, #f8fafc 100%);
}

.login-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  max-width: 1100px;
  width: 100%;
  min-height: 620px;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: var(--shadow-xl);
  background: var(--white);
}

.login-hero {
  position: relative;
  padding: 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: white;
  background: url('https://images.unsplash.com/photo-1487530811176-3780de880c2d?w=800&q=80') center/cover;
}

.login-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(160deg, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.55) 100%);
}

.login-hero > * { position: relative; z-index: 1; }

.login-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: 0.04em;
}

.login-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-hero h1 {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.25;
  margin-top: auto;
  margin-bottom: 12px;
}

.login-hero p {
  font-size: 14px;
  opacity: 0.9;
  line-height: 1.6;
  margin-bottom: 28px;
}

.login-pills {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.login-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(8px);
  border-radius: 999px;
  font-size: 13px;
  border: 1px solid rgba(255,255,255,0.15);
  transition: transform 0.2s, background 0.2s;
}

.login-pill:hover { transform: translateX(4px); background: rgba(255,255,255,0.18); }

.login-pill-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

.login-form-side {
  padding: 48px 44px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.lang-btn {
  position: absolute;
  top: 24px;
  right: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--white);
  color: var(--slate);
  cursor: pointer;
  font-size: 13px;
  transition: border-color 0.15s;
}

.lang-btn:hover { border-color: var(--green); }

.login-form-side h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 48px 0 28px;
  line-height: 1.35;
  color: var(--navy);
}

.form-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
}

.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  background: var(--white);
  color: var(--navy);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-glow);
}

.form-group textarea { min-height: 80px; resize: vertical; }

.field-required { color: #ef4444; margin-left: 2px; }

.field-hint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.5;
}

.password-wrap { position: relative; }
.password-wrap input { padding-right: 44px; }

.toggle-pwd {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  padding: 4px;
}

.btn-primary {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, #22c55e, #10b981);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 14px var(--green-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px var(--green-glow);
}

.btn-primary:active { transform: scale(0.98); }

.form-footer {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: var(--muted);
}

.login-error {
  color: #ef4444;
  font-size: 13px;
  margin-bottom: 12px;
  display: none;
  padding: 10px 14px;
  background: #fef2f2;
  border-radius: 8px;
  border: 1px solid #fecaca;
}

.login-error.visible { display: block; }

.register-sub {
  font-size: 14px;
  color: var(--slate);
  margin: -16px 0 20px;
  line-height: 1.5;
}

.auth-footer-link {
  text-align: center;
  margin-top: 20px;
  font-size: 14px;
}

.auth-footer-link a {
  color: var(--green-dark);
  font-weight: 600;
}

.auth-footer-link a:hover { text-decoration: underline; }

.btn-link {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  background: none;
  border: none;
  color: var(--green-dark);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  text-align: center;
}

.btn-link:hover { text-decoration: underline; }

.code-input {
  font-size: 28px !important;
  font-weight: 800;
  letter-spacing: 0.35em;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.demo-code-badge {
  display: block;
  padding: 12px 16px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
  font-size: 13px;
  color: #92400e;
  text-align: center;
}

.demo-code-badge strong {
  font-size: 22px;
  letter-spacing: 0.2em;
  display: block;
  margin-top: 6px;
  color: var(--navy);
}

@media (max-width: 860px) {
  .login-card { grid-template-columns: 1fr; }
  .login-hero { min-height: 260px; padding: 28px; }
  .login-form-side { padding: 32px 28px; }
  .login-form-side h2 { margin-top: 36px; }
}

@media (max-width: 480px) {
  .login-page { padding: 16px; }
  .login-form-side { padding: 24px 20px; }
  .form-box { padding: 20px; }
}

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

/* ─── Sidebar Backdrop (mobile) ─── */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  z-index: 99;
  backdrop-filter: blur(2px);
  animation: fadeIn 0.2s;
}

.sidebar-backdrop.visible { display: block; }

/* ─── Sidebar ─── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar.collapsed { transform: translateX(calc(-1 * var(--sidebar-w))); }

.sidebar-top {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border);
}

.shop-card {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.shop-card:hover {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-glow);
}

.shop-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--green-light);
  color: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
}

.shop-info { flex: 1; min-width: 0; }
.shop-label { font-size: 10px; color: var(--muted); font-weight: 500; }
.shop-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.shop-dot {
  width: 8px;
  height: 8px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px var(--green-glow);
}

.menu-toggle {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate);
  transition: all 0.15s;
  flex-shrink: 0;
}

.menu-toggle:hover {
  border-color: var(--green);
  background: var(--green-light);
  color: var(--green-dark);
}

.sidebar-search {
  padding: 12px 14px 8px;
}

.sidebar-search input {
  width: 100%;
  padding: 9px 14px 9px 36px;
  border: 1px solid var(--border);
  border-radius: 999px;
  outline: none;
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85zm-5.242 1.156a5 5 0 1 1 0-10 5 5 0 0 1 0 10z'/%3E%3C/svg%3E") 12px center no-repeat;
  font-size: 13px;
  transition: all 0.15s;
}

.sidebar-search input:focus {
  border-color: var(--green);
  background-color: var(--white);
  box-shadow: 0 0 0 3px var(--green-glow);
}

.nav-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 6px 10px 24px;
}

.nav-scroll::-webkit-scrollbar { width: 4px; }
.nav-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }
.nav-scroll::-webkit-scrollbar-thumb:hover { background: var(--green); }

.nav-item, .nav-sub {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 10px;
  cursor: pointer;
  color: var(--slate);
  font-size: 13px;
  font-weight: 500;
  transition: background 0.12s, color 0.12s;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-item:hover, .nav-sub:hover {
  background: var(--bg);
  color: var(--navy);
}

.nav-item.active {
  background: var(--green-light);
  color: var(--green-dark);
  position: relative;
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 6px;
  bottom: 6px;
  width: 3px;
  background: var(--green);
  border-radius: 0 4px 4px 0;
}

.nav-icon {
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #f1f5f9;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.15s;
}

.nav-item:hover .nav-icon,
.nav-item.active .nav-icon {
  background: rgba(34, 197, 94, 0.15);
  color: var(--green-dark);
  transform: scale(1.05);
}

.nav-chevron {
  margin-left: auto;
  font-size: 10px;
  transition: transform 0.2s;
  opacity: 0.5;
}

.nav-group.open .nav-chevron { transform: rotate(90deg); }

.nav-subs { display: none; padding-left: 20px; }
.nav-group.open .nav-subs { display: block; }
.nav-sub { padding: 7px 10px; font-size: 12px; }
.nav-sub.active { color: var(--green-dark); font-weight: 600; }

.main-wrap {
  flex: 1;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-wrap.expanded { margin-left: 0; }

/* ─── Header ─── */
.top-header {
  height: var(--header-h);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  color: var(--navy);
}

.header-spacer { flex: 1; }

.header-time {
  font-size: 12px;
  color: var(--slate);
  white-space: nowrap;
}

.btn-pos {
  padding: 9px 18px;
  background: linear-gradient(135deg, #22c55e, #10b981);
  color: white;
  border: none;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  box-shadow: 0 4px 14px var(--green-glow);
}

.btn-pos:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--green-glow);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate);
  transition: all 0.15s;
}

.icon-btn:hover {
  border-color: var(--green);
  background: var(--green-light);
  color: var(--green-dark);
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 5px;
  border: 1px solid var(--border);
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.user-menu:hover {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-glow);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.user-name { font-weight: 600; font-size: 13px; }

.page-content {
  flex: 1;
  padding: 24px;
  animation: pageIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes pageIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Dashboard ─── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-greeting {
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.greeting-icon {
  display: inline-flex;
  vertical-align: middle;
  color: var(--green);
  animation: pulse 2.5s ease-in-out infinite;
  cursor: help;
}

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.15); opacity: 0.8; }
}

.date-range {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  font-weight: 500;
}

.date-range:hover {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-glow);
}

/* Date picker panel */
.date-picker-panel {
  position: absolute;
  right: 24px;
  top: calc(var(--header-h) + 64px);
  z-index: 60;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 20px;
  animation: slideDown 0.2s ease;
}

@keyframes slideDown {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.date-picker-inner {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.date-picker-inner .form-group { margin-bottom: 0; min-width: 140px; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

.kpi-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px;
  border: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  box-shadow: var(--shadow);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  position: relative;
  overflow: hidden;
  cursor: default;
}

.kpi-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--green), #06b6d4);
  opacity: 0;
  transition: opacity 0.25s;
}

.kpi-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.1);
}

.kpi-card:hover::after { opacity: 1; }

.kpi-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.kpi-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--navy);
  line-height: 1;
}

.kpi-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.charts-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 16px;
}

.chart-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 24px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: box-shadow 0.25s;
}

.chart-card:hover { box-shadow: var(--shadow-lg); }

.chart-card h3 {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-wrap { position: relative; height: 260px; }

/* ─── Generic pages ─── */
.page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

.page-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ─── Buttons ─── */
.btn {
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--white);
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  color: var(--navy);
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.btn:hover { border-color: var(--green); color: var(--green-dark); }
.btn:active { transform: scale(0.97); }

.btn-green {
  background: linear-gradient(135deg, #22c55e, #10b981);
  color: white;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}

.btn-green:hover {
  background: linear-gradient(135deg, #16a34a, #059669);
  color: white;
  box-shadow: 0 6px 18px rgba(34, 197, 94, 0.4);
  transform: translateY(-1px);
}

.btn-danger {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fecaca;
}

.btn-danger:hover {
  background: #fee2e2;
  border-color: #fca5a5;
}

/* Action buttons in tables */
.btn-action {
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 500;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--white);
  cursor: pointer;
  transition: all 0.12s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--slate);
}

.btn-action:hover { border-color: var(--green); color: var(--green-dark); background: var(--green-light); }

.btn-del:hover { border-color: #fecaca; color: #dc2626; background: #fef2f2; }

/* ─── Card ─── */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.25s;
}

.card:hover { box-shadow: var(--shadow-lg); }

/* ─── Table ─── */
.data-table {
  width: 100%;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 13px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.data-table th {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: #f8fafc;
  white-space: nowrap;
}

.data-table tr:hover td { background: #f8fafc; }
.data-table tr:last-child td { border-bottom: none; }

.data-table td { font-size: 13px; }

.table-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}

/* ─── Badges ─── */
.badge {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-green { background: var(--green-light); color: var(--green-dark); }
.badge-yellow { background: #fef9c3; color: #a16207; }
.badge-red { background: #fee2e2; color: #dc2626; }
.badge-blue { background: #dbeafe; color: #1d4ed8; }

/* ─── Spinner ─── */
.spinner {
  display: inline-block;
  width: 24px; height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Empty state ─── */
.empty-state {
  padding: 48px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* ─── Modal ─── */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@keyframes slideUp {
  from { transform: translateY(16px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
  animation: fadeIn 0.2s;
  backdrop-filter: blur(4px);
}

.modal {
  background: var(--white);
  border-radius: 20px;
  width: 100%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-xl);
  animation: slideUp 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.confirm-modal { max-width: 420px; }

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 { font-size: 17px; font-weight: 700; }

.modal-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--muted);
  line-height: 1;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  transition: background 0.15s;
}

.modal-close:hover { background: var(--bg); color: var(--navy); }

.modal-body { padding: 24px; }

.modal-error {
  display: none;
  color: #ef4444;
  font-size: 13px;
  padding: 8px 24px 0;
  animation: fadeIn 0.2s;
}

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

.modal .form-group { margin-bottom: 16px; }

.modal .form-group input,
.modal .form-group select,
.modal .form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  outline: none;
  transition: all 0.15s;
  background: var(--white);
}

.modal .form-group input:focus,
.modal .form-group select:focus,
.modal .form-group textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-glow);
}

.modal .form-group textarea { min-height: 80px; resize: vertical; }

.confirm-icon {
  font-size: 40px;
  text-align: center;
  margin-bottom: 14px;
}

.confirm-msg {
  color: var(--slate);
  line-height: 1.6;
  text-align: center;
  font-size: 14px;
}

/* ─── POS ─── */
.pos-layout {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 20px;
  height: calc(100vh - var(--header-h) - 48px);
}

.pos-products {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  overflow-y: auto;
  padding: 4px;
}

.pos-product {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s;
  animation: cardPop 0.35s ease backwards;
}

.pos-product:hover {
  border-color: var(--green);
  box-shadow: 0 4px 16px var(--green-glow);
  transform: translateY(-3px);
}

.pos-product:active { transform: scale(0.97); }

.pos-product .emoji,
.pos-product .product-icon-wrap { margin-bottom: 8px; }

.pos-product .name { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.pos-product .price { color: var(--green-dark); font-weight: 700; }

.pos-cart {
  background: var(--white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.pos-cart-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  font-weight: 700;
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pos-cart-items { flex: 1; overflow-y: auto; padding: 12px; }

.cart-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.cart-line:last-child { border-bottom: none; }
.cart-line-info { flex: 1; }
.cart-line-name { font-weight: 600; font-size: 13px; }
.cart-line-price { font-size: 12px; color: var(--muted); }

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

.qty-controls button {
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--white);
  cursor: pointer;
  font-weight: 700;
  transition: all 0.12s;
}

.qty-controls button:hover {
  border-color: var(--green);
  background: var(--green-light);
}

.cart-remove {
  border: none;
  background: #fef2f2;
  color: #dc2626;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  flex-shrink: 0;
}

.cart-remove:hover { background: #fee2e2; }

.pos-cart-footer {
  padding: 16px 20px;
  border-top: 1px solid var(--border);
  background: #f8fafc;
}

.pos-total {
  display: flex;
  justify-content: space-between;
  font-size: 19px;
  font-weight: 800;
  margin-bottom: 12px;
}

.pos-search { margin-bottom: 16px; position: relative; }

.pos-search input {
  width: 100%;
  padding: 11px 16px 11px 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  outline: none;
  transition: all 0.15s;
}

.pos-search input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-glow);
}

.pos-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

/* POS exit buttons */
.btn-exit-pos {
  padding: 9px 16px;
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
}

.btn-exit-pos:hover { background: #fee2e2; }

.top-header--pos { box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06); }

.pos-floating-bar {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.pos-floating-btn {
  padding: 12px 18px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--white);
  box-shadow: var(--shadow-lg);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.pos-floating-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.15);
}

.pos-floating-exit { background: #fef2f2; color: #dc2626; border-color: #fecaca; }
.pos-floating-exit:hover { background: #fee2e2; }

.pos-dropdown {
  position: fixed;
  z-index: 200;
  min-width: 220px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-xl);
  padding: 8px;
  animation: slideUp 0.2s;
}

.pos-dropdown-item {
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 10px;
}

.pos-dropdown-item:hover { background: var(--bg); }
.pos-dropdown-exit { color: #dc2626; font-weight: 700; }
.pos-dropdown-exit:hover { background: #fef2f2; }
.pos-dropdown-divider { height: 1px; background: var(--border); margin: 6px 0; }

/* ─── AI Assistant ─── */
.ai-chat {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 200px);
  max-height: 600px;
}

.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-msg {
  max-width: 82%;
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.55;
  animation: msgIn 0.25s ease;
}

@keyframes msgIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.ai-msg.bot {
  background: linear-gradient(135deg, #ecfdf5, #d1fae5);
  border: 1px solid rgba(34, 197, 94, 0.2);
  color: var(--navy);
  align-self: flex-start;
  border-bottom-left-radius: 4px;
}

.ai-msg.user {
  background: linear-gradient(135deg, #0f172a, #1e293b);
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 4px;
}

.ai-input-row {
  display: flex;
  gap: 10px;
  padding: 16px;
  border-top: 1px solid var(--border);
}

.ai-input-row input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  outline: none;
  transition: all 0.15s;
}

.ai-input-row input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-glow);
}

/* ─── Calendar ─── */
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.cal-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
}

.cal-day:hover { background: var(--bg); border-color: var(--border); }
.cal-day.has-order { background: var(--green-light); border-color: var(--green); font-weight: 600; color: var(--green-dark); }
.cal-day.today { outline: 2px solid var(--green); font-weight: 700; }

/* ─── Stats grid ─── */
.stats-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.stat-box {
  padding: 20px;
  background: linear-gradient(135deg, var(--green-light), #fff);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 0.2s;
}

.stat-box:hover { transform: translateY(-2px); }
.stat-box h4 { font-size: 12px; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.stat-box .val { font-size: 28px; font-weight: 800; }

/* ─── Toast ─── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 20px;
  background: var(--navy);
  color: white;
  border-radius: 12px;
  font-weight: 600;
  z-index: 300;
  animation: toastIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  box-shadow: var(--shadow-lg);
  font-size: 14px;
}

@keyframes toastIn {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.toast.success { background: linear-gradient(135deg, #16a34a, #059669); }

/* ─── Shop dropdown ─── */
.dropdown-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 6px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 110;
  display: none;
  overflow: hidden;
}

.dropdown-menu.open { display: block; animation: slideDown 0.2s ease; }

.dropdown-item {
  padding: 11px 16px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.12s;
}

.dropdown-item:hover { background: var(--bg); }
.dropdown-item.active { background: var(--green-light); color: var(--green-dark); font-weight: 600; }
.dropdown-divider { height: 1px; background: var(--border); }

.shop-card-wrap { position: relative; flex: 1; min-width: 0; }

.user-dropdown {
  position: fixed !important;
  top: auto;
  left: auto;
  width: 200px !important;
  animation: slideDown 0.2s ease;
}

/* ─── Settings ─── */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.settings-card { padding: 24px; }
.settings-card h3 { font-size: 15px; font-weight: 700; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }

/* ─── Profile ─── */
.profile-section-title { font-size: 15px; font-weight: 700; margin-bottom: 20px; display: flex; align-items: center; gap: 8px; }

/* ─── Link btn ─── */
.link-btn { color: var(--green-dark); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.link-btn:hover { text-decoration: underline; }

/* ─── Table product cell ─── */
.table-product-cell { display: inline-flex; align-items: center; gap: 10px; }
.table-product-cell .icon-box { width: 32px; height: 32px; border-radius: 8px; }

/* ─── Card animations ─── */
@keyframes cardPop {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}

/* ─── Icon elements ─── */
.icon { display: inline-block; vertical-align: middle; flex-shrink: 0; }
.icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  width: 40px;
  height: 40px;
}

.btn-icon-only { padding: 7px 10px !important; }

/* ─── Responsive: Tablet 768-1024px ─── */
@media (max-width: 1200px) {
  .kpi-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1100px) {
  .charts-row { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 1024px) {
  :root { --sidebar-w: 260px; }
}

/* ─── Responsive: iPad 768-1024px ─── */
@media (max-width: 900px) {
  .pos-layout { grid-template-columns: 1fr; height: auto; }
  .pos-cart { margin-top: 12px; max-height: 380px; }
}

@media (max-width: 860px) {
  .login-card { grid-template-columns: 1fr; }
  .login-hero { min-height: 260px; }
}

/* ─── Responsive: Mobile < 768px ─── */
@media (max-width: 767px) {
  :root {
    --sidebar-w: 280px;
    --header-h: 56px;
  }

  /* Sidebar becomes overlay on mobile */
  .sidebar {
    transform: translateX(calc(-1 * var(--sidebar-w)));
    box-shadow: none;
    z-index: 100;
  }

  .sidebar.mobile-open {
    transform: translateX(0);
    box-shadow: var(--shadow-xl);
  }

  /* Main content full width on mobile */
  .main-wrap {
    margin-left: 0 !important;
  }

  .main-wrap.expanded { margin-left: 0; }

  .page-content { padding: 16px; }

  .top-header { padding: 0 14px; gap: 8px; }

  .page-title { font-size: 18px; }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .kpi-card { padding: 14px; }
  .kpi-value { font-size: 18px; }
  .kpi-icon { width: 38px; height: 38px; }

  .charts-row { grid-template-columns: 1fr; }
  .chart-wrap { height: 220px; }

  .stats-2col { grid-template-columns: 1fr; gap: 10px; }

  .page-header { flex-direction: column; align-items: flex-start; gap: 10px; }
  .date-range { width: 100%; justify-content: center; }
  .date-picker-panel { right: 16px; left: 16px; }

  .data-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .modal-overlay { padding: 12px; align-items: flex-end; }
  .modal {
    border-radius: 20px 20px 0 0;
    max-height: 85vh;
    animation: slideUpMobile 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  }

  @keyframes slideUpMobile {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
  }

  .toast { bottom: 16px; right: 16px; left: 16px; }

  .toolbar { width: 100%; }
  .toolbar .btn { flex: 1; justify-content: center; }

  .btn-pos { padding: 8px 12px; font-size: 12px; }

  .user-name, .header-time { display: none; }
  .user-dropdown { right: 12px !important; }

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

  .pos-floating-bar {
    left: 12px;
    bottom: 12px;
    right: 12px;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .pos-floating-btn { flex: 1; min-width: 130px; text-align: center; padding: 12px; font-size: 13px; }

  .pos-layout { gap: 12px; }
  .pos-products { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }

  .calendar-grid { gap: 2px; }
  .cal-day { font-size: 12px; }

  .settings-grid { grid-template-columns: 1fr; }

  .ai-chat { height: calc(100vh - 180px); }
}

@media (max-width: 480px) {
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kpi-card { padding: 12px; }
  .kpi-value { font-size: 16px; }
  .kpi-label { font-size: 9px; }
}

/* ─── KPI card clickable ─── */
.kpi-card--clickable {
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
}
.kpi-card--clickable:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
}
.kpi-card--clickable:active { transform: translateY(0); }

/* ─── KPI detail modal summary ─── */
.kpi-detail-summary {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.kpi-ds-item {
  background: var(--bg);
  border-radius: var(--radius);
  padding: 10px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 120px;
}
.kpi-ds-item span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; }
.kpi-ds-item strong { font-size: 18px; font-weight: 700; color: var(--navy); }

/* ─── Product picker ─── */
/* ─── Product Picker ─── */
.pp-wrap {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--white);
}
.pp-filter {
  width: 100%;
  padding: 10px 14px;
  border: none;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
  outline: none;
  font-size: 14px;
}
.pp-filter:focus { background: white; border-bottom-color: var(--green); }
.pp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 6px;
  padding: 10px;
  max-height: 240px;
  overflow-y: auto;
  background: #fafbfd;
}
.pp-product {
  padding: 10px 10px 8px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: all 0.14s;
  background: white;
  user-select: none;
  position: relative;
  min-height: 72px;
  touch-action: manipulation;
}
.pp-product:active { transform: scale(0.97); }
.pp-product:hover { border-color: var(--green); background: var(--green-light); box-shadow: 0 2px 8px rgba(16,185,129,0.1); }
.pp-product.selected { border-color: var(--green-dark); background: linear-gradient(135deg, var(--green-light), #d1fae5); box-shadow: 0 2px 8px rgba(16,185,129,0.15); }
.pp-check-mark {
  position: absolute;
  top: 5px; right: 5px;
  color: var(--green-dark);
  background: white;
  border-radius: 50%;
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 1px 4px rgba(16,185,129,0.3);
}
.pp-pname { font-weight: 600; font-size: 12px; line-height: 1.3; }
.pp-pprice { font-size: 12px; font-weight: 700; color: var(--green-dark); }
.pp-pstock { font-size: 11px; }
.pp-stock-ok { color: var(--muted); }
.pp-stock-warn { color: #f59e0b; font-weight: 600; }
.pp-stock-danger { color: #ef4444; font-weight: 600; }
.pp-selected {
  border-top: 1.5px solid var(--border);
  padding: 8px 10px;
  min-height: 40px;
  background: white;
}
.pp-empty-sel {
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  padding: 10px;
  font-style: italic;
}
.pp-sel-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f8fafc;
  margin-bottom: 4px;
  border: 1px solid var(--border);
}
.pp-sel-info { flex: 1; overflow: hidden; }
.pp-sel-name { font-weight: 600; font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pp-sel-price { font-size: 11px; color: var(--muted); }
.pp-qty {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.pp-qty-val { min-width: 24px; text-align: center; }
.pp-qty-inp {
  width: 52px;
  height: 32px;
  border: 1.5px solid var(--border);
  border-radius: 7px;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
  padding: 0 4px;
  background: white;
  color: var(--slate);
  -moz-appearance: textfield;
}
.pp-qty-inp::-webkit-outer-spin-button,
.pp-qty-inp::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pp-qty-inp:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 2px rgba(16,185,129,0.15); }
.pp-minus, .pp-plus {
  width: 30px; height: 30px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: white;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.12s;
  color: var(--slate);
  padding: 0;
  touch-action: manipulation;
}
.pp-minus:hover, .pp-plus:hover { border-color: var(--green); color: var(--green-dark); background: var(--green-light); }
.pp-plus:hover { background: var(--green); color: white; border-color: var(--green); }
.pp-remove {
  width: 28px; height: 28px;
  border-radius: 8px;
  border: 1px solid #fca5a5;
  background: #fee2e2;
  color: #dc2626;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  line-height: 1;
  flex-shrink: 0;
  padding: 0;
  transition: all 0.12s;
  touch-action: manipulation;
}
.pp-remove:hover { background: #fca5a5; }
.pp-empty {
  font-size: 13px;
  color: var(--muted);
  text-align: center;
  padding: 20px;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}

/* ─── Product picker tabs ─── */
.pp-tab-bar {
  display: flex;
  gap: 0;
  border-bottom: 1.5px solid var(--border);
  background: #f8fafc;
}
.pp-tab {
  flex: 1;
  padding: 8px 12px;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.15s;
  border-bottom: 2.5px solid transparent;
  margin-bottom: -1.5px;
}
.pp-tab:hover { color: var(--green-dark); background: var(--green-light); }
.pp-tab.active { color: var(--green-dark); border-bottom-color: var(--green); background: white; }

/* Bouquet cards */
.pp-bouquet { flex-direction: column; text-align: center; }
.pp-bouquet-icon { font-size: 22px; line-height: 1; margin-bottom: 2px; }

/* Bouquet selected item */
.pp-sel-bouquet { background: linear-gradient(135deg, #f0fdf4, #ecfdf5); border-color: var(--green); }
.pp-customize-btn {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f1f5f9;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.12s;
  flex-shrink: 0;
}
.pp-customize-btn:hover, .pp-customize-btn.active { background: #dbeafe; border-color: #93c5fd; }

/* Bouquet customizer */
.pp-bouquet-customizer {
  margin: 4px 0 8px 0;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px dashed var(--border);
  border-radius: 8px;
  font-size: 12px;
}
.pp-customizer-label { font-weight: 600; color: var(--muted); margin-bottom: 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; }
.pp-comp-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.pp-comp-chip {
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: white;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.12s;
}
.pp-comp-chip.active { background: var(--green); color: white; border-color: var(--green); }
.pp-comp-chip:hover { border-color: var(--green); color: var(--green-dark); }
.pp-comp-current { display: flex; flex-wrap: wrap; gap: 6px; min-height: 24px; }
.pp-comp-item {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 11px;
}
.pp-comp-minus, .pp-comp-plus, .pp-comp-rm {
  width: 16px; height: 16px;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0;
}
.pp-comp-minus, .pp-comp-plus { background: #e2e8f0; color: var(--slate); }
.pp-comp-rm { background: #fee2e2; color: #dc2626; }

/* Total row in picker */
.pp-total-row {
  margin-top: 8px;
  padding: 8px 10px;
  background: linear-gradient(135deg, var(--green-light), #d1fae5);
  border-radius: 8px;
  font-size: 14px;
  color: var(--green-dark);
  text-align: right;
}

/* Notification groups */
.tg-notif-group { margin-bottom: 16px; }
.tg-group-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 6px 0 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

/* ─── Payment quick buttons ─── */
.pay-quick-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pay-quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: white;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.14s;
  min-width: 70px;
  touch-action: manipulation;
  color: var(--slate);
}
.pay-quick-btn:hover { border-color: var(--green); background: var(--green-light); color: var(--green-dark); }
.pay-quick-btn.active {
  border-color: var(--green-dark);
  background: linear-gradient(135deg, var(--green), #059669);
  color: white;
  box-shadow: 0 3px 10px rgba(16,185,129,0.3);
}
.pqb-icon { font-size: 18px; line-height: 1; }
.pqb-name { font-size: 11px; font-weight: 600; }

/* ─── Client select ─── */
.client-select-wrap {
  display: flex;
  gap: 6px;
  align-items: stretch;
}
.client-select-wrap .client-input { flex: 1; }
.btn-quick-add-client {
  padding: 0 12px;
  border: 1.5px solid var(--green);
  border-radius: 8px;
  background: var(--green-light);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  touch-action: manipulation;
  transition: all 0.14s;
}
.btn-quick-add-client:hover { background: var(--green); color: white; }
.recent-clients-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 6px;
  align-items: center;
}
.recent-label { font-size: 11px; color: var(--muted); }
.recent-client-chip {
  padding: 3px 10px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: #f1f5f9;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.12s;
  touch-action: manipulation;
}
.recent-client-chip:hover { background: var(--green); color: white; border-color: var(--green); }

/* ─── btn-xs helper ─── */
.btn-xs {
  padding: 2px 8px !important;
  font-size: 11px !important;
  border-radius: 6px !important;
  height: auto !important;
  vertical-align: middle;
  border: 1px solid var(--border);
  background: #f1f5f9;
  cursor: pointer;
}
.btn-danger-ghost {
  color: #ef4444 !important;
  border-color: #fecaca !important;
  background: #fef2f2 !important;
}
.btn-danger-ghost:hover {
  background: #fee2e2 !important;
}
/* ─── stats-3col ─── */
.stats-3col {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
@media (max-width: 600px) {
  .stats-3col { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════
   Staff Modal — mobile-first
═══════════════════════════════════════════════ */

/* Modal wrapper: flex column so footer never scrolls away.
   Overrides .modal { overflow-y:auto; max-height:90vh } */
.sm-modal {
  display: flex !important;
  flex-direction: column !important;
  max-width: 580px;
  width: 100%;
  max-height: 90dvh !important;
  max-height: 90vh !important; /* fallback */
  overflow: hidden !important; /* scroll lives only in .sm-modal-body */
}

/* Scrollable body between header and sticky footer */
.sm-modal-body {
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 20px 24px;
}
.sm-modal-body .form-group:last-child { margin-bottom: 0; }

/* Sticky footer — always visible regardless of scroll position */
.sm-modal-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  padding: 14px 20px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  background: var(--card-bg, var(--surface));
}
.sm-modal-footer .btn { min-width: 90px; }

/* Error bar just above footer */
.sm-modal .modal-error {
  flex-shrink: 0;
  display: none;
  color: #ef4444;
  font-size: 13px;
  padding: 8px 24px;
  background: #fef2f2;
  border-top: 1px solid #fecaca;
}
.sm-modal .modal-error:not(:empty) { display: block; }

/* ─── Role cards ─── */
.sm-role-grid {
  display: flex;
  flex-direction: column; /* stack on mobile */
  gap: 8px;
}
@media (min-width: 480px) {
  .sm-role-grid { flex-direction: row; } /* row on desktop */
}

.sm-role-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  flex: 1;
  min-height: 56px; /* comfortable touch target */
  transition: border-color .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.sm-role-card.is-checked {
  border-color: attr(data-role-color); /* fallback — overridden by JS via inline style */
  background: rgba(0,0,0,.03);
}
/* Use CSS custom property set by JS for the active border colour */
.sm-role-card[data-role-color="#8b5cf6"].is-checked { border-color: #8b5cf6; background: #f5f3ff; }
.sm-role-card[data-role-color="#f59e0b"].is-checked { border-color: #f59e0b; background: #fffbeb; }
.sm-role-card[data-role-color="#3b82f6"].is-checked { border-color: #3b82f6; background: #eff6ff; }

.sm-role-radio {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.sm-role-dot {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sm-role-name {
  font-weight: 600;
  font-size: 14px;
  line-height: 1.2;
}
.sm-role-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* ─── Permission section header ─── */
.sm-perm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

/* ─── Permission grid wrapper ─── */
.sm-perm-grid-wrap {
  background: var(--bg-alt, var(--bg));
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 8px 8px;
}

/* ─── One permission section ─── */
.sm-perm-section {
  padding-top: 10px;
}
.sm-perm-section + .sm-perm-section {
  border-top: 1px solid var(--border);
}

.sm-perm-section-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-muted);
  font-weight: 700;
  margin-bottom: 4px;
  padding: 0 4px;
}

/* ─── Permission items grid ─── */
.sm-perm-items {
  display: grid;
  grid-template-columns: repeat(2, 1fr); /* 2 cols on mobile */
  gap: 0;
}
@media (min-width: 480px) {
  .sm-perm-items {
    grid-template-columns: repeat(3, 1fr); /* 3 cols on desktop */
  }
}

/* Each checkbox row: 44px tall touch target */
.sm-perm-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 4px 6px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  transition: background .1s;
}
.sm-perm-item:hover  { background: rgba(0,0,0,.04); }
.sm-perm-item:active { background: rgba(0,0,0,.08); }

/* Checkbox itself — 20px visual, padded to 44px via label */
.sm-perm-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-width: 20px;
  flex-shrink: 0;
  accent-color: #10b981;
  cursor: pointer;
  border-radius: 4px;
}

/* Mobile: slightly smaller text to fit 2-col */
@media (max-width: 479px) {
  .sm-perm-item { font-size: 12px; gap: 6px; }
  .sm-perm-item input[type="checkbox"] { width: 18px; height: 18px; min-width: 18px; }
}

/* ─── Photo upload field ─── */
.photo-upload-wrap {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: white;
}
.photo-preview-box {
  background: #f8fafc;
  min-height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid var(--border);
}
.photo-preview-box:hover { background: var(--green-light); }
.photo-preview-img {
  max-height: 200px;
  max-width: 100%;
  object-fit: contain;
  border-radius: 4px;
}
.photo-empty-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}
.photo-empty-preview span:first-child { font-size: 40px; }
.photo-upload-actions {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  align-items: center;
  flex-wrap: wrap;
}
.photo-select-btn { font-size: 13px; }

/* Table photo thumbnail */
.table-photo-thumb {
  width: 44px;
  height: 44px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* Product photo in tables and pickers */
.product-photo-icon {
  width: 32px;
  height: 32px;
  object-fit: cover;
  border-radius: 7px;
  border: 1px solid var(--border);
  vertical-align: middle;
}

/* POS product card photo */
.pos-card-photo-wrap { padding: 4px; }
.pos-card-photo {
  width: 100%;
  height: 70px;
  object-fit: cover;
  border-radius: 8px;
  display: block;
}

/* ─── Product emoji icon ─── */
.product-emoji-icon {
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--green-light);
  flex-shrink: 0;
}

/* ─── Emoji picker ─── */
.emoji-picker-wrap {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: white;
}
.emoji-picker-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}
.emoji-current-display {
  font-size: 28px;
  line-height: 1;
  width: 36px;
  text-align: center;
  flex-shrink: 0;
}
.emoji-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(42px, 1fr));
  gap: 2px;
  padding: 8px;
  max-height: 200px;
  overflow-y: auto;
  background: #fafbfd;
}
.emoji-grid-btn {
  font-size: 22px;
  padding: 6px;
  border: 1.5px solid transparent;
  border-radius: 8px;
  background: white;
  cursor: pointer;
  transition: all 0.12s;
  touch-action: manipulation;
  line-height: 1;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 1;
}
.emoji-grid-btn:hover { border-color: var(--green); background: var(--green-light); transform: scale(1.15); }
.emoji-grid-btn.active { border-color: var(--green-dark); background: var(--green-light); box-shadow: 0 0 0 2px rgba(16,185,129,0.3); }

/* ─── POS recent sales button ─── */
.pos-cart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pos-recent-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: white;
  color: var(--slate);
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.15s;
}
.pos-recent-btn:hover { border-color: var(--green); color: var(--green-dark); background: var(--green-light); }

/* ─── Sidebar shop dropdown section label ─── */
.dropdown-section-label {
  padding: 4px 14px;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
}

/* ─── Danger dropdown item ─── */
.dropdown-item--danger { color: #dc2626 !important; }
.dropdown-item--danger:hover { background: #fee2e2 !important; }

/* ─── Sidebar collapsed state: show toggle in header ─── */
#sidebar-toggle-btn { flex-shrink: 0; }

/* ══════════════════════════════════════════════════════════
   LIQUID GLASS REDESIGN
══════════════════════════════════════════════════════════ */

:root {
  --glass-bg: rgba(255,255,255,0.72);
  --glass-border: rgba(255,255,255,0.55);
  --glass-shadow: 0 8px 32px rgba(15,23,42,0.09), 0 1px 3px rgba(15,23,42,0.05);
  --glass-blur: blur(18px);
  --gradient-bg: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 30%, #f0f9ff 70%, #f8fafc 100%);
  --sidebar-glass: rgba(255,255,255,0.88);
}

html, body { background: var(--gradient-bg); background-attachment: fixed; }

/* Glass card */
.card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* Glass sidebar */
.sidebar {
  background: var(--sidebar-glass);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-right: 1px solid var(--glass-border);
}

/* Glass header */
.top-header {
  background: rgba(255,255,255,0.82);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.6);
  box-shadow: 0 1px 0 rgba(15,23,42,0.04), 0 4px 16px rgba(15,23,42,0.05);
}

/* Glass KPI cards */
.kpi-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* Glass chart cards */
.chart-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* Glass modal */
.modal {
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
}

/* ══════════════════════════════════════════════════════════
   TABS COMPONENT
══════════════════════════════════════════════════════════ */

.tabs-bar {
  display: flex;
  gap: 4px;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.tab-btn {
  padding: 10px 18px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tab-btn:hover { color: var(--navy); }
.tab-btn.active { color: var(--green-dark); border-bottom-color: var(--green); }

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ══════════════════════════════════════════════════════════
   FILTER BAR
══════════════════════════════════════════════════════════ */

.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  padding: 12px 16px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.filter-input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  font-size: 13px;
  background: white;
  transition: border-color 0.15s;
}

.filter-input:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-glow); }

.filter-select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  outline: none;
  font-size: 13px;
  background: white;
  cursor: pointer;
  transition: border-color 0.15s;
}

.filter-select:focus { border-color: var(--green); }

/* ══════════════════════════════════════════════════════════
   PAGINATION
══════════════════════════════════════════════════════════ */

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
  background: #f8fafc;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  flex-wrap: wrap;
  gap: 10px;
}

.pagination-info { font-size: 12px; }

.pagination-btns { display: flex; gap: 4px; align-items: center; }

.pg-btn {
  min-width: 32px;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--slate);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s;
}

.pg-btn:hover { border-color: var(--green); color: var(--green-dark); background: var(--green-light); }
.pg-btn.active { background: var(--green); color: white; border-color: var(--green); }
.pg-btn:disabled { opacity: 0.4; cursor: default; }
.pg-btn:disabled:hover { background: white; border-color: var(--border); color: var(--slate); }

.per-page-wrap { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.per-page-select {
  padding: 4px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
  background: white;
  cursor: pointer;
}

/* ══════════════════════════════════════════════════════════
   BULK TOOLBAR
══════════════════════════════════════════════════════════ */

.bulk-toolbar {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-bottom: 1px solid #bfdbfe;
}

.bulk-toolbar.visible { display: flex; }

.bulk-count {
  font-size: 13px;
  font-weight: 700;
  color: #1d4ed8;
}

.bulk-actions { display: flex; gap: 8px; margin-left: auto; }

.btn-bulk-delete {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #dc2626;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: background 0.15s;
}

.btn-bulk-delete:hover { background: #fee2e2; }

/* Checkbox column */
.data-table .col-check { width: 40px; }
.data-table input[type="checkbox"] { width: 15px; height: 15px; cursor: pointer; accent-color: var(--green); }

/* ══════════════════════════════════════════════════════════
   PRODUCTS TABLE ENHANCEMENTS
══════════════════════════════════════════════════════════ */

.product-img-cell {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  background: var(--green-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: var(--muted);
  border: 1px solid var(--border);
  overflow: hidden;
}

.product-img-cell img { width: 100%; height: 100%; object-fit: cover; border-radius: 9px; }

.sku-badge {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: #f1f5f9;
  color: var(--slate);
  font-family: 'Courier New', monospace;
}

.date-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  background: #f1f5f9;
  color: var(--slate);
  white-space: nowrap;
}

/* ══════════════════════════════════════════════════════════
   REFERENCE BADGES (SA_ / PU_)
══════════════════════════════════════════════════════════ */

.ref-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  font-family: 'Courier New', monospace;
  background: #eff6ff;
  color: #1d4ed8;
  letter-spacing: 0.02em;
}

.ref-badge.pu { background: #fdf4ff; color: #9333ea; }

/* ══════════════════════════════════════════════════════════
   PAYMENT TYPE BADGE
══════════════════════════════════════════════════════════ */

.pay-type-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  background: #e0f2fe;
  color: #0369a1;
}

.pay-type-badge.cash { background: #dcfce7; color: #166534; }
.pay-type-badge.kaspi { background: #fef9c3; color: #92400e; }
.pay-type-badge.halyk { background: #fce7f3; color: #9d174d; }

/* ══════════════════════════════════════════════════════════
   TABLE ACTIONS MENU (⋮)
══════════════════════════════════════════════════════════ */

.btn-dots {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate);
  transition: all 0.12s;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -1px;
}

.btn-dots:hover { border-color: var(--green); background: var(--green-light); color: var(--green-dark); }

.row-menu {
  position: fixed;
  z-index: 300;
  min-width: 160px;
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-xl);
  padding: 6px;
  animation: slideDown 0.15s ease;
}

.row-menu-item {
  padding: 9px 14px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background 0.1s;
  color: var(--navy);
}

.row-menu-item:hover { background: var(--bg); }
.row-menu-item.danger { color: #dc2626; }
.row-menu-item.danger:hover { background: #fef2f2; }

/* ══════════════════════════════════════════════════════════
   DASHBOARD ENHANCEMENTS
══════════════════════════════════════════════════════════ */

.dash-tables-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
  margin-top: 16px;
}

.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.chart-menu-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all 0.12s;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -1px;
}

.chart-menu-btn:hover { border-color: var(--green); color: var(--navy); }

/* ══════════════════════════════════════════════════════════
   LOYALTY PAGE
══════════════════════════════════════════════════════════ */

.loyalty-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.loyalty-stat-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  box-shadow: var(--glass-shadow);
}

.loyalty-stat-card .lsc-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 4px;
}

.loyalty-stat-card .lsc-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 500;
}

.loyalty-settings-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--glass-shadow);
  margin-bottom: 16px;
}

.loyalty-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.loyalty-toggle-row:last-child { border-bottom: none; }

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
}

.toggle-switch input { opacity: 0; width: 0; height: 0; }

.toggle-slider {
  position: absolute;
  inset: 0;
  background: #e2e8f0;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.2s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  left: 3px;
  top: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle-switch input:checked + .toggle-slider { background: var(--green); }
.toggle-switch input:checked + .toggle-slider::before { transform: translateX(20px); }

.how-it-works {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}

.hiw-step {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  text-align: center;
  box-shadow: var(--glass-shadow);
}

.hiw-num {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--green), #10b981);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 16px;
  margin: 0 auto 12px;
}

.hiw-step h4 { font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.hiw-step p { font-size: 12px; color: var(--muted); line-height: 1.5; }

/* ══════════════════════════════════════════════════════════
   CALENDAR REDESIGN
══════════════════════════════════════════════════════════ */

.cal-stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.cal-stat {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--glass-shadow);
}

.cal-stat-label { font-size: 11px; color: var(--muted); font-weight: 500; margin-bottom: 4px; }
.cal-stat-value { font-size: 22px; font-weight: 800; color: var(--navy); }

.cal-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  flex-wrap: wrap;
  gap: 10px;
}

.cal-view-toggle {
  display: flex;
  gap: 2px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px;
  background: white;
}

.cal-view-btn {
  padding: 6px 14px;
  border-radius: 7px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  transition: all 0.15s;
}

.cal-view-btn.active { background: var(--green); color: white; box-shadow: 0 2px 8px var(--green-glow); }

.cal-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cal-nav-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--slate);
  transition: all 0.12s;
}

.cal-nav-btn:hover { border-color: var(--green); background: var(--green-light); color: var(--green-dark); }

.cal-nav-today {
  padding: 6px 14px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: white;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  transition: all 0.12s;
}

.cal-nav-today:hover { border-color: var(--green); color: var(--green-dark); }

.cal-month-label { font-size: 15px; font-weight: 700; color: var(--navy); }

.cal-day {
  min-height: 90px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 6px;
  font-size: 13px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(8px);
}

.cal-day:hover { background: var(--bg); }
.cal-day.today { border-color: var(--green); background: rgba(220,252,231,0.5); font-weight: 700; }
.cal-day.has-order { background: rgba(220,252,231,0.4); }
.cal-day-num { font-weight: 700; font-size: 13px; color: var(--slate); margin-bottom: 4px; }
.cal-day.today .cal-day-num { color: var(--green-dark); }

.cal-order-card {
  background: linear-gradient(135deg, #22c55e, #10b981);
  color: white;
  border-radius: 6px;
  padding: 4px 6px;
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  transition: opacity 0.12s;
}

.cal-order-card:hover { opacity: 0.9; }
.cal-order-card.delivery { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.cal-order-card.pickup { background: linear-gradient(135deg, #f59e0b, #d97706); }

.cal-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 16px;
}

/* ══════════════════════════════════════════════════════════
   WAREHOUSE PAGE
══════════════════════════════════════════════════════════ */

.warehouse-card {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--glass-shadow);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.warehouse-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }

.warehouse-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.warehouse-card .wc-meta { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
.warehouse-card .wc-stats { display: flex; gap: 16px; }
.warehouse-card .wc-stat { font-size: 12px; }
.warehouse-card .wc-stat strong { font-size: 18px; font-weight: 800; display: block; color: var(--navy); }

/* ══════════════════════════════════════════════════════════
   PAYMENT METHODS PAGE
══════════════════════════════════════════════════════════ */

.pay-method-row {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  gap: 14px;
  transition: background 0.12s;
}

.pay-method-row:last-child { border-bottom: none; }
.pay-method-row:hover { background: #f8fafc; }

.pay-method-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--green-light);
  color: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.pay-method-name { font-weight: 700; font-size: 14px; flex: 1; }

/* ══════════════════════════════════════════════════════════
   ROLES PERMISSIONS MATRIX
══════════════════════════════════════════════════════════ */

.perms-matrix {
  overflow-x: auto;
}

.perms-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.perms-table th {
  padding: 10px 14px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}

.perms-table th:first-child { text-align: left; min-width: 160px; }

.perms-table td {
  padding: 10px 14px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

.perms-table td:first-child { text-align: left; font-weight: 600; }
.perms-table tr:hover td { background: #f8fafc; }
.perms-table input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--green); cursor: pointer; }

.perms-all-row td { background: linear-gradient(90deg, #ecfdf5, #f0fdf4); font-weight: 700; }

/* ══════════════════════════════════════════════════════════
   REPORTS PAGE REDESIGN
══════════════════════════════════════════════════════════ */

.report-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 20px;
}

.report-stat {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--glass-shadow);
}

.report-stat-label { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 8px; }
.report-stat-value { font-size: 26px; font-weight: 800; color: var(--navy); }

/* ══════════════════════════════════════════════════════════
   SETTINGS REDESIGN
══════════════════════════════════════════════════════════ */

.settings-tab-content { padding: 0; }

.settings-section {
  padding: 24px;
  border-bottom: 1px solid var(--border);
}

.settings-section:last-child { border-bottom: none; }

.settings-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.settings-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.logo-upload-area {
  width: 100px;
  height: 100px;
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  gap: 6px;
}

.logo-upload-area:hover { border-color: var(--green); background: var(--green-light); color: var(--green-dark); }

/* ══════════════════════════════════════════════════════════
   PEOPLE / CLIENTS PAGE
══════════════════════════════════════════════════════════ */

.client-name-cell { display: flex; flex-direction: column; gap: 2px; }
.client-name { font-weight: 700; font-size: 13px; }
.client-phone { font-size: 12px; color: var(--muted); }
.client-bonuses { font-size: 11px; color: var(--green-dark); font-weight: 600; }

/* ══════════════════════════════════════════════════════════
   BARCODE REDESIGN
══════════════════════════════════════════════════════════ */

.barcode-layout {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 20px;
}

.barcode-preview-panel {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--glass-shadow);
  position: sticky;
  top: calc(var(--header-h) + 24px);
  max-height: calc(100vh - var(--header-h) - 48px);
  overflow-y: auto;
}

.barcode-preview-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius);
  padding: 20px;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: white;
}

.barcode-item-preview {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  text-align: center;
  width: 160px;
  background: white;
}

.barcode-item-name { font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.barcode-item-price { font-size: 18px; font-weight: 800; color: var(--navy); }
.barcode-lines { display: flex; gap: 1px; justify-content: center; margin: 6px 0; }
.barcode-line { width: 2px; height: 28px; background: var(--navy); }
.barcode-line.thin { width: 1px; opacity: 0.5; }

.barcode-settings { display: flex; flex-direction: column; gap: 14px; }

.toggle-row-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.toggle-row-inline:last-child { border-bottom: none; }
.toggle-row-inline label { font-size: 13px; font-weight: 500; }

/* ══════════════════════════════════════════════════════════
   SIDEBAR SECTIONS
══════════════════════════════════════════════════════════ */

.nav-section-label {
  padding: 12px 10px 4px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

/* ══════════════════════════════════════════════════════════
   TOTALS ROW IN TABLE
══════════════════════════════════════════════════════════ */

.data-table tr.totals-row td {
  background: linear-gradient(90deg, #f0fdf4, #ecfdf5);
  font-weight: 700;
  color: var(--navy);
  border-top: 2px solid var(--green-light);
}

/* ══════════════════════════════════════════════════════════
   iPad ADAPTATION (768-1024px)
══════════════════════════════════════════════════════════ */

@media (min-width: 768px) and (max-width: 1024px) {
  :root {
    --sidebar-w: 240px;
    --header-h: 58px;
  }

  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .kpi-card { padding: 16px; }
  .kpi-value { font-size: 20px; }

  .charts-row { grid-template-columns: 1fr; }
  .dash-tables-row { grid-template-columns: 1fr; }

  .loyalty-stats { grid-template-columns: 1fr 1fr; }
  .how-it-works { grid-template-columns: 1fr 1fr; }

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

  .barcode-layout { grid-template-columns: 1fr; }
  .barcode-preview-panel { position: static; }

  .report-stats-row { grid-template-columns: 1fr 1fr; }
  .settings-form-grid { grid-template-columns: 1fr; }

  .data-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  .page-content { padding: 18px; }

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

@media (max-width: 767px) {
  .dash-tables-row { grid-template-columns: 1fr; }
  .loyalty-stats { grid-template-columns: 1fr; }
  .how-it-works { grid-template-columns: 1fr; }
  .cal-stats-row { grid-template-columns: repeat(2, 1fr); }
  .barcode-layout { grid-template-columns: 1fr; }
  .barcode-preview-panel { position: static; }
  .report-stats-row { grid-template-columns: 1fr; }
  .settings-form-grid { grid-template-columns: 1fr; }
  .cal-view-toggle { display: none; }
  .perms-table { font-size: 11px; }
  .perms-table th, .perms-table td { padding: 7px 8px; }
}

/* ══════════════════════════════════════════════════════════
   IMPORT / EXPORT CLIENTS
══════════════════════════════════════════════════════════ */

.btn-secondary {
  padding: 9px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: white;
  cursor: pointer;
  font-weight: 600;
  font-size: 13px;
  color: var(--slate);
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-secondary:hover { border-color: var(--green); color: var(--green-dark); }

/* ══════════════════════════════════════════════════════════
   ENHANCED USER DROPDOWN
══════════════════════════════════════════════════════════ */

.user-dropdown.enhanced {
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
}

.ud-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(16, 185, 129, 0.06));
}

.ud-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary, #6366f1), var(--green));
  color: #fff;
  font-weight: 800;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ud-info { flex: 1; min-width: 0; }
.ud-name { font-weight: 700; font-size: 14px; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ud-email { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.ud-shop { font-size: 11px; color: var(--green-dark); display: flex; align-items: center; gap: 4px; margin-top: 3px; }

.user-dropdown.enhanced .dropdown-item { padding: 10px 16px; }

.ud-lang-row {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  cursor: default !important;
}

.ud-lang-btn {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  background: var(--surface-2, #f8fafc);
  cursor: pointer;
  color: var(--primary, #6366f1);
  transition: all 0.15s;
}

.ud-lang-btn:hover {
  background: var(--primary, #6366f1);
  color: #fff;
  border-color: var(--primary, #6366f1);
}

/* ══════════════════════════════════════════════════════════
   CHART CARD HEADER (with menu btn)
══════════════════════════════════════════════════════════ */

.chart-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.chart-card-header h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
}

.chart-menu-btn {
  background: none;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 4px 10px;
  cursor: pointer;
  font-size: 16px;
  color: var(--muted);
  line-height: 1;
  transition: all 0.15s;
  position: relative;
}

.chart-menu-btn:hover {
  border-color: var(--primary, #6366f1);
  color: var(--primary, #6366f1);
  background: rgba(99, 102, 241, 0.06);
}

/* ══════════════════════════════════════════════════════════
   DASHBOARD TABLES ROW
══════════════════════════════════════════════════════════ */

.dash-tables-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 20px;
}

.dash-tables-row .chart-card {
  overflow: hidden;
}

.dash-tables-row .data-table td,
.dash-tables-row .data-table th {
  padding: 8px 10px;
  font-size: 12px;
}

@media (max-width: 768px) {
  .dash-tables-row { grid-template-columns: 1fr; }
}

/* iPad */
@media (min-width: 768px) and (max-width: 1024px) {
  .dash-tables-row { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════
   GLOBAL DESIGN ENHANCEMENTS v2
══════════════════════════════════════════════════════════ */

/* Smoother page transitions */
@keyframes pageIn {
  from { opacity: 0; transform: translateY(14px) scale(0.995); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Better data table */
.data-table th {
  font-size: 10.5px;
  letter-spacing: 0.08em;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 1;
}

.data-table tbody tr {
  transition: background 0.12s;
}

.data-table tbody tr:hover td {
  background: linear-gradient(90deg, rgba(16,185,129,0.04), rgba(16,185,129,0.01));
}

/* Improved badges */
.badge {
  font-weight: 700;
  letter-spacing: 0.03em;
  border-radius: 8px;
  padding: 3px 10px;
}

.badge-green {
  background: linear-gradient(135deg, #d1fae5, #a7f3d0);
  color: #065f46;
  border: 1px solid rgba(16,185,129,0.2);
}

.badge-yellow {
  background: linear-gradient(135deg, #fef9c3, #fde68a);
  color: #78350f;
  border: 1px solid rgba(245,158,11,0.2);
}

.badge-red {
  background: linear-gradient(135deg, #fee2e2, #fecaca);
  color: #991b1b;
  border: 1px solid rgba(239,68,68,0.2);
}

.badge-blue {
  background: linear-gradient(135deg, #dbeafe, #bfdbfe);
  color: #1e40af;
  border: 1px solid rgba(59,130,246,0.2);
}

/* Improved buttons */
.btn {
  transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  letter-spacing: 0.01em;
}

.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15,23,42,0.08);
}

.btn:active { transform: translateY(0) scale(0.97); }

.btn-green {
  box-shadow: 0 4px 14px rgba(16,185,129,0.35);
  letter-spacing: 0.01em;
}

.btn-green:hover {
  box-shadow: 0 8px 22px rgba(16,185,129,0.45);
  transform: translateY(-2px);
}

/* Improved KPI cards */
.kpi-card {
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.kpi-card:hover {
  transform: translateY(-6px) scale(1.01);
  box-shadow: 0 20px 40px rgba(15,23,42,0.12);
}

.kpi-value {
  font-size: 26px;
  letter-spacing: -0.03em;
}

/* Improved sidebar nav items */
.nav-item, .nav-sub {
  border-radius: 10px;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover {
  background: linear-gradient(90deg, rgba(16,185,129,0.08), rgba(16,185,129,0.02));
  transform: translateX(2px);
}

.nav-item.active {
  background: linear-gradient(90deg, #d1fae5, rgba(167,243,208,0.3));
  box-shadow: 0 2px 8px rgba(16,185,129,0.12);
}

/* Better header */
.top-header {
  box-shadow: 0 1px 0 rgba(15,23,42,0.05), 0 2px 16px rgba(15,23,42,0.04);
}

/* Better card hover */
.card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Improved modal */
.modal {
  border-radius: 22px;
  box-shadow: 0 25px 80px rgba(15,23,42,0.22);
}

.modal-header {
  padding: 22px 26px 18px;
  background: linear-gradient(180deg, #fafbfd, #fff);
}

/* Better toast */
.toast {
  border-radius: 14px;
  padding: 14px 22px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 32px rgba(15,23,42,0.18);
}

.toast.success {
  background: linear-gradient(135deg, #059669, #10b981);
  box-shadow: 0 8px 24px rgba(16,185,129,0.4);
}

/* Better filter bar */
.filter-bar {
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
  border-bottom: 1px solid var(--border);
}

.filter-input, .filter-select {
  transition: all 0.15s;
}

.filter-input:focus, .filter-select:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(16,185,129,0.15);
  background: white;
}

/* Better pagination */
.pagination-bar {
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
}

.pg-btn {
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 700;
}

.pg-btn.active {
  background: linear-gradient(135deg, #10b981, #059669);
  box-shadow: 0 4px 12px rgba(16,185,129,0.3);
  transform: scale(1.05);
}

/* Better loyalty cards */
.loyalty-stat-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.loyalty-stat-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(15,23,42,0.12);
}

/* Better calendar day cells */
.cal-day {
  border-radius: 10px;
  transition: all 0.15s;
}

.cal-day:hover {
  background: rgba(16,185,129,0.06);
  border-color: var(--green);
  transform: scale(1.02);
}

.cal-order-card {
  border-radius: 7px;
  font-size: 11px;
  font-weight: 700;
}

/* Better warehouse cards */
.warehouse-card {
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.warehouse-card:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: 0 16px 40px rgba(15,23,42,0.14);
}

/* Report stats */
.report-stat {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.report-stat:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(15,23,42,0.1);
}

/* Better how-it-works steps */
.hiw-step {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hiw-step:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgba(15,23,42,0.1);
}

/* Better stat boxes */
.stat-box {
  background: linear-gradient(135deg, rgba(209,250,229,0.6), rgba(255,255,255,0.9));
  border-left: 3px solid var(--green);
}

/* Improved user dropdown */
.user-dropdown.enhanced {
  border: 1px solid rgba(255,255,255,0.8);
  box-shadow: 0 20px 60px rgba(15,23,42,0.18), 0 0 0 1px rgba(15,23,42,0.04);
}

.ud-header {
  background: linear-gradient(135deg, rgba(209,250,229,0.5), rgba(219,234,254,0.3));
}

/* Better cal stats */
.cal-stat {
  transition: transform 0.18s ease;
}

.cal-stat:hover {
  transform: translateY(-3px);
}

/* Improved scroll bar */
* {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

*::-webkit-scrollbar { width: 5px; height: 5px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }
*::-webkit-scrollbar-thumb:hover { background: var(--green); }

/* Better pos cart */
.pos-cart {
  border-radius: 18px;
  box-shadow: 0 8px 32px rgba(15,23,42,0.1);
}

/* Better POS product cards */
.pos-product {
  border-radius: 14px;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pos-product:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 12px 28px rgba(16,185,129,0.2);
}

/* Smooth icon button transitions */
.icon-btn, .btn-action, .btn-dots {
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-btn:hover {
  transform: scale(1.08);
}

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

/* Logo upload area animation */
.logo-upload-area {
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-upload-area:hover {
  transform: scale(1.04);
  box-shadow: 0 8px 24px rgba(16,185,129,0.15);
}

/* Tabs smooth active underline */
.tab-btn {
  transition: color 0.15s, border-color 0.15s;
  position: relative;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%);
  width: 20px;
  height: 2px;
  background: var(--green);
  border-radius: 2px;
  animation: tabSlideIn 0.2s ease forwards;
}

@keyframes tabSlideIn {
  from { width: 0; opacity: 0; }
  to { width: 20px; opacity: 1; }
}

/* Print styles */
@media print {
  /* Hide everything except the receipt */
  body > *                       { display: none !important; }
  .modal-overlay                 { display: block !important; position: static !important; background: none !important; }
  .modal-overlay .modal          { display: block !important; box-shadow: none !important; border: none !important; max-width: none !important; width: auto !important; }
  .modal-overlay .modal-header,
  .modal-overlay .modal-footer   { display: none !important; }
  .modal-overlay .receipt-body   { display: block !important; overflow: visible !important; max-height: none !important; padding: 0 !important; }
  #print-receipt-area            { display: block !important; }
  #print-receipt-area *          { display: revert !important; }

  /* Receipt: monospace, B&W, 80mm */
  #print-receipt-area.rcp-wrap {
    font-family: 'Courier New', 'Courier', monospace !important;
    font-size: 10pt !important;
    line-height: 1.5 !important;
    width: 80mm !important;
    max-width: 80mm !important;
    margin: 0 auto !important;
    padding: 3mm 4mm !important;
    color: #000 !important;
    background: #fff !important;
  }

  /* Force black on everything inside the receipt */
  #print-receipt-area .rcp-shop-name { color: #000 !important; font-size: 13pt !important; }
  #print-receipt-area .rcp-sub       { color: #000 !important; }
  #print-receipt-area .rcp-dots      { color: #000 !important; }
  #print-receipt-area .rcp-meta      { color: #000 !important; }
  #print-receipt-area .rcp-item-name { color: #000 !important; }
  #print-receipt-area .rcp-item-row  { color: #000 !important; }
  #print-receipt-area .rcp-total-row { color: #000 !important; }
  #print-receipt-area .rcp-grand     { color: #000 !important; font-size: 12pt !important; }
  #print-receipt-area .rcp-pay-method{ color: #000 !important; }
  #print-receipt-area .rcp-change    { color: #000 !important; }
  #print-receipt-area .rcp-note      { color: #000 !important; background: none !important; }
  #print-receipt-area .rcp-thanks    { color: #000 !important; }
  #print-receipt-area .rcp-barcode-num { color: #000 !important; }
  #print-receipt-area svg            { color: #000 !important; }
  #print-receipt-area svg rect,
  #print-receipt-area svg path       { fill: #000 !important; stroke: none !important; }
}

/* ══════════════════════════════════════════════════════════
   BOTANICAL LUXURY DESIGN SYSTEM
   Warm emerald · Refined organic · Memorable details
══════════════════════════════════════════════════════════ */

/* ─── Google Fonts: Outfit (display) + DM Sans (body) ─── */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@700;800&family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  --font-display: 'Outfit', 'Inter', sans-serif;
  --font-body: 'DM Sans', 'Inter', sans-serif;

  /* Botanical palette */
  --sage: #84a98c;
  --sage-light: #cfe1d0;
  --sage-dark: #52796f;
  --cream: #faf7f2;
  --warm-border: #e8e0d5;
  --leaf: #2d6a4f;

  /* Accent glow colors per KPI position */
  --glow-blue:   rgba(59,130,246,0.22);
  --glow-green:  rgba(16,185,129,0.22);
  --glow-amber:  rgba(245,158,11,0.22);
  --glow-purple: rgba(139,92,246,0.22);
  --glow-cyan:   rgba(6,182,212,0.22);
  --glow-rose:   rgba(244,63,94,0.22);
}

html, body {
  font-family: var(--font-body);
}

.page-title, h1, h2, h3 {
  font-family: var(--font-display);
}

/* ─── KPI cards: per-position colored glow on hover ─── */
.kpi-card { position: relative; }

.kpi-grid:nth-of-type(1) .kpi-card:nth-child(1):hover { box-shadow: 0 20px 48px var(--glow-blue),  0 4px 12px rgba(15,23,42,0.06); }
.kpi-grid:nth-of-type(1) .kpi-card:nth-child(2):hover { box-shadow: 0 20px 48px var(--glow-green), 0 4px 12px rgba(15,23,42,0.06); }
.kpi-grid:nth-of-type(1) .kpi-card:nth-child(3):hover { box-shadow: 0 20px 48px var(--glow-amber), 0 4px 12px rgba(15,23,42,0.06); }
.kpi-grid:nth-of-type(1) .kpi-card:nth-child(4):hover { box-shadow: 0 20px 48px var(--glow-purple),0 4px 12px rgba(15,23,42,0.06); }
.kpi-grid:nth-of-type(2) .kpi-card:nth-child(1):hover { box-shadow: 0 20px 48px var(--glow-cyan),  0 4px 12px rgba(15,23,42,0.06); }
.kpi-grid:nth-of-type(2) .kpi-card:nth-child(2):hover { box-shadow: 0 20px 48px var(--glow-green), 0 4px 12px rgba(15,23,42,0.06); }
.kpi-grid:nth-of-type(2) .kpi-card:nth-child(3):hover { box-shadow: 0 20px 48px var(--glow-rose),  0 4px 12px rgba(15,23,42,0.06); }
.kpi-grid:nth-of-type(2) .kpi-card:nth-child(4):hover { box-shadow: 0 20px 48px rgba(100,116,139,0.2), 0 4px 12px rgba(15,23,42,0.06); }

.kpi-icon {
  border-radius: 16px;
  width: 52px;
  height: 52px;
  position: relative;
  overflow: hidden;
}

.kpi-icon::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.35) 0%, transparent 60%);
  border-radius: inherit;
}

.kpi-label {
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.07em;
  margin-bottom: 10px;
}

.kpi-value {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: -0.04em;
  line-height: 1;
}

/* ─── Tables: zebra rows + refined dividers ─── */
.data-table tbody tr:nth-child(even) td {
  background: #fafbfc;
}

.data-table tbody tr:nth-child(even):hover td,
.data-table tbody tr:hover td {
  background: linear-gradient(90deg, rgba(16,185,129,0.05), rgba(16,185,129,0.01));
}

.data-table th {
  font-family: var(--font-body);
  font-size: 10.5px;
  letter-spacing: 0.09em;
  color: #8899aa;
  background: linear-gradient(180deg, #f9fafb 0%, #f3f4f6 100%);
  border-bottom: 1.5px solid #e5e7eb;
}

.data-table td {
  border-bottom: 1px solid #f1f3f5;
  font-family: var(--font-body);
}

.data-table tr:last-child td { border-bottom: none; }

/* ─── Modal: gradient header + close animation ─── */
@keyframes modalSlideDown {
  from { transform: translateY(0) scale(1); opacity: 1; }
  to   { transform: translateY(12px) scale(0.97); opacity: 0; }
}

.modal--closing {
  animation: modalSlideDown 0.2s cubic-bezier(0.4, 0, 1, 1) forwards;
}

.modal-overlay--closing {
  animation: fadeOut 0.22s ease forwards;
}

@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

.modal-header {
  background: linear-gradient(160deg, #f8fdfb 0%, #f0f9f4 50%, #fafaf8 100%);
  border-bottom: 1.5px solid #e8f0eb;
  padding: 22px 24px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

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

.modal-header-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--green-light), #a7f3d0);
  color: var(--green-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(16,185,129,0.2);
}

.modal-header h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy);
}

.modal-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(15,23,42,0.04);
  border: 1px solid transparent;
  color: var(--muted);
  font-size: 18px;
  transition: all 0.15s;
}

.modal-close:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: #dc2626;
}

.modal .form-group input,
.modal .form-group select,
.modal .form-group textarea {
  border-radius: 12px;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  background: #fafbfd;
  font-family: var(--font-body);
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.modal .form-group input:focus,
.modal .form-group select:focus,
.modal .form-group textarea:focus {
  background: white;
  border-color: var(--green);
  box-shadow: 0 0 0 3.5px rgba(16,185,129,0.14);
}

.modal-footer {
  background: #fafbfd;
  border-top: 1px solid var(--border);
  padding: 16px 24px;
}

/* ─── Buttons: outline variant + green shimmer ─── */
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--green);
  color: var(--green-dark);
  font-weight: 600;
}

.btn-outline:hover {
  background: var(--green-light);
  border-color: var(--green-dark);
  color: var(--green-dark);
}

.btn-green {
  position: relative;
  overflow: hidden;
}

.btn-green::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    105deg,
    transparent 30%,
    rgba(255,255,255,0.25) 50%,
    transparent 70%
  );
  transition: left 0.45s ease;
}

.btn-green:hover::before {
  left: 160%;
}

/* ─── Toasts: icon indicator ─── */
.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  max-width: 360px;
  border-radius: 14px;
  padding: 14px 20px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
}

.toast::before {
  content: '●';
  font-size: 10px;
  flex-shrink: 0;
  opacity: 0.7;
  line-height: 1;
}

.toast.success::before { content: '✓'; font-size: 14px; font-weight: 800; opacity: 1; }
.toast.error::before   { content: '⚠'; font-size: 13px; opacity: 1; }

/* ─── Sidebar: styled section labels + dividers ─── */
.nav-section-label {
  padding: 18px 12px 5px;
  font-family: var(--font-body);
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #b0bec5;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

.nav-scroll .nav-section-label:first-child { padding-top: 8px; }

/* ─── Empty state: botanical SVG illustration ─── */
.empty-state {
  padding: 60px 24px 56px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  background: linear-gradient(180deg, #fafdfb 0%, #fff 100%);
}

.empty-state::before {
  content: '';
  display: block;
  width: 88px;
  height: 88px;
  margin-bottom: 20px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 88 88' fill='none'%3E%3Ccircle cx='44' cy='44' r='44' fill='%23f0fdf4'/%3E%3C!-- stem --%3E%3Cpath d='M44 68 Q44 52 44 44' stroke='%2386efac' stroke-width='2.5' stroke-linecap='round'/%3E%3C!-- leaves --%3E%3Cpath d='M44 58 Q36 52 32 46 Q38 46 44 54' fill='%2386efac' opacity='.6'/%3E%3Cpath d='M44 54 Q52 48 56 42 Q50 43 44 50' fill='%234ade80' opacity='.5'/%3E%3C!-- petals --%3E%3Cellipse cx='44' cy='28' rx='5' ry='9' fill='%2334d399' opacity='.8' transform='rotate(0 44 44)'/%3E%3Cellipse cx='44' cy='28' rx='5' ry='9' fill='%2310b981' opacity='.7' transform='rotate(45 44 44)'/%3E%3Cellipse cx='44' cy='28' rx='5' ry='9' fill='%2334d399' opacity='.8' transform='rotate(90 44 44)'/%3E%3Cellipse cx='44' cy='28' rx='5' ry='9' fill='%2310b981' opacity='.7' transform='rotate(135 44 44)'/%3E%3Cellipse cx='44' cy='28' rx='5' ry='9' fill='%2334d399' opacity='.8' transform='rotate(180 44 44)'/%3E%3Cellipse cx='44' cy='28' rx='5' ry='9' fill='%2310b981' opacity='.7' transform='rotate(225 44 44)'/%3E%3Cellipse cx='44' cy='28' rx='5' ry='9' fill='%2334d399' opacity='.8' transform='rotate(270 44 44)'/%3E%3Cellipse cx='44' cy='28' rx='5' ry='9' fill='%2310b981' opacity='.7' transform='rotate(315 44 44)'/%3E%3C!-- center --%3E%3Ccircle cx='44' cy='44' r='7' fill='%23fde68a'/%3E%3Ccircle cx='44' cy='44' r='4' fill='%23fbbf24'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  animation: emptyFloat 3s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(16,185,129,0.15));
}

@keyframes emptyFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

.empty-state-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 6px;
}

.empty-state-sub {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

/* ─── Filter bar: pill-style buttons ─── */
.filter-bar .btn,
.filter-bar button.btn {
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 12.5px;
}

.filter-bar .btn:hover {
  background: var(--green-light);
  border-color: var(--green);
  transform: none;
  box-shadow: none;
}

.filter-input,
.filter-select {
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  border: 1.5px solid var(--border);
  font-family: var(--font-body);
}

/* ─── Pagination: prominent total badge ─── */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  gap: 10px;
  flex-wrap: wrap;
}

.pagination-info {
  font-size: 12px;
  color: var(--slate);
  font-family: var(--font-body);
  background: linear-gradient(135deg, #f0fdf4, #ecfdf5);
  border: 1px solid rgba(16,185,129,0.2);
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.pg-btn {
  font-family: var(--font-body);
  border-radius: 9px;
  font-weight: 700;
  min-width: 34px;
  height: 34px;
}

.pg-btn.active {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  border-color: transparent;
  box-shadow: 0 3px 10px rgba(16,185,129,0.35);
  transform: scale(1.06);
}

/* ─── Sidebar nav typography upgrade ─── */
.nav-item, .nav-sub {
  font-family: var(--font-body);
  font-size: 13.5px;
  letter-spacing: -0.01em;
}

.shop-name {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

/* ─── Page titles with display font ─── */
.page-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.page-greeting {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.03em;
}

/* ─── Chart cards upgraded ─── */
.chart-card-header h3 {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ─── Loyalty + report stat values ─── */
.lsc-value, .report-stat-value, .cal-stat-value, .stat-box .val, .kpi-value {
  font-family: var(--font-display);
}

/* ─── Badges: rounded-rectangle style ─── */
.badge {
  border-radius: 8px;
  padding: 3px 10px;
  font-family: var(--font-body);
  font-size: 11.5px;
  letter-spacing: 0.01em;
}

/* ─── Breadcrumb with display font ─── */
.breadcrumb {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ─── Tabs ─── */
.tab-btn {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ─── Modal form labels ─── */
.modal .form-group label,
.form-group label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--slate);
  letter-spacing: 0.01em;
  margin-bottom: 6px;
}

/* ─── Upgrade btn typography ─── */
.btn {
  font-family: var(--font-body);
  letter-spacing: -0.01em;
}

/* ─── Section title in settings/loyalty/etc ─── */
.settings-section-title,
.loyalty-settings-card h3,
.chart-card h3,
.profile-section-title {
  font-family: var(--font-display);
}

/* ─── Hint text ─── */
.field-hint {
  font-family: var(--font-body);
  font-size: 11.5px;
  color: #94a3b8;
  line-height: 1.55;
}

/* ─── Scrollbar refined ─── */
*::-webkit-scrollbar { width: 4px; height: 4px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 99px;
}
*::-webkit-scrollbar-thumb:hover { background: var(--green); }

/* ─── Warm card base ─── */
.card {
  border-color: #eaeef2;
}

/* ─── Form inputs base ─── */
.form-group input,
.form-group select,
.form-group textarea {
  font-family: var(--font-body);
  border-radius: 12px;
}

/* ─── User avatar in header: display font initial ─── */
.user-avatar {
  font-family: var(--font-display);
  font-weight: 800;
}

/* ─── Responsive for Outfit ─── */
@media (max-width: 767px) {
  .page-title { font-size: 18px; }
  .page-greeting { font-size: 17px; }
  .kpi-value { font-size: 22px; }
}

/* ═══════════════════════════════════════════════════════════
   NEW POS STYLES
═══════════════════════════════════════════════════════════ */
.pos-shell {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 0px);
  background: var(--bg);
  overflow: hidden;
}

/* Top bar */
.pos-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  height: 52px;
  background: white;
  border-bottom: 1.5px solid var(--border);
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.pos-topbar-left { display: flex; align-items: center; gap: 12px; }
.pos-topbar-right { display: flex; align-items: center; gap: 6px; }
.pos-exit-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: white;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: var(--slate);
  transition: all 0.15s;
}
.pos-exit-btn:hover { background: #fee2e2; color: #dc2626; border-color: #fca5a5; }
.pos-shop-title { font-size: 16px; font-weight: 700; color: var(--green-dark); }
.pos-icon-btn {
  position: relative;
  width: 40px; height: 40px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: white;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--slate);
  transition: all 0.15s;
  font-size: 18px;
}
.pos-icon-btn:hover { background: var(--green-light); border-color: var(--green); color: var(--green-dark); }

/* POS — Return button */
.pos-return-topbtn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 0 12px; height: 36px;
  border: 1.5px solid #fca5a5; border-radius: 8px;
  background: #fff1f2; color: #dc2626;
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all .15s; white-space: nowrap;
}
.pos-return-topbtn:hover { background: #fee2e2; border-color: #ef4444; }

/* POS — Return modal */
.ret-modal { overflow: hidden; }
.ret-sale-card:hover { border-color: #6366f1 !important; box-shadow: 0 2px 8px rgba(99,102,241,.15) !important; }
.pos-icon-badge {
  position: absolute;
  top: -5px; right: -5px;
  background: var(--green);
  color: white;
  font-size: 10px;
  font-weight: 800;
  border-radius: 10px;
  padding: 1px 5px;
  min-width: 16px;
  text-align: center;
}

/* Main layout */
.pos-main {
  display: grid;
  grid-template-columns: 360px 1fr;
  flex: 1;
  overflow: hidden;
  gap: 0;
}

/* Left: Cart panel */
.pos-left {
  display: flex;
  flex-direction: column;
  background: white;
  border-right: 1.5px solid var(--border);
  overflow-y: auto;
  overflow-x: hidden;
}
.pos-section {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.pos-section-row { display: flex; gap: 8px; align-items: center; }
.pos-client-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0 10px;
  background: #f8fafc;
  transition: border-color 0.15s;
}
.pos-client-wrap:focus-within { border-color: var(--green); background: white; }
.pos-client-icon { color: var(--muted); flex-shrink: 0; }
.pos-client-inp { flex: 1; border: none; background: transparent; padding: 9px 4px; font-size: 13px; outline: none; }
.pos-client-clear { border: none; background: none; cursor: pointer; color: var(--muted); font-size: 18px; padding: 0 2px; }
.pos-client-dd {
  position: absolute;
  z-index: 100;
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  width: 320px;
  max-height: 200px;
  overflow-y: auto;
}
.pos-client-option { padding: 10px 14px; cursor: pointer; transition: background 0.12s; }
.pos-client-option:hover { background: var(--green-light); }
.pos-co-name { font-weight: 600; font-size: 13px; }
.pos-co-sub { font-size: 11px; color: var(--muted); }
.pos-bonus-row { display: flex; gap: 12px; font-size: 12px; color: var(--green-dark); margin-top: 5px; }

.pos-sel {
  flex: 1;
  padding: 8px 10px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: white;
  cursor: pointer;
}
.pos-bouquet-btn {
  padding: 8px 12px;
  border: 1.5px solid var(--green);
  border-radius: 8px;
  background: var(--green-light);
  color: var(--green-dark);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.15s;
}
.pos-bouquet-btn:hover { background: var(--green); color: white; }

/* Cart items */
.pos-cart-body { flex: 1; padding: 8px 12px; overflow-y: auto; min-height: 100px; }
.pos-cart-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px 16px; color: var(--muted); gap: 8px; text-align: center; font-size: 14px;
}
.pos-cart-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 6px;
  border-bottom: 1px solid var(--border);
}
.pos-cart-row-info { flex: 1; overflow: hidden; }
.pos-cart-row-name { font-weight: 600; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-cart-row-sub { font-size: 11px; color: var(--muted); }
.pos-cart-row-qty { display: flex; align-items: center; gap: 3px; }
.pcq-btn {
  width: 28px; height: 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #f1f5f9;
  cursor: pointer;
  font-size: 16px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  flex-shrink: 0;
  touch-action: manipulation;
  transition: all 0.12s;
}
.pcq-btn:hover { background: var(--green); color: white; border-color: var(--green); }
.pcq-inp {
  width: 48px; height: 28px;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  -moz-appearance: textfield;
}
.pcq-inp::-webkit-outer-spin-button, .pcq-inp::-webkit-inner-spin-button { -webkit-appearance: none; }
.pcq-rm {
  width: 24px; height: 24px;
  border: 1px solid #fca5a5;
  border-radius: 6px;
  background: #fee2e2;
  color: #dc2626;
  cursor: pointer;
  font-size: 16px;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  flex-shrink: 0;
}

/* Discount/Delivery rows */
.pos-discounts { padding: 8px 12px; }
.pos-disc-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.pos-disc-label { font-size: 12px; color: var(--muted); min-width: 70px; display: flex; align-items: center; gap: 4px; }
.pos-disc-inp {
  flex: 1;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-size: 13px;
  text-align: right;
  -moz-appearance: textfield;
}
.pos-disc-inp::-webkit-outer-spin-button, .pos-disc-inp::-webkit-inner-spin-button { -webkit-appearance: none; }
.pos-type-toggle { display: flex; border: 1px solid var(--border); border-radius: 7px; overflow: hidden; flex-shrink: 0; }
.ptb {
  padding: 5px 10px;
  border: none;
  background: #f1f5f9;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.15s;
}
.ptb.active { background: var(--green); color: white; }
.pos-disc-hint { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* Totals */
.pos-totals {
  padding: 8px 12px 4px;
  border-top: 1.5px solid var(--border);
  background: #f8fafc;
}
.pos-total-row { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; }
.pos-total-row.disc { color: var(--green-dark); }
.pos-total-row.del { color: #f59e0b; }
.pos-total-row.total { font-size: 17px; font-weight: 800; padding: 8px 0 4px; border-top: 1.5px solid var(--border); margin-top: 4px; color: var(--green-dark); }

/* Footer */
.pos-cart-footer {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1.5px solid var(--border);
  background: white;
  flex-shrink: 0;
}
.pos-foot-btns { display: flex; gap: 8px; }
.pos-foot-btn {
  flex: 1;
  padding: 9px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: white;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 5px;
  transition: all 0.15s;
}
.pos-hold-btn:hover { background: #fef3c7; border-color: #f59e0b; color: #92400e; }
.pos-reset-btn:hover { background: #fee2e2; border-color: #fca5a5; color: #dc2626; }
.pos-pay-btn {
  width: 100%;
  padding: 14px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--green), #059669);
  color: white;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 4px 14px rgba(16,185,129,0.35);
  transition: all 0.15s;
  touch-action: manipulation;
}
.pos-pay-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(16,185,129,0.4); }
.pos-pay-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* Right: Products panel */
.pos-right { display: flex; flex-direction: column; overflow: hidden; background: var(--bg); }
.pos-prod-search {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: white;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.pos-prod-search input {
  flex: 1; border: none; background: transparent; font-size: 14px; outline: none;
}
.pos-search-icon { color: var(--muted); flex-shrink: 0; }
#pos-search-clear { border: none; background: none; cursor: pointer; color: var(--muted); font-size: 20px; }

.pos-cat-tabs {
  display: flex;
  gap: 6px;
  padding: 8px 14px;
  overflow-x: auto;
  background: white;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
  scrollbar-width: none;
}
.pos-cat-tabs::-webkit-scrollbar { display: none; }
.pos-cat-tab {
  padding: 5px 14px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  background: white;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.15s;
  color: var(--slate);
}
.pos-cat-tab:hover { border-color: var(--green); color: var(--green-dark); }
.pos-cat-tab.active { background: var(--green); color: white; border-color: var(--green); box-shadow: 0 2px 8px rgba(16,185,129,0.3); }

.pos-prod-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  padding: 12px 14px;
  overflow-y: auto;
  flex: 1;
  align-content: start;
}
.pos-grid-empty { grid-column: 1/-1; text-align: center; padding: 48px; color: var(--muted); font-size: 14px; }

/* Product cards */
.pos-prod-card {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  cursor: pointer;
  transition: all 0.15s;
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  user-select: none;
  touch-action: manipulation;
  min-height: 130px;
}
.pos-prod-card:hover { border-color: var(--green); box-shadow: 0 4px 16px rgba(16,185,129,0.12); transform: translateY(-1px); }
.pos-prod-card:active { transform: scale(0.97); }
@keyframes cardAdded { 0%{box-shadow:0 0 0 0 rgba(16,185,129,0.6)} 100%{box-shadow:0 0 0 12px rgba(16,185,129,0)} }
.pos-card-added { animation: cardAdded 0.3s ease-out; }
.pos-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 4px;
}
.pos-card-price { font-size: 13px; font-weight: 800; color: var(--green-dark); }
.pos-card-stock { font-size: 11px; font-weight: 600; color: var(--muted); }
.pos-card-stock.low { color: #ef4444; }
.pos-card-img {
  font-size: 32px;
  text-align: center;
  line-height: 1;
  margin: 4px 0;
  flex: 1;
  display: flex; align-items: center; justify-content: center;
}
.pos-card-noimg { font-size: 28px; opacity: 0.4; }
.pos-card-name { font-size: 12px; font-weight: 600; line-height: 1.3; }
.pos-card-sku { font-size: 10px; color: var(--muted); }

/* Held orders rows */
.held-order-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
}
.held-order-row:last-child { border-bottom: none; }
.btn-sm { padding: 5px 12px !important; font-size: 12px !important; }

/* Payment modal */
.ppm-modal { max-width: 860px; width: 95%; }
.ppm-body { display: grid; grid-template-columns: 1fr 280px; gap: 20px; padding: 20px; }
.ppm-left { display: flex; flex-direction: column; gap: 12px; }
.ppm-receipt-tabs { display: flex; gap: 6px; }
.ppm-rtab {
  flex: 1; padding: 7px 10px; border: 1.5px solid var(--border); border-radius: 8px;
  background: white; cursor: pointer; font-size: 12px; font-weight: 600;
  transition: all 0.15s; text-align: center;
}
.ppm-rtab.active { background: var(--green); color: white; border-color: var(--green); }
.ppm-right { display: flex; flex-direction: column; gap: 12px; }
.ppm-summary-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 14px;
}
.ppm-sum-row { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; }
.ppm-sum-row.green { color: var(--green-dark); }
.ppm-sum-total { font-size: 16px; font-weight: 800; border-top: 1.5px solid var(--border); margin-top: 4px; padding-top: 8px; color: var(--green-dark); }
.ppm-sum-change { font-size: 14px; font-weight: 700; color: #f59e0b; }
.ppm-cart-preview { font-size: 12px; }
.ppm-cart-line { display: flex; justify-content: space-between; padding: 2px 0; border-bottom: 1px dashed var(--border); }
.ppm-client-card { background: var(--green-light); border: 1px solid var(--green); border-radius: 8px; padding: 8px 12px; font-size: 13px; color: var(--green-dark); }

/* Receipt modal */
.receipt-modal { max-width: 420px; }
.receipt-body { padding: 0 16px 10px; max-height: 75vh; overflow-y: auto; }

/* Thermal receipt wrap */
.rcp-wrap {
  font-family: 'Courier New', 'Courier', monospace;
  font-size: 12px;
  line-height: 1.55;
  color: #1a1a1a;
  background: #fff;
  padding: 16px 12px;
  width: 300px;
  max-width: 300px;
  margin: 0 auto;
  box-sizing: border-box;
}
.rcp-shop-name { text-align: center; font-size: 14px; font-weight: 700; letter-spacing: 0.5px; margin-bottom: 2px; font-family: 'Courier New', monospace; }
.rcp-sub { text-align: center; font-size: 11px; color: #555; font-family: 'Courier New', monospace; }
.rcp-dots { color: #aaa; font-size: 11px; overflow: hidden; white-space: nowrap; margin: 3px 0; font-family: 'Courier New', monospace; }
.rcp-meta { display: flex; justify-content: space-between; font-size: 11px; color: #555; margin: 3px 0; font-family: 'Courier New', monospace; }
.rcp-items { margin: 4px 0; }
.rcp-item-name { font-size: 12px; font-weight: 600; word-break: break-word; font-family: 'Courier New', monospace; }
.rcp-item-row { display: flex; justify-content: space-between; font-size: 11px; color: #444; font-family: 'Courier New', monospace; }
.rcp-total-row { display: flex; justify-content: space-between; font-size: 12px; padding: 2px 0; font-family: 'Courier New', monospace; }
.rcp-grand { font-size: 13px; font-weight: 700; }
.rcp-pay-method { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; }
.rcp-change { font-weight: 700; color: #16a34a; }
.rcp-note { font-size: 11px; color: #555; word-break: break-word; font-family: 'Courier New', monospace; }
.rcp-thanks { text-align: center; font-size: 13px; font-weight: 700; letter-spacing: 0.5px; margin: 6px 0; font-family: 'Courier New', monospace; }
.rcp-barcode { text-align: center; margin-top: 10px; }
.rcp-barcode-svg { width: 100%; max-width: 260px; height: 50px; display: block; margin: 0 auto; }
.rcp-barcode-num { font-size: 10px; font-family: 'Courier New', monospace; letter-spacing: 3px; margin-top: 3px; color: #555; }

/* Client create option */
.pos-client-create { color: var(--green-dark); font-weight: 600; gap: 6px; }

/* Calculator overlay */
.pos-calc-overlay {
  position: fixed; bottom: 80px; right: 20px; z-index: 1000;
}
.pos-calc {
  background: white;
  border: 1.5px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.15);
  overflow: hidden;
  width: 220px;
}
.pos-calc-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; background: var(--bg); border-bottom: 1px solid var(--border); font-size: 13px; font-weight: 700; }
.pos-calc-header button { border: none; background: none; cursor: pointer; font-size: 18px; }
.pos-calc-display { padding: 10px 14px; font-size: 22px; font-weight: 700; text-align: right; min-height: 48px; background: #f8fafc; font-family: monospace; word-break: break-all; }
.pos-calc-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border); }
.pos-calc-btn { padding: 14px; border: none; background: white; cursor: pointer; font-size: 15px; font-weight: 600; transition: background 0.1s; }
.pos-calc-btn:hover { background: var(--bg); }
.calc-eq { background: var(--green) !important; color: white; }
.calc-eq:hover { background: #059669 !important; }
.calc-op { background: #f1f5f9; }
.calc-c { background: #fee2e2; color: #dc2626; }

/* Customer Display page */
.cd-shell {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: linear-gradient(160deg, #0f172a 0%, #064e3b 50%, #0f172a 100%);
  color: white;
  font-family: inherit;
  padding: 0;
}
.cd-header {
  text-align: center;
  padding: 32px 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.cd-logo { max-height: 60px; margin-bottom: 10px; }
.cd-shop-name { font-size: 28px; font-weight: 800; color: #34d399; letter-spacing: -0.5px; }
.cd-title { font-size: 14px; color: rgba(255,255,255,0.6); margin-top: 4px; }
.cd-datetime { font-size: 14px; color: rgba(255,255,255,0.5); margin-top: 6px; }
.cd-body { flex: 1; padding: 24px 32px; }
.cd-client-row { font-size: 22px; font-weight: 700; color: #a7f3d0; margin-bottom: 20px; }
.cd-items-wrap { background: rgba(255,255,255,0.05); border-radius: 12px; overflow: hidden; margin-bottom: 20px; }
.cd-table { width: 100%; border-collapse: collapse; }
.cd-table th { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); font-size: 13px; padding: 10px 14px; text-align: left; }
.cd-table td { padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,0.06); font-size: 15px; color: rgba(255,255,255,0.9); }
.cd-table td:last-child { font-weight: 700; color: #34d399; }
.cd-totals { background: rgba(255,255,255,0.05); border-radius: 12px; padding: 14px 20px; }
.cd-sum-row { display: flex; justify-content: space-between; font-size: 15px; padding: 4px 0; color: rgba(255,255,255,0.8); }
.cd-sum-row.cd-disc { color: #34d399; }
.cd-sum-row.cd-total { font-size: 24px; font-weight: 800; color: #34d399; border-top: 1px solid rgba(255,255,255,0.15); margin-top: 8px; padding-top: 12px; }
.cd-footer { text-align: center; padding: 20px; color: rgba(255,255,255,0.4); font-size: 16px; }

/* Calculator icon in icons (alias) */
.calculator-label::before { content: '#'; font-size: 12px; font-weight: 700; }

@media (max-width: 768px) {
  .pos-main { grid-template-columns: 1fr; }
  .pos-left { max-height: 50vh; }
  .pos-prod-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .ppm-body { grid-template-columns: 1fr; }
}

/* ── iPad (768px–1180px) ── */
@media (min-width: 769px) and (max-width: 1180px) {
  /* Prevent sidebar from clipping content */
  .main-wrap { min-width: 0; overflow-x: hidden; }
  .sidebar { width: 220px; }
  .main-wrap:not(.expanded) { margin-left: 220px; }

  /* POS: stack on narrow iPad landscape / portrait */
  .pos-main { grid-template-columns: 300px 1fr; }
  .pos-prod-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }

  /* Modal: don't overflow */
  .modal { max-width: calc(100vw - 32px) !important; }
  .ppm-modal { max-width: min(780px, calc(100vw - 32px)); }
}

/* Safe-area insets for iPadOS full-screen PWA */
@supports (padding: env(safe-area-inset-top)) {
  .pos-topbar  { padding-top: max(8px, env(safe-area-inset-top)); }
  .sidebar     { padding-top: max(0px, env(safe-area-inset-top)); }
  .pos-cart-footer { padding-bottom: max(12px, env(safe-area-inset-bottom)); }
}

/* Prevent body/page scroll bounce on iPadOS */
html, body { overscroll-behavior: none; touch-action: pan-x pan-y; }
.pos-shell { touch-action: pan-x pan-y; }

/* ═══════════════════════════════════════════════════════════════
   EMPLOYEE SELECTOR (shown after login, before shift is opened)
═══════════════════════════════════════════════════════════════ */
.emp-selector-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: linear-gradient(135deg, #e2e8f0 0%, #f8fafc 100%);
}

.emp-selector-card {
  background: white;
  border-radius: 20px;
  box-shadow: var(--shadow-xl);
  padding: 36px 40px;
  width: 100%;
  max-width: 560px;
}

.emp-selector-header {
  text-align: center;
  margin-bottom: 28px;
}

.emp-logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 800;
  color: var(--green-dark);
  margin-bottom: 16px;
}

.emp-selector-header h2 {
  font-size: 22px;
  font-weight: 800;
  color: var(--navy);
  margin-bottom: 6px;
}

.emp-selector-header p {
  font-size: 14px;
  color: var(--muted);
}

.emp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.emp-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 8px;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: white;
  cursor: pointer;
  transition: all 0.15s;
  text-align: center;
}

.emp-card:hover { border-color: var(--green); background: var(--green-light); }
.emp-card.selected { border-color: var(--green-dark); background: linear-gradient(135deg, var(--green-light), #d1fae5); box-shadow: 0 0 0 3px rgba(34,197,94,0.2); }

.emp-card-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  font-weight: 800;
  flex-shrink: 0;
}

.emp-card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
}

.emp-card-role {
  font-size: 11px;
  color: var(--muted);
}

.emp-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--muted);
  font-size: 12px;
}
.emp-divider::before, .emp-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.emp-name-inp, .emp-balance-inp {
  width: 100%;
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  transition: border-color 0.15s;
}
.emp-name-inp:focus, .emp-balance-inp:focus {
  border-color: var(--green);
  outline: none;
  box-shadow: 0 0 0 3px rgba(34,197,94,0.12);
}

.emp-open-btn {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  justify-content: center;
  margin-bottom: 10px;
  background: var(--green);
  color: white;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.15s;
}
.emp-open-btn:hover { background: var(--green-dark); }

.emp-logout-btn {
  width: 100%;
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
}

/* ═══════════════════════════════════════════════════════════════
   POS SHIFT BAR
═══════════════════════════════════════════════════════════════ */
.pos-shift-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 16px;
  background: linear-gradient(90deg, #0f172a 0%, #1e293b 100%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  gap: 12px;
  flex-wrap: wrap;
  min-height: 36px;
}

.pos-shift-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.85);
}

.pos-shift-info strong { color: #86efac; }

.pos-shift-divider {
  color: rgba(255,255,255,0.3);
}

.pos-shift-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pos-shift-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,0.15);
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.12s;
}

.pos-shift-btn:hover { background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.3); }

.pos-shift-close-btn { border-color: rgba(239,68,68,0.4); color: #fca5a5; }
.pos-shift-close-btn:hover { background: rgba(239,68,68,0.2); border-color: #ef4444; color: #fca5a5; }
.pos-shift-bar-empty { justify-content: flex-end; }

/* Shifts open-panel on /shifts page */
.shift-open-panel { padding: 20px; }

/* ═══════════════════════════════════════════════════════════════
   SHIFT REPORT MODAL
═══════════════════════════════════════════════════════════════ */
.shift-report-modal {
  max-width: 780px;
  width: 96%;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.shift-summary-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  background: var(--surface-2, #f8fafc);
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  flex-wrap: wrap;
}

.shift-sum-item {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--slate);
}

.shift-tabs {
  padding: 0 16px;
  border-bottom: 1px solid var(--border);
  background: white;
}

.shift-report-body {
  overflow-y: auto;
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.shift-report-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shift-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--navy);
  display: flex;
  align-items: center;
  gap: 6px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.shift-cash-grid {
  background: var(--surface-2, #f8fafc);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.shift-cash-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13.5px;
}
.shift-cash-row:last-child { border-bottom: none; }
.shift-cash-row-bold {
  background: white;
  font-weight: 700;
}

.shift-cash-val {
  font-weight: 700;
  font-size: 14px;
}

.shift-actual-inp {
  width: 130px;
  text-align: right;
  font-size: 15px;
  font-weight: 700;
  padding: 4px 8px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  color: var(--navy);
}
.shift-actual-inp:focus { border-color: var(--green); outline: none; box-shadow: 0 0 0 2px rgba(34,197,94,0.12); }

.shift-cash-actions {
  display: flex;
  gap: 8px;
}

.shift-txn-log {
  background: white;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}

.shift-txn-log-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.shift-txn-log-row:last-child { border-bottom: none; }

.shift-txn-time {
  font-size: 11px;
  color: var(--muted);
  min-width: 40px;
  text-align: right;
}

.shift-acquiring-block {
  background: var(--surface-2, #f8fafc);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
}

.shift-acquiring-block h5 {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.shift-report-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 4px;
}


/* ═══════════════════════════════════════════════════════════════
   SHIFTS HISTORY PAGE
═══════════════════════════════════════════════════════════════ */
.shift-active-card {
  padding: 14px 18px;
  border-left: 4px solid var(--green);
  background: linear-gradient(90deg, var(--green-light), white);
}

.shift-active-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.3);
  animation: pulse-dot 2s infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34,197,94,0.3); }
  50% { box-shadow: 0 0 0 6px rgba(34,197,94,0.12); }
}

.shift-hist-row { cursor: pointer; transition: background 0.12s; }
.shift-hist-row:hover { background: var(--green-light); }

.col-num { text-align: right; }
.ref-cell { font-family: monospace; font-size: 12px; color: var(--muted); }
.items-cell { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.time-cell { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.tfoot-total { font-weight: 700; background: var(--surface-2, #f8fafc); }

/* table col-num alignment in report modal */
.shift-report-modal .col-num { text-align: right; }

@media (max-width: 640px) {
  .emp-selector-card { padding: 24px 18px; }
  .emp-grid { grid-template-columns: repeat(2, 1fr); }
  .shift-summary-bar { gap: 8px; font-size: 11.5px; }
  .shift-report-modal { max-height: 96vh; border-radius: 14px 14px 0 0; }
  .pos-shift-bar { padding: 5px 10px; }
  .pos-shift-info { font-size: 11.5px; }
}

