/* =============================================
   Exchange UI v2 — Shared Components
   ============================================= */

/* ═══════════════════════════════════════════
   APP LAYOUT
   ═══════════════════════════════════════════ */
.main-content {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 68px; /* bottom-nav height */
}

.page-content {
  animation: fadeIn 0.2s ease;
}

/* ═══════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════ */
.app-header {
  flex-shrink: 0;
  height: 56px;
  background: var(--header-bg);
  border-bottom: 1px solid var(--b1);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 90;
}

.app-header .logo {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  background: var(--logo-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.app-header .header-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--t1);
  flex: 1;
  text-align: center;
}

.app-header .header-left { flex: 1; display: flex; align-items: center; gap: 8px; }
.app-header .header-right { display: flex; align-items: center; gap: 14px; }

.header-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--t2);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.header-icon-btn:hover { background: var(--bg-hover); color: var(--t1); }
.header-icon-btn:active { background: var(--bg-active); }

/* 返回按鈕 */
.back-btn {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--t1);
  cursor: pointer;
  border-radius: 8px;
  margin-left: -4px;
}
.back-btn:active { background: var(--bg-hover); }

/* ═══════════════════════════════════════════
   BOTTOM NAVIGATION
   ═══════════════════════════════════════════ */
.bottom-nav {
  flex-shrink: 0;
  height: 60px;
  background: var(--nav-bg);
  border-top: 1px solid var(--nav-border);
  display: flex;
  align-items: stretch;
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 540px;
  z-index: 90;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  color: var(--t3);
  cursor: pointer;
  padding: 6px 4px 4px;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  transition: color 0.15s;
}

.nav-item .nav-icon { transition: transform 0.2s; }
.nav-item span {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.nav-item.active {
  color: var(--accent);
}

.nav-item.active .nav-icon {
  transform: translateY(-1px);
}

/* Active 點指示器 */
.nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.85;
}

/* 中間交易按鈕 (加強版) */
.nav-item.nav-trade-btn {
  flex: 1.2;
}

.nav-trade-btn .trade-btn-inner {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--logo-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  box-shadow: var(--shadow-accent);
  transition: transform 0.15s, box-shadow 0.15s;
}

.nav-trade-btn:active .trade-btn-inner {
  transform: scale(0.94);
  box-shadow: 0 2px 8px rgba(var(--accent-rgb), 0.3);
}

/* trade-btn 沒有 active 點 */
.nav-item.nav-trade-btn::after { display: none; }

.nav-trade-btn span { color: var(--t3); }
.nav-trade-btn.active span { color: var(--accent); }

/* ═══════════════════════════════════════════
   CARDS
   ═══════════════════════════════════════════ */
.card {
  background: var(--bg-card);
  border-radius: 12px;
  overflow: hidden;
}

.card-bordered {
  border: 1px solid var(--b1);
}

.card-shadow {
  box-shadow: var(--shadow-sm);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 8px;
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--t1);
}

.card-more {
  font-size: 12px;
  color: var(--t2);
  display: flex;
  align-items: center;
  gap: 2px;
  cursor: pointer;
}
.card-more:hover { color: var(--accent); }

/* ═══════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 0 16px;
  height: 42px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.15s;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: #000;
  font-weight: 700;
}
.btn-primary:not(:disabled):hover { filter: brightness(1.08); box-shadow: var(--shadow-accent); }
.btn-primary:not(:disabled):active { filter: brightness(0.92); transform: scale(0.98); box-shadow: none; }

.btn-buy {
  background: var(--up);
  color: #fff;
}
.btn-buy:not(:disabled):hover { filter: brightness(1.08); }
.btn-buy:not(:disabled):active { filter: brightness(0.92); transform: scale(0.98); }

.btn-sell {
  background: var(--down);
  color: #fff;
}
.btn-sell:not(:disabled):hover { filter: brightness(1.08); }
.btn-sell:not(:disabled):active { filter: brightness(0.92); transform: scale(0.98); }

.btn-ghost {
  background: var(--bg-surface);
  color: var(--t1);
  border: 1px solid var(--b2);
}
.btn-ghost:not(:disabled):hover { background: var(--bg-hover); }
.btn-ghost:not(:disabled):active { background: var(--bg-active); }

.btn-ghost-up {
  background: var(--up-bg);
  color: var(--up);
  border: 1px solid rgba(14,203,129,0.2);
}
.btn-ghost-down {
  background: var(--down-bg);
  color: var(--down);
  border: 1px solid rgba(246,70,93,0.2);
}

.btn-text {
  background: none;
  color: var(--accent);
  padding: 0;
  height: auto;
}
.btn-text:hover { opacity: 0.8; }

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 12px;
  border-radius: 6px;
}

.btn-xs {
  height: 26px;
  padding: 0 8px;
  font-size: 11px;
  border-radius: 4px;
}

.btn-lg {
  height: 52px;
  font-size: 16px;
  border-radius: var(--radius-sm);
}

.btn-block { width: 100%; }

/* 圓形按鈕 */
.icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  color: var(--t2);
  border: 1px solid var(--b1);
  cursor: pointer;
  transition: all 0.15s;
}
.icon-btn:hover { background: var(--bg-hover); color: var(--t1); border-color: var(--b2); }

/* ═══════════════════════════════════════════
   FORM INPUTS
   ═══════════════════════════════════════════ */
.input-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.input-label {
  font-size: 13px;
  color: var(--t2);
  font-weight: 500;
}

.input-field {
  position: relative;
  display: flex;
  align-items: center;
}

.input-field input {
  width: 100%;
  height: 48px;
  background: var(--bg-input);
  border: 1.5px solid var(--b1);
  border-radius: 8px;
  padding: 0 44px 0 14px;
  color: var(--t1);
  font-size: 14px;
  transition: border-color 0.15s, background 0.15s;
}

.input-field input:focus {
  border-color: var(--accent);
  background: var(--bg-surface);
}

.input-field input::placeholder { color: var(--t3); }

.input-field .input-icon,
.input-field .input-action {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--t3);
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-action button {
  font-size: 13px;
  color: var(--accent);
  font-weight: 600;
}

.input-field.has-prefix input { padding-left: 44px; }
.input-prefix {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--t2);
}

.input-error {
  font-size: 12px;
  color: var(--down);
}

.input-hint {
  font-size: 12px;
  color: var(--t2);
}

/* 數量輸入（帶後綴） */
.amount-input {
  position: relative;
}
.amount-input input {
  padding-right: 60px;
  text-align: right;
}
.amount-input .amount-unit {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 13px;
  font-weight: 600;
  color: var(--t2);
}

/* ═══════════════════════════════════════════
   TABS
   ═══════════════════════════════════════════ */
.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--b1);
  padding: 0 16px;
  background: var(--bg-card);
}

.tab-item {
  padding: 12px 0;
  margin-right: 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--t2);
  cursor: pointer;
  position: relative;
  white-space: nowrap;
  transition: color 0.15s;
}

.tab-item::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.2s;
  border-radius: 2px;
}

.tab-item.active {
  color: var(--t1);
  font-weight: 600;
}

.tab-item.active::after {
  transform: scaleX(1);
}

/* 膠囊 Tabs */
.tabs-pill {
  display: flex;
  gap: 6px;
  padding: 4px;
  background: var(--bg-surface);
  border-radius: 10px;
}

.tab-pill-item {
  flex: 1;
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 13px;
  font-weight: 500;
  color: var(--t2);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}

.tab-pill-item.active {
  background: var(--bg-card);
  color: var(--t1);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--b2);
}

/* ═══════════════════════════════════════════
   TOAST NOTIFICATIONS
   ═══════════════════════════════════════════ */
#toast-container {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: calc(100% - 32px);
  max-width: 400px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 10px;
  background: var(--bg-card);
  box-shadow: var(--shadow-md);
  border: 1px solid var(--b2);
  animation: slideDown 0.25s ease;
  pointer-events: auto;
  font-size: 14px;
  font-weight: 500;
  color: var(--t1);
}

.toast.toast-success { border-left: 3px solid var(--up); }
.toast.toast-error   { border-left: 3px solid var(--down); }
.toast.toast-warning { border-left: 3px solid var(--warn); }
.toast.toast-info    { border-left: 3px solid var(--info); }

.toast .toast-icon { flex-shrink: 0; }
.toast.toast-success .toast-icon { color: var(--up); }
.toast.toast-error   .toast-icon { color: var(--down); }
.toast.toast-warning .toast-icon { color: var(--warn); }
.toast.toast-info    .toast-icon { color: var(--info); }

.toast-hide {
  animation: none;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s, transform 0.2s;
}

/* ═══════════════════════════════════════════
   MODAL
   ═══════════════════════════════════════════ */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: fadeInScale 0.2s ease;
}

.modal-box {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 340px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--b2);
}

.modal-header {
  padding: 20px 20px 0;
}

.modal-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--t1);
  text-align: center;
}

.modal-body {
  padding: 16px 20px;
  font-size: 14px;
  color: var(--t2);
  line-height: 1.7;
  text-align: center;
}

.modal-footer {
  display: flex;
  border-top: 1px solid var(--b1);
}

.modal-footer button {
  flex: 1;
  height: 52px;
  font-size: 15px;
  font-weight: 600;
  color: var(--t2);
  transition: background 0.15s;
}
.modal-footer button:first-child {
  border-right: 1px solid var(--b1);
}
.modal-footer button.btn-confirm { color: var(--accent); }
.modal-footer button.btn-danger-confirm { color: var(--down); }
.modal-footer button:hover { background: var(--bg-hover); }

/* ═══════════════════════════════════════════
   BOTTOM DRAWER / SHEET
   ═══════════════════════════════════════════ */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  z-index: 900;
  opacity: 0;
  transition: opacity 0.28s ease;
  will-change: opacity;
}

.drawer-sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%) translateY(100%);
  width: 100%;
  max-width: 540px;
  background: var(--bg-card);
  border-radius: 20px 20px 0 0;
  z-index: 901;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  transition: transform 0.32s cubic-bezier(0.32, 0.72, 0, 1);
  will-change: transform;
}

.drawer-handle {
  width: 36px;
  height: 4px;
  background: var(--b2);
  border-radius: 2px;
  margin: 12px auto 0;
  flex-shrink: 0;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  flex-shrink: 0;
}

.drawer-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--t1);
}

.drawer-close {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: none;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--t2);
  cursor: pointer;
  flex-shrink: 0;
}
.drawer-close:hover { background: var(--bg-hover); color: var(--t1); }

.drawer-body {
  overflow-y: auto;
  flex: 1;
  -webkit-overflow-scrolling: touch;
  padding-bottom: env(safe-area-inset-bottom, 12px);
}

/* ═══════════════════════════════════════════
   LIST ROWS
   ═══════════════════════════════════════════ */
.list-row {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  gap: 12px;
  cursor: pointer;
  transition: background 0.12s;
  position: relative;
}
.list-row:active { background: var(--bg-hover); }
.list-row + .list-row::before {
  content: '';
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 1px;
  background: var(--divider);
}

.list-row-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.list-row-content { flex: 1; min-width: 0; }
.list-row-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--t1);
}
.list-row-subtitle {
  font-size: 12px;
  color: var(--t2);
  margin-top: 2px;
}

.list-row-right {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--t2);
}

/* ═══════════════════════════════════════════
   QUICK ACTIONS GRID
   ═══════════════════════════════════════════ */
/* 快捷操作包裝區 */
.quick-actions-wrap {
  background: var(--bg-card);
  border-bottom: 1px solid var(--b1);
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px 16px;
}

.quick-action-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 4px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.quick-action-item:active { background: var(--bg-hover); }

.quick-action-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--b1);
}

.quick-action-label {
  font-size: 11px;
  color: var(--t2);
  font-weight: 500;
  text-align: center;
}

/* ═══════════════════════════════════════════
   COIN AVATAR
   ═══════════════════════════════════════════ */
/* Home 市場區塊 */
.home-market-section {
  background: var(--bg-card);
  border-top: 8px solid var(--bg-page);
}
.home-market-tabs {
  display: flex;
  align-items: center;
  padding: 14px 16px 0;
  gap: 16px;
  border-bottom: 1px solid var(--b1);
}
.home-market-tabs .tab-item { margin-right: 0; }
.coin-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
  color: #fff;
  overflow: hidden;
}

/* ═══════════════════════════════════════════
   SEGMENT / PERCENTAGE SLIDER
   ═══════════════════════════════════════════ */
.seg-buttons {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}

.seg-btn {
  padding: 5px 0;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  color: var(--t2);
  background: var(--bg-surface);
  border: 1px solid var(--b1);
  cursor: pointer;
  transition: all 0.12s;
}
.seg-btn:hover { background: var(--bg-hover); color: var(--t1); }
.seg-btn.active-buy  { background: var(--up-bg); color: var(--up); border-color: transparent; }
.seg-btn.active-sell { background: var(--down-bg); color: var(--down); border-color: transparent; }

/* ═══════════════════════════════════════════
   ORDER BOOK ROWS
   ═══════════════════════════════════════════ */
.orderbook-row {
  display: flex;
  align-items: center;
  padding: 3px 0;
  font-size: 12px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  transition: opacity 0.1s;
}
.orderbook-row:hover { opacity: 0.8; }

.orderbook-depth-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  opacity: 0.15;
  transition: width 0.3s ease;
  border-radius: 2px;
}
.orderbook-ask .orderbook-depth-bar { background: var(--down); right: 0; }
.orderbook-bid .orderbook-depth-bar { background: var(--up); right: 0; }

.orderbook-price { flex: 1; font-weight: 600; }
.orderbook-ask .orderbook-price { color: var(--down); }
.orderbook-bid .orderbook-price { color: var(--up); }
.orderbook-qty { flex: 1; text-align: right; color: var(--t2); }
.orderbook-total { flex: 1; text-align: right; color: var(--t3); }

/* ═══════════════════════════════════════════
   SWITCH TOGGLE
   ═══════════════════════════════════════════ */
.toggle-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toggle-label { font-size: 14px; color: var(--t1); }
.toggle-sub { font-size: 12px; color: var(--t2); margin-top: 2px; }

.toggle {
  position: relative;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-slider {
  position: absolute;
  inset: 0;
  background: var(--bg-active);
  border-radius: 12px;
  cursor: pointer;
  transition: background 0.2s;
}
.toggle-slider::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  top: 3px;
  left: 3px;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.toggle input:checked + .toggle-slider { background: var(--up); }
.toggle input:checked + .toggle-slider::after { transform: translateX(20px); }

/* ═══════════════════════════════════════════
   NOTICE BAR
   ═══════════════════════════════════════════ */
.notice-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--warn-bg);
  border-left: 3px solid var(--warn);
  font-size: 12px;
  color: var(--warn);
  border-radius: 0 8px 8px 0;
  margin: 8px 16px;
}

/* ═══════════════════════════════════════════
   PAGE SECTION TITLE
   ═══════════════════════════════════════════ */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 16px 10px;
}

.section-title h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--t1);
}

.section-title a {
  font-size: 12px;
  color: var(--t2);
  display: flex;
  align-items: center;
  gap: 2px;
}
.section-title a:hover { color: var(--accent); }

/* ═══════════════════════════════════════════
   EMPTY STATE
   ═══════════════════════════════════════════ */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  gap: 12px;
}

.empty-state-icon { color: var(--t3); opacity: 0.6; }
.empty-state-text { font-size: 14px; color: var(--t2); text-align: center; }
.empty-state-sub  { font-size: 12px; color: var(--t3); text-align: center; }

/* ═══════════════════════════════════════════
   LOADING SPINNER
   ═══════════════════════════════════════════ */
.spinner {
  width: 24px;
  height: 24px;
  border: 2.5px solid var(--b2);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}
.spinner-sm { width: 16px; height: 16px; border-width: 2px; }
.spinner-lg { width: 36px; height: 36px; border-width: 3px; }

/* ═══════════════════════════════════════════
   KYC LEVEL BADGE
   ═══════════════════════════════════════════ */
.kyc-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
}
.kyc-badge-verified   { background: var(--up-bg); color: var(--up); }
.kyc-badge-unverified { background: var(--warn-bg); color: var(--warn); }
.kyc-badge.lv1 { background: var(--icon-green-bg); color: var(--icon-green); }
.kyc-badge.lv2 { background: var(--icon-blue-bg);  color: var(--icon-blue); }
.kyc-badge.lv3 { background: var(--icon-gold-bg);  color: var(--icon-gold); }
.kyc-badge.xs  { font-size: 10px; padding: 2px 6px; }

/* ═══════════════════════════════════════════
   SEARCH BAR
   ═══════════════════════════════════════════ */
.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-input);
  border-radius: 10px;
  padding: 0 14px;
  height: 42px;
  border: 1.5px solid transparent;
  transition: border-color 0.15s;
}
.search-bar:focus-within { border-color: var(--accent); }
.search-bar svg { color: var(--t3); flex-shrink: 0; }
.search-bar input {
  flex: 1;
  background: none;
  color: var(--t1);
  font-size: 14px;
}
.search-bar input::placeholder { color: var(--t3); }

/* Theme toggle button */
.theme-toggle-btn {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--b1);
  color: var(--t2);
  cursor: pointer;
  transition: all 0.15s;
}
.theme-toggle-btn:hover {
  background: var(--bg-hover);
  color: var(--accent);
  border-color: var(--accent);
}
