/* BlackBay Mail - Premium Dark Theme */

:root {
  --bg-primary: #0a0a0b;
  --bg-secondary: #111113;
  --bg-card: #16161a;
  --bg-hover: #1e1e24;
  --bg-active: #252530;

  --text-primary: #fafafa;
  --text-secondary: #a1a1aa;
  --text-muted: #52525b;

  --accent: #6366f1;
  --accent-hover: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.3);

  --success: #10b981;
  --danger: #ef4444;
  --warning: #f59e0b;
  --info: #3b82f6;

  --border: #27272a;
  --border-light: #3f3f46;

  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 16px;

  --sidebar-width: 260px;
  --header-height: 60px;

  --shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.5);

  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

/* Utility Classes */
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.small { font-size: 13px; }
.hidden { display: none !important; }

/* ==================== AUTH SCREEN ==================== */
.auth-screen {
  display: none;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 20px;
  position: relative;
}

.auth-screen.active {
  display: flex;
}

.auth-bg {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at 20% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 50%),
    var(--bg-primary);
  z-index: -1;
  animation: bgPulse 20s ease infinite;
}

@keyframes bgPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.8; }
}

.auth-container {
  width: 100%;
  max-width: 440px;
  animation: fadeUp 0.5s ease;
}

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

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

.auth-logo {
  margin-bottom: 20px;
}

.logo-icon-large {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
  border-radius: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  box-shadow: 0 10px 40px var(--accent-glow);
}

.auth-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
}

.auth-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
}

/* Auth Box */
.auth-box {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}

.auth-footer {
  text-align: center;
  color: var(--text-secondary);
  font-size: 14px;
}

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

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

.register-section {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  animation: fadeUp 0.3s ease;
}

.register-section.active {
  display: block;
}

.auth-back {
  text-align: center;
  margin-top: 20px;
}

.auth-back a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
}

/* Auth Tabs */
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 20px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-primary);
  border: 1px solid var(--border);
}

.auth-tab {
  flex: 1;
  padding: 12px 16px;
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.auth-tab:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
}

.auth-tab.active {
  background: var(--accent);
  color: white;
}

.auth-tab-content {
  display: none;
}

.auth-tab-content.active {
  display: block;
}

/* ==================== FORM ELEMENTS ==================== */
.form-group {
  margin-bottom: 18px;
}

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

.form-group input,
.form-group textarea,
.form-group select,
.select-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  transition: var(--transition);
}

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

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-actions {
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.form-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Amount Presets */
.amount-presets {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.preset-btn {
  padding: 8px 16px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
}

.preset-btn:hover {
  background: var(--bg-active);
  border-color: var(--accent);
}

/* ==================== BUTTONS ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
  color: white;
  box-shadow: 0 4px 15px var(--accent-glow);
}

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

.btn-secondary {
  background: var(--bg-hover);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

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

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

.btn-danger:hover {
  background: #dc2626;
}

.btn-success {
  background: var(--success);
  color: white;
}

.btn-success:hover {
  background: #059669;
}

.btn-full { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 13px; }
.btn-lg { padding: 16px 32px; font-size: 16px; }

.btn-icon {
  padding: 10px;
  background: transparent;
  border: 1px solid var(--border);
}

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

.btn-icon.btn-sm {
  padding: 6px 10px;
}

/* ==================== MAIN APP LAYOUT ==================== */
.main-app {
  display: none;
  min-height: 100vh;
}

.main-app.active {
  display: flex;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  position: fixed;
  left: 0;
  top: 0;
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

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

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
}

.sidebar-close {
  display: none;
  position: absolute;
  right: 16px;
  top: 20px;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 28px;
  cursor: pointer;
}

/* Sidebar Navigation */
.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 24px;
}

.nav-section-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0 12px;
  margin-bottom: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: var(--radius-sm);
  margin-bottom: 4px;
  transition: var(--transition);
  position: relative;
}

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

.nav-item.active {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.15) 0%, transparent 100%);
  color: var(--accent);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 20px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.nav-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.nav-badge {
  margin-left: auto;
  padding: 2px 8px;
  background: var(--accent);
  color: white;
  font-size: 11px;
  font-weight: 600;
  border-radius: 10px;
  display: none;
}

.admin-section {
  display: none;
}

.admin-section.visible {
  display: block;
}

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

.user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
}

.user-info {
  flex: 1;
  min-width: 0;
}

.user-name {
  display: block;
  font-weight: 500;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

/* Mobile Header */
.mobile-header {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  padding: 0 16px;
  align-items: center;
  z-index: 90;
}

.menu-btn {
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  padding: 8px;
}

.mobile-logo {
  flex: 1;
  text-align: center;
  font-weight: 600;
}

.mobile-balance {
  font-size: 14px;
  font-weight: 600;
}

/* Main Content */
.main-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 32px;
  min-height: 100vh;
  background: var(--bg-primary);
}

/* Views */
.view {
  display: none;
  animation: fadeIn 0.3s ease;
}

.view.active {
  display: block;
}

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

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

.view-header h1 {
  font-size: 26px;
  font-weight: 600;
}

.view-subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

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

.section-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  margin-top: 32px;
}

/* ==================== CARDS ==================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 24px;
  overflow: hidden;
}

.card-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}

.card-header h2 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
}

.card-header p {
  font-size: 13px;
  color: var(--text-muted);
}

.card-body {
  padding: 24px;
}

.card-desc {
  font-weight: 500;
  margin-bottom: 4px;
}

/* ==================== STATS GRID ==================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}

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

.stat-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
}

.stat-icon.blue { background: rgba(59, 130, 246, 0.15); }
.stat-icon.green { background: rgba(16, 185, 129, 0.15); }
.stat-icon.purple { background: rgba(139, 92, 246, 0.15); }
.stat-icon.orange { background: rgba(245, 158, 11, 0.15); }

.stat-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
}

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

/* ==================== QUICK ACTIONS ==================== */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 32px;
}

.quick-action-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: var(--transition);
}

.quick-action-card:hover {
  border-color: var(--accent);
  background: var(--bg-hover);
}

.quick-action-icon {
  font-size: 32px;
}

.quick-action-content {
  flex: 1;
}

.quick-action-content h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.quick-action-content p {
  font-size: 13px;
  color: var(--text-muted);
}

.quick-action-arrow {
  font-size: 20px;
  color: var(--text-muted);
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

.pricing-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.pricing-item:last-child {
  border-bottom: none;
}

/* ==================== API KEY ==================== */
.api-key-display {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-top: 12px;
}

.api-key-display code {
  flex: 1;
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 14px;
  color: var(--accent);
  word-break: break-all;
}

.api-key-buttons {
  display: flex;
  gap: 8px;
}

.api-key-box {
  padding: 20px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.api-key-box.large {
  padding: 24px;
  text-align: center;
}

.api-key-box.large code {
  font-size: 18px;
}

.api-key-box code {
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 14px;
  color: var(--accent);
  word-break: break-all;
}

.api-key-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.api-warning {
  margin-top: 20px;
  padding: 12px 16px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: var(--radius-sm);
}

.api-warning p {
  color: var(--danger);
  font-size: 13px;
}

.api-url-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.api-url-box code {
  flex: 1;
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 14px;
  color: var(--success);
}

/* ==================== MY EMAILS GRID ==================== */
.emails-container {
  margin-top: 8px;
}

.emails-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 20px;
}

.emails-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 20px;
}

.email-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  transition: var(--transition);
}

.email-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.1);
}

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

.email-card-icon {
  width: 52px;
  height: 52px;
  background: linear-gradient(135deg, var(--accent) 0%, #8b5cf6 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
  box-shadow: 0 4px 15px var(--accent-glow);
}

.email-card-info {
  flex: 1;
  min-width: 0;
}

.email-card-address {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
  word-break: break-all;
}

.email-card-domain {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.email-card-stats {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}

.email-stat {
  flex: 1;
  text-align: center;
}

.email-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.email-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.email-card-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 4px;
}

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

.email-card-locked {
  font-size: 12px;
  color: var(--success);
}

.email-card-stat {
  text-align: center;
  flex: 1;
}

.email-card-stat .stat-number {
  display: block;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.email-card-stat .stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.email-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.email-card-actions .btn {
  flex: 1;
  min-width: fit-content;
}

.email-card-actions .btn-secondary {
  background: rgba(99, 102, 241, 0.1);
  border-color: rgba(99, 102, 241, 0.3);
  color: var(--accent);
}

.email-card-actions .btn-secondary:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--accent);
}

/* ==================== CREATE EMAIL ==================== */
.create-email-container {
  max-width: 600px;
  margin: 0 auto;
}

.create-email-card {
  margin-bottom: 0;
}

.balance-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  font-size: 14px;
}

.cost-badge {
  margin-left: auto;
  padding: 4px 12px;
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 500;
}

.email-input-row {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.email-name-input {
  flex: 1;
  border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important;
  border-right: none !important;
}

.email-at {
  padding: 12px 12px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-left: none;
  border-right: none;
  color: var(--text-muted);
  font-size: 14px;
  display: flex;
  align-items: center;
}

.domain-selector {
  flex: 1;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  border-left: none;
  overflow: hidden;
}

.domain-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-hover);
  cursor: pointer;
  transition: var(--transition);
}

.domain-option:first-child {
  border-bottom: 1px solid var(--border);
}

.domain-option:hover:not(.disabled) {
  background: var(--bg-active);
}

.domain-option.selected {
  background: rgba(99, 102, 241, 0.15);
  border-color: var(--accent);
}

.domain-option.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.domain-name {
  font-size: 14px;
  font-weight: 500;
}

.domain-status {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
}

.domain-status.available {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.domain-status.soon {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

/* Email Input Split Layout */
.email-input-split {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.email-name-section {
  flex: 1;
}

.email-name-section input {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm) !important;
  border-right: none !important;
  height: 100%;
}

.email-domain-section {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.domain-select {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  display: none;
}

.domain-select-dropdown {
  flex: 1;
  padding: 12px 16px;
  background: var(--bg-hover);
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23a1a1aa' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
}

.domain-select-dropdown:focus {
  outline: none;
  border-color: var(--accent);
}

.domain-select-dropdown option {
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 12px;
}

.domain-select-dropdown option:disabled {
  color: var(--danger);
}

.domain-badges {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-left: none;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  overflow: hidden;
}

.domain-badge {
  padding: 12px 16px;
  background: var(--bg-hover);
  cursor: pointer;
  transition: var(--transition);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.domain-badge:last-child {
  border-bottom: none;
}

.domain-badge:hover:not(.soon) {
  background: var(--bg-active);
}

.domain-badge.selected {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent);
  font-weight: 500;
}

.domain-badge.soon {
  opacity: 0.7;
  cursor: not-allowed;
  color: var(--text-muted);
}

.soon-tag {
  background: var(--danger);
  color: white;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 700;
  margin-left: 8px;
}

.email-preview {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 24px;
  margin-top: 16px;
}

.preview-label {
  font-size: 13px;
  color: var(--text-muted);
}

.preview-email {
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 14px;
  color: var(--accent);
}

/* ==================== MESSAGES LIST ==================== */
.messages-list {
  min-height: 200px;
}

.message-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}

.message-item:last-child {
  border-bottom: none;
}

.message-item:hover {
  background: var(--bg-hover);
}

.message-item.unread {
  background: rgba(99, 102, 241, 0.05);
}

.message-item.unread .message-subject {
  font-weight: 600;
}

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

.message-content {
  flex: 1;
  min-width: 0;
}

.message-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 4px;
}

.message-from {
  font-weight: 500;
  font-size: 14px;
}

.message-date {
  color: var(--text-muted);
  font-size: 12px;
}

.message-subject {
  font-size: 14px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.message-preview {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Message Detail */
.message-detail-header {
  padding: 24px;
  border-bottom: 1px solid var(--border);
}

.message-detail-subject {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 16px;
}

.message-detail-meta {
  display: flex;
  align-items: center;
  gap: 14px;
}

.message-detail-body {
  padding: 24px;
  min-height: 300px;
  line-height: 1.8;
  white-space: pre-wrap;
}

/* ==================== DEPOSITS ==================== */
.deposit-details {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.deposit-success {
  text-align: center;
  margin-bottom: 24px;
}

.success-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

.deposit-success h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.deposit-amount-box {
  padding: 24px;
  background: var(--bg-primary);
  border: 2px solid var(--success);
  border-radius: var(--radius);
  margin-bottom: 20px;
  text-align: center;
}

.deposit-amount-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.deposit-usd-big {
  font-size: 32px;
  font-weight: 700;
  color: var(--success);
}

.deposit-equals {
  font-size: 24px;
  color: var(--text-muted);
}

.deposit-ltc-big {
  font-size: 28px;
  font-weight: 600;
  color: var(--warning);
}

.deposit-copy-btns {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.deposit-amount-usd {
  font-size: 28px;
  font-weight: 700;
  color: var(--success);
  margin-bottom: 8px;
}

.deposit-amount-ltc {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.deposit-info-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.deposit-rate {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: right;
}

.deposit-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.deposit-address-box {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.deposit-address-box code {
  flex: 1;
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 13px;
  color: var(--text-primary);
  word-break: break-all;
}

.deposit-warning {
  padding: 12px 16px;
  background: rgba(245, 158, 11, 0.1);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}

.deposit-warning p {
  color: var(--warning);
  font-size: 13px;
}

.deposit-expires,
.deposit-usd {
  font-size: 13px;
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 8px;
}

/* Deposits Table */
.deposits-table-container {
  overflow-x: auto;
}

.deposits-table {
  width: 100%;
  border-collapse: collapse;
}

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

.deposits-table th {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
}

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

/* Status Badge */
.status-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  text-transform: capitalize;
}

.status-pending {
  background: rgba(245, 158, 11, 0.15);
  color: var(--warning);
}

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

.status-rejected,
.status-expired {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

/* ==================== API DOCS ==================== */
.docs-features {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.docs-feature {
  padding: 12px 16px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  font-size: 14px;
}

.code-block {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  overflow-x: auto;
}

.code-block pre {
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.endpoint {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-primary);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.endpoint:last-child {
  margin-bottom: 0;
}

.endpoint-method {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  min-width: 70px;
  text-align: center;
}

.endpoint-method.get {
  background: rgba(16, 185, 129, 0.15);
  color: var(--success);
}

.endpoint-method.post {
  background: rgba(59, 130, 246, 0.15);
  color: var(--info);
}

.endpoint-method.delete {
  background: rgba(239, 68, 68, 0.15);
  color: var(--danger);
}

.endpoint-path {
  font-family: 'Monaco', 'Consolas', monospace;
  font-size: 14px;
  color: var(--accent);
  flex: 1;
}

.endpoint-desc {
  font-size: 13px;
  color: var(--text-muted);
}

/* ==================== SETTINGS ==================== */
.account-info-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

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

.account-info-item:last-child {
  border-bottom: none;
}

.account-info-item label {
  font-weight: 500;
}

.account-info-value {
  display: flex;
  align-items: center;
  gap: 12px;
}

.account-info-value input {
  width: 200px;
  padding: 8px 12px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 14px;
}

/* ==================== DELETE MODAL ==================== */
.delete-confirm-body {
  padding: 20px 0;
  text-align: center;
}

.delete-warning-text {
  font-size: 16px;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.delete-warning-text strong {
  color: var(--accent);
}

.delete-warning-sub {
  font-size: 14px;
  color: var(--danger);
}

/* ==================== ADMIN TABLE ==================== */
.admin-table-container {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
}

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

.admin-table th {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.admin-table tbody tr:hover {
  background: var(--bg-hover);
}

/* ==================== EMPTY STATE ==================== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
}

.empty-state.small {
  padding: 40px 20px;
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.6;
}

.empty-state h3 {
  font-size: 18px;
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 14px;
  margin-bottom: 20px;
}

/* ==================== MODAL ==================== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
}

.modal-content {
  position: relative;
  width: 100%;
  max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  animation: modalIn 0.3s ease;
}

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

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

.modal-header h2 {
  font-size: 18px;
}

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

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

/* ==================== TOAST ==================== */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.toast {
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 12px;
  animation: toastIn 0.3s ease;
  min-width: 280px;
}

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

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

/* ==================== RESPONSIVE ==================== */
@media (max-width: 1200px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .quick-actions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  .emails-grid {
    grid-template-columns: 1fr;
  }
}

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

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

  .sidebar-close {
    display: block;
  }

  .mobile-header {
    display: flex;
  }

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

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

  .stat-card {
    padding: 16px;
  }

  .stat-icon {
    width: 44px;
    height: 44px;
    font-size: 20px;
  }

  .stat-value {
    font-size: 22px;
  }

  .quick-actions-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .view-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .header-actions {
    width: 100%;
  }

  .email-input-row {
    flex-direction: column;
  }

  .email-name-input {
    border-radius: var(--radius-sm) !important;
    border-right: 1px solid var(--border) !important;
  }

  .email-at {
    display: none;
  }

  .domain-selector {
    border-radius: var(--radius-sm);
    border-left: 1px solid var(--border);
    margin-top: 12px;
  }

  .endpoint {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .email-input-split {
    flex-direction: column;
  }

  .email-name-section input {
    border-radius: var(--radius-sm) !important;
    border-right: 1px solid var(--border) !important;
  }

  .email-at {
    display: none;
  }

  .email-domain-section {
    margin-top: 12px;
  }

  .domain-badges {
    border-radius: var(--radius-sm);
    border-left: 1px solid var(--border);
  }

  .emails-list {
    grid-template-columns: 1fr;
  }

  .email-card-actions {
    flex-direction: column;
  }

  .email-card-actions .btn {
    width: 100%;
  }

  .deposit-amount-main {
    flex-direction: column;
    gap: 8px;
  }

  .deposit-equals {
    display: none;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-active);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-light);
}

/* Selection */
::selection {
  background: var(--accent);
  color: white;
}
