/* ═══════════════════════════════════════════════════
   FlowLogic PRO — Design System v17.1
   © 2026 Tihomir Kolev | office@tngroup.eu
   ═══════════════════════════════════════════════════ */

/* ── CSS Variables ────────────────────────────────── */
:root {
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-card: #1e293b;
  --bg-card-hover: #283548;

  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-accent: #a5b4fc;

  --accent-primary: #6366f1;
  --accent-primary-hover: #4f46e5;
  --accent-gradient: linear-gradient(135deg, #6366f1, #8b5cf6);
  --accent-glow: rgba(99, 102, 241, 0.3);

  --success: #10b981;
  --success-bg: rgba(16, 185, 129, 0.1);
  --warning: #f59e0b;
  --warning-bg: rgba(245, 158, 11, 0.1);
  --danger: #ef4444;
  --danger-bg: rgba(239, 68, 68, 0.1);
  --info: #3b82f6;
  --info-bg: rgba(59, 130, 246, 0.1);

  --border: #334155;
  --border-light: #475569;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  --radius-full: 50%;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 30px var(--accent-glow);

  --sidebar-width: 260px;
  --topbar-height: 64px;
  --mobile-nav-height: 68px;

  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s ease;
  --transition-slow: 0.5s ease;

  --font: 'Inter', system-ui, -apple-system, sans-serif;
}

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

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

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

a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color var(--transition-fast);
}
a:hover { color: var(--text-accent); }

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

/* ── Splash Screen ───────────────────────────────── */
.splash-screen {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}
.splash-screen.hidden {
  opacity: 0;
  visibility: hidden;
}
.splash-content {
  text-align: center;
}
.splash-logo {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 20px;
}
.splash-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--bg-tertiary);
  border-top-color: var(--accent-primary);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.splash-text {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ── Logo ────────────────────────────────────────── */
.logo-flow { color: var(--text-primary); }
.logo-logic { color: var(--text-primary); }
.logo-pro { color: var(--accent-primary); font-weight: 900; }

/* ── Auth Screen ─────────────────────────────────── */
.auth-container {
  max-width: 440px;
  margin: 0 auto;
  padding: 40px 24px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-header {
  text-align: center;
  margin-bottom: 40px;
}
.auth-logo {
  font-size: 2rem;
  font-weight: 900;
}
.auth-subtitle {
  color: var(--text-secondary);
  margin-top: 8px;
  font-size: 0.95rem;
}
.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
}
.auth-trial-badge {
  background: var(--success-bg);
  color: var(--success);
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  margin-bottom: 24px;
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.auth-form {
  background: var(--bg-secondary);
  padding: 32px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 6px;
}
.form-group input, .form-group select {
  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: 0.95rem;
  transition: border-color var(--transition-fast);
  outline: none;
}
.form-group input:focus, .form-group select:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group input::placeholder {
  color: var(--text-muted);
}
.password-wrapper {
  position: relative;
}
.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  opacity: 0.6;
  transition: opacity var(--transition-fast);
}
.toggle-password:hover { opacity: 1; }

.auth-links {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
  font-size: 0.85rem;
}
.auth-message {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  text-align: center;
  animation: fadeIn 0.3s ease;
}
.auth-message.success {
  background: var(--success-bg);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}
.auth-message.error {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgba(239, 68, 68, 0.2);
}

/* ── Buttons ─────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all var(--transition-normal);
  text-decoration: none;
  white-space: nowrap;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  width: 100%;
}
.btn-primary:hover:not(:disabled) {
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}
.btn-primary:active:not(:disabled) {
  transform: scale(0.98);
}
.btn-outline {
  background: transparent;
  color: var(--accent-primary);
  border: 2px solid var(--accent-primary);
  width: 100%;
}
.btn-outline:hover:not(:disabled) {
  background: rgba(99, 102, 241, 0.1);
}
.btn-large {
  padding: 16px 32px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}
.btn-loader {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: var(--radius-full);
  animation: spin 0.6s linear infinite;
}
.btn-voice {
  background: var(--accent-gradient);
  color: #fff;
  width: 200px;
  height: 56px;
  border-radius: 28px;
  font-size: 1rem;
}
.btn-voice.recording {
  background: linear-gradient(135deg, #ef4444, #dc2626);
  animation: pulse 1.5s ease infinite;
}

@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 0 16px rgba(239, 68, 68, 0); }
}

/* ── Top Bar ─────────────────────────────────────── */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--topbar-height);
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  z-index: 100;
}
.top-bar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}
.top-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.hamburger {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}
.top-logo {
  font-size: 1.3rem;
  font-weight: 800;
}
.credits-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
}
.credits-icon { font-size: 1.1rem; }
.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
  transition: box-shadow var(--transition-fast);
}
.user-avatar:hover { box-shadow: var(--shadow-glow); }

/* ── Sidebar ─────────────────────────────────────── */
.sidebar {
  position: fixed;
  top: var(--topbar-height);
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 90;
  transition: transform var(--transition-normal);
}
.sidebar-nav {
  flex: 1;
  padding: 12px 8px;
  overflow-y: auto;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all var(--transition-fast);
  margin-bottom: 2px;
  text-decoration: none;
}
.nav-item:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
}
.nav-item.active {
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
}
.nav-icon { font-size: 1.15rem; }
.nav-label { font-size: 0.9rem; }
.nav-divider {
  height: 1px;
  background: var(--border);
  margin: 12px 16px;
}
.nav-logout { color: var(--danger); }
.nav-logout:hover { background: var(--danger-bg); color: var(--danger); }

.sidebar-footer {
  padding: 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.75rem;
  border-top: 1px solid var(--border);
}

.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 85;
}

/* ── Main Content ────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-width);
  margin-top: var(--topbar-height);
  padding: 32px;
  min-height: calc(100vh - var(--topbar-height));
}
.content-section {
  display: none;
  animation: fadeIn 0.3s ease;
}
.content-section.active { display: block; }

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

.section-header {
  margin-bottom: 32px;
}
.section-header h1 {
  font-size: 1.6rem;
  font-weight: 700;
}
.section-subtitle {
  color: var(--text-secondary);
  margin-top: 4px;
  font-size: 0.95rem;
}

/* ── Stats Grid ──────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all var(--transition-normal);
}
.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.stat-icon {
  font-size: 2rem;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-purple .stat-icon { background: rgba(99, 102, 241, 0.15); }
.stat-blue .stat-icon { background: rgba(59, 130, 246, 0.15); }
.stat-green .stat-icon { background: rgba(16, 185, 129, 0.15); }
.stat-orange .stat-icon { background: rgba(245, 158, 11, 0.15); }
.stat-value {
  font-size: 1.6rem;
  font-weight: 800;
}
.stat-label {
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* ── Quick Actions ───────────────────────────────── */
.quick-actions h3 {
  font-size: 1.1rem;
  margin-bottom: 16px;
}
.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}
.action-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
  color: var(--text-primary);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.action-card:hover {
  border-color: var(--accent-primary);
  background: var(--bg-card-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.action-icon { font-size: 2rem; }
.action-label { font-size: 0.9rem; font-weight: 500; }

/* ── Scan / Camera Section ───────────────────────── */
.scan-container {
  max-width: 800px;
}

/* Camera Viewfinder */
.camera-viewfinder {
  position: relative;
  width: 100%;
  min-height: 300px;
  max-height: 500px;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 2px solid var(--border);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.camera-placeholder {
  text-align: center;
  color: var(--text-muted);
  padding: 48px 24px;
}
.camera-big-icon {
  font-size: 4rem;
  display: block;
  margin-bottom: 16px;
  opacity: 0.7;
}
.camera-placeholder p {
  font-size: 1rem;
  margin-bottom: 4px;
}
.camera-placeholder small {
  font-size: 0.8rem;
  opacity: 0.6;
}
#camera-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-lg);
}
.scan-preview {
  max-width: 100%;
  max-height: 480px;
  border-radius: var(--radius-md);
  object-fit: contain;
}

/* Camera Buttons */
.camera-button-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}
.btn-camera {
  background: var(--accent-gradient);
  color: #fff;
  padding: 14px 28px;
  font-size: 1.05rem;
  border-radius: var(--radius-md);
}
.btn-camera:hover:not(:disabled) {
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}
.btn-snap {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  padding: 14px 32px;
  font-size: 1.2rem;
  border-radius: 50px;
  min-width: 140px;
}
.btn-snap:hover:not(:disabled) {
  box-shadow: 0 0 20px rgba(16, 185, 129, 0.3);
  transform: translateY(-2px);
}
.btn-file-fallback {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Scan Controls */
.scan-controls {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.model-select {
  display: flex;
  align-items: center;
  gap: 12px;
}
.model-select label {
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}
.model-select select {
  flex: 1;
  max-width: 300px;
  padding: 10px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  outline: none;
}
.model-select select:focus {
  border-color: var(--accent-primary);
}

/* Scan Status */
.scan-status {
  padding: 14px 20px;
  background: var(--info-bg);
  color: var(--info);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  margin-top: 12px;
  animation: fadeIn 0.3s ease;
}

/* Vault Badge */
.vault-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.2);
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--success);
  text-decoration: none;
  transition: all var(--transition-fast);
}
.vault-badge:hover {
  background: rgba(16, 185, 129, 0.25);
  color: var(--success);
}

/* Upload Area */
.upload-drop-area {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 48px 24px;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-normal);
}
.upload-drop-area:hover,
.upload-drop-area.dragover {
  border-color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.05);
}
.upload-placeholder {
  color: var(--text-secondary);
}
.upload-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 12px;
}
.upload-placeholder p { margin-bottom: 8px; }
.upload-placeholder small { color: var(--text-muted); font-size: 0.8rem; }

/* ── Result Container ────────────────────────────── */
.result-container {
  margin-top: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  animation: fadeIn 0.3s ease;
}
.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--bg-tertiary);
  border-bottom: 1px solid var(--border);
}
.result-header h3 {
  font-size: 0.95rem;
  font-weight: 600;
}
.model-badge {
  padding: 4px 12px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 600;
}
.result-content {
  padding: 20px;
  line-height: 1.7;
  color: var(--text-secondary);
  white-space: pre-wrap;
  font-size: 0.95rem;
  max-height: 500px;
  overflow-y: auto;
}
.result-footer {
  padding: 12px 20px;
  background: var(--success-bg);
  color: var(--success);
  font-size: 0.85rem;
  font-weight: 600;
  border-top: 1px solid rgba(16, 185, 129, 0.15);
}

/* ── Voice Section ───────────────────────────────── */
.voice-container {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}
.voice-visualizer {
  margin: 40px 0;
}
.voice-circle {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  border: 3px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  transition: all var(--transition-normal);
}
.voice-circle.active {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
  animation: pulse 1.5s ease infinite;
}
.voice-icon { font-size: 3rem; }
.voice-status {
  color: var(--text-secondary);
  font-size: 0.95rem;
}
.voice-controls {
  margin-bottom: 32px;
}
.voice-transcript {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  text-align: left;
  margin-bottom: 16px;
}
.voice-transcript h4 {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.voice-transcript p {
  color: var(--text-primary);
  font-size: 0.95rem;
}

/* ── Upload Section ──────────────────────────────── */
.upload-container {
  max-width: 600px;
}
.upload-file-info {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin: 16px 0;
  font-size: 0.9rem;
}
#upload-file-name { color: var(--text-primary); font-weight: 500; }
#upload-file-size { color: var(--text-muted); }

/* ── Profile Section ─────────────────────────────── */
.profile-container {
  max-width: 500px;
  margin: 0 auto;
}
.profile-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  text-align: center;
}
.profile-avatar-large {
  width: 80px;
  height: 80px;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.5rem;
  margin: 0 auto 16px;
}
.profile-info h2 {
  font-size: 1.3rem;
  margin-bottom: 4px;
}
.profile-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 12px;
}
.profile-plan-badge {
  display: inline-block;
  padding: 4px 16px;
  background: rgba(99, 102, 241, 0.15);
  color: var(--accent-primary);
  border-radius: 16px;
  font-size: 0.8rem;
  font-weight: 700;
  margin-bottom: 24px;
}
.profile-stats {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-bottom: 24px;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.profile-stat { text-align: center; }
.profile-stat-value {
  display: block;
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--text-primary);
}
.profile-stat-label {
  color: var(--text-secondary);
  font-size: 0.8rem;
  margin-top: 4px;
}

/* ── Payment / Plans ─────────────────────────────── */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}
.plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  position: relative;
  transition: all var(--transition-normal);
}
.plan-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.plan-card.featured {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-glow);
}
.plan-badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent-gradient);
  color: #fff;
  padding: 4px 16px;
  border-radius: 12px;
  font-size: 0.78rem;
  font-weight: 700;
}
.plan-header { text-align: center; margin-bottom: 24px; }
.plan-header h3 { font-size: 1.3rem; margin-bottom: 12px; }
.plan-price {
  font-size: 2.4rem;
  font-weight: 800;
}
.plan-price span {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--text-secondary);
}
.plan-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-top: 8px;
}
.plan-features {
  list-style: none;
  margin-bottom: 24px;
}
.plan-features li {
  padding: 6px 0;
  font-size: 0.9rem;
  color: var(--text-secondary);
}
.payment-secure {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}
.payment-secure strong { color: var(--success); }

/* ── Mobile Bottom Nav ───────────────────────────── */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--mobile-nav-height);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  z-index: 100;
}
.mobile-nav {
  display: none;
  justify-content: space-around;
  align-items: center;
  padding: 0 8px;
}
.mobile-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 12px;
  color: var(--text-muted);
  font-size: 1.2rem;
  text-decoration: none;
  cursor: pointer;
  transition: color var(--transition-fast);
  border-radius: var(--radius-sm);
}
.mobile-nav-item small {
  font-size: 0.65rem;
  font-weight: 500;
}
.mobile-nav-item.active { color: var(--accent-primary); }
.mobile-nav-item:hover { color: var(--text-primary); }

/* ── Toast ───────────────────────────────────────── */
.toast-container {
  position: fixed;
  top: 80px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.toast {
  padding: 14px 20px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: var(--shadow-md);
  animation: slideInRight 0.3s ease;
  max-width: 360px;
}
.toast.success {
  background: var(--success);
  color: #fff;
}
.toast.error {
  background: var(--danger);
  color: #fff;
}
.toast.info {
  background: var(--info);
  color: #fff;
}
.toast.hiding {
  animation: slideOutRight 0.3s ease forwards;
}

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

/* ── Responsive ──────────────────────────────────── */
@media (max-width: 768px) {
  .hamburger { display: block; }

  .sidebar {
    transform: translateX(-100%);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .sidebar-overlay.active {
    display: block;
  }

  .main-content {
    margin-left: 0;
    padding: 20px 16px;
    padding-bottom: calc(var(--mobile-nav-height) + 20px);
  }

  .mobile-nav {
    display: flex;
  }

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

  .section-header h1 {
    font-size: 1.3rem;
  }

  .profile-stats {
    gap: 24px;
  }

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

@media (max-width: 480px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .auth-container {
    padding: 20px 16px;
  }
  .auth-form {
    padding: 24px 20px;
  }
}

/* ── Efficiency Section ──────────────────────────── */
.efficiency-section {
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.4), rgba(15, 23, 42, 0.6));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 32px;
  box-shadow: var(--shadow-lg), 0 0 20px rgba(99, 102, 241, 0.05);
}

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

.efficiency-header h3 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.efficiency-badge {
  background: var(--accent-gradient);
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.efficiency-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px;
}

.efficiency-card {
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: transform 0.3s ease;
}

.efficiency-card:hover {
  transform: translateY(-2px);
  border-color: var(--border-light);
}

.efficiency-card.highlight {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(15, 23, 42, 0.4));
  border-color: rgba(16, 185, 129, 0.3);
}

.eff-icon {
  font-size: 1.8rem;
  opacity: 0.9;
}

.eff-content {
  display: flex;
  flex-direction: column;
}

.eff-value {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--text-primary);
}

.eff-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.efficiency-footer {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.efficiency-footer p {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-align: center;
}

.efficiency-footer a {
  font-weight: 600;
  color: var(--accent-primary);
}

.animate-in {
  animation: fadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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