@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-primary: #070913;
  --bg-secondary: #0f1322;
  --bg-surface: rgba(18, 24, 43, 0.75);
  --bg-surface-hover: rgba(28, 36, 62, 0.85);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(0, 212, 255, 0.5);
  
  --accent-cyan: #00d4ff;
  --accent-blue: #3b82f6;
  --accent-purple: #8b5cf6;
  --accent-green: #10b981;
  --accent-rose: #f43f5e;
  --accent-amber: #f59e0b;

  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --shadow-glow: 0 0 25px rgba(0, 212, 255, 0.25);
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.5);
  --glass-blur: blur(16px);
  --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Outfit', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(0, 212, 255, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(139, 92, 246, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(59, 130, 246, 0.04) 0%, transparent 60%);
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-full);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 212, 255, 0.4);
}

/* Container */
.container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 24px;
}

/* Glassmorphic Panel */
.glass-panel {
  background: var(--bg-surface);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
}

/* Top Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 28px;
  margin-bottom: 32px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-glow);
}

.brand-icon svg {
  width: 26px;
  height: 26px;
  color: #fff;
}

.brand-text h1 {
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-text p {
  font-size: 0.75rem;
  color: var(--accent-cyan);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  border: none;
  outline: none;
  transition: var(--transition);
  text-decoration: none;
  font-family: inherit;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  color: #050b14;
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 212, 255, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
  border: 1px solid rgba(244, 63, 94, 0.3);
}

.btn-danger:hover {
  background: var(--accent-rose);
  color: white;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: var(--radius-sm);
}

/* Alerts / Banners */
.alert-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  color: #fde68a;
  font-size: 0.9rem;
}

.alert-banner code {
  background: rgba(0, 0, 0, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--accent-amber);
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 28px;
}

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

/* Accounts Section */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.badge-count {
  background: rgba(0, 212, 255, 0.15);
  color: var(--accent-cyan);
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 700;
}

/* Account Cards */
.accounts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.account-card {
  background: var(--bg-surface);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.account-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 212, 255, 0.3);
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

.account-card-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.account-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 1.1rem;
  color: white;
  position: relative;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.status-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  position: absolute;
  bottom: 0;
  right: 0;
  border: 2px solid var(--bg-secondary);
}

.status-dot.online {
  background-color: var(--accent-green);
  box-shadow: 0 0 8px var(--accent-green);
}

.status-dot.offline {
  background-color: var(--accent-rose);
}

.account-info h3 {
  font-size: 1.05rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 170px;
}

.account-username {
  font-size: 0.8rem;
  color: var(--accent-cyan);
  font-family: 'JetBrains Mono', monospace;
}

.account-details {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 16px;
  font-size: 0.85rem;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
}

.detail-row span:last-child {
  color: var(--text-primary);
  font-weight: 500;
}

.account-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  opacity: 0.4;
  color: var(--accent-cyan);
}

.empty-state h3 {
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 8px;
}

/* Add Account Panel */
.add-account-panel {
  padding: 24px;
  height: fit-content;
}

.tab-nav {
  display: flex;
  gap: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 5px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
}

.tab-btn {
  flex: 1;
  padding: 10px 8px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.tab-btn.active {
  background: var(--bg-surface-hover);
  color: var(--accent-cyan);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
  animation: fadeIn 0.3s ease-in-out;
}

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

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

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

.form-input, .form-textarea {
  width: 100%;
  padding: 12px 16px;
  background: rgba(10, 14, 26, 0.8);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-input:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.15);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.85rem;
}

.form-help {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 6px;
}

/* QR Code Box */
.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px 0;
}

.qr-box {
  background: #ffffff;
  padding: 16px;
  border-radius: var(--radius-lg);
  border: 4px solid rgba(0, 212, 255, 0.4);
  box-shadow: 0 0 35px rgba(0, 212, 255, 0.25), 0 10px 30px rgba(0, 0, 0, 0.5);
  position: relative;
  width: 270px;
  height: 270px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.qr-box:hover {
  transform: scale(1.02);
  box-shadow: 0 0 45px rgba(0, 212, 255, 0.35), 0 12px 35px rgba(0, 0, 0, 0.6);
}

.qr-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--radius-sm);
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.qr-box-expired-overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.88);
  backdrop-filter: blur(4px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  cursor: pointer;
  z-index: 10;
}

.qr-box-expired-overlay span {
  color: #f1f5f9;
  font-weight: 600;
  font-size: 0.95rem;
}

.qr-countdown {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  color: var(--accent-cyan);
  margin-bottom: 12px;
}

/* Wizard step visual */
.step-indicator {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 20px;
}

.step-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  transition: var(--transition);
}

.step-dot.active {
  background: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
}

/* Bulk Progress Box */
.bulk-status-box {
  margin-top: 18px;
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.bulk-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
}

.bulk-item-phone {
  font-family: 'JetBrains Mono', monospace;
}

.badge-status {
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

.badge-status.success {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-green);
}

.badge-status.waiting {
  background: rgba(0, 212, 255, 0.15);
  color: var(--accent-cyan);
}

.badge-status.error {
  background: rgba(244, 63, 94, 0.15);
  color: var(--accent-rose);
}

/* Auth Cards (Login & Register pages) */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 40px;
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header h2 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-top: 14px;
  margin-bottom: 6px;
}

.auth-footer {
  text-align: center;
  margin-top: 24px;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.auth-footer a {
  color: var(--accent-cyan);
  text-decoration: none;
  font-weight: 600;
}

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

/* Toasts */
#toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 9999;
}

.toast {
  padding: 14px 20px;
  border-radius: var(--radius-md);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  animation: slideIn 0.3s ease-out;
  min-width: 280px;
  max-width: 420px;
}

.toast.success {
  border-left: 4px solid var(--accent-green);
}
.toast.error {
  border-left: 4px solid var(--accent-rose);
}
.toast.info {
  border-left: 4px solid var(--accent-cyan);
}

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

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

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

/* Search & Filter Bar */
.accounts-filter-bar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.search-box {
  position: relative;
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
}

.search-icon {
  position: absolute;
  left: 12px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 8px 32px 8px 36px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.85rem;
  transition: var(--transition);
}

.search-input:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
}

.search-clear-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 4px;
}

.search-clear-btn:hover {
  color: var(--text-primary);
}

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

.filter-select {
  padding: 8px 12px;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  outline: none;
  transition: var(--transition);
}

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

.filter-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

/* Pagination Bar */
.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  margin-top: 16px;
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
}

.pagination-btn {
  min-width: 80px;
}

.pagination-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

.pagination-info {
  color: var(--text-secondary);
}

.pagination-info span {
  color: var(--text-primary);
  font-weight: 600;
}

.pagination-total {
  margin-left: 6px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

/* Quick Select Pills */
.btn-pill {
  padding: 3px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.75rem;
  cursor: pointer;
  transition: var(--transition);
}

.btn-pill:hover {
  background: rgba(0, 212, 255, 0.15);
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
}

/* ==========================================================================
   LUXURY DASHBOARD & RESPONSIVE SIDEBAR DRAWER STYLES
   ========================================================================== */

body.luxury-dashboard {
  background-color: #050711;
  background-image: 
    radial-gradient(circle at 0% 0%, rgba(0, 212, 255, 0.09) 0%, transparent 45%),
    radial-gradient(circle at 100% 100%, rgba(139, 92, 246, 0.09) 0%, transparent 45%),
    radial-gradient(circle at 50% 30%, rgba(59, 130, 246, 0.04) 0%, transparent 60%);
  min-height: 100vh;
  color: var(--text-primary);
}

.app-layout {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* --- Backdrop Overlay for Mobile Drawer --- */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 998;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* --- Luxury Sidebar Navigation --- */
.app-sidebar {
  width: 280px;
  min-width: 280px;
  background: rgba(10, 14, 28, 0.88);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border-right: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 999;
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-header {
  padding: 20px 20px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
}

.brand-icon-lux {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
  flex-shrink: 0;
}

.brand-icon-lux svg {
  width: 22px;
  height: 22px;
  color: #fff;
}

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

.brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.brand-badge-lux {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 1.2px;
  background: linear-gradient(90deg, rgba(0, 212, 255, 0.2), rgba(139, 92, 246, 0.2));
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 212, 255, 0.3);
  padding: 2px 6px;
  border-radius: 4px;
  width: fit-content;
  margin-top: 2px;
}

.sidebar-close-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
}

.sidebar-close-btn:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.08);
}

/* Sidebar Nav Items */
.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--text-muted);
  padding: 14px 12px 6px;
  text-transform: uppercase;
}

.nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: transparent;
  border: 1px solid transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
  text-align: left;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: rgba(255, 255, 255, 0.08);
  transform: translateX(3px);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(0, 212, 255, 0.16), rgba(59, 130, 246, 0.08));
  border-color: rgba(0, 212, 255, 0.35);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.15);
}

.nav-item.active .nav-icon {
  color: var(--accent-cyan);
  filter: drop-shadow(0 0 6px rgba(0, 212, 255, 0.6));
}

.nav-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: var(--text-secondary);
  transition: var(--transition);
}

.nav-text {
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-badge {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 9999px;
  background: rgba(0, 212, 255, 0.2);
  color: var(--accent-cyan);
  border: 1px solid rgba(0, 212, 255, 0.3);
}

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

.user-profile-lux {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px 12px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.user-avatar-lux {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.3);
  flex-shrink: 0;
}

.user-meta-lux {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.user-name-lux {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-badge-online {
  font-size: 0.68rem;
  color: var(--accent-green);
  font-weight: 500;
}

.logout-btn-lux {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: 6px;
  transition: var(--transition);
}

.logout-btn-lux:hover {
  color: var(--accent-rose);
  background: rgba(244, 63, 94, 0.12);
}

/* --- Main Workspace Layout --- */
.app-main {
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background: transparent;
}

/* Top Bar */
.app-topbar {
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(6, 8, 19, 0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  position: sticky;
  top: 0;
  z-index: 100;
}

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

.hamburger-btn {
  display: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}

.hamburger-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--accent-cyan);
}

.topbar-breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
}

.bc-root {
  color: var(--text-muted);
  font-weight: 500;
}

.bc-sep {
  color: rgba(255, 255, 255, 0.2);
}

.bc-current {
  color: var(--text-primary);
  font-weight: 600;
}

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

.gateway-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  padding: 5px 12px;
  border-radius: 9999px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--accent-green);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 10px var(--accent-green);
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.alert-banner-lux {
  background: rgba(245, 158, 11, 0.1);
  border-left: 4px solid var(--accent-amber);
  padding: 12px 24px;
  margin: 16px 32px 0;
  border-radius: var(--radius-sm);
  color: #fde68a;
  font-size: 0.88rem;
}

/* --- Viewport & View Panels --- */
.app-viewport {
  flex: 1;
  padding: 32px;
  max-width: 1440px;
  width: 100%;
  margin: 0 auto;
}

.view-panel {
  display: none;
  animation: fadeInView 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.view-panel.active {
  display: block;
}

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

.view-header-lux {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.view-heading {
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(to right, #fff, #94a3b8);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.view-subheading {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.view-actions-lux {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.badge-count-lux {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  background: rgba(0, 212, 255, 0.12);
  border: 1px solid rgba(0, 212, 255, 0.25);
  border-radius: 9999px;
  color: var(--accent-cyan);
}

/* --- Luxury Tool Cards (Studio Views) --- */
.tool-card-lux {
  max-width: 780px;
  margin: 0 auto;
  padding: 32px;
  background: var(--bg-surface);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.tool-card-lux::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent-cyan), var(--accent-purple), transparent);
}

.tool-header-lux {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 28px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.tool-icon-circle {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.35);
  flex-shrink: 0;
}

.tool-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.tool-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 3px;
}

.tool-body-lux {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

/* --- Responsive Media Queries (Mobile First & Tablet) --- */
@media (max-width: 992px) {
  .app-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    transform: translateX(-100%);
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
  }

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

  .sidebar-close-btn {
    display: block;
  }

  .hamburger-btn {
    display: flex;
  }

  .app-topbar {
    padding: 0 18px;
  }

  .app-viewport {
    padding: 20px 16px;
  }

  .alert-banner-lux {
    margin: 12px 16px 0;
  }

  .view-heading {
    font-size: 1.35rem;
  }

  .tool-card-lux {
    padding: 20px 16px;
  }

  .btn-text-desktop {
    display: none;
  }
}

@media (max-width: 600px) {
  .accounts-filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-controls {
    width: 100%;
    justify-content: space-between;
  }

  .filter-select {
    flex: 1;
  }

  .tool-header-lux {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }
}
