/* ====================================================
   ArkSale Admin - Ultra-Clean White & Modern Design System
   Role-Based Access Control (RBAC) Edition
   ==================================================== */

:root {
  /* Surface & Backgrounds (Crisp Modern White Theme) */
  --bg-body: #F8FAFC;
  --bg-surface: #FFFFFF;
  --bg-card: #FFFFFF;
  --bg-card-hover: #F8FAFC;
  --bg-subtle: #F1F5F9;
  --bg-muted: #E2E8F0;

  /* Borders & Dividers */
  --border-color: #E2E8F0;
  --border-subtle: #EDF2F7;
  --border-focus: #059669;

  /* Brand Accents - Fresh Sri Lankan Retail Emerald & Indigo */
  --emerald: #059669;
  --emerald-hover: #047857;
  --emerald-subtle: #ECFDF5;
  --emerald-glow: rgba(5, 150, 105, 0.15);

  --indigo: #4F46E5;
  --indigo-subtle: #EEF2FF;
  --indigo-glow: rgba(79, 70, 229, 0.15);

  --cyan: #0284C7;
  --cyan-subtle: #F0F9FF;

  --amber: #D97706;
  --amber-subtle: #FEF3C7;

  --purple: #7C3AED;
  --purple-subtle: #F5F3FF;

  --red: #DC2626;
  --red-subtle: #FEF2F2;

  /* Typography Colors */
  --text-main: #0F172A;
  --text-muted: #475569;
  --text-dim: #94A3B8;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-card: 0 1px 3px 0 rgba(0, 0, 0, 0.05), 0 1px 2px -1px rgba(0, 0, 0, 0.03);
  --shadow-card-hover: 0 6px 12px -2px rgba(0, 0, 0, 0.08), 0 3px 6px -3px rgba(0, 0, 0, 0.04);
  --shadow-dropdown: 0 12px 28px -4px rgba(15, 23, 42, 0.12), 0 6px 12px -4px rgba(15, 23, 42, 0.06);
  --shadow-modal: 0 25px 50px -12px rgba(15, 23, 42, 0.25);

  /* Fonts & Geometry */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
  background-color: var(--bg-body);
  color: var(--text-main);
  font-family: var(--font-body);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ====================================================
   Login Screen (Pre-dashboard Gateway)
   ==================================================== */
.login-view {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--bg-body);
  background-image: 
    radial-gradient(at 10% 20%, rgba(5, 150, 105, 0.06) 0px, transparent 40%),
    radial-gradient(at 90% 80%, rgba(79, 70, 229, 0.06) 0px, transparent 40%);
  padding: 24px;
}

.login-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-modal);
  width: 100%;
  max-width: 460px;
  padding: 40px 36px;
  animation: fadeInDown 0.4s ease-out;
}

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

.login-brand {
  text-align: center;
  margin-bottom: 24px;
}

.login-logo {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  box-shadow: 0 4px 14px var(--emerald-glow);
  object-fit: cover;
  margin-bottom: 14px;
}

.login-brand h2 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.login-brand p {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 4px;
}

.login-badge {
  display: inline-block;
  background: var(--emerald-subtle);
  color: var(--emerald);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 4px 10px;
  border-radius: 9999px;
  margin-top: 8px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.login-error {
  display: none;
  background: var(--red-subtle);
  color: var(--red);
  border: 1px solid rgba(220, 38, 38, 0.2);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
}

.login-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 6px;
}

.btn-login {
  width: 100%;
  padding: 12px 20px;
  background: linear-gradient(135deg, var(--emerald), var(--emerald-hover));
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 600;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 4px 12px var(--emerald-glow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-login:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(5, 150, 105, 0.3);
}

.demo-credentials-box {
  background: var(--bg-subtle);
  border: 1px dashed var(--border-color);
  border-radius: var(--radius-sm);
  padding: 14px;
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-muted);
}

.demo-credentials-box .demo-title {
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.demo-role-buttons {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.btn-demo-pill {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 5px 10px;
  border-radius: var(--radius-xs);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-demo-pill:hover {
  border-color: var(--emerald);
  color: var(--emerald);
  background: var(--emerald-subtle);
}

/* ====================================================
   App Layout (Dashboard)
   ==================================================== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background-color: var(--bg-surface);
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  padding: 24px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px 20px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  box-shadow: 0 2px 10px var(--emerald-glow);
  object-fit: cover;
}

.brand-text h2 {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text-main);
}

.brand-text span {
  font-size: 11px;
  color: var(--emerald);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 500;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
  width: 100%;
}

.nav-item svg {
  flex-shrink: 0;
  color: var(--text-dim);
  transition: var(--transition);
}

.nav-item:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.nav-item:hover svg {
  color: var(--text-main);
}

.nav-item.active {
  background: var(--emerald-subtle);
  color: var(--emerald);
  font-weight: 600;
}

.nav-item.active svg {
  color: var(--emerald);
}

.sidebar-footer {
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
  font-size: 12px;
}

.live-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--emerald);
  font-weight: 600;
  margin-bottom: 4px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(5, 150, 105, 0.6);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(5, 150, 105, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(5, 150, 105, 0); }
}

.market-tag {
  color: var(--text-dim);
}

/* ====================================================
   Main Content Area & Topbar
   ==================================================== */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 28px 36px;
  overflow-y: auto;
  background-color: var(--bg-body);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--border-color);
  background: transparent;
}

.header-title h1 {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text-main);
}

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

.topbar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

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

/* ====================================================
   Header User Profile & Dropdown
   ==================================================== */
.user-profile-menu {
  position: relative;
}

.user-profile-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 6px 12px 6px 6px;
  border-radius: 9999px;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.user-profile-btn:hover {
  border-color: var(--emerald);
  box-shadow: var(--shadow-card);
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--emerald), var(--indigo));
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.user-first-name {
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  line-height: 1.2;
}

.user-role-badge {
  font-size: 11px;
  color: var(--emerald);
  font-weight: 700;
  text-transform: capitalize;
}

.chevron-icon {
  color: var(--text-dim);
  transition: var(--transition);
}

.user-profile-menu.open .chevron-icon {
  transform: rotate(180deg);
}

/* Dropdown Card */
.user-dropdown-card {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 290px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-dropdown);
  z-index: 100;
  padding: 16px;
  animation: dropdownIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.user-dropdown-card.show {
  display: block;
}

.dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
}

.dropdown-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--emerald), var(--indigo));
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dropdown-info {
  overflow: hidden;
}

.dropdown-info h4 {
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dropdown-email {
  display: block;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

.dropdown-role-tag {
  display: inline-block;
  background: var(--emerald-subtle);
  color: var(--emerald);
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 9999px;
  margin-top: 4px;
}

.dropdown-divider {
  height: 1px;
  background-color: var(--border-color);
  margin: 10px 0;
}

.dropdown-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 10px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  text-align: left;
}

.dropdown-item:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.dropdown-footer {
  padding-top: 6px;
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--red-subtle);
  color: var(--red);
  border: 1px solid rgba(220, 38, 38, 0.15);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: var(--radius-xs);
  cursor: pointer;
  transition: var(--transition);
  width: 100%;
  justify-content: center;
}

.logout-btn:hover {
  background: var(--red);
  color: #FFFFFF;
}

/* ====================================================
   Buttons
   ==================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: var(--radius-sm);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--emerald), var(--emerald-hover));
  color: #FFFFFF;
  box-shadow: 0 2px 8px var(--emerald-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.35);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-main);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
  border-color: var(--border-focus);
}

.btn-glass {
  background: var(--cyan-subtle);
  color: var(--cyan);
  border: 1px solid rgba(2, 132, 199, 0.3);
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn-glass:hover {
  background: rgba(2, 132, 199, 0.15);
}

.btn-text {
  background: none;
  border: none;
  color: var(--emerald);
  font-family: var(--font-heading);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

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

.btn-danger-sm {
  background: var(--red-subtle);
  color: var(--red);
  border: 1px solid rgba(220, 38, 38, 0.2);
  padding: 6px 12px;
  border-radius: var(--radius-xs);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-danger-sm:hover {
  background: var(--red);
  color: #FFFFFF;
}

/* ====================================================
   Stats Grid
   ==================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  gap: 16px;
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}

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

.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  flex-shrink: 0;
}

.stat-icon.emerald { background: var(--emerald-subtle); color: var(--emerald); }
.stat-icon.cyan { background: var(--cyan-subtle); color: var(--cyan); }
.stat-icon.amber { background: var(--amber-subtle); color: var(--amber); }
.stat-icon.purple { background: var(--purple-subtle); color: var(--purple); }
.stat-icon.indigo { background: var(--indigo-subtle); color: var(--indigo); }

.stat-info {
  display: flex;
  flex-direction: column;
}

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

.stat-value {
  font-family: var(--font-heading);
  font-size: 22px;
  font-weight: 700;
  margin: 3px 0;
  letter-spacing: -0.4px;
  color: var(--text-main);
}

.stat-badge {
  font-size: 11px;
  font-weight: 600;
}

.stat-badge.positive { color: var(--emerald); }
.stat-badge.warning { color: var(--amber); }
.stat-badge.neutral { color: var(--text-muted); }

/* Feature Banner & Role Restriction Banner */
.feature-banner {
  background: linear-gradient(135deg, #ECFDF5, #F0F9FF);
  border: 1px solid #A7F3D0;
  border-radius: var(--radius-md);
  padding: 18px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  gap: 20px;
  box-shadow: var(--shadow-sm);
}

.feature-text h4 {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  color: #064E3B;
  margin-bottom: 4px;
}

.feature-text p {
  color: #047857;
  font-size: 13px;
  max-width: 750px;
}

/* ====================================================
   Card & Data Tables (Clean White Theme)
   ==================================================== */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-card);
}

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

.card-header h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

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

.table-responsive {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 13px;
}

.data-table th {
  padding: 12px 14px;
  color: var(--text-muted);
  font-family: var(--font-heading);
  font-weight: 600;
  background-color: var(--bg-subtle);
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.5px;
}

.data-table td {
  padding: 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
  vertical-align: middle;
}

.data-table tr:hover td {
  background-color: #F8FAFC;
}

.loading-cell {
  text-align: center;
  color: var(--text-muted);
  padding: 36px !important;
}

/* Badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 11px;
  font-weight: 600;
}

.badge-emerald { background: var(--emerald-subtle); color: var(--emerald); border: 1px solid #A7F3D0; }
.badge-cyan { background: var(--cyan-subtle); color: var(--cyan); border: 1px solid #BAE6FD; }
.badge-amber { background: var(--amber-subtle); color: var(--amber); border: 1px solid #FDE68A; }
.badge-purple { background: var(--purple-subtle); color: var(--purple); border: 1px solid #DDD6FE; }
.badge-indigo { background: var(--indigo-subtle); color: var(--indigo); border: 1px solid #C7D2FE; }
.badge-red { background: var(--red-subtle); color: var(--red); border: 1px solid #FECACA; }
.badge-slate { background: var(--bg-subtle); color: var(--text-muted); border: 1px solid var(--border-color); }

/* ====================================================
   User Table Specific Styles
   ==================================================== */
.user-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-circle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--indigo), var(--emerald));
  color: #FFFFFF;
  font-weight: 700;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.user-name-title {
  font-weight: 600;
  color: var(--text-main);
}

.user-email-sub {
  font-size: 12px;
  color: var(--text-muted);
}

/* Catalog search & filters */
.catalog-filters {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.search-input {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 13px;
  min-width: 260px;
  outline: none;
  transition: var(--transition);
}

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

.filter-select {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  font-size: 13px;
  outline: none;
  cursor: pointer;
}

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

/* ====================================================
   Forms & Controls
   ==================================================== */
.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

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

.form-group label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.form-control {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  color: var(--text-main);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  font-family: inherit;
  transition: var(--transition);
}

.form-control:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px var(--emerald-glow);
}

.password-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrap .form-control {
  width: 100%;
  padding-right: 40px;
}

.password-toggle-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.password-toggle-btn:hover {
  color: var(--text-main);
}

/* Simulator Form */
.simulator-box {
  padding: 8px 0;
}

.simulator-action-wrap {
  margin: 18px 0;
}

.btn-large {
  padding: 12px 24px;
  font-size: 15px;
}

.sim-log-terminal {
  background: #0F172A;
  border: 1px solid #1E293B;
  border-radius: var(--radius-sm);
  padding: 16px;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: 12px;
  margin-top: 16px;
  color: #38BDF8;
}

.terminal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #94A3B8;
  font-weight: 700;
  border-bottom: 1px solid #1E293B;
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.terminal-dot {
  width: 6px;
  height: 6px;
  background-color: #10B981;
  border-radius: 50%;
}

#simLogOutput {
  color: #38BDF8;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 200px;
  overflow-y: auto;
}

/* ====================================================
   Modals (Clean White Cards)
   ==================================================== */
.modal-backdrop {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
}

.modal-box {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px;
  box-shadow: var(--shadow-modal);
  animation: modalScale 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

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

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: 700;
  color: var(--text-main);
}

.modal-close {
  background: none;
  border: none;
  font-size: 24px;
  color: var(--text-dim);
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text-main);
}

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

.sku-thumb {
  width: 36px;
  height: 36px;
  border-radius: 4px;
  object-fit: cover;
  background-color: var(--bg-subtle);
  border: 1px solid var(--border-color);
}

/* Tab Panes */
.tab-pane {
  display: none;
  animation: fadeIn 0.2s ease-in-out;
}

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

.tab-pane.active {
  display: block;
}

/* ====================================================
   Toast Notification System
   ==================================================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-left: 4px solid var(--emerald);
  border-radius: var(--radius-sm);
  padding: 12px 18px;
  box-shadow: var(--shadow-dropdown);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  animation: toastSlide 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.toast-error {
  border-left-color: var(--red);
}

@keyframes toastSlide {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .app-layout {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
  }
  .main-content {
    padding: 20px;
  }
}

/* ====================================================
   Customer Directory, Telemetry & Notification Preview Styles
   ==================================================== */

.sub-tabs-container {
  margin-bottom: 20px;
}

.sub-tabs {
  display: inline-flex;
  background: var(--bg-muted);
  padding: 4px;
  border-radius: var(--radius-md);
  gap: 4px;
}

.sub-tab-btn {
  background: transparent;
  border: none;
  padding: 8px 16px;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
}

.sub-tab-btn:hover {
  color: var(--text-main);
}

.sub-tab-btn.active {
  background: var(--bg-surface);
  color: var(--emerald);
  box-shadow: var(--shadow-sm);
}

.telemetry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 12px;
}

.telemetry-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
}

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

.telemetry-value {
  font-family: var(--font-heading);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 4px;
}

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

.text-emerald { color: var(--emerald) !important; }
.text-amber { color: var(--amber) !important; }
.text-cyan { color: var(--cyan) !important; }
.text-purple { color: var(--purple) !important; }

/* Phone Mockup Preview */
.phone-mockup {
  width: 320px;
  background: #1E293B;
  border-radius: 40px;
  padding: 12px;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.25);
  border: 4px solid #334155;
}

.phone-screen {
  background: #0F172A;
  border-radius: 30px;
  padding: 16px;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  position: relative;
  background-image: linear-gradient(180deg, #1E1B4B 0%, #0F172A 100%);
}

.phone-notch {
  width: 100px;
  height: 18px;
  background: #000;
  border-radius: 0 0 12px 12px;
  margin: 0 auto 12px auto;
}

.phone-time {
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  color: #94A3B8;
  margin-bottom: 24px;
}

.phone-home-indicator {
  width: 100px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 2px;
  margin: auto auto 4px auto;
}

/* Mobile Notification Banner */
.mobile-notification-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-radius: 18px;
  padding: 14px 16px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  animation: notifPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes notifPop {
  from { opacity: 0; transform: translateY(-12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.notif-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.notif-app-icon {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  object-fit: cover;
}

.notif-app-info {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
}

.notif-app-name {
  font-weight: 700;
  color: #0F172A;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.notif-dot {
  color: #94A3B8;
}

.notif-time {
  color: #64748B;
}

.notif-title {
  font-size: 14px;
  font-weight: 700;
  color: #0F172A;
  margin: 0 0 4px 0;
  line-height: 1.3;
}

.notif-body {
  font-size: 12px;
  color: #334155;
  margin: 0;
  line-height: 1.4;
  word-break: break-word;
}

.notif-img-container {
  margin-top: 10px;
  border-radius: 12px;
  overflow: hidden;
  max-height: 140px;
}

.notif-media {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}

.input-sm {
  padding: 6px 12px;
  font-size: 12px;
}
