/* Nails21 B2B Catalog - Light/Dark Theme + Responsive */

/* ========== THEME VARIABLES ========== */

/* Dark theme (default) */
:root,
[data-theme="dark"] {
  --bg-primary: #0e1117;
  --bg-secondary: #1a1d24;
  --bg-card: #262730;
  --bg-sidebar: #14171f;
  --text-primary: #fafafa;
  --text-secondary: #b0b0b0;
  --text-muted: #6b6b6b;
  --border: #333640;
  --accent-red: #ff4b4b;
  --accent-green: #00c853;
  --warning-bg: #3d3d00;
  --warning-border: #8b8b00;
  --success-bg: #003d00;
  --success-border: #00c853;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --overlay: rgba(0, 0, 0, 0.6);
  --scrollbar-track: #0e1117;
  --scrollbar-thumb: #333640;
  --btn-primary-text: #000;
}

/* Light theme */
[data-theme="light"] {
  --bg-primary: #f5f5f5;
  --bg-secondary: #ffffff;
  --bg-card: #f0f0f0;
  --bg-sidebar: #fafafa;
  --text-primary: #1a1a1a;
  --text-secondary: #555555;
  --text-muted: #999999;
  --border: #ddd;
  --accent-red: #e53935;
  --accent-green: #2e7d32;
  --warning-bg: #fff8e1;
  --warning-border: #f9a825;
  --success-bg: #e8f5e9;
  --success-border: #2e7d32;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  --overlay: rgba(0, 0, 0, 0.4);
  --scrollbar-track: #f5f5f5;
  --scrollbar-thumb: #ccc;
  --btn-primary-text: #fff;
}

/* System preference detection (only when no manual choice) */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg-primary: #f5f5f5;
    --bg-secondary: #ffffff;
    --bg-card: #f0f0f0;
    --bg-sidebar: #fafafa;
    --text-primary: #1a1a1a;
    --text-secondary: #555555;
    --text-muted: #999999;
    --border: #ddd;
    --accent-red: #e53935;
    --accent-green: #2e7d32;
    --warning-bg: #fff8e1;
    --warning-border: #f9a825;
    --success-bg: #e8f5e9;
    --success-border: #2e7d32;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --overlay: rgba(0, 0, 0, 0.4);
    --scrollbar-track: #f5f5f5;
    --scrollbar-thumb: #ccc;
    --btn-primary-text: #fff;
  }
}

/* ========== RESET ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family:
    "Source Sans Pro",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  transition:
    background 0.3s,
    color 0.3s;
}

/* ========== THEME TOGGLE ========== */
.theme-toggle {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  flex-shrink: 0;
}

.theme-toggle:hover {
  background: var(--border);
}

/* ========== SIDEBAR ========== */
.sidebar {
  width: 260px;
  min-height: 100vh;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  padding: 20px 16px;
  position: fixed;
  top: 0;
  left: 0;
  overflow-y: auto;
  z-index: 200;
  transition:
    transform 0.3s ease,
    background 0.3s;
}

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

.sidebar-header h2 {
  font-size: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar-close {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 22px;
  cursor: pointer;
}

.sidebar-section {
  margin-bottom: 20px;
}

.sidebar-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.sidebar-value {
  font-size: 28px;
  font-weight: 700;
}

.sidebar-value.red {
  color: var(--accent-red);
}
.sidebar-value.green {
  color: var(--accent-green);
}

.sidebar-subtotal {
  font-size: 16px;
  color: var(--text-secondary);
}

.sidebar-discount-label {
  color: var(--accent-green) !important;
}

.sidebar-discount {
  font-size: 16px;
  color: var(--accent-green);
  font-weight: 600;
}

.tier-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  background: var(--bg-card);
  border: 1px solid var(--border);
  margin: 8px 0;
  width: 100%;
  text-align: center;
}

/* Buttons */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 14px;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
  margin-bottom: 8px;
  transition: background 0.2s;
}

.btn:hover {
  background: var(--border);
}

.btn-primary {
  background: var(--accent-green);
  color: var(--btn-primary-text);
  border-color: var(--accent-green);
  font-weight: 600;
}

.btn-primary:hover {
  filter: brightness(0.9);
}

.btn-danger {
  border-color: var(--accent-red);
  color: var(--accent-red);
}

.btn-danger:hover {
  background: rgba(255, 75, 75, 0.15);
}

.sidebar hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0;
}

.sidebar select,
.sidebar input[type="text"] {
  width: 100%;
  padding: 8px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  margin-top: 4px;
}

.sidebar select:focus,
.sidebar input[type="text"]:focus {
  border-color: var(--accent-red);
}

/* Mobile sidebar overlay */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 199;
}

/* Mobile cart FAB */
.mobile-cart-fab {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 150;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--accent-green);
  color: var(--btn-primary-text);
  border: none;
  font-size: 24px;
  cursor: pointer;
  box-shadow: var(--shadow);
  align-items: center;
  justify-content: center;
}

.mobile-cart-fab .fab-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--accent-red);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ========== MAIN CONTENT ========== */
.main {
  margin-left: 260px;
  flex: 1;
  padding: 20px 30px;
  min-height: 100vh;
  transition: margin 0.3s;
}

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

.logo-text {
  font-size: 36px;
  font-weight: 300;
  letter-spacing: 4px;
  text-align: center;
  flex: 1;
}

.logo-img {
  display: block;
  max-width: 25%;
  margin: 0 auto;
  flex: 1;
}

[data-theme="dark"] .logo-img {
  filter: invert(1);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .logo-img {
    filter: invert(1);
  }
}

/* Menu accordion */
.menu-toggle {
  width: 100%;
  padding: 10px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}

.menu-toggle:hover {
  background: var(--bg-card);
}

.menu-content {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 16px;
  display: none;
}

.menu-content.open {
  display: block;
}

.menu-tabs {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  flex-wrap: wrap;
}

.menu-tab {
  background: none;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 14px;
  padding-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.menu-tab.active {
  color: var(--accent-red);
  border-bottom: 2px solid var(--accent-red);
}

.menu-select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  margin-top: 6px;
}

.menu-select:focus {
  border-color: var(--accent-red);
}

.menu-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 2px;
}

/* ========== TIER STATUS BAR ========== */
.tier-status {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 14px 20px;
  margin-bottom: 16px;
}

.tier-status-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
  gap: 8px;
}

.tier-status-name {
  font-weight: 600;
  font-size: 15px;
}

.tier-status-total {
  font-size: 14px;
  color: var(--text-secondary);
}

.tier-progress {
  width: 100%;
  height: 6px;
  background: var(--bg-card);
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 10px;
}

.tier-progress-bar {
  height: 100%;
  border-radius: 3px;
  transition:
    width 0.4s ease,
    background 0.4s;
  min-width: 2px;
}

.tier-warning {
  background: var(--warning-bg);
  border: 1px solid var(--warning-border);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tier-warning strong {
  color: var(--text-primary);
}

.tier-warning.tier-success {
  background: var(--success-bg);
  border-color: var(--success-border);
}

/* ========== PAGINATION ========== */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 20px;
}

.pagination button {
  flex: 1;
  padding: 10px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s;
}

.pagination button:hover:not(:disabled) {
  background: var(--bg-card);
}

.pagination button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.pagination .page-info {
  flex: 2;
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
  padding: 10px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* ========== PRODUCT GRID ========== */
.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.product-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition:
    border-color 0.2s,
    box-shadow 0.2s;
}

.product-card:hover {
  border-color: var(--text-muted);
  box-shadow: var(--shadow);
}

.product-card.in-cart {
  border-color: var(--accent-green);
}

.product-img {
  width: 120px;
  height: 120px;
  object-fit: contain;
  margin-bottom: 12px;
  border-radius: 4px;
}

.product-name {
  font-size: 13px;
  font-weight: 500;
  text-align: center;
  margin-bottom: 8px;
  min-height: 36px;
  display: flex;
  align-items: center;
}

.product-price-wrap {
  margin-bottom: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-height: 38px;
  justify-content: flex-end;
}

.product-price-original {
  font-size: 12px;
  color: var(--text-muted);
  text-decoration: line-through;
}

.product-price-final {
  font-size: 14px;
  color: var(--text-secondary);
}

.product-price-final.has-discount {
  color: var(--accent-green);
  font-weight: 600;
}

/* Quantity selector */
.qty-selector {
  display: flex;
  align-items: center;
  gap: 0;
  width: 100%;
}

.qty-selector input {
  flex: 1;
  text-align: center;
  padding: 8px 4px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  border-left: none;
  border-right: none;
  -moz-appearance: textfield;
}

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

.qty-selector button {
  padding: 8px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-primary);
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s;
}

.qty-selector button:first-child {
  border-radius: 6px 0 0 6px;
}
.qty-selector button:last-child {
  border-radius: 0 6px 6px 0;
}
.qty-selector button:hover {
  background: var(--border);
}

/* ========== CART ITEMS (in menu) ========== */
.cart-items {
  max-height: 300px;
  overflow-y: auto;
}

.cart-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}

.cart-item-name {
  flex: 1;
  margin-right: 10px;
}
.cart-item-qty {
  color: var(--text-secondary);
  margin-right: 10px;
}

.cart-item-remove {
  background: none;
  border: none;
  color: var(--accent-red);
  cursor: pointer;
  font-size: 16px;
}

.cart-empty {
  color: var(--text-muted);
  font-size: 13px;
  text-align: center;
  padding: 20px;
}

/* ========== MODAL ========== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 600px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
}

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

.modal-header h3 {
  font-size: 18px;
}

.modal-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 24px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.modal-close:hover {
  background: var(--bg-card);
  color: var(--text-primary);
}

.modal-body .form-group {
  margin-bottom: 16px;
}

.modal-body label {
  display: block;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 4px;
  font-weight: 500;
}

.modal-body input[type="text"],
.modal-body input[type="number"],
.modal-body select {
  width: 100%;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
}

.modal-body input:focus,
.modal-body select:focus {
  border-color: var(--accent-red);
}

.modal-body .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

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

.modal-footer .btn {
  width: auto;
  margin-bottom: 0;
}

/* Image upload area in modal */
.img-upload-area {
  display: flex;
  align-items: center;
  gap: 16px;
}

.img-upload-preview {
  width: 100px;
  height: 100px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.img-upload-controls {
  flex: 1;
}

.img-upload-controls input[type="file"] {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ========== ESTADO INDICATOR (SIDEBAR) ========== */

.sidebar-estado {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 16px;
}

.sidebar-estado-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.sidebar-estado-value {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-red);
}

.sidebar-estado-change {
  margin-left: auto;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.sidebar-estado-change:hover {
  border-color: var(--accent-red);
  color: var(--accent-red);
}

/* ========== ESTADO PICKER MODAL ========== */

.estado-picker-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 32px;
}

.estado-picker-header {
  text-align: center;
  margin-bottom: 24px;
}

.estado-picker-header img {
  margin-bottom: 16px;
}

.estado-picker-header h2 {
  font-size: 20px;
  margin-bottom: 6px;
  color: var(--text-primary);
}

.estado-picker-header p {
  font-size: 14px;
  color: var(--text-secondary);
}

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

.estado-picker-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
}

.estado-picker-btn:hover {
  border-color: var(--accent-red);
  background: var(--bg-primary);
  transform: translateY(-1px);
}

.estado-picker-sigla {
  font-weight: 700;
  font-size: 16px;
  color: var(--accent-red);
  min-width: 28px;
}

.estado-picker-nome {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ========== ORDER SUMMARY MODAL ========== */

.order-summary-modal {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 480px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
}

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

.order-summary-header h3 {
  font-size: 20px;
}

.order-summary-tier {
  font-size: 15px;
  font-weight: 600;
  padding: 8px 16px;
  border-left: 3px solid var(--border);
  margin-bottom: 16px;
}

.order-summary-items {
  border-top: 1px solid var(--border);
  max-height: 300px;
  overflow-y: auto;
}

.order-summary-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--border);
}

.order-summary-item-info {
  flex: 1;
  min-width: 0;
}

.order-summary-item-name {
  display: block;
  font-size: 14px;
  font-weight: 500;
}

.order-summary-item-sku {
  font-size: 11px;
  color: var(--text-muted);
  font-family: monospace;
}

.order-summary-item-price {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.order-summary-item-qty {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
  min-width: 36px;
  text-align: right;
}

.order-summary-total {
  text-align: right;
  font-size: 16px;
  color: var(--accent-green);
  padding: 16px 0;
  border-top: 1px solid var(--border);
}

.order-summary-total strong {
  font-size: 20px;
}

.order-summary-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.order-btn-download {
  font-size: 16px;
  padding: 12px 16px;
}

.export-btn-whatsapp {
  background: #25d366 !important;
  color: #fff !important;
  border-color: #25d366 !important;
  font-weight: 600;
}

.export-btn-whatsapp:hover {
  filter: brightness(0.9);
}

.export-btn-whatsapp svg {
  flex-shrink: 0;
}

.order-summary-hint {
  background: var(--success-bg);
  border: 1px solid var(--success-border);
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 13px;
  color: var(--text-primary);
}

/* ========== RESPONSIVE ========== */

/* Tablet landscape */
@media (max-width: 1200px) {
  .product-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Tablet portrait / small laptop */
@media (max-width: 900px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: var(--shadow);
  }

  .sidebar-close {
    display: block;
  }

  .sidebar-overlay.active {
    display: block;
  }

  .mobile-cart-fab {
    display: flex;
  }

  .main {
    margin-left: 0;
    padding: 16px;
  }

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

  .product-img {
    width: 100px;
    height: 100px;
  }

  .logo-text {
    font-size: 28px;
  }

  .tier-status {
    padding: 12px 14px;
  }

  .modal {
    max-width: 100%;
    margin: 10px;
    max-height: 95vh;
  }

  .modal-body .form-row {
    grid-template-columns: 1fr;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .product-card {
    padding: 12px 10px;
  }

  .product-img {
    width: 80px;
    height: 80px;
  }

  .product-name {
    font-size: 12px;
    min-height: 30px;
  }

  .main {
    padding: 12px 10px;
  }

  .main-header {
    margin-bottom: 10px;
  }

  .logo-text {
    font-size: 22px;
  }

  .tier-status-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .pagination button {
    padding: 12px 8px;
  }

  .estado-picker-modal {
    padding: 20px;
  }

  .estado-picker-grid {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }

  .qty-selector button {
    padding: 10px 14px;
  }

  .qty-selector input {
    padding: 10px 4px;
  }
}

/* Very small phones */
@media (max-width: 380px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}
::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 3px;
}

/* ========== LOADING ========== */
.loading {
  text-align: center;
  padding: 40px;
  color: var(--text-muted);
}

.loading::after {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--text-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-left: 10px;
  vertical-align: middle;
}

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