/* ============================================================
   SHINKA SCANNER — Design System
   Mobile-first dark theme with vibrant accents
   ============================================================ */

/* --- Tokens --- */
:root {
  /* Surfaces */
  --bg-base: #0a0a0f;
  --bg-card: #13131a;
  --bg-elevated: #1a1a24;
  --bg-input: #1e1e2a;

  /* Borders */
  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.1);
  --border-focus: #7c5cfc;

  /* Text */
  --text-primary: #f0f0f5;
  --text-secondary: #9090a8;
  --text-muted: #606078;

  /* Accent */
  --accent: #7c5cfc;
  --accent-hover: #6a48e8;
  --accent-glow: rgba(124, 92, 252, 0.25);

  /* Status */
  --success: #34d399;
  --success-bg: rgba(52, 211, 153, 0.12);
  --warning: #fbbf24;
  --warning-bg: rgba(251, 191, 36, 0.12);
  --danger: #f87171;
  --danger-bg: rgba(248, 113, 113, 0.12);
  --info: #60a5fa;
  --info-bg: rgba(96, 165, 250, 0.12);

  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 999px;

  /* Typography */
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;

  /* Transition */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --duration: 200ms;
}

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

html {
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font);
  font-size: var(--text-base);
  color: var(--text-primary);
  background: var(--bg-base);
  line-height: 1.5;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

input {
  font-family: inherit;
  border: none;
  background: none;
  color: inherit;
  outline: none;
}

/* --- App Shell --- */
#app {
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: var(--space-xl);
}

/* --- Header --- */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) var(--space-md) var(--space-sm);
  border-bottom: 1px solid var(--border-subtle);
}

.header__brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.header__logo {
  font-size: 1.6rem;
  font-weight: 700;
  background: linear-gradient(135deg, #7c5cfc, #e040fb);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header__title {
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.header__badge {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  padding: var(--space-xs) var(--space-sm);
  border: 1px solid rgba(124, 92, 252, 0.3);
  border-radius: var(--radius-full);
}

/* --- Tabs --- */
.tabs {
  display: flex;
  gap: var(--space-xs);
  padding: var(--space-xs) var(--space-md);
  background: var(--bg-base);
  position: sticky;
  top: 0;
  z-index: 100;
}

.tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  transition: all var(--duration) var(--ease);
}

.tab:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.tab--active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), #6a48e8);
  border-color: transparent;
  box-shadow: 0 4px 16px var(--accent-glow);
}

.tab__icon {
  font-size: var(--text-lg);
}

/* --- Scanner Panel --- */
.scanner-panel {
  margin: var(--space-sm) var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.scanner-panel__modes {
  display: flex;
  gap: var(--space-xs);
  padding: var(--space-sm);
  border-bottom: 1px solid var(--border-subtle);
}

.scanner-mode {
  flex: 1;
  padding: var(--space-xs) var(--space-sm);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  transition: all var(--duration) var(--ease);
}

.scanner-mode:hover {
  color: var(--text-primary);
}

.scanner-mode--active {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.scanner-view {
  padding: var(--space-sm) var(--space-md);
}

.scanner-view--hidden {
  display: none;
}

.qr-reader {
  border-radius: var(--radius-md);
  overflow: hidden;
}

/* Override html5-qrcode styles */
#qr-reader {
  max-height: 300px;
}

#qr-reader__scan_region {
  height: 180px !important;
  min-height: 180px !important;
  max-height: 180px !important;
  overflow: hidden;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

#qr-reader__scan_region video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

#qr-reader__dashboard {
  padding: var(--space-sm) !important;
}

#qr-reader__dashboard_section_csr button {
  background: var(--accent) !important;
  color: #fff !important;
  border: none !important;
  border-radius: var(--radius-sm) !important;
  padding: var(--space-sm) var(--space-md) !important;
  font-family: var(--font) !important;
  font-weight: 600 !important;
  cursor: pointer !important;
}

#qr-reader__dashboard_section_csr select {
  background: var(--bg-input) !important;
  color: var(--text-primary) !important;
  border: 1px solid var(--border-default) !important;
  border-radius: var(--radius-sm) !important;
  padding: var(--space-xs) var(--space-sm) !important;
  font-family: var(--font) !important;
}

.manual-input-group {
  display: flex;
  gap: var(--space-sm);
}

.input {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-base);
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  transition: border-color var(--duration) var(--ease);
}

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

.input::placeholder {
  color: var(--text-muted);
}

.input--barcode {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.05em;
}

.hint {
  margin-top: var(--space-sm);
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-lg);
  font-size: var(--text-sm);
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: all var(--duration) var(--ease);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: background var(--duration) var(--ease);
}

.btn:active::after {
  background: rgba(255, 255, 255, 0.1);
}

.btn--primary {
  background: linear-gradient(135deg, var(--accent), #6a48e8);
  color: #fff;
  box-shadow: 0 2px 8px var(--accent-glow);
}

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

.btn--primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn--success {
  background: linear-gradient(135deg, #34d399, #059669);
  color: #fff;
}

.btn--success:hover {
  box-shadow: 0 4px 16px rgba(52, 211, 153, 0.25);
  transform: translateY(-1px);
}

.btn--danger {
  background: linear-gradient(135deg, #f87171, #dc2626);
  color: #fff;
}

.btn--outline {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid var(--border-default);
}

.btn--outline:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

.btn--full {
  width: 100%;
}

.btn--lg {
  padding: var(--space-md) var(--space-lg);
  font-size: var(--text-base);
  border-radius: var(--radius-md);
}

/* --- Loader --- */
.loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-xl);
}

.loader--hidden {
  display: none;
}

.loader__spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--border-default);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.loader__text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
}

/* --- Product Card --- */
.product-section {
  margin: 0 var(--space-md);
  animation: slideUp 0.3s var(--ease);
}

.product-section--hidden {
  display: none;
}

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

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.product-card {
  display: flex;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
}

.product-card__image {
  flex-shrink: 0;
  width: 90px;
  height: 90px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.no-image {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: center;
}

.product-card__info {
  flex: 1;
  min-width: 0;
}

.product-card__info h3 {
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: var(--space-xs);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.product-card__info .variant {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.product-card__info p {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  line-height: 1.4;
}

.price-tag {
  font-size: var(--text-xl) !important;
  color: var(--success) !important;
  font-weight: 700;
  margin: var(--space-xs) 0;
}

.stock-tag {
  font-size: var(--text-lg) !important;
  margin-top: var(--space-xs);
}

.stock-tag .stock {
  font-size: var(--text-base);
  padding: 2px 10px;
}

.barcode-tag {
  font-size: var(--text-sm);
  color: var(--text-primary);
  font-weight: 600;
}

.product-card__info strong {
  color: var(--text-muted);
  font-weight: 500;
}

.stock {
  font-weight: 600;
  padding: 1px 6px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
}

.stock.ok {
  color: var(--success);
  background: var(--success-bg);
}

.stock.low {
  color: var(--warning);
  background: var(--warning-bg);
}

.stock.out {
  color: var(--danger);
  background: var(--danger-bg);
}

.incoming-stock {
  margin-top: var(--space-xs);
  font-size: var(--text-xs);
  color: var(--text-secondary);
}

.incoming {
  font-weight: 600;
  color: var(--info);
}

.incoming-stock-btn {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-sm);
  padding: 4px 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  color: var(--text-secondary);
  cursor: pointer;
  width: 100%;
  transition: all var(--duration) var(--ease);
}

.incoming-stock-btn:hover {
  background: var(--bg-input);
  border-color: var(--accent);
  color: var(--text-primary);
}

.incoming-stock-btn .icon {
  margin-left: auto;
  font-size: var(--text-sm);
  opacity: 0.7;
}

/* --- Form Sections --- */
.form-section {
  margin: var(--space-md);
  animation: slideUp 0.3s var(--ease);
}

.form-section--hidden {
  display: none;
}

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
}

.form-card__title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-md);
}

/* Reason Picker */
.reason-group {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.reason-btn {
  flex: 1;
  padding: var(--space-sm) var(--space-xs);
  font-size: var(--text-xs);
  font-weight: 600;
  text-align: center;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 2px solid transparent;
  transition: all var(--duration) var(--ease);
  line-height: 1.4;
}

.reason-btn:hover {
  background: var(--bg-elevated);
}

.reason-btn--active {
  border-color: var(--accent);
  background: var(--accent-glow);
  color: #fff;
}

.reason-btn__icon {
  display: block;
  font-size: var(--text-lg);
  margin-bottom: 2px;
}

/* Quantity Adjuster */
.qty-group {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.qty-group__label {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  min-width: 60px;
}

.qty-controls {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  overflow: hidden;
}

.qty-btn {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--text-secondary);
  transition: all var(--duration) var(--ease);
}

.qty-btn:hover {
  color: var(--text-primary);
  background: var(--bg-elevated);
}

.qty-btn:active {
  background: var(--accent-glow);
}

.qty-value {
  width: 56px;
  height: 44px;
  text-align: center;
  font-size: var(--text-lg);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: transparent;
  border-left: 1px solid var(--border-subtle);
  border-right: 1px solid var(--border-subtle);
  color: var(--text-primary);
}

/* Notes */
.notes-group {
  margin-bottom: var(--space-md);
}

.notes-group label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--space-xs);
}

.textarea {
  width: 100%;
  min-height: 60px;
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  resize: vertical;
  font-family: var(--font);
  transition: border-color var(--duration) var(--ease);
}

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

/* Select */
.select {
  width: 100%;
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font);
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%239090a8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 36px;
  cursor: pointer;
}

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

/* Info Display for Checker */
.info-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
}

.info-item {
  padding: var(--space-sm);
  background: var(--bg-input);
  border-radius: var(--radius-sm);
}

.info-item__label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 2px;
}

.info-item__value {
  font-size: var(--text-base);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.info-item--price .info-item__value {
  color: var(--success);
  font-size: var(--text-lg);
}

.info-item--stock .info-item__value {
  font-size: var(--text-lg);
}

/* Action Buttons */
.form-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

/* --- Confirm Dialog --- */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s var(--ease);
  padding: var(--space-md);
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.confirm-dialog {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  max-width: 360px;
  width: 100%;
  animation: scaleIn 0.2s var(--ease);
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

.confirm-dialog__title {
  font-size: var(--text-lg);
  font-weight: 700;
  margin-bottom: var(--space-sm);
}

.confirm-dialog__message {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  margin-bottom: var(--space-lg);
  line-height: 1.6;
}

.confirm-dialog__actions {
  display: flex;
  gap: var(--space-sm);
}

.confirm-dialog__actions .btn {
  flex: 1;
}

/* --- Recent Section --- */
.recent-section {
  margin: var(--space-lg) var(--space-md) 0;
}

.recent-section__title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-sm);
}

.recent-list__empty {
  font-size: var(--text-sm);
  color: var(--text-muted);
  text-align: center;
  padding: var(--space-lg);
}

.recent-item {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-xs);
  font-size: var(--text-sm);
  animation: slideUp 0.2s var(--ease);
}

.recent-item__icon {
  font-size: var(--text-lg);
}

.recent-item__text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-item__time {
  font-size: var(--text-xs);
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}

/* --- Modals --- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  animation: fadeIn 0.2s var(--ease);
  padding: var(--space-md);
}

.modal-overlay--hidden {
  display: none;
}

.modal-card {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 400px;
  animation: scaleIn 0.2s var(--ease);
  overflow: hidden;
}

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

.modal-title {
  font-size: var(--text-lg);
  font-weight: 700;
}

.modal-close {
  font-size: var(--text-xl);
  color: var(--text-secondary);
  padding: var(--space-xs);
  line-height: 1;
}

.modal-body {
  padding: var(--space-lg);
}

.incoming-stat {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.incoming-stat__value {
  display: block;
  font-size: 3rem;
  font-weight: 800;
  color: var(--info);
  line-height: 1;
  margin-bottom: var(--space-xs);
}

.incoming-stat__label {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.modal-text {
  font-size: var(--text-sm);
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: var(--space-lg);
  line-height: 1.5;
}

.modal-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.modal-actions a {
  text-decoration: none;
}

/* --- Toasts --- */
.toast-container {
  position: fixed;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  width: calc(100% - var(--space-xl));
  max-width: 420px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  font-weight: 500;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  animation: toastIn 0.3s var(--ease);
  pointer-events: auto;
  backdrop-filter: blur(8px);
}

.toast--success {
  background: var(--success-bg);
  border: 1px solid var(--success);
  color: var(--success);
}

.toast--error {
  background: var(--danger-bg);
  border: 1px solid var(--danger);
  color: var(--danger);
}

.toast--info {
  background: var(--info-bg);
  border: 1px solid var(--info);
  color: var(--info);
}

.toast__icon {
  font-size: var(--text-lg);
  flex-shrink: 0;
}

.toast--out {
  animation: toastOut 0.3s var(--ease) forwards;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(16px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes toastOut {
  from {
    opacity: 1;
    transform: translateY(0);
  }

  to {
    opacity: 0;
    transform: translateY(16px);
  }
}

/* --- Scan Result Toast (Top) --- */
.scan-toast-container {
  position: fixed;
  top: var(--space-md);
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  width: auto;
  min-width: 200px;
  pointer-events: none;
}

.scan-toast {
  background: rgba(124, 92, 252, 0.95);
  color: white;
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-full);
  font-size: var(--text-base);
  font-weight: 700;
  text-align: center;
  box-shadow: 0 4px 20px rgba(124, 92, 252, 0.4);
  animation: scanToastIn 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes scanToastIn {
  0% {
    opacity: 0;
    transform: translateY(-20px) scale(0.9);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.scan-toast--out {
  animation: scanToastOut 0.2s ease forwards;
}

@keyframes scanToastOut {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  100% {
    opacity: 0;
    transform: translateY(-10px) scale(0.95);
  }
}

/* --- Responsive --- */
@media (min-width: 480px) {
  #app {
    padding-top: var(--space-md);
  }

  .header {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    border: 1px solid var(--border-subtle);
    border-bottom: none;
  }

  .tabs {
    border-left: 1px solid var(--border-subtle);
    border-right: 1px solid var(--border-subtle);
  }
}