/* ================================
   AboVert — Design System v2
   ================================ */

/* ---------- Custom Properties ---------- */
:root {
  --bg-base: #0a0f1a;
  --bg-surface: #111827;
  --bg-card: #161f2e;
  --bg-elevated: #1e293b;
  --bg-input: rgba(255, 255, 255, 0.05);
  --bg-glass: rgba(17, 24, 39, 0.88);

  --border: rgba(148, 163, 184, 0.1);
  --border-hover: rgba(148, 163, 184, 0.18);
  --border-accent: rgba(52, 211, 153, 0.25);
  --border-accent-strong: rgba(52, 211, 153, 0.45);

  --text: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  --accent: #34d399;
  --accent-hover: #6ee7b7;
  --accent-dim: rgba(52, 211, 153, 0.1);
  --accent-glow: rgba(52, 211, 153, 0.15);
  --cyan: #22d3ee;
  --danger: #f87171;
  --warning: #fbbf24;
  --orange: #fb923c;
  --lime: #84cc16;

  --gradient: linear-gradient(135deg, #34d399, #06b6d4);

  --shadow-sm: 0 1px 4px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 24px rgba(52, 211, 153, 0.18);

  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-full: 9999px;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  display: block;
}

button,
input {
  font-family: inherit;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-hover);
}

::-webkit-scrollbar {
  width: 5px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(148, 163, 184, 0.15);
  border-radius: 3px;
}

/* ---------- Header ---------- */
.app-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 15, 26, 0.88);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: 60px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.logo-mark svg {
  width: 30px;
  height: 30px;
}

.logo-text {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.accent {
  color: var(--accent);
}

/* Desktop Nav */
.desktop-nav {
  display: none;
  align-items: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 4px;
}

.nav-link {
  padding: 8px 22px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s ease;
}

.nav-link:hover {
  color: var(--text);
}

.nav-link.active {
  background: var(--accent-dim);
  color: var(--accent);
}

/* Header Scan Button (desktop) */
.header-action-btn {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 9px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-accent);
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.header-action-btn:hover {
  background: var(--accent-dim);
  border-color: var(--border-accent-strong);
}

/* ---------- Main ---------- */
main {
  padding-top: 60px;
  padding-bottom: 100px;
  /* space for bottom nav on mobile */
  min-height: 100vh;
}

/* ---------- Pages ---------- */
.page {
  display: none;
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
  animation: pageIn 0.35s var(--ease) forwards;
}

.page.active {
  display: block;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.page-top {
  padding: 32px 0 8px;
}

.page-top h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-top p {
  color: var(--text-secondary);
  font-size: 14px;
  margin-top: 4px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  border-radius: var(--radius-md);
  padding: 12px 24px;
  transition: all 0.2s ease;
  cursor: pointer;
  border: none;
  outline: none;
  white-space: nowrap;
}

.btn-primary {
  background: var(--gradient);
  color: #0a0f1a;
  box-shadow: 0 2px 12px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 20px rgba(52, 211, 153, 0.25);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-hover);
}

.btn-outline:hover {
  border-color: var(--border-accent);
  background: var(--accent-dim);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  padding: 10px 16px;
}

.btn-ghost:hover {
  color: var(--text);
}

.btn-danger {
  background: rgba(248, 113, 113, 0.12);
  color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.2);
}

.btn-danger:hover {
  background: rgba(248, 113, 113, 0.18);
}

.btn-sm {
  padding: 8px 18px;
  font-size: 13px;
}

.btn-lg {
  padding: 14px 32px;
  font-size: 15px;
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  background: var(--bg-input);
  padding: 0;
}

.btn-icon:hover {
  color: var(--accent);
  border-color: var(--border-accent);
}

.link-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: none;
  cursor: pointer;
}

.link-btn:hover {
  color: var(--accent-hover);
}

/* ---------- HOME PAGE ---------- */
.home-hero {
  padding: 48px 0 40px;
}

.hero-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 6px 14px;
  background: var(--accent-dim);
  border: 1px solid rgba(52, 211, 153, 0.15);
  border-radius: var(--radius-full);
  margin-bottom: 20px;
}

.hero-heading {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.hero-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 28px;
  max-width: 420px;
}

/* Steps */
.home-steps {
  padding-bottom: 40px;
}

.section-heading {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 16px;
}

.steps-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.step-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  transition: border-color 0.2s ease;
}

.step-card:hover {
  border-color: var(--border-hover);
}

.step-num {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-dim);
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}

.step-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.step-card p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* Recent */
.home-recent {
  padding-bottom: 24px;
}

.section-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.section-row .section-heading {
  margin-bottom: 0;
}

.recent-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

/* Empty States */
.empty-state {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
}

.empty-icon {
  margin-bottom: 12px;
  opacity: 0.35;
}

.empty-state p {
  font-size: 14px;
}

/* ---------- SCAN PAGE ---------- */
.scan-upload-zone {
  margin-top: 20px;
  border: 2px dashed var(--border-hover);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.02);
  transition: all 0.3s ease;
}

.scan-upload-zone.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: scale(1.01);
}

.upload-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.upload-art {
  color: var(--text-muted);
  margin-bottom: 16px;
  opacity: 0.5;
}

.upload-main-text {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.upload-divider {
  font-size: 12px;
  color: var(--text-muted);
  margin: 12px 0 16px;
}

.upload-btns {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Preview */
.scan-preview {
  margin-top: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.preview-wrap {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: #000;
}

.preview-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Scan Animation */
.scan-animation {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scan-beam {
  position: absolute;
  left: 8%;
  right: 8%;
  height: 2px;
  background: var(--gradient);
  box-shadow: 0 0 16px var(--accent-glow), 0 0 40px rgba(52, 211, 153, 0.12);
  border-radius: 1px;
  animation: beamSweep 2s ease-in-out infinite;
}

@keyframes beamSweep {
  0% {
    top: 12%;
  }

  50% {
    top: 84%;
  }

  100% {
    top: 12%;
  }
}

.scan-corners {
  position: absolute;
  inset: 10%;
}

.scan-corners span {
  position: absolute;
  width: 20px;
  height: 20px;
  border-color: var(--accent);
  border-style: solid;
  border-width: 0;
}

.scan-corners span:nth-child(1) {
  top: 0;
  left: 0;
  border-top-width: 2.5px;
  border-left-width: 2.5px;
  border-radius: 4px 0 0 0;
}

.scan-corners span:nth-child(2) {
  top: 0;
  right: 0;
  border-top-width: 2.5px;
  border-right-width: 2.5px;
  border-radius: 0 4px 0 0;
}

.scan-corners span:nth-child(3) {
  bottom: 0;
  left: 0;
  border-bottom-width: 2.5px;
  border-left-width: 2.5px;
  border-radius: 0 0 0 4px;
}

.scan-corners span:nth-child(4) {
  bottom: 0;
  right: 0;
  border-bottom-width: 2.5px;
  border-right-width: 2.5px;
  border-radius: 0 0 4px 0;
}

.scan-label {
  position: relative;
  z-index: 2;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  background: rgba(0, 0, 0, 0.6);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-accent);
}

.preview-btns {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
}

.btn-analyze {
  flex: 1;
  max-width: 220px;
}

/* Scan Results */
.scan-results {
  margin-top: 20px;
  animation: pageIn 0.4s var(--ease) forwards;
}

.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
}

.result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 20px;
  border-bottom: 1px solid var(--border);
}

.result-name {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin-bottom: 2px;
}

.result-crop {
  font-size: 13px;
  color: var(--text-secondary);
}

.severity-badge {
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.severity-low {
  background: rgba(132, 204, 22, 0.12);
  color: var(--lime);
  border: 1px solid rgba(132, 204, 22, 0.25);
}

.severity-medium {
  background: rgba(250, 204, 21, 0.12);
  color: var(--warning);
  border: 1px solid rgba(250, 204, 21, 0.25);
}

.severity-high {
  background: rgba(251, 146, 60, 0.12);
  color: var(--orange);
  border: 1px solid rgba(251, 146, 60, 0.25);
}

.severity-critical {
  background: rgba(248, 113, 113, 0.12);
  color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.25);
}

.confidence-wrap {
  padding: 16px 20px;
}

.confidence-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.confidence-val {
  font-weight: 700;
  color: var(--accent);
}

.conf-bar {
  height: 5px;
  background: var(--bg-input);
  border-radius: 3px;
  overflow: hidden;
}

.conf-fill {
  height: 100%;
  background: var(--gradient);
  border-radius: 3px;
  transition: width 1.2s var(--ease);
  width: 0;
}

.result-body {
  padding: 0 20px 20px;
}

.result-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  margin-top: 20px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.result-label:first-child {
  margin-top: 0;
}

.result-text {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.result-list {
  list-style: none;
  padding: 0;
}

.result-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 6px;
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.symptom-list li::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 10px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--warning);
}

.treatment-list li::before {
  content: '✓';
  position: absolute;
  left: 2px;
  top: 0;
  color: var(--accent);
  font-weight: 700;
  font-size: 12px;
}

.result-footer {
  display: flex;
  gap: 10px;
  padding: 16px 20px;
  border-top: 1px solid var(--border);
}

.result-footer .btn {
  flex: 1;
}

/* Healthy */
.healthy-result {
  text-align: center;
  padding: 48px 24px;
}

.healthy-check {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 2px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  animation: popIn 0.5s var(--spring) forwards;
}

@keyframes popIn {
  from {
    transform: scale(0);
    opacity: 0;
  }

  to {
    transform: scale(1);
    opacity: 1;
  }
}

.healthy-check svg {
  color: var(--accent);
}

.healthy-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}

.healthy-desc {
  font-size: 14px;
  color: var(--text-secondary);
  max-width: 300px;
  margin: 0 auto;
}

/* ---------- LIBRARY PAGE ---------- */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin: 16px 0;
  transition: border-color 0.2s ease;
}

.search-bar:focus-within {
  border-color: var(--border-accent);
}

.search-bar svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-bar input {
  flex: 1;
  background: none;
  border: none;
  color: var(--text);
  font-size: 14px;
  outline: none;
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

/* Filter Chips */
.filter-row {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 16px;
  margin-bottom: 8px;
  scrollbar-width: none;
}

.filter-row::-webkit-scrollbar {
  display: none;
}

.chip {
  padding: 7px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-input);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s ease;
  cursor: pointer;
}

.chip:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

.chip.active {
  background: var(--accent-dim);
  border-color: var(--border-accent);
  color: var(--accent);
  font-weight: 600;
}

/* Library Grid */
.library-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.lib-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.lib-card:hover {
  border-color: var(--border-hover);
}

.lib-card:active {
  transform: scale(0.99);
}

.lib-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.lib-name {
  font-size: 15px;
  font-weight: 600;
}

.lib-crop {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.lib-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lib-expanded {
  display: none;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.lib-card.expanded .lib-expanded {
  display: block;
}

.lib-card.expanded .lib-desc {
  -webkit-line-clamp: unset;
}

/* ---------- HISTORY PAGE ---------- */
.history-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.history-card:hover {
  border-color: var(--border-hover);
}

.history-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--bg-elevated);
  flex-shrink: 0;
}

.history-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.history-info {
  flex: 1;
  min-width: 0;
}

.history-disease {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-meta {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---------- SETTINGS PAGE ---------- */
.settings-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  margin-top: 16px;
}

.settings-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}

.settings-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 14px;
}

.input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.input-row input {
  flex: 1;
  padding: 10px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.input-row input:focus {
  border-color: var(--border-accent);
}

.input-row input::placeholder {
  color: var(--text-muted);
}

.key-status {
  font-size: 12px;
  margin-top: 8px;
  min-height: 18px;
}

.key-status.success {
  color: var(--accent);
}

.key-status.error {
  color: var(--danger);
}

/* ---------- BOTTOM NAV ---------- */
.bottom-nav {
  position: fixed;
  bottom: 14px;
  left: 14px;
  right: 14px;
  z-index: 100;
  background: rgba(15, 20, 32, 0.94);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border-radius: 22px;
  border: 1px solid var(--border);
  padding: 6px 8px;
  display: flex;
  align-items: center;
  justify-content: space-around;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.bnav-item {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 2px;
  min-width: 0;
  border-radius: var(--radius-md);
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 500;
  transition: all 0.2s ease;
  background: none;
  border: none;
}

.bnav-item.active {
  color: var(--accent);
  background: var(--accent-dim);
}

.bnav-item svg {
  width: 20px;
  height: 20px;
}

/* Center Scan FAB */
.bnav-scan {
  position: relative;
  top: -18px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--gradient);
  border: 3px solid var(--bg-base);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0a0f1a;
  box-shadow: 0 4px 20px rgba(52, 211, 153, 0.3);
  transition: all 0.25s ease;
  flex-shrink: 0;
}

.bnav-scan:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 28px rgba(52, 211, 153, 0.4);
}

.bnav-scan:active {
  transform: scale(0.95);
}

.bnav-scan svg {
  width: 24px;
  height: 24px;
}

/* ---------- TOAST ---------- */
.toast {
  position: fixed;
  bottom: 110px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 500;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  opacity: 0;
  transition: all 0.35s var(--spring);
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  pointer-events: auto;
}

.toast-icon {
  font-size: 16px;
}

/* ---------- SPINNER ---------- */
.spinner {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* ---------- UTILITIES ---------- */
[hidden] {
  display: none !important;
}

/* ---------- RESPONSIVE ---------- */

/* Tablet+ */
@media (min-width: 640px) {
  .steps-row {
    grid-template-columns: repeat(3, 1fr);
  }

  .library-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .recent-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Desktop */
@media (min-width: 768px) {
  .desktop-nav {
    display: flex;
  }

  .header-action-btn {
    display: flex;
  }

  .header-inner {
    height: 64px;
  }

  main {
    padding-top: 64px;
    padding-bottom: 40px;
  }

  .bottom-nav {
    display: none;
  }

  .home-hero {
    padding: 64px 0 48px;
  }

  .hero-heading {
    font-size: 46px;
  }

  .page-top {
    padding: 40px 0 12px;
  }

  .page-top h1 {
    font-size: 30px;
  }

  .toast {
    bottom: 32px;
  }
}

/* Large Desktop */
@media (min-width: 1024px) {
  .hero-heading {
    font-size: 52px;
  }

  .home-hero {
    padding: 72px 0 56px;
  }
}