/* ═══════════════════════════════════════════════════════════
   SD Modeler — Components
   Icon Buttons, Tooltips, Inputs, Badges, Modals
   ═══════════════════════════════════════════════════════════ */

/* Global: ensure [hidden] always works even on display:flex elements */
[hidden] {
  display: none !important;
}

/* ── Icon Button (Core UI Element) ───────────────────────── */
.icon-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition-base);
  flex-shrink: 0;
}

.icon-btn:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.icon-btn:active {
  background: var(--surface-active);
  transform: scale(0.95);
}

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

.icon-btn.active {
  background: var(--accent-stock);
  color: var(--text-inverse);
  box-shadow: var(--shadow-sm);
}

.icon-btn.active:hover {
  filter: brightness(1.1);
}

.icon-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  pointer-events: none;
}

.icon-btn--sm {
  width: 28px;
  height: 28px;
}

.icon-btn--lg {
  width: 40px;
  height: 40px;
}

.icon-btn svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.icon-btn--sm svg {
  width: 14px;
  height: 14px;
}

.icon-btn--lg svg {
  width: 20px;
  height: 20px;
}

/* Icon button color variants (for SD element tools) */
.icon-btn.active[data-tool="stock"] {
  background: var(--accent-stock);
}
.icon-btn.active[data-tool="flow"] {
  background: var(--accent-flow);
}
.icon-btn.active[data-tool="converter"] {
  background: var(--accent-converter);
  color: var(--text-primary);
}
.icon-btn.active[data-tool="connector"] {
  background: var(--accent-connector);
}
.icon-btn.active[data-tool="cloud"] {
  background: var(--accent-cloud);
}
.icon-btn.active[data-tool="delay"] {
  background: var(--accent-delay);
}

/* ── Tooltip System (CSS-only) ───────────────────────────── */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  padding: 5px 10px;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: var(--shadow-tooltip);
  border: 1px solid var(--border);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
  z-index: var(--z-tooltip);
}

[data-tooltip]:hover::after {
  opacity: 1;
  transition-delay: 500ms;
}

/* Tooltip positions */
[data-tooltip-pos="top"]::after,
[data-tooltip]:not([data-tooltip-pos])::after {
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
}

[data-tooltip-pos="right"]::after {
  left: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  bottom: auto;
}

[data-tooltip-pos="bottom"]::after {
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  bottom: auto;
}

[data-tooltip-pos="left"]::after {
  right: calc(100% + 8px);
  top: 50%;
  transform: translateY(-50%);
  bottom: auto;
  left: auto;
}

/* ── Divider ─────────────────────────────────────────────── */
.divider {
  width: 24px;
  height: 1px;
  background: var(--border);
  margin: var(--space-1) auto;
  flex-shrink: 0;
}

.divider--vertical {
  width: 1px;
  height: 24px;
  margin: 0 var(--space-2);
}

/* ── Input Fields ────────────────────────────────────────── */
.input {
  width: 100%;
  padding: var(--space-2) var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  line-height: 1.5;
  outline: none;
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

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

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

.input--code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
}

/* ── Label ───────────────────────────────────────────────── */
.label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-1);
}

/* ── Badge ───────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.badge--stock { background: var(--accent-stock-bg); color: var(--accent-stock); }
.badge--flow { background: var(--accent-flow-bg); color: var(--accent-flow); }
.badge--converter { background: var(--accent-converter-bg); color: var(--accent-converter); }
.badge--connector { background: var(--accent-connector-bg); color: var(--accent-connector); }
.badge--success { background: var(--success-bg); color: var(--success); }
.badge--danger { background: var(--danger-bg); color: var(--danger); }
.badge--info { background: var(--info-bg); color: var(--info); }

/* ── Panel Header ────────────────────────────────────────── */
.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--border);
  min-height: 40px;
}

.panel-header__title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.panel-header__actions {
  display: flex;
  gap: var(--space-1);
}

/* ── Status Bar ──────────────────────────────────────────── */
.status-bar {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: 0 var(--space-4);
  height: var(--status-bar-height);
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-secondary);
  z-index: var(--z-header);
}

.status-bar__item {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.status-bar__dot {
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
}

.status-bar__dot--ok { background: var(--success); }
.status-bar__dot--warn { background: var(--warning); }
.status-bar__dot--error { background: var(--danger); }

/* ── Empty State ─────────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  padding: var(--space-8);
  color: var(--text-tertiary);
  text-align: center;
}

.empty-state svg {
  width: 48px;
  height: 48px;
  opacity: 0.4;
}

.empty-state__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.empty-state__hint {
  font-size: 12px;
  max-width: 260px;
}

/* ── Keyboard Shortcut Badge ─────────────────────────────── */
.kbd {
  display: inline-flex;
  align-items: center;
  padding: 1px 5px;
  border: 1px solid var(--border);
  border-radius: var(--radius-xs);
  background: var(--bg-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-tertiary);
  line-height: 1.6;
}

/* ── Status Bar Spacer ──────────────────────────────────── */
.status-bar__spacer {
  flex: 1;
}

/* ── Modal Dialog ───────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: var(--z-modal, 9000);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.15s ease-out;
}

.modal-backdrop[hidden] {
  display: none;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  width: 420px;
  max-width: 90vw;
  max-height: 80vh;
  overflow-y: auto;
  animation: slideUp 0.2s ease-out;
}

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

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

.modal__title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.modal__body {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.modal__row {
  display: flex;
  gap: var(--space-3);
}

.modal__row > .modal__field {
  flex: 1;
}

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

.modal__footer {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  border-top: 1px solid var(--border);
}

.modal__btn {
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal__btn:hover {
  background: var(--surface-hover);
}

.modal__btn--primary {
  background: var(--accent-stock);
  color: white;
  border-color: var(--accent-stock);
}

.modal__btn--primary:hover {
  filter: brightness(1.1);
}

.modal__btn--primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  filter: none;
}

/* ── Modal Overlay (template / settings) ─────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.15s ease-out;
}

.modal-overlay[hidden] {
  display: none !important;
}

/* ── Wide Modal (Template Picker) ────────────────────── */
.modal--wide {
  width: 900px;
  max-width: 95vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.modal--wide .modal__body {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* ── Template Picker Layout ──────────────────────────── */
.template-picker {
  display: flex !important;
  flex-direction: row !important;
  gap: 0 !important;
  padding: 0 !important;
  height: 450px;
}

.template-picker__sidebar {
  width: 200px;
  min-width: 200px;
  border-right: 1px solid var(--border);
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.template-cat-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition-fast);
  width: 100%;
}

.template-cat-btn:hover {
  background: var(--surface-hover);
  color: var(--text-primary);
}

.template-cat-btn.active {
  background: var(--accent-stock);
  color: white;
}

.template-cat-btn__icon {
  font-size: 16px;
  flex-shrink: 0;
}

.template-picker__list {
  flex: 1;
  min-width: 0;
  padding: 12px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-right: 1px solid var(--border);
}

.template-card {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--transition-fast);
  background: var(--bg-secondary);
}

.template-card:hover {
  border-color: var(--accent-stock);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.template-card.active {
  border-color: var(--accent-stock);
  background: var(--surface);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.template-card__name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.template-card__desc {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.template-picker__detail {
  width: 280px;
  min-width: 280px;
  padding: 16px;
  overflow-y: auto;
}

.template-detail__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  font-size: 13px;
}

.template-detail__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.template-detail__section {
  margin-bottom: 12px;
}

.template-detail__label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.template-detail__text {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.template-detail__stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}

.template-stat {
  padding: 8px;
  background: var(--bg-secondary);
  border-radius: var(--radius-md);
  text-align: center;
}

.template-stat__value {
  font-size: 18px;
  font-weight: 700;
  color: var(--accent-stock);
  font-family: 'JetBrains Mono', monospace;
}

.template-stat__label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}

.template-detail__scenarios {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.scenario-badge {
  padding: 3px 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 10px;
  color: var(--text-secondary);
  font-weight: 500;
}

select.input {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
  cursor: pointer;
}

/* ── Toast Notifications ────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: calc(var(--status-bar-height) + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column-reverse;
  gap: var(--space-2);
  pointer-events: none;
}

.toast {
  padding: 8px 20px;
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  white-space: nowrap;
  pointer-events: auto;
  animation: toastIn 0.25s ease-out, toastOut 0.3s ease-in forwards;
  animation-delay: 0s, 1.8s;
}

.toast--undo {
  border-left: 3px solid var(--accent-stock);
}

.toast--redo {
  border-left: 3px solid var(--accent-flow);
}

.toast--info {
  border-left: 3px solid var(--info);
}

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

@keyframes toastOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

/* ── Autocomplete Dropdown ───────────────────────────────── */
.autocomplete-wrap {
  position: relative;
}

.autocomplete-dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  z-index: var(--z-modal);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  max-height: 200px;
  overflow-y: auto;
  margin-top: 2px;
}

.ac-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  font-size: 12px;
  font-family: 'JetBrains Mono', monospace;
  color: var(--text-primary);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.ac-item:hover,
.ac-item.active {
  background: var(--surface-hover);
}

.ac-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: var(--radius-sm);
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}

.ac-icon--fn       { background: var(--accent-converter); color: #fff; }
.ac-icon--stock    { background: var(--accent-stock);     color: #fff; }
.ac-icon--flow     { background: var(--accent-flow);      color: #fff; }
.ac-icon--converter { background: var(--accent-converter); color: #fff; }

/* ── Panel Header Actions ────────────────────────────────── */
.panel-header__actions {
  display: flex;
  align-items: center;
  gap: 2px;
}

/* ── Feature Gate — Locked State ────────────────────────── */
.feature-locked {
  position: relative;
  opacity: 0.55;
  cursor: not-allowed !important;
  filter: grayscale(0.3);
  transition: opacity 0.2s, filter 0.2s;
}

.feature-locked:hover {
  opacity: 0.7;
  filter: grayscale(0);
}

.feature-lock-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  font-size: 10px;
  line-height: 1;
  pointer-events: none;
  animation: lockPulse 2s infinite;
}

@keyframes lockPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* Premium badge for panels and sections */
.premium-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 1px 7px;
  border-radius: 9px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
  white-space: nowrap;
}

/* ── Upgrade Modal ─────────────────────────────────────── */
.upgrade-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9001;
  width: 400px;
  max-width: 90vw;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px 28px 24px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  animation: upgradeIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.upgrade-modal[hidden] {
  display: none;
}

@keyframes upgradeIn {
  from { opacity: 0; transform: translate(-50%, -50%) scale(0.9); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.upgrade-modal__glow {
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 120px;
  background: radial-gradient(ellipse, rgba(59,130,246,0.15), transparent 70%);
  pointer-events: none;
}

.upgrade-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
}

.upgrade-modal__icon {
  font-size: 40px;
  line-height: 1;
  margin-bottom: 12px;
}

.upgrade-modal__title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 6px;
}

.upgrade-modal__desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0 0 16px;
}

.upgrade-modal__divider {
  height: 1px;
  background: var(--border);
  margin: 0 -28px 16px;
}

.upgrade-modal__subtitle {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin: 0 0 10px;
}

.upgrade-modal__list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  text-align: left;
}

.upgrade-feature-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  padding: 5px 8px;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}

.upgrade-feature-item--active {
  background: var(--accent-stock-bg);
  color: var(--accent-stock);
  font-weight: 600;
}

.upgrade-feature-item__icon {
  font-size: 14px;
  flex-shrink: 0;
}

.upgrade-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 12px;
}

.upgrade-modal__btn {
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
}

.upgrade-modal__btn:hover {
  background: var(--surface-hover);
}

.upgrade-modal__btn--primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  color: #fff;
  border: none;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(59,130,246,0.3);
}

.upgrade-modal__btn--primary:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 20px rgba(59,130,246,0.4);
  transform: translateY(-1px);
}

.upgrade-modal__note {
  font-size: 11px;
  color: var(--text-tertiary);
  margin: 0;
}

/* ── Auth UI ───────────────────────────────────────────── */
.auth-login-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 14px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  color: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.auth-login-btn:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59,130,246,0.3);
}

.auth-login-btn[hidden] { display: none; }

.auth-user-menu { position: relative; }
.auth-user-menu[hidden] { display: none; }

.auth-user-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.12s;
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-user-btn:hover {
  background: var(--surface-hover);
  border-color: var(--accent-stock);
}

.auth-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 160px;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  overflow: hidden;
  animation: fadeIn 0.15s ease-out;
}

.auth-dropdown.open { display: block; }

.auth-dropdown__header { padding: 10px 14px; }

.auth-tier {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 8px;
}

.auth-tier--free {
  background: var(--bg-secondary);
  color: var(--text-secondary);
}

.auth-tier--premium {
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  color: #fff;
}

.auth-dropdown__divider {
  height: 1px;
  background: var(--border);
}

.auth-dropdown__item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 14px;
  border: none;
  background: none;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  cursor: pointer;
  transition: background 0.1s;
}

.auth-dropdown__item:hover {
  background: var(--surface-hover);
}
