:root {
  --bg: #f8f9fc;
  --bg2: #ffffff;
  --bg3: #f0f2f8;
  --text: #1a1d2e;
  --text2: #5a5f7d;
  --border: #e4e7f0;
  --accent: #6c63ff;
  --accent2: #4f46e5;
  --accent-soft: #ede9fe;
  --success: #10b981;
  --success-soft: #d1fae5;
  --warning: #f59e0b;
  --warning-soft: #fef3c7;
  --danger: #ef4444;
  --danger-soft: #fee2e2;
  --shadow: 0 2px 16px rgba(108,99,255,0.08);
  --shadow-lg: 0 8px 32px rgba(108,99,255,0.14);
  --radius: 16px;
  --radius-sm: 10px;
  --transition: 0.25s cubic-bezier(.4,0,.2,1);
}

[data-theme="dark"] {
  --bg: #0f1117;
  --bg2: #1a1d2e;
  --bg3: #232740;
  --text: #f0f2ff;
  --text2: #8b91b8;
  --border: #2e3352;
  --accent: #7c73ff;
  --accent2: #6c63ff;
  --accent-soft: #1e1a40;
  --success-soft: #052e1e;
  --warning-soft: #2d1f00;
  --danger-soft: #2d0a0a;
  --shadow: 0 2px 16px rgba(0,0,0,0.3);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.4);
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
  line-height: 1.6;
}

/* ─── SCROLLBAR ─── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 99px; }

/* ─── TOPBAR ─── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 60px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
  backdrop-filter: blur(12px);
  transition: background var(--transition), border-color var(--transition);
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--accent);
}

.topbar-brand img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
}

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

/* ─── THEME TOGGLE ─── */
.theme-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: var(--bg3);
  color: var(--text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all var(--transition);
}

.theme-btn:hover { background: var(--accent-soft); color: var(--accent); }

/* ─── SIDEBAR ─── */
.sidebar {
  position: fixed;
  top: 60px; left: 0;
  width: 240px;
  height: calc(100vh - 60px);
  background: var(--bg2);
  border-right: 1px solid var(--border);
  padding: 20px 12px;
  overflow-y: auto;
  z-index: 90;
  transition: transform var(--transition), background var(--transition);
}

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

.sidebar-section {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text2);
  padding: 12px 10px 6px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text2);
  transition: all var(--transition);
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.nav-item:hover { background: var(--bg3); color: var(--text); }
.nav-item.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav-item .icon { font-size: 1.1rem; width: 20px; text-align: center; }

/* ─── MAIN CONTENT ─── */
.main {
  margin-left: 240px;
  margin-top: 60px;
  padding: 24px 20px;
  min-height: calc(100vh - 60px);
  transition: margin var(--transition);
}

.main.no-sidebar { margin-left: 0; }

/* ─── PAGES ─── */
.page { display: none; animation: fadeIn 0.3s ease; }
.page.active { display: block; }

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

/* ─── CARDS ─── */
.card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

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

.card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
}

.card-sub {
  font-size: 0.82rem;
  color: var(--text2);
}

/* ─── STATS GRID ─── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}

@media (min-width: 640px) {
  .stats-grid { grid-template-columns: repeat(4, 1fr); }
}

.stat-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  box-shadow: var(--shadow);
  transition: all var(--transition);
}

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

.stat-icon {
  font-size: 1.5rem;
  margin-bottom: 2px;
}

.stat-value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text2);
  font-weight: 500;
}

/* ─── BADGES ─── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-pending { background: var(--warning-soft); color: var(--warning); }
.badge-process { background: var(--accent-soft); color: var(--accent); }
.badge-resolved { background: var(--success-soft); color: var(--success); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-warning { background: #fff3cd; color: #856404; }

/* ─── BUTTONS ─── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent2); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(108,99,255,0.4); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: 0.85; }

.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 0.82rem; }
.btn-full { width: 100%; }

.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

/* ─── FORMS ─── */
.form-group { margin-bottom: 18px; }

.form-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 7px;
}

.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg3);
  color: var(--text);
  font-size: 0.9rem;
  transition: all var(--transition);
  outline: none;
  font-family: inherit;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--accent);
  background: var(--bg2);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.12);
}

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

.form-hint { font-size: 0.78rem; color: var(--text2); margin-top: 5px; }

/* ─── REPORT CARDS ─── */
.report-list { display: flex; flex-direction: column; gap: 14px; }

.report-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  transition: all var(--transition);
  cursor: pointer;
}

.report-card:hover { border-color: var(--accent); box-shadow: var(--shadow-lg); transform: translateY(-1px); }

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

.report-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.report-meta {
  font-size: 0.8rem;
  color: var(--text2);
  margin-top: 4px;
}

.report-desc {
  font-size: 0.88rem;
  color: var(--text2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ─── MODAL ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}

@media (min-width: 640px) {
  .modal-overlay { align-items: center; }
}

.modal-overlay.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--bg2);
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 24px 20px 32px;
  width: 100%;
  max-width: 500px;
  max-height: 92vh;
  overflow-y: auto;
  transform: translateY(40px);
  transition: transform var(--transition);
}

@media (min-width: 640px) {
  .modal { border-radius: var(--radius); transform: scale(0.95); }
}

.modal-overlay.open .modal { transform: translateY(0) scale(1); }

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

.modal-title { font-size: 1.1rem; font-weight: 700; }

.modal-close {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: none;
  background: var(--bg3);
  color: var(--text);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.modal-close:hover { background: var(--danger-soft); color: var(--danger); }

/* ─── TABS ─── */
.tabs {
  display: flex;
  gap: 4px;
  background: var(--bg3);
  padding: 4px;
  border-radius: var(--radius-sm);
  margin-bottom: 20px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  flex: 1;
  min-width: max-content;
  padding: 8px 12px;
  border-radius: 7px;
  border: none;
  background: none;
  color: var(--text2);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  text-align: center;
}

.tab-btn.active { background: var(--bg2); color: var(--accent); font-weight: 600; box-shadow: var(--shadow); }

@media (max-width: 480px) {
  .tab-btn { font-size: 0.78rem; padding: 7px 10px; }
}

/* ─── AUTH PAGE ─── */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: var(--bg);
}

.auth-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 28px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
}

.auth-logo {
  text-align: center;
  margin-bottom: 28px;
}

.auth-logo-icon {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin: 0 auto 12px;
}

.auth-logo h2 { font-size: 1.3rem; font-weight: 700; }
.auth-logo p { font-size: 0.85rem; color: var(--text2); margin-top: 4px; }

/* ─── LANDING ─── */
.landing {
  min-height: 100vh;
  background: var(--bg);
}

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px 40px;
  background: radial-gradient(ellipse at top, rgba(108,99,255,0.08) 0%, transparent 60%);
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 99px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 24px;
  border: 1px solid rgba(108,99,255,0.2);
}

.hero h1 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  font-weight: 800;
  line-height: 1.15;
  max-width: 700px;
  background: linear-gradient(135deg, var(--text) 40%, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 18px;
}

.hero p {
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  color: var(--text2);
  max-width: 520px;
  margin-bottom: 36px;
}

.hero-btns {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  padding: 60px 20px;
  max-width: 1000px;
  margin: 0 auto;
}

.feature-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 20px;
  text-align: center;
  transition: all var(--transition);
}

.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent); }

.feature-icon {
  width: 52px;
  height: 52px;
  background: var(--accent-soft);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin: 0 auto 14px;
}

.feature-card h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 0.84rem; color: var(--text2); line-height: 1.6; }

/* ─── CUSTOMER VIEW ─── */
.customer-wrap {
  min-height: 100vh;
  background: var(--bg);
  padding-bottom: 40px;
}

.customer-header {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 20px;
  text-align: center;
}

.customer-logo {
  width: 72px;
  height: 72px;
  border-radius: 20px;
  object-fit: cover;
  margin-bottom: 10px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  margin-inline: auto;
  overflow: hidden;
}

.customer-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 20px;
}

.customer-store-name { font-size: 1.2rem; font-weight: 700; }
.customer-tagline { font-size: 0.85rem; color: var(--text2); margin-top: 4px; }

.customer-content { max-width: 540px; margin: 0 auto; padding: 24px 16px; }

/* ─── VENDOR LIST ─── */
.vendor-table { width: 100%; border-collapse: collapse; }
.vendor-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text2);
  border-bottom: 1px solid var(--border);
}

.vendor-table td {
  padding: 12px 14px;
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.vendor-table tr:last-child td { border-bottom: none; }
.vendor-table tr:hover td { background: var(--bg3); }

/* ─── TOAST ─── */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  font-size: 0.88rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: 300px;
  animation: slideIn 0.3s ease;
  transition: opacity 0.3s ease;
}

.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--accent); }

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

/* ─── EMPTY STATE ─── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text2);
}

.empty-icon { font-size: 3rem; margin-bottom: 14px; opacity: 0.5; }
.empty-state h3 { font-size: 1rem; font-weight: 600; margin-bottom: 6px; color: var(--text); }
.empty-state p { font-size: 0.85rem; }

/* ─── AVATAR ─── */
.avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* ─── DIVIDER ─── */
.divider {
  height: 1px;
  background: var(--border);
  margin: 20px 0;
}

/* ─── MOBILE SIDEBAR TOGGLE ─── */
.hamburger {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: none;
  background: var(--bg3);
  color: var(--text);
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  transition: all var(--transition);
}

/* ─── MOBILE OVERLAY ─── */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 89;
  backdrop-filter: blur(2px);
}

/* ─── RESPONSIVE ─── */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

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

  .sidebar-overlay.open { display: block; }
  .hamburger { display: flex; }

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

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

  .topbar-store-name { display: none; }
  .topbar-push-btn { display: none; }
  .landing-admin-btn { display: none; }

  .vendor-table { font-size: 0.8rem; }
  .vendor-table th, .vendor-table td { padding: 8px 10px; }

  .toast-container { left: 16px; right: 16px; bottom: 16px; }
  .toast { max-width: 100%; }
}

/* ─── LOADING SPINNER ─── */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ─── SECTION HEADER ─── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  flex-wrap: wrap;
  gap: 10px;
}

.section-title {
  font-size: 1.15rem;
  font-weight: 700;
}

/* ─── STATUS TIMELINE ─── */
.timeline {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 20px 0;
}

.timeline-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
}

.timeline-step::before {
  content: '';
  position: absolute;
  top: 14px;
  right: -50%;
  width: 100%;
  height: 2px;
  background: var(--border);
}

.timeline-step:last-child::before { display: none; }

.timeline-step.done::before { background: var(--accent); }

.timeline-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg3);
  border: 2px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  position: relative;
  z-index: 1;
  transition: all var(--transition);
}

.timeline-step.done .timeline-dot {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.timeline-step.current .timeline-dot {
  background: var(--bg2);
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.timeline-label {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text2);
  text-align: center;
}

.timeline-step.done .timeline-label,
.timeline-step.current .timeline-label { color: var(--accent); }

/* ─── PASSWORD INPUT WRAP ─── */
.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-wrap .form-input {
  padding-right: 44px;
}

.input-eye {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 16px;
  padding: 4px;
  color: var(--text2);
  line-height: 1;
  transition: color var(--transition);
}

.input-eye:hover { color: var(--accent); }

/* ─── SEARCH BAR ─── */
.search-bar-wrap {
  position: relative;
  margin-bottom: 14px;
}

.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  pointer-events: none;
}

.search-bar {
  width: 100%;
  padding: 11px 14px 11px 42px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg2);
  color: var(--text);
  font-size: 0.9rem;
  outline: none;
  font-family: inherit;
  transition: all var(--transition);
}

.search-bar:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(108,99,255,0.12);
}

/* ─── PLATFORM CHIP ─── */
.platform-chip {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ─── REPORT ACCOUNT ROW ─── */
.report-account {
  font-size: 0.78rem;
  color: var(--text2);
  margin-top: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── INFO GRID (modal) ─── */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

@media (max-width: 480px) {
  .info-grid { grid-template-columns: 1fr; }
}

.info-item { display: flex; flex-direction: column; gap: 4px; }

.info-value {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  word-break: break-word;
}

.info-box {
  background: var(--bg3);
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 0.88rem;
  color: var(--text);
  line-height: 1.6;
  word-break: break-word;
}

/* ─── CREDENTIALS PANEL ─── */
.credentials-panel {
  background: var(--bg3);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin: 14px 0;
  border: 1px solid var(--border);
}

.credentials-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.cred-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.cred-row:last-child { margin-bottom: 0; }

.cred-label {
  font-size: 0.78rem;
  color: var(--text2);
  font-weight: 600;
  min-width: 90px;
  flex-shrink: 0;
}

.cred-value {
  font-size: 0.88rem;
  color: var(--text);
  font-family: monospace;
  flex: 1;
  word-break: break-all;
}

.btn-copy {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--text2);
  transition: all var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-copy:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }

.btn-link {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 0.8rem;
  cursor: pointer;
  padding: 0 4px;
  font-weight: 600;
  text-decoration: underline;
  transition: opacity var(--transition);
}

.btn-link:hover { opacity: 0.7; }

/* ─── RESPONSE BOX ─── */
.response-box {
  background: var(--accent-soft);
  padding: 12px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  border-left: 3px solid var(--accent);
  line-height: 1.6;
  word-break: break-word;
}

.waiting-msg {
  text-align: center;
  color: var(--text2);
  font-size: 0.85rem;
  padding: 14px 0;
}

/* ─── SUCCESS CARD ─── */
.success-card {
  text-align: center;
  padding: 32px 20px;
}

.success-icon { font-size: 3.5rem; margin-bottom: 14px; }
.success-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; }
.success-sub { color: var(--text2); font-size: 0.9rem; margin-bottom: 20px; }

.track-box {
  background: var(--bg3);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-bottom: 20px;
  text-align: left;
  border: 1px dashed var(--border);
}

.success-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── CUSTOMER FORM ─── */
.customer-form-card { padding: 24px 20px; }
.customer-form-title { font-size: 1rem; font-weight: 700; margin-bottom: 20px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 480px) {
  .form-row { grid-template-columns: 1fr; }
}

.required { color: var(--danger); font-size: 0.8rem; }
.optional { color: var(--text2); font-size: 0.78rem; font-weight: 400; }

.btn-lg { padding: 14px 20px; font-size: 1rem; }

/* ─── CREDENTIALS PAGE ─── */
.cred-list { display: flex; flex-direction: column; gap: 14px; }

.cred-card { padding: 18px; }

.cred-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}

.cred-fields { display: flex; flex-direction: column; gap: 10px; }

.cred-field-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.cred-field-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text2);
  min-width: 110px;
  flex-shrink: 0;
}

.cred-field-val-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.cred-field-input {
  flex: 1;
  min-width: 0;
  padding: 8px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg3);
  color: var(--text);
  font-size: 0.88rem;
  font-family: monospace;
  outline: none;
  transition: all var(--transition);
}

.cred-field-input:focus {
  border-color: var(--accent);
  background: var(--bg2);
}

@media (max-width: 480px) {
  .cred-field-row { flex-direction: column; align-items: flex-start; }
  .cred-field-val-wrap { width: 100%; }
}

/* ─── CONFIG SECTIONS ─── */
.config-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 18px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

/* ─── TOPBAR STORE NAME ─── */
.topbar-store-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 400px) {
  .topbar-store-name { max-width: 80px; }
  .btn-outline.icon-only span { display: none; }
}

/* ─── CUSTOMER AUTH TABS ─── */
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 16px;
  background: var(--bg3);
  border-radius: var(--radius-sm);
  padding: 4px;
}

.auth-tab {
  flex: 1;
  padding: 10px;
  border: none;
  background: none;
  border-radius: 7px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text2);
  cursor: pointer;
  transition: all var(--transition);
}

.auth-tab.active {
  background: var(--bg2);
  color: var(--accent);
  box-shadow: var(--shadow);
}

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

/* ─── CUSTOMER WELCOME ─── */
.customer-welcome {
  font-size: 1rem;
  color: var(--text2);
  margin-bottom: 16px;
  padding: 0 2px;
}

/* ─── CUSTOMER TOPBAR ─── */
.customer-topbar {
  position: fixed;
  background: var(--bg2) !important;
}

/* ─── FILE UPLOAD ─── */
.file-upload-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 20px 16px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition);
  background: var(--bg3);
  position: relative;
  overflow: hidden;
}

.file-upload-area:hover,
.file-upload-area.dragover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.file-upload-area input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.file-upload-icon { font-size: 2rem; margin-bottom: 8px; }
.file-upload-text { font-size: 0.88rem; color: var(--text2); font-weight: 500; }
.file-upload-hint { font-size: 0.75rem; color: var(--text2); margin-top: 4px; opacity: 0.7; }

.file-preview {
  width: 100%;
  max-height: 220px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  display: block;
}

.file-preview-wrap {
  position: relative;
}

.file-preview-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ─── REPORT IMAGE (vendor modal) ─── */
.report-image {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  cursor: pointer;
  display: block;
  margin-bottom: 14px;
  transition: opacity var(--transition);
}

.report-image:hover { opacity: 0.9; }

/* ─── PUSH NOTIFICATION BANNER ─── */
.push-banner {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #fff;
  border-radius: var(--radius);
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.push-banner-icon { font-size: 1.8rem; flex-shrink: 0; }
.push-banner-text { flex: 1; min-width: 0; }
.push-banner-text strong { display: block; font-size: 0.95rem; margin-bottom: 2px; }
.push-banner-text span { font-size: 0.82rem; opacity: 0.85; }
.push-banner-btn {
  background: rgba(255,255,255,0.2);
  border: 1.5px solid rgba(255,255,255,0.4);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition);
  flex-shrink: 0;
}
.push-banner-btn:hover { background: rgba(255,255,255,0.3); }
.push-banner-dismiss {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  cursor: pointer;
  font-size: 18px;
  flex-shrink: 0;
  line-height: 1;
}

/* ─── PAGINATION ─── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  margin-top: 20px;
  flex-wrap: wrap;
  padding: 0 4px;
}

.page-btn {
  min-width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: var(--bg2);
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.page-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}

.page-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.page-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.pagination-info {
  text-align: center;
  font-size: 0.78rem;
  color: var(--text2);
  margin-top: 8px;
}

@media (max-width: 480px) {
  .page-btn { min-width: 34px; height: 34px; font-size: 0.82rem; }
}
