/* 
   Dynamic QR Code Generator Stylesheet
   Premium Glassmorphism / Dark Mode Theme
*/

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

:root {
  --font-heading: 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Outfit', sans-serif;

  /* Light Theme Color Palette */
  --bg-primary: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(15, 23, 42, 0.08);
  --glass-border-focus: rgba(99, 102, 241, 0.4);
  --glass-highlight: rgba(255, 255, 255, 0.8);

  --accent-indigo: #6366f1;
  --accent-purple: #a855f7;
  --accent-cyan: #0891b2;
  --accent-emerald: #059669;
  --accent-rose: #e11d48;
  --accent-amber: #d97706;

  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  
  --sidebar-width: 280px;
  --header-height: 80px;

  --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
}

body {
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.04) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(168, 85, 247, 0.04) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
  min-height: 100vh;
}

/* Scrollbars */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--accent-indigo);
}

a, button {
  font-family: inherit;
  color: inherit;
  text-decoration: none;
}

/* Glassmorphism Utilities */
.glass-panel {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  transition: var(--transition-smooth);
}

.glass-panel:hover {
  border-color: rgba(99, 102, 241, 0.15);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
}

/* ==========================================================================
   LOGIN SCREEN
   ========================================================================== */
.login-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 440px;
  padding: 40px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.75);
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.08);
  position: relative;
  overflow: hidden;
}

.login-card::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(99,102,241,0.03) 0%, transparent 60%);
  pointer-events: none;
}

.login-header {
  text-align: center;
  margin-bottom: 36px;
}

.login-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-purple));
  margin-bottom: 16px;
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.2);
}

.login-logo svg {
  width: 28px;
  height: 28px;
  color: white;
}

.login-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 700;
  background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.form-group {
  margin-bottom: 24px;
  position: relative;
}

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

.form-input-wrapper {
  position: relative;
}

.form-input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  transition: var(--transition-smooth);
}

.form-input {
  width: 100%;
  padding: 14px 16px 14px 44px;
  border-radius: 12px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.01);
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  transition: var(--transition-smooth);
}

.form-input:focus {
  outline: none;
  border-color: var(--accent-indigo);
  background: rgba(99, 102, 241, 0.02);
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
}

.form-input:focus + .form-input-icon {
  color: var(--accent-indigo);
}

.login-btn {
  width: 100%;
  padding: 14px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-purple));
  color: white;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-spring);
  box-shadow: 0 10px 25px rgba(99, 102, 241, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px rgba(99, 102, 241, 0.35);
}

.login-btn:active {
  transform: translateY(0);
}

.error-message {
  background: rgba(244, 63, 94, 0.08);
  border: 1px solid rgba(244, 63, 94, 0.2);
  border-radius: 12px;
  padding: 12px 16px;
  color: #fda4af;
  font-size: 0.875rem;
  margin-bottom: 20px;
  display: none;
  align-items: center;
  gap: 8px;
  animation: shake 0.5s ease-in-out;
}

/* ==========================================================================
   APP SHELL LAYOUT
   ========================================================================== */
.app-container {
  display: flex;
  min-height: 100vh;
}

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

.brand {
  height: var(--header-height);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 24px;
  border-bottom: 1px solid var(--glass-border);
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo svg {
  width: 20px;
  height: 20px;
  color: white;
}

.brand-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.brand-tag {
  font-size: 0.65rem;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  padding: 2px 6px;
  border-radius: 6px;
  font-weight: 600;
  margin-left: -4px;
  border: 1px solid rgba(99, 102, 241, 0.2);
}

.nav-list {
  list-style: none;
  padding: 24px 16px;
  flex: 1;
}

.nav-item {
  margin-bottom: 8px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition-smooth);
}

.nav-link:hover, .nav-item.active .nav-link {
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
}

.nav-item.active .nav-link {
  background: rgba(99, 102, 241, 0.08);
  color: #c7d2fe;
  border: 1px solid rgba(99, 102, 241, 0.1);
}

.nav-link svg {
  width: 20px;
  height: 20px;
}

.user-profile {
  padding: 20px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-purple), var(--accent-cyan));
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: white;
  font-size: 0.95rem;
}

.user-info {
  flex: 1;
  overflow: hidden;
}

.username {
  font-size: 0.85rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

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

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

/* Main Content Area */
.main-wrapper {
  flex: 1;
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.header {
  height: var(--header-height);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 9;
}

.page-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
}

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

.content-body {
  padding: 40px;
  flex: 1;
}

/* Buttons */
.btn-primary {
  padding: 10px 20px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--accent-indigo), var(--accent-purple));
  color: white;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-spring);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.2);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(99, 102, 241, 0.35);
}

.btn-secondary {
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid var(--glass-border);
  background: var(--glass-panel);
  color: var(--text-primary);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

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

/* ==========================================================================
   DASHBOARD STATS
   ========================================================================== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

.stat-card {
  padding: 24px;
  position: relative;
  overflow: hidden;
}

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

.stat-title {
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.stat-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-icon.blue {
  background: rgba(99, 102, 241, 0.1);
  color: var(--accent-indigo);
}
.stat-icon.purple {
  background: rgba(168, 85, 247, 0.1);
  color: var(--accent-purple);
}
.stat-icon.cyan {
  background: rgba(6, 182, 212, 0.1);
  color: var(--accent-cyan);
}

.stat-icon svg {
  width: 22px;
  height: 22px;
}

.stat-value {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.stat-meta {
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ==========================================================================
   SETTINGS COMPONENT
   ========================================================================== */
.settings-section {
  max-width: 600px;
  margin-bottom: 40px;
}

.settings-card {
  padding: 28px;
}

.settings-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.settings-desc {
  font-size: 0.875rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.settings-row {
  display: flex;
  gap: 12px;
}

/* ==========================================================================
   QR GRID & CARDS
   ========================================================================== */
.grid-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.grid-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
}

.qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.qr-card {
  padding: 24px;
  display: flex;
  flex-direction: column;
  position: relative;
}

.qr-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
}

.qr-card-title-group {
  flex: 1;
  overflow: hidden;
  margin-right: 8px;
}

.qr-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}

.qr-card-date {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.qr-badge {
  font-size: 0.7rem;
  background: rgba(16, 185, 129, 0.1);
  color: var(--accent-emerald);
  padding: 3px 8px;
  border-radius: 6px;
  font-weight: 600;
  border: 1px solid rgba(16, 185, 129, 0.15);
}

.qr-card-body {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.qr-card-preview-container {
  width: 102px;
  height: 102px;
  flex-shrink: 0;
  background: white;
  border-radius: 12px;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(0,0,0,0.06);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.qr-card-preview-container::after {
  content: '🔍';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-smooth);
  font-size: 1.25rem;
}

.qr-card-preview-container:hover::after {
  opacity: 1;
}



.qr-card-info {
  flex: 1;
  min-width: 0; /* Prevents text overflow in flex */
}

.qr-url-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.qr-url-value {
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 12px;
}

.qr-short-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.qr-short-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.015);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 4px 8px;
}

.qr-short-value {
  font-size: 0.8rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.qr-copy-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  transition: var(--transition-smooth);
}

.qr-copy-btn:hover {
  color: var(--accent-indigo);
  background: rgba(99, 102, 241, 0.08);
}

.qr-card-stats {
  border-top: 1px solid var(--glass-border);
  padding-top: 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.stat-item-icon {
  color: var(--accent-cyan);
  display: flex;
}

.stat-item-label {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.stat-item-count {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.qr-card-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}

.card-action-btn {
  flex: 1;
  padding: 8px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.01);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.card-action-btn:hover {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-primary);
}

.card-action-btn.delete:hover {
  background: rgba(244, 63, 94, 0.08);
  border-color: rgba(244, 63, 94, 0.2);
  color: #fda4af;
}

.card-action-btn.edit:hover {
  background: rgba(99, 102, 241, 0.08);
  border-color: rgba(99, 102, 241, 0.2);
  color: #c7d2fe;
}

.card-action-btn svg {
  width: 14px;
  height: 14px;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 80px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 440px;
  margin: 0 auto;
}

.empty-icon {
  width: 80px;
  height: 80px;
  border-radius: 24px;
  background: rgba(99, 102, 241, 0.05);
  color: var(--accent-indigo);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.empty-icon svg {
  width: 40px;
  height: 40px;
}

.empty-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.empty-desc {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 24px;
}

/* ==========================================================================
   MODALS / POPUPS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(15, 23, 42, 0.25);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.modal-content {
  width: 100%;
  max-width: 780px;
  background: #ffffff;
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  box-shadow: 0 30px 60px rgba(15, 23, 42, 0.12);
  display: flex;
  flex-direction: column;
  max-height: 85vh;
  transform: scale(0.95);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.modal-overlay.active .modal-content {
  transform: scale(1);
}

.modal-header {
  padding: 24px 32px;
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 6px;
  border-radius: 50%;
  transition: var(--transition-smooth);
}

.modal-close:hover {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
}

.modal-close svg {
  width: 20px;
  height: 20px;
}

.modal-body {
  padding: 32px;
  overflow-y: auto;
}

.modal-footer {
  padding: 20px 32px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

/* Create QR Modal specific layout (Split pane) */
.creator-split {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
}

.creator-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.creator-preview-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.01);
  border: 1px dashed var(--glass-border);
  border-radius: 16px;
  padding: 24px;
}

.qr-large-preview {
  width: 224px;
  height: 224px;
  background: white;
  border-radius: 16px;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  margin-bottom: 20px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}



.customization-section {
  margin-top: 8px;
}

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

/* Color input customization */
.color-picker-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.015);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  padding: 6px 12px;
}

.color-picker-input {
  border: none;
  background: none;
  width: 32px;
  height: 32px;
  cursor: pointer;
  border-radius: 6px;
}

.color-picker-text {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.select-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--glass-border);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 0.85rem;
  outline: none;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.select-input:focus {
  border-color: var(--accent-indigo);
}

/* Analytics Modal Layout */
.analytics-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 24px;
}

.chart-container {
  height: 240px;
  width: 100%;
  padding: 16px;
  background: rgba(255,255,255,0.01);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  position: relative;
}

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

.history-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--glass-border);
  font-size: 0.85rem;
}

.history-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.history-device {
  font-weight: 600;
}

.history-ip {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.history-time {
  color: var(--text-secondary);
}

/* Device Breakdown Bar */
.device-breakdown {
  margin-top: 16px;
}

.device-row {
  margin-bottom: 12px;
}

.device-row-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-bottom: 4px;
}

.device-bar-track {
  height: 6px;
  background: rgba(255,255,255,0.05);
  border-radius: 3px;
  overflow: hidden;
}

.device-bar-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--accent-cyan);
}

.device-bar-fill.ios { background: var(--accent-purple); }
.device-bar-fill.android { background: var(--accent-emerald); }
.device-bar-fill.desktop { background: var(--accent-indigo); }

/* ==========================================================================
   SCAN SIMULATOR PANEL
   ========================================================================== */
.simulator-panel {
  max-width: 500px;
  padding: 24px;
  text-align: center;
}

.simulator-info {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

.simulator-btn {
  width: 100%;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(6, 182, 212, 0.3);
  background: rgba(6, 182, 212, 0.1);
  color: var(--accent-cyan);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.simulator-btn:hover {
  background: rgba(6, 182, 212, 0.2);
  transform: translateY(-1px);
}

/* ==========================================================================
   KEYFRAME ANIMATIONS
   ========================================================================== */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

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

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

/* ==========================================================================
   RESPONSIVENESS (MOBILE/TABLET RULES)
   ========================================================================== */
@media (max-width: 1024px) {
  .app-container {
    flex-direction: column;
  }
  
  .sidebar {
    width: 100%;
    height: auto;
    position: relative;
    border-right: none;
    border-bottom: 1px solid var(--glass-border);
  }

  .nav-list {
    display: flex;
    padding: 10px 16px;
    margin: 0;
    overflow-x: auto;
  }

  .nav-item {
    margin-bottom: 0;
    margin-right: 8px;
    flex-shrink: 0;
  }

  .user-profile {
    display: none; /* Hide profile block on mobile sidebar */
  }

  .main-wrapper {
    margin-left: 0;
  }
  
  .header {
    padding: 0 20px;
  }

  .content-body {
    padding: 24px;
  }
}

@media (max-width: 768px) {
  .creator-split {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  
  .creator-preview-panel {
    order: -1; /* Place preview on top on mobile */
  }

  .analytics-grid {
    grid-template-columns: 1fr;
  }

  .settings-row {
    flex-direction: column;
  }
  
  .settings-row input {
    width: 100%;
  }

  .settings-row button {
    width: 100%;
  }
}
