:root {
  --bg-deep: #030712;
  --bg-card: rgba(11, 19, 43, 0.45);
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-glow: rgba(37, 99, 235, 0.25);
  --accent: #06b6d4;
  --accent-hover: #0891b2;
  --accent-glow: rgba(6, 182, 212, 0.25);
  --success: #10b981;
  --success-glow: rgba(16, 185, 129, 0.2);
  --warning: #f59e0b;
  --danger: #ef4444;
  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --border: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(37, 99, 235, 0.5);
  --glass-bg: rgba(255, 255, 255, 0.02);
  --glass-border: rgba(255, 255, 255, 0.05);
  --font-display: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-mono: 'Space Grotesk', monospace;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-display);
}

body {
  background-color: var(--bg-deep);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(37, 99, 235, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(6, 182, 212, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(16, 185, 129, 0.03) 0%, transparent 60%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

.app-wrapper {
  max-width: 1280px;
  margin: 0 auto;
  padding: 2.5rem 1.5rem;
}

/* Glassmorphism Classes */
.glass-premium {
  background: var(--bg-card);
  backdrop-filter: blur(24px) saturate(120%);
  -webkit-backdrop-filter: blur(24px) saturate(120%);
  border: 1px solid var(--border);
  box-shadow: 
    0 4px 30px rgba(0, 0, 0, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.05);
  border-radius: 1.25rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Navigation bar styling */
.top-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  padding: 1.25rem 2rem;
}

.brand-sec {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-container {
  position: relative;
  width: 42px;
  height: 42px;
  background: rgba(37, 99, 235, 0.15);
  border-radius: 0.75rem;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid rgba(37, 99, 235, 0.3);
}

.brand-icon {
  font-size: 1.35rem;
  color: var(--accent);
  text-shadow: 0 0 12px var(--accent);
  z-index: 2;
}

.pulse-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 2px solid var(--accent);
  border-radius: 0.75rem;
  animation: pulse 2.5s infinite;
  opacity: 0;
  z-index: 1;
}

@keyframes pulse {
  0% {
    transform: scale(0.95);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.15);
    opacity: 0;
  }
  100% {
    transform: scale(0.95);
    opacity: 0;
  }
}

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

.brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, #ffffff 0%, #a1a1aa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-family: var(--font-mono);
}

.brand-status {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.status-dot {
  width: 6px;
  height: 6px;
  background-color: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--success);
  display: inline-block;
}

.vertical-divider {
  width: 1px;
  height: 24px;
  background-color: var(--border);
}

.nav-shortcut-btn {
  background: transparent;
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  color: var(--text-main);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s;
}

.nav-shortcut-btn:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--accent);
  color: var(--accent);
}

.user-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.04);
  padding: 0.4rem 1rem;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-logout-icon {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.15rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-logout-icon:hover {
  color: var(--danger);
  transform: scale(1.1);
}

/* Tabs Panel */
.tab-nav {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 2rem;
  padding: 0.35rem;
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border);
  border-radius: 0.85rem;
}

.tab-btn {
  flex: 1;
  padding: 0.85rem 1.5rem;
  border-radius: 0.65rem;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
}

.tab-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
  background: rgba(37, 99, 235, 0.15);
  border: 1px solid rgba(37, 99, 235, 0.25);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.tab-btn i {
  font-size: 0.95rem;
  opacity: 0.85;
}

.tab-btn.active i {
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent);
}

.tab-content {
  display: none;
  animation: slideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

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

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

/* Cards & Layout */
.card {
  padding: 2.25rem;
}

.container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.compose-header, .tab-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1.5rem;
}

.compose-header h2, .tab-header h2 {
  font-size: 1.35rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Section Title decoration */
.section-title {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin: 2.25rem 0 1.25rem 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--border) 0%, transparent 100%);
}

/* Input Fields & Textareas */
.input-group {
  margin-bottom: 1.25rem;
}

.form-grid-three {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.form-grid-two {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.label-spintax {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.spintax-indicator {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  background: rgba(6, 182, 212, 0.1);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
}

.input-field-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-field-wrapper i {
  position: absolute;
  left: 1rem;
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
}

.input-field-wrapper input {
  padding-left: 2.5rem;
}

input, textarea {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.85rem 1rem;
  color: var(--text-main);
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

input:focus, textarea:focus {
  outline: none;
  border-color: var(--border-focus);
  background: rgba(0, 0, 0, 0.4);
  box-shadow: 0 0 0 4px var(--primary-glow);
}

.textarea-wrapper {
  position: relative;
}

textarea {
  min-height: 120px;
  line-height: 1.6;
  resize: vertical;
}

.body-editor-wrapper textarea {
  min-height: 220px;
  font-family: inherit;
}

small {
  display: block;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Custom pills for send mode selection */
.data-source-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.data-source-header label {
  margin-bottom: 0;
}

.toggle-mode-pills {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  padding: 0.2rem;
  border-radius: 0.5rem;
}

.pill-option {
  position: relative;
  cursor: pointer;
  margin-bottom: 0;
}

.pill-option input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.pill-option span {
  display: inline-block;
  padding: 0.3rem 0.85rem;
  font-size: 0.75rem;
  font-weight: 700;
  border-radius: 0.35rem;
  color: var(--text-muted);
  transition: all 0.2s;
}

.pill-option input:checked + span {
  background: var(--primary);
  color: #fff;
}

/* File upload zone */
.file-upload-dropzone {
  border: 2px dashed var(--border);
  border-radius: 0.75rem;
  padding: 2rem 1.5rem;
  text-align: center;
  background: rgba(255, 255, 255, 0.01);
  cursor: pointer;
  position: relative;
  transition: all 0.2s;
}

.file-upload-dropzone:hover {
  border-color: var(--accent);
  background: rgba(6, 182, 212, 0.02);
}

.upload-icon {
  font-size: 2.25rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
  display: block;
}

.file-upload-dropzone:hover .upload-icon {
  color: var(--accent);
}

.upload-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: block;
}

.file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.file-success-message {
  color: var(--success);
  font-weight: 700;
  margin-top: 0.5rem;
}

/* Buttons styling */
.btn {
  padding: 0.85rem 1.5rem;
  border-radius: 0.75rem;
  font-weight: 700;
  font-size: 0.875rem;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-hover) 100%);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.1);
}

.btn-glow:hover {
  box-shadow: 0 0 15px var(--primary-glow);
}

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

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hover) 100%);
  color: #fff;
}

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

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.75rem;
  border-radius: 0.5rem;
}

.btn-launch {
  font-size: 1rem;
  padding: 1.15rem 2rem;
  flex: 1;
}

.form-action-bar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 0.75rem;
}

/* Execution Layout */
.execution-panel {
  display: flex;
  gap: 1.5rem;
  align-items: center;
  margin-top: 2rem;
}

.deliverability-card {
  padding: 0.85rem 1.5rem;
  border-radius: 0.75rem;
  min-width: 200px;
}

.deliverability-metrics {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.metric {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 700;
}

.metric-label {
  color: var(--text-muted);
}

.reputation-bar {
  width: 100%;
  height: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 99px;
  overflow: hidden;
}

.reputation-fill {
  height: 100%;
  background: var(--success);
  box-shadow: 0 0 8px var(--success);
}

/* Live Progress log */
.live-progress-container {
  margin-top: 2.5rem;
  border-top: 1px solid var(--border);
  padding-top: 2rem;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-meta h3 {
  font-size: 0.95rem;
  font-weight: 700;
}

#progress-percent {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent);
}

.progress-bar-track {
  width: 100%;
  height: 8px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 99px;
  margin: 1rem 0;
  overflow: hidden;
}

.progress-bar-fill {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent) 0%, var(--primary) 100%);
  border-radius: 99px;
  transition: width 0.4s ease;
}

.progress-controls {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

#progress-text {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.btn-stop {
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
  padding: 0.35rem 0.85rem;
  border-radius: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  transition: all 0.2s;
}

.btn-stop:hover {
  background: rgba(239, 68, 68, 0.1);
}

.logs-container {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.logs-header {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.02);
  padding: 0.5rem 1rem;
  border-bottom: 1px solid var(--border);
}

.logs-body {
  height: 160px;
  overflow-y: auto;
  padding: 0.85rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 1.6;
}

.log-entry {
  margin-bottom: 0.35rem;
  color: var(--text-muted);
}

.log-entry.success {
  color: var(--success);
}

.log-entry.error {
  color: var(--danger);
}

.log-entry.info {
  color: var(--accent);
}

/* Settings columns */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
}

.settings-column {
  display: flex;
  flex-direction: column;
}

.column-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.5rem;
}

.column-title i {
  color: var(--accent);
}

.custom-file-upload {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.15);
  border-radius: 0.75rem;
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.2s;
  position: relative;
}

.custom-file-upload:hover {
  border-color: var(--accent);
  background: rgba(6, 182, 212, 0.02);
  color: #fff;
}

.file-input-inline {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.asset-preview-box {
  margin-top: 0.75rem;
  max-width: 160px;
  max-height: 80px;
  overflow: hidden;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  display: none;
}

.asset-preview-box img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.checkbox-wrapper {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.checkbox-label {
  margin-bottom: 0;
  cursor: pointer;
}

/* Switch Toggle Slider */
.switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 22px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.08);
  transition: .3s;
  border-radius: 34px;
  border: 1px solid var(--border);
}

.slider:before {
  position: absolute;
  content: "";
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background-color: var(--text-muted);
  transition: .3s;
  border-radius: 50%;
}

.switch input:checked + .slider {
  background-color: var(--primary);
  border-color: rgba(255, 255, 255, 0.05);
}

.switch input:checked + .slider:before {
  transform: translateX(22px);
  background-color: #fff;
}

.settings-footer {
  display: flex;
  gap: 1rem;
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding-top: 1.5rem;
}

.btn-save {
  width: auto;
}

/* Batch Card & Grid */
.templates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.batch-card {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

.batch-card:hover {
  background: rgba(255, 255, 255, 0.02);
  border-color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.batch-title {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
}

.batch-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.batch-preview {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.batch-actions {
  display: flex;
  gap: 0.5rem;
}

.batch-actions button {
  flex: 1;
}

/* Campaign Intel / Stats cards */
.stats-cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.stat-card {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.75rem 1.5rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.stat-icon-wrapper {
  width: 48px;
  height: 48px;
  border-radius: 0.75rem;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.25rem;
}

.stat-icon-wrapper.blue-glow {
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
  border: 1px solid rgba(37, 99, 235, 0.2);
}

.stat-icon-wrapper.sky-glow {
  background: rgba(6, 182, 212, 0.1);
  color: var(--accent);
  border: 1px solid rgba(6, 182, 212, 0.2);
}

.stat-icon-wrapper.emerald-glow {
  background: rgba(16, 185, 129, 0.1);
  color: var(--success);
  border: 1px solid rgba(16, 185, 129, 0.2);
}

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

.stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.stat-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin-top: 0.15rem;
}

/* Overlay & Overlays cards styling */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(2, 6, 23, 0.85);
  backdrop-filter: blur(20px);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 10000;
}

.auth-card, .preview-card, .library-card, .guide-card {
  width: 90%;
  max-width: 440px;
  padding: 3rem;
}

.preview-card {
  max-width: 650px;
}

.library-card {
  max-width: 850px;
}

.guide-card {
  max-width: 650px;
}

.preview-header, .library-header, .guide-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.close-overlay-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  cursor: pointer;
  transition: all 0.2s;
}

.close-overlay-btn:hover {
  color: var(--danger);
}

.preview-content-box {
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
}

.preview-meta-fields {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
}

.meta-label {
  color: var(--text-muted);
  font-weight: 700;
  margin-right: 0.5rem;
}

.preview-html-viewport {
  max-height: 380px;
  overflow-y: auto;
  line-height: 1.6;
  font-size: 0.875rem;
}

/* Guide content layout */
.guide-scrollable-body {
  max-height: 420px;
  overflow-y: auto;
}

.guide-block {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}

.guide-block:last-child {
  border-bottom: none;
  padding-bottom: 0;
  margin-bottom: 0;
}

.guide-block h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.guide-block h4 i {
  color: var(--accent);
}

.guide-block p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.guide-block code {
  background: rgba(255, 255, 255, 0.05);
  padding: 0.1rem 0.3rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 0.75rem;
}

/* Authentication card */
.auth-logo {
  position: relative;
  width: 60px;
  height: 60px;
  background: rgba(37, 99, 235, 0.1);
  border-radius: 1rem;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 auto 1.5rem auto;
  border: 1px solid rgba(37, 99, 235, 0.25);
}

.auth-logo i {
  font-size: 1.85rem;
  color: var(--accent);
  text-shadow: 0 0 10px var(--accent);
  z-index: 2;
}

.logo-glow-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 1rem;
  box-shadow: 0 0 20px rgba(6, 182, 212, 0.2);
  z-index: 1;
}

.auth-card h2 {
  text-align: center;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.auth-subtitle {
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
  margin-bottom: 2rem;
}

#auth-toggle {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 1.5rem;
}

#auth-toggle a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 700;
}

#auth-toggle a:hover {
  text-decoration: underline;
}

/* Text glow utilities */
.text-glow-blue {
  text-shadow: 0 0 10px rgba(37, 99, 235, 0.4);
}
.text-glow-sky {
  color: var(--accent);
  text-shadow: 0 0 10px rgba(6, 182, 212, 0.4);
}
.text-glow-green {
  color: var(--success);
  text-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
}

/* Toast System */
#toast-container {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.toast {
  background: rgba(11, 19, 43, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  padding: 1rem 1.5rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: 0 10px 25px rgba(0,0,0,0.5);
  animation: toastIn 0.3s cubic-bezier(0.18, 0.89, 0.32, 1.28) forwards;
}

.toast.success i {
  color: var(--success);
  text-shadow: 0 0 8px var(--success);
}

.toast.error i {
  color: var(--danger);
  text-shadow: 0 0 8px var(--danger);
}

.toast.info i {
  color: var(--accent);
  text-shadow: 0 0 8px var(--accent);
}

.toast span {
  font-size: 0.85rem;
  font-weight: 600;
}

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

/* Template Library grid */
.library-list-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1.25rem;
  max-height: 480px;
  overflow-y: auto;
  padding-right: 0.5rem;
}

.lib-template-card {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.lib-template-card:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--accent);
  transform: translateY(-1px);
}

.lib-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.35rem;
}

.lib-subject {
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 0.75rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lib-preview {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
  height: 4.5em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

/* Responsiveness overrides */
@media (max-width: 992px) {
  .settings-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .form-grid-three {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .form-grid-two {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .stats-cards-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}
