:root {
  --bg: #fff8f3;
  --bg-elevated: rgba(255, 255, 255, 0.88);
  --text: #2a2118;
  --text-muted: #8a7560;
  --accent: #f57c00;
  --accent-hover: #e65100;
  --accent-soft: rgba(245, 124, 0, 0.12);
  --accent-glow: rgba(245, 124, 0, 0.22);
  --border: rgba(42, 33, 24, 0.1);
  --shadow: 0 10px 36px rgba(245, 124, 0, 0.1);
  --shadow-soft: 0 4px 18px rgba(42, 33, 24, 0.06);
  --radius: 20px;
  --radius-sm: 14px;
  --glass-blur: blur(20px) saturate(160%);
  --success: #2e9e4a;
  --delivery: #2e9e4a;
  --error: #e53935;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.2, 0.64, 1);
}

[data-theme="dark"] {
  --bg: #1a1410;
  --bg-elevated: rgba(38, 30, 24, 0.92);
  --text: #fff5eb;
  --text-muted: #b8a08a;
  --border: rgba(255, 235, 210, 0.12);
  --shadow: 0 10px 36px rgba(0, 0, 0, 0.45);
  --accent-soft: rgba(255, 167, 38, 0.18);
  --accent-glow: rgba(255, 167, 38, 0.28);
}

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

html {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: inherit;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  transition: background var(--transition), color var(--transition);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: radial-gradient(ellipse at 15% 0%, rgba(255, 183, 77, 0.22), transparent 55%),
              radial-gradient(ellipse at 85% 100%, rgba(255, 138, 0, 0.12), transparent 50%);
  pointer-events: none;
  z-index: -1;
}

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

.glass-card, .glass-header, .glass-footer {
  background: var(--bg-elevated);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.glass-header {
  position: sticky;
  top: 0;
  z-index: 100;
  border-radius: 0 0 var(--radius) var(--radius);
  margin-bottom: 24px;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 20px;
  flex-wrap: wrap;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}

.search-form { flex: 1; min-width: 160px; max-width: 360px; position: relative; }

.search-form--compact {
  flex: 0 1 280px;
  max-width: 280px;
}

.search-form--compact .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
}

.search-form input {
  width: 100%;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.search-form--compact input {
  padding: 8px 14px 8px 36px;
  font-size: 0.85rem;
  box-shadow: var(--shadow-soft);
}

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

.search-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 8px;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  max-height: 320px;
  overflow-y: auto;
  z-index: 50;
}

.search-dropdown a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
  transition: background 0.2s;
}

.search-dropdown a:hover {
  background: var(--accent-soft);
}

.search-dropdown a strong {
  font-size: 0.82rem;
  color: var(--accent);
  white-space: nowrap;
}

.page-header { margin-bottom: 28px; }
.page-subtitle { color: var(--text-muted); margin-top: 8px; }
.text-muted { color: var(--text-muted); }
.glass-inset {
  background: rgba(0, 0, 0, 0.03);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
[data-theme="dark"] .glass-inset { background: rgba(255, 255, 255, 0.04); }

body.modal-open { overflow: hidden; }
.promo-message { font-size: 0.85rem; margin: 8px 0; }
.promo-message.is-success { color: var(--success); }
.promo-message.is-error { color: var(--error); }
.btn.is-loading { opacity: 0.7; pointer-events: none; }

.nav-links { display: flex; align-items: center; gap: 16px; }
.nav-links a { color: var(--text); text-decoration: none; font-weight: 500; }
.cart-link { position: relative; }
.cart-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  background: var(--accent);
  color: #fff;
  font-size: 0.7rem;
  padding: 2px 6px;
  border-radius: 999px;
  min-width: 18px;
  text-align: center;
}

.theme-toggle, .mobile-menu-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  color: var(--text);
  font-size: 1.1rem;
}

.header-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  flex-shrink: 0;
}

.mobile-menu-btn { display: none; }

.breadcrumb {
  margin-bottom: 16px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.breadcrumb a {
  color: var(--accent);
  text-decoration: none;
}

.cart-page h1 {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.cart-delivery-notice {
  margin-bottom: 20px;
}

.delivery-zone-notice,
.field-hint,
.delivery-zone-footer {
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.delivery-zone-notice {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-soft), rgba(46, 158, 74, 0.08));
  border: 1px solid var(--border);
  color: var(--text);
  font-weight: 500;
  line-height: 1.45;
}

.cart-item-name {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.35;
  color: var(--text);
  text-decoration: none;
  flex: 1 1 180px;
  min-width: 0;
  word-break: break-word;
}

.cart-item-name:hover {
  color: var(--accent);
}

.cart-item-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.qty-minus,
.qty-plus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  padding: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  touch-action: manipulation;
  user-select: none;
}

.qty-minus:hover,
.qty-plus:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.qty-minus:disabled,
.qty-plus:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.cart-item-controls .qty-input {
  width: 56px;
  min-height: 40px;
  padding: 8px 4px;
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  -moz-appearance: textfield;
}

.cart-item-controls .qty-input::-webkit-outer-spin-button,
.cart-item-controls .qty-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.cart-item-controls .item-total {
  font-weight: 700;
  font-size: 1rem;
  min-width: 88px;
  text-align: right;
  white-space: nowrap;
}

.cart-remove {
  min-width: 40px;
  min-height: 40px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-muted);
  font-size: 1.1rem;
  cursor: pointer;
  font-family: inherit;
  touch-action: manipulation;
}

.cart-remove:hover {
  color: var(--error);
  background: rgba(229, 57, 53, 0.1);
}

.cart-summary p {
  font-size: 0.95rem;
  line-height: 1.5;
}

.promo-form {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}

.promo-form input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
}

.main-content { padding-bottom: 60px; animation: fadeIn 0.4s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.hero {
  margin: 0 20px 40px;
  border-radius: var(--radius);
  padding: 60px 40px;
  text-align: center;
}

.hero h1 { font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 16px; }
.hero p { color: var(--text-muted); margin-bottom: 24px; font-size: 1.1rem; }

.section { margin-bottom: 48px; }
.section-title { font-size: 1.5rem; margin-bottom: 24px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 999px;
  border: none;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.2;
  touch-action: manipulation;
  user-select: none;
  transition:
    transform 0.18s var(--spring),
    box-shadow 0.22s ease,
    background-color 0.22s ease,
    border-color 0.22s ease,
    color 0.22s ease;
  will-change: transform;
}

.btn:hover:not(:disabled):not(.is-loading) {
  transform: translateY(-1px) scale(1.02);
}

.btn:active:not(:disabled):not(.is-loading) {
  transform: translateY(0) scale(0.98);
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn:disabled,
.btn.is-loading {
  opacity: 0.72;
  cursor: not-allowed;
  transform: none;
  pointer-events: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 14px rgba(245, 124, 0, 0.25);
}

.btn-primary:hover:not(:disabled):not(.is-loading) {
  background: var(--accent-hover);
  box-shadow: 0 8px 24px var(--accent-glow);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--border);
}

.btn-ghost:hover:not(:disabled):not(.is-loading) {
  background: var(--accent-soft);
  border-color: var(--accent);
}

.btn-lg { padding: 16px 32px; font-size: 1.05rem; }
.btn-block { width: 100%; }
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
}

.category-card {
  padding: 24px 16px;
  text-align: center;
  border-radius: var(--radius-sm);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.2s;
}

.category-card:hover { transform: translateY(-4px); }

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

.product-card {
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.3s;
}

.product-card:hover { transform: translateY(-6px); }

.product-card-image {
  display: block;
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--border);
}

.product-card-image img { width: 100%; height: 100%; object-fit: cover; }

.badge.discount {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--error);
  color: #fff;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 700;
}

.product-card-body { padding: 16px; }
.product-category { font-size: 0.8rem; color: var(--text-muted); }
.product-card h3 { font-size: 1rem; margin: 8px 0; }
.product-card h3 a { color: var(--text); text-decoration: none; }
.delivery-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(46, 158, 74, 0.12);
  color: var(--delivery);
  font-size: 0.75rem;
  font-weight: 600;
  margin-bottom: 8px;
  border: 1px solid rgba(46, 158, 74, 0.25);
}
.delivery-badge-icon { display: flex; line-height: 0; }
.product-buy-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 16px 0;
}
.product-qty-control {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-elevated);
}
.product-qty-control button {
  width: 40px;
  height: 40px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 1.2rem;
  cursor: pointer;
}
.product-qty-control input {
  width: 48px;
  text-align: center;
  border: none;
  background: transparent;
  color: var(--text);
  font-weight: 600;
  font-family: inherit;
  font-size: 1rem;
  -moz-appearance: textfield;
}

.product-qty-control input::-webkit-outer-spin-button,
.product-qty-control input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.product-qty-control button {
  font-family: inherit;
  touch-action: manipulation;
}
.product-line-total {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--accent);
}
.checkout-page {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.checkout-page h1 { width: 100%; max-width: 560px; }
.checkout-form {
  width: 100%;
  max-width: 560px;
  padding: 28px 24px;
}
.checkout-form label {
  display: block;
  margin: 14px 0 6px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.checkout-form input,
.checkout-form textarea,
.checkout-form select {
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--bg-elevated);
  color: var(--text);
  font-family: inherit;
}
.checkout-total {
  margin: 20px 0;
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.flash-banner {
  margin: 0 auto 16px;
  max-width: 1200px;
  padding: 12px 18px;
  border-radius: var(--radius-sm);
  font-weight: 500;
}
.flash-banner.success { background: rgba(46, 158, 74, 0.15); color: var(--success); }
.flash-banner.info { background: var(--accent-soft); color: var(--accent-hover); }
.product-price { margin: 8px 0; }
.price-current { font-weight: 700; font-size: 1.1rem; }
.price-old { text-decoration: line-through; color: var(--text-muted); margin-left: 8px; font-size: 0.9rem; }
.stock.in-stock { color: var(--success); font-size: 0.85rem; }
.stock.out-stock { color: var(--error); font-size: 0.85rem; }
.product-card .btn { width: 100%; margin-top: 12px; }

.catalog-layout { display: grid; grid-template-columns: 260px 1fr; gap: 24px; }
.filters { padding: 24px; border-radius: var(--radius); }
.filters label { display: block; margin: 12px 0 6px; font-size: 0.85rem; color: var(--text-muted); }
.filters input, .filters select {
  width: 100%;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  margin-bottom: 8px;
}

.checkbox-label { display: flex !important; align-items: center; gap: 8px; }

.pagination { display: flex; gap: 8px; margin-top: 32px; flex-wrap: wrap; }
.pagination a {
  padding: 8px 14px;
  border-radius: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
}
.pagination a.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.product-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  padding: 32px;
  border-radius: var(--radius);
  margin-bottom: 40px;
}

.product-gallery-frame {
  max-height: min(400px, 50vh);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
}
.product-gallery-frame .main-image {
  width: 100%;
  max-height: min(400px, 50vh);
  height: auto;
  object-fit: contain;
  border-radius: var(--radius-sm);
}
.thumbs { display: flex; gap: 8px; margin-top: 12px; }
.thumb-btn {
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: none;
  cursor: pointer;
  flex: 0 0 auto;
}
.thumb-btn.active { border-color: var(--accent); }
.thumbs img, .thumb-btn img { width: 64px; height: 64px; object-fit: cover; border-radius: 6px; display: block; }
.thumbs img:hover, .thumb-btn:hover { border-color: var(--accent); }

#product-modal-overlay {
  z-index: 10000;
}
.product-quick-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 10001;
  width: min(920px, calc(100vw - 24px));
  max-height: min(90vh, 720px);
  overflow: auto;
  padding: 0;
}
.product-quick-body { padding: 24px 28px 28px; }
.product-quick-loading { text-align: center; padding: 48px; color: var(--text-muted); }
.product-quick-layout {
  display: grid;
  grid-template-columns: minmax(200px, 1fr) minmax(260px, 1.1fr);
  gap: 28px;
  align-items: start;
}
.product-quick-gallery {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  border-radius: var(--radius-sm);
  padding: 12px;
  min-height: 200px;
}
.product-quick-img {
  width: 100%;
  max-width: 360px;
  max-height: min(320px, 40vh);
  object-fit: contain;
  border-radius: var(--radius-sm);
}
.product-quick-info h2 { font-size: 1.35rem; margin: 8px 0; }
.product-quick-delivery {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(46, 158, 74, 0.12);
  color: var(--delivery);
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 8px;
}
.product-quick-category { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 8px; }
.product-quick-total-line { margin: 12px 0; font-size: 1.05rem; }
.product-quick-total { color: var(--accent); }
.product-quick-desc {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  max-height: 180px;
  overflow-y: auto;
}
.product-quick-info .btn-block { margin-top: 12px; }
.product-full-link { margin-top: 12px; display: inline-block; }
.product-summary-line { margin: 8px 0; }
.product-delivery-note { font-size: 0.85rem; margin-bottom: 12px; }
.product-desc-block { margin-top: 24px; }
.product-desc-title { font-size: 1.1rem; margin-bottom: 8px; }
.product-checkout-link { margin-top: 8px; }
.checkout-totals-breakdown p { margin: 6px 0; }

.product-price.large .price-current { font-size: 2rem; }
.qty-row { display: flex; gap: 12px; margin: 20px 0; }
.qty-row input { width: 80px; padding: 12px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: transparent; color: var(--text); }

.specs-table { width: 100%; margin-top: 20px; border-collapse: collapse; }
.specs-table th, .specs-table td { padding: 10px; border-bottom: 1px solid var(--border); text-align: left; }
.specs-table th { color: var(--text-muted); width: 40%; }

.cart-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; }
.cart-item { padding: 20px; margin-bottom: 12px; border-radius: var(--radius-sm); display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px; }
.cart-summary { padding: 24px; border-radius: var(--radius); position: sticky; top: 100px; }
.cart-summary h3 { margin-bottom: 16px; }
.total-line { font-size: 1.2rem; margin: 16px 0; }

.auth-card { max-width: 420px; margin: 40px auto; padding: 40px; border-radius: var(--radius); }
.auth-card input { width: 100%; padding: 14px; margin: 8px 0 16px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: transparent; color: var(--text); font-size: 1rem; }
.auth-message { margin-top: 16px; padding: 12px; border-radius: 8px; }
.auth-message.error { background: rgba(255, 59, 48, 0.15); color: var(--error); }
.auth-message.success { background: rgba(52, 199, 89, 0.15); color: var(--success); }

.account-layout { display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
.account-nav { padding: 20px; border-radius: var(--radius); display: flex; flex-direction: column; gap: 8px; }
.account-nav a { color: var(--text); text-decoration: none; padding: 10px; border-radius: 8px; }
.account-nav a.active { background: var(--accent); color: #fff; }

.profile-form, .checkout-form { padding: 32px; border-radius: var(--radius); max-width: 600px; }
.profile-form label, .checkout-form label { display: block; margin: 12px 0 6px; color: var(--text-muted); font-size: 0.9rem; }
.profile-form input, .profile-form textarea, .checkout-form input, .checkout-form textarea {
  width: 100%; padding: 12px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: transparent; color: var(--text); margin-bottom: 8px;
}

.order-card { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; padding: 20px; margin-bottom: 12px; border-radius: var(--radius-sm); text-decoration: none; color: var(--text); }
.status-new { color: var(--accent); }
.status-delivered { color: var(--success); }
.status-cancelled { color: var(--error); }

.glass-footer { margin-top: 60px; padding: 40px 0 20px; border-radius: var(--radius) var(--radius) 0 0; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 24px; margin-bottom: 24px; }
.footer-grid a { display: block; color: var(--text-muted); text-decoration: none; margin: 4px 0; }
.footer-copy { text-align: center; color: var(--text-muted); font-size: 0.85rem; padding-top: 20px; border-top: 1px solid var(--border); }

#toast-container { position: fixed; top: 80px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  backdrop-filter: var(--glass-blur);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  max-width: min(360px, calc(100vw - 40px));
}
.toast-visible { opacity: 1; transform: translateX(0); }
.toast-success { border-color: #34c759; background: rgba(52, 199, 89, 0.12); }
.toast-error { border-color: #ff3b30; background: rgba(255, 59, 48, 0.12); }
.toast-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.toast-success .toast-icon { background: #34c759; color: #fff; }
.toast-error .toast-icon { background: #ff3b30; color: #fff; }
.toast-text { font-size: 0.92rem; line-height: 1.35; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } }

.loader {
  position: fixed;
  bottom: 20px;
  right: 20px;
  inset: auto;
  width: auto;
  height: auto;
  background: transparent;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}
.loader { transition: opacity 0.2s ease, visibility 0.2s ease; }
.loader.hidden { opacity: 0; visibility: hidden; }
.loader-spinner {
  width: 48px; height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
}
.modal {
  position: fixed;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 201;
  padding: 32px;
  border-radius: var(--radius);
  max-width: 90vw;
  width: 480px;
}
.modal.hidden, .modal-overlay.hidden, .hidden { display: none !important; }
.modal-close { position: absolute; top: 12px; right: 16px; background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text); }

.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; }
.alert-success { background: rgba(52, 199, 89, 0.15); color: var(--success); }
.alert-error { background: rgba(255, 59, 48, 0.15); color: var(--error); }

.empty-state { text-align: center; padding: 60px 20px; }

/* Mobile/tablet: see assets/css/responsive.css */
