/* ============================================================
   styles.css  –  Social Bookmarking Application
   Theme switching: set data-theme="light|dark" on <html>
   Design language: Clean solid surfaces
     · Indigo accent · Generous radius
   ============================================================ */

/* ── Theme: light (default) ─────────────────────────────────── */
:root,
:root[data-theme="light"] {
  /* Surface tokens — solid colors, same names kept for compatibility */
  --glass-toolbar: var(--bg-toolbar);
  --glass-canvas:  var(--bg-canvas);
  --glass-panel:   var(--bg-toolbar);
  --glass-modal:   var(--bg-modal-solid);
  --glass-input:   var(--bg-input);
  --glass-border:  var(--border);
  --glass-overlay: rgba(0,0,0,0.50);

  --bg-app:         #F2F4FF;
  --bg-modal-solid: #FFFFFF;
  --bg-canvas:      #ECEEFF;
  --bg-toolbar:     #FFFFFF;
  --bg-tray:        #FFFFFF;
  --bg-card:        #FFFFFF;
  --bg-container:   #FFFFFF;
  --bg-modal:       var(--bg-modal-solid);
  --bg-input:       #F4F5FB;
  --bg-overlay:     var(--glass-overlay);

  --text-primary:   #0C0E24;
  --text-secondary: #5B607A;
  --text-muted:     #9196B0;
  --text-on-accent: #FFFFFF;

  --border:         #DCE0EE;
  --border-focus:   #5B5BFF;
  --shadow-card:    0 1px 3px rgba(20,20,60,0.08), 0 1px 2px rgba(20,20,60,0.05);
  --shadow-modal:   0 8px 40px rgba(0,0,0,0.14);
  --shadow-glass:   0 1px 3px rgba(0,0,0,0.08);
  --shadow-btn:     0 1px 2px rgba(0,0,0,0.10);

  --accent:         #5B5BFF;
  --accent-hover:   #4242F0;
  --accent-glow:    rgba(91,91,255,0.28);
  --danger:         #EF4444;
  --danger-hover:   #DC2626;
  --warning:        #F59E0B;
  --success:        #10B981;

  --radius-sm:    6px;
  --radius-md:   12px;
  --radius-lg:   16px;
  --radius-pill: 999px;
  --font:        'Inter',-apple-system,BlinkMacSystemFont,'Segoe UI Variable Display','Segoe UI',Roboto,sans-serif;
}

/* ── Theme: dark ─────────────────────────────────────────────── */
:root[data-theme="dark"] {
  --glass-toolbar: var(--bg-toolbar);
  --glass-canvas:  var(--bg-canvas);
  --glass-panel:   var(--bg-toolbar);
  --glass-modal:   var(--bg-modal-solid);
  --glass-input:   var(--bg-input);
  --glass-border:  var(--border);
  --glass-overlay: rgba(0,0,0,0.65);

  --bg-app:         #0D0E1C;
  --bg-modal-solid: #1A1B2E;
  --bg-canvas:      #131426;
  --bg-toolbar:     #16172C;
  --bg-tray:        #1A1B2E;
  --bg-card:        #1A1B2E;
  --bg-container:   #1A1B2E;
  --bg-modal:       var(--bg-modal-solid);
  --bg-input:       #1F2138;
  --bg-overlay:     var(--glass-overlay);

  --text-primary:   #E8ECF8;
  --text-secondary: #8B93B8;
  --text-muted:     #5A607A;
  --text-on-accent: #FFFFFF;

  --border:         #2A2D44;
  --border-focus:   #8080FF;
  --shadow-card:    0 2px 8px rgba(0,0,40,0.40);
  --shadow-modal:   0 8px 40px rgba(0,0,0,0.50);
  --shadow-glass:   0 1px 3px rgba(0,0,0,0.30);

  --accent:         #8080FF;
  --accent-hover:   #6B6BF5;
  --accent-glow:    rgba(128,128,255,0.30);
  --danger:         #F87171;
  --danger-hover:   #EF4444;
  --warning:        #FBBF24;
}

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

html { height: 100%; }

body {
  min-height: 100%;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--bg-app);
}

button {
  font-family: var(--font);
  cursor: pointer;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: var(--font);
  font-size: 14px;
  color: var(--text-primary);
  background: var(--glass-input);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 9px 12px;
  width: 100%;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

input:focus, textarea:focus, select:focus {
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}

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

/* ── Auth Screen ─────────────────────────────────────────────── */
#auth-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
}

.auth-card {
  background: var(--glass-modal);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  width: 100%;
  max-width: 400px;
  padding: 36px;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.auth-brand .brand-mark { width: 36px; height: 36px; }
.auth-brand .brand-text { font-size: 26px; line-height: 1; }
.auth-brand h1 { margin: 0; line-height: 1; }

.auth-card h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.04em;
  margin-bottom: 4px;
}

.auth-card p.subtitle {
  color: var(--text-secondary);
  margin-bottom: 24px;
  font-size: 13px;
}

.auth-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--glass-border);
}

.auth-tab {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.15s, border-color 0.15s;
}

.auth-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.auth-form { display: none; }
.auth-form.active { display: block; }

.form-group {
  margin-bottom: 14px;
}

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.auth-error {
  color: var(--danger);
  font-size: 13px;
  margin-bottom: 12px;
  min-height: 18px;
}

.auth-success {
  color: var(--success, #16a34a);
  font-size: 13px;
  margin-bottom: 12px;
  min-height: 18px;
}

.auth-form-hint {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.auth-links {
  text-align: center;
  margin-top: 12px;
}

.auth-link {
  font-size: 13px;
  color: var(--accent);
  text-decoration: none;
}

.auth-link:hover { text-decoration: underline; }

/* OAuth buttons */
.oauth-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}

.btn-oauth {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--glass-input);
  color: var(--text-primary);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s, transform 0.1s;
}
.btn-oauth:active { transform: scale(0.98); }

.btn-oauth:hover {
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  background: color-mix(in srgb, var(--accent) 8%, var(--glass-input));
  color: var(--accent);
}

/* Auth divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 14px 0;
  color: var(--text-secondary);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* Email-verify banner (shown inside board-view) */
.verify-banner {
  background: color-mix(in srgb, var(--warning) 15%, var(--glass-toolbar));
  color: color-mix(in srgb, var(--warning) 70%, var(--text-primary));
  border-bottom: 1px solid color-mix(in srgb, var(--warning) 35%, transparent);
  font-size: 13px;
  text-align: center;
  padding: 8px 16px;
}

.verify-banner a {
  color: var(--accent);
  font-weight: 600;
  margin-left: 8px;
  text-decoration: underline;
}

/* ── Button Styles ───────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--accent);
  color: var(--text-on-accent);
  box-shadow: 0 4px 14px -4px var(--accent-glow);
}

.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 6px 18px -4px var(--accent-glow);
}

/* Auth form submit buttons — full-width only here */
.auth-form .btn-primary {
  width: 100%;
  justify-content: center;
  padding: 10px;
  font-size: 14px;
  margin-top: 4px;
}

.btn-secondary {
  background: var(--glass-input);
  color: var(--text-primary);
  border-color: var(--glass-border);
}

.btn-secondary:hover {
  background: color-mix(in srgb, var(--accent) 8%, var(--glass-input));
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  color: var(--accent);
}

.btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid color-mix(in srgb, var(--danger) 50%, transparent);
}

.btn-danger:hover {
  background: color-mix(in srgb, var(--danger) 12%, transparent);
  border-color: var(--danger);
}

.btn-icon {
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1;
}

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

/* ── Board View ──────────────────────────────────────────────── */
#board-view {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ── Toolbar ─────────────────────────────────────────────────── */
.toolbar {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 12px;
  padding: 8px 18px;
  background: var(--glass-toolbar);
  box-shadow: var(--shadow-glass);
  flex-shrink: 0;
}

/* Col 1: brand mark + wordmark */
.toolbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  flex-shrink: 0;
  margin-right: 6px;
}
.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, color-mix(in srgb, var(--accent) 80%, white), var(--accent));
  box-shadow:
    0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent),
    0 4px 12px -2px var(--accent-glow);
  position: relative;
  flex-shrink: 0;
}
.brand-mark::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.5);
}
.brand-text {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text-primary);
  line-height: 1;
}
.brand-accent { color: var(--accent); }

/* Right column: plain block so rows stack naturally */
.toolbar-right {
  margin-left: auto;
  flex-shrink: 0;
}

.toolbar-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.toolbar-row + .toolbar-row {
  margin-top: 10px;
}

.toolbar-row .btn {
  font-size: 13px;
  padding: 5px 12px;
}

.toolbar-welcome {
  font-size: 13px;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* Custom segmented theme picker — replaces native <select> */
.theme-picker {
  display: flex;
  gap: 2px;
  padding: 2px;
  background: var(--glass-input);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  width: auto;
}
.theme-option {
  width: 30px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-size: 14px;
  line-height: 1;
  padding: 0;
}
.theme-option:hover { color: var(--text-primary); }
.theme-option.active {
  background: var(--bg-modal-solid);
  color: var(--text-primary);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}
[data-theme="dark"] .theme-option.active {
  background: var(--glass-modal);
}

/* ── Search ──────────────────────────────────────────────────── */
.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input {
  width: 200px;
  padding: 7px 28px 7px 14px;
  font-size: 13px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--glass-border);
  background: var(--glass-input);
  color: var(--text-primary);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  transition: border-color 0.15s, width 0.2s, box-shadow 0.15s;
}
.search-input::-webkit-search-decoration,
.search-input::-webkit-search-cancel-button,
.search-input::-webkit-search-results-button,
.search-input::-webkit-search-results-decoration { display: none; }

.search-input:focus {
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
  width: 260px;
}

.search-clear {
  position: absolute;
  right: 6px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  padding: 0 2px;
}

.search-clear:hover { color: var(--text-primary); }

.bookmark-card.search-match {
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--bg-card));
}

/* ── Banner — fixed 728×90, center of toolbar row ───────────── */
.banner-bar {
  /* Fixed size — never flex-grows or flex-shrinks */
  width: 728px;
  height: 90px;
  flex-shrink: 0;
  flex-grow: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.banner-inner {
  position: relative;
  display: inline-block;
  line-height: 0;
}

.banner-bar a {
  display: block;
  line-height: 0;
  border-radius: 3px;
  overflow: hidden;
}

.banner-bar img {
  display: block;
  width: 728px;
  height: 90px;
}

.banner-label {
  position: absolute;
  top: 2px;
  right: 2px;
  font-size: 9px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  background: var(--glass-input);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 1px 6px;
  line-height: 14px;
  pointer-events: none;
  -webkit-user-select: none;
  user-select: none;
}

/* ── Workspace Tabs (fused-tab redesign) ─────────────────────── */
/* The active tab shares the same glass material as the canvas
   below, with its bottom border erased — they read as one
   continuous "page" surface. */

.ws-bar {
  display: flex;
  align-items: flex-end;
  padding: 8px 16px 0;
  background: var(--glass-toolbar);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.ws-bar-right {
  display: flex;
  align-items: center;
  padding: 0 12px 8px 12px;
  gap: 8px;
  flex-shrink: 0;
}

.ws-search-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

.workspace-tabs {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
  flex: 1;
  min-width: 0;
}

.workspace-tabs::-webkit-scrollbar { display: none; }

.ws-tab-wrap {
  display: flex;
  align-items: flex-end;
  position: relative;
}

.ws-tab {
  position: relative;
  display: flex;
  align-items: center;
  padding: 9px 18px 11px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
[data-theme="dark"] .ws-tab {
  background: var(--bg-canvas);
}

.ws-tab:hover {
  background: var(--bg-canvas);
  color: var(--text-primary);
}
[data-theme="dark"] .ws-tab:hover {
  background: var(--bg-input);
}

/* Active tab — same glass surface as the canvas below, reads as one page */
.ws-tab.active {
  background: var(--glass-canvas);
  border-color: var(--border);
  color: var(--text-primary);
  font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--ws-color, var(--accent));
}

/* Erase the canvas's top border under the active tab */
.ws-tab.active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--glass-canvas);
}

.ws-tab-edit {
  opacity: 0;
  padding: 4px 6px;
  font-size: 12px;
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-radius: 6px;
  margin-left: -2px;
  margin-bottom: 4px;
  cursor: pointer;
  transition: opacity 0.15s, color 0.15s;
}
.ws-tab-edit:hover { color: var(--text-primary); }

.ws-tab-wrap:hover .ws-tab-edit { opacity: 1; }

.ws-tab-add {
  margin-left: 4px;
  margin-bottom: 0;
  font-size: 12px;
  padding: 7px 14px;
  color: var(--text-muted);
  background: transparent;
  border: 1px dashed var(--border);
  border-bottom: none;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.ws-tab-add:hover {
  background: var(--bg-canvas);
  color: var(--text-primary);
  border-color: color-mix(in srgb, var(--accent) 40%, var(--border));
}

/* ── Scrollable main area ────────────────────────────────────── */
.board-body {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: row;
  overflow: hidden;
}

/* ── Global panel (Recommendations + Unassigned) ─────────────── */
#global-panel {
  width: 344px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--glass-border);
  background: var(--glass-panel);
  overflow: hidden;
  transition: width 0.2s ease, padding 0.2s ease;
}

#global-panel.collapsed {
  width: 36px;
}


/* Panel toggle lives in ws-bar — aligns with tab strip */
#panel-toggle.ws-panel-toggle {
  align-self: flex-end;
  margin-bottom: 6px;
  margin-right: 4px;
  font-size: 16px;
  flex-shrink: 0;
}

#panel-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

#global-panel.collapsed #panel-content { display: none; }

/* ── Canvas wrapper (scrollable column-flow area) ────────────── */
/* Shares the active workspace tab's glass material so they read as
   one continuous "page". The 1px border-top is what the active tab
   erases via its ::after pseudo-element. */
.canvas-wrap {
  flex: 1;
  overflow: auto;
  padding: 16px;
  box-sizing: border-box;
  min-height: 0;
  background: var(--glass-canvas);
  border-top: 1px solid var(--border);
}

/* ── Unassigned Tray ─────────────────────────────────────────── */
.tray {
  background: var(--bg-tray);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  flex-shrink: 0;
}

.tray-header {
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
}

.tray-count {
  background: var(--bg-input);
  border-radius: 10px;
  padding: 1px 7px;
  font-size: 11px;
}

.tray-body {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 10px 12px;
  min-height: 56px;
}

.tray-body.drag-over {
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-tray));
  outline: 2px dashed var(--accent);
  outline-offset: -4px;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.tray-empty {
  color: var(--text-muted);
  font-size: 13px;
  align-self: center;
  font-style: italic;
}

/* ── Canvas ──────────────────────────────────────────────────── */
#canvas {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 14px;
  height: 100%;
  /* overflow: visible (default) — tall topics and wide column sets both
     propagate to canvas-wrap, which handles all scrolling via overflow: auto */
}

/* ── Topic Container ─────────────────────────────────────────── */
.topic-container {
  background: var(--bg-container);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  width: 320px;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
  transition: box-shadow 0.15s;
}

.topic-container.drag-source {
  opacity: 0.4;
}

.topic-container.drop-before {
  box-shadow: -4px 0 0 0 var(--accent), var(--shadow-card);
}

.topic-container.drop-after {
  box-shadow: 4px 0 0 0 var(--accent), var(--shadow-card);
}

.topic-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  height: 40px;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  border-bottom: 3px solid var(--topic-accent, #4F8EF7);
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}

.topic-header:active { cursor: grabbing; }

.grip {
  color: var(--text-muted);
  font-size: 16px;
  flex-shrink: 0;
}

.topic-name {
  flex: 1;
  font-size: 15px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topic-meta {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.btn-add-bm {
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  flex-shrink: 0;
  color: var(--text-muted);
}

.topic-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.15s;
}

.topic-header:hover .topic-actions,
.topic-container:focus-within .topic-actions {
  opacity: 1;
}

.topic-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 10px;
  min-height: 60px;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.topic-body.body-collapsed {
  display: none;
}

.unassigned-container {
  cursor: default;
  width: 100%;
}

.unassigned-container .topic-header {
  cursor: default;
}

/* ── Recommendations container ───────────────────────────────── */
.recs-container {
  width: 100%;
  cursor: default;
}

.recs-container .topic-header {
  cursor: default;
}

.recs-container .grip { display: none; }

.recs-empty {
  color: var(--text-muted);
  font-size: 12px;
  font-style: italic;
  padding: 4px 2px;
  line-height: 1.5;
}

/* Cards inside the global panel fill their container instead of being fixed-width */
#panel-content .bookmark-card {
  width: 100%;
}

/* ── Add-to-collection button on rec cards ───────────────────── */
.card-add-btn {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  color: var(--text-secondary);
  opacity: 1;
  transition: opacity 0.15s, background 0.15s, color 0.15s;
  background: var(--bg-input);
}

.bookmark-card:hover .card-add-btn { opacity: 1; }
.card-add-btn:hover { background: #8B5CF6; color: #fff; }

.topic-body.drag-over {
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-container));
  outline: 2px dashed var(--accent);
  outline-offset: -4px;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

/* ── Bookmark Card ───────────────────────────────────────────── */
.bookmark-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  width: 300px;
  height: 32px;
  padding: 0 10px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  position: relative;
  transition: box-shadow 0.15s, border-color 0.15s;
  flex-shrink: 0;
}

.bookmark-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.bookmark-card.dragging {
  opacity: 0.4;
}

.bookmark-favicon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  border-radius: 3px;
  object-fit: contain;
}

.card-content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.card-title {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
}

.card-edit-btn {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-secondary);
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
  background: var(--bg-input);
}

.bookmark-card:hover .card-edit-btn { opacity: 1; }
.card-edit-btn:hover { background: var(--accent); color: #fff; }

/* Drop position indicators for bookmark reordering */
.bookmark-card.drop-before-bm { box-shadow: 0 -3px 0 0 var(--accent), var(--shadow-card); }
.bookmark-card.drop-after-bm  { box-shadow: 0  3px 0 0 var(--accent), var(--shadow-card); }

/* Dead / unreachable bookmark */
.bookmark-card.dead {
  opacity: 0.42;
}
.bookmark-card.dead .card-title {
  font-style: italic;
  color: var(--text-muted);
}
.bookmark-card.dead .bookmark-favicon {
  filter: grayscale(1);
  opacity: 0.6;
}

/* ── Batch bar ───────────────────────────────────────────────── */
.batch-bar {
  display: flex;
  align-items: center;
  gap: 8px;
}
#btn-batch-select { padding: 7px 14px; }
.batch-count { font-size: 13px; font-weight: 600; white-space: nowrap; }
.batch-controls,
.batch-actions  { display: flex; align-items: center; gap: 5px; }
.batch-controls { border-right: 1px solid var(--border); padding-right: 8px; }
.batch-bar .btn-sm { padding: 6px 10px; font-size: 13px; }
.batch-bar .btn-sm.active { background: color-mix(in srgb, var(--accent) 15%, var(--glass-input)); border-color: var(--accent); color: var(--accent); }
.batch-move-select {
  padding: 6px 10px; font-size: 13px; border-radius: var(--radius-sm);
  border: 1px solid var(--glass-border);
  background: var(--glass-input); color: var(--text-primary);
  width: auto;
}

/* ── Card checkbox & selection ───────────────────────────── */
.bm-checkbox {
  flex-shrink: 0;
  width: 15px; height: 15px;
  margin-right: 2px;
  cursor: pointer;
  accent-color: var(--accent);
}
.bookmark-card.batch-selected {
  outline: 2px solid var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-card));
}

/* ── Redirect indicator ──────────────────────────────────── */
.redirect-dot {
  position: absolute;
  bottom: 0; right: 30px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--warning, #f59e0b);
  border: 1px solid var(--bg-card);
  pointer-events: none;
}
.redirect-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  background: color-mix(in srgb, var(--warning, #f59e0b) 12%, var(--bg-card));
  border: 1px solid color-mix(in srgb, var(--warning, #f59e0b) 35%, var(--bg-card));
  border-radius: var(--radius);
  margin-bottom: 4px;
}
.redirect-arrow { font-size: 18px; color: var(--warning, #f59e0b); line-height: 1.2; flex-shrink: 0; }
.redirect-notice-body { min-width: 0; }
.redirect-notice-label {
  font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; color: var(--text-secondary); margin-bottom: 2px;
}
.redirect-notice-target { font-size: 12px; word-break: break-all; color: var(--accent); }

.btn-row { display: flex; flex-direction: row; gap: 8px; }
.flex-1  { flex: 1; }

/* Toolbar toggle: active state (e.g. Hide dead pressed) */
.btn.active {
  background: color-mix(in srgb, var(--accent) 15%, var(--bg-input));
  border-color: var(--accent);
  color: var(--accent);
}

/* ── Modals ──────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--glass-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
  animation: modal-overlay-in 0.2s ease both;
}

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

@keyframes modal-overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.modal {
  background: var(--glass-modal);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 48px);
  animation: modal-in 0.32s cubic-bezier(0.32, 0.72, 0, 1) both;
}

@keyframes modal-in {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to   { opacity: 1; transform: scale(1)     translateY(0); }
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 22px 14px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.modal-header h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.modal-close {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: var(--glass-input);
  color: var(--text-secondary);
  font-size: 18px;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.modal-close:hover {
  background: color-mix(in srgb, var(--accent) 12%, var(--glass-input));
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
}

.modal-body {
  padding: 18px 22px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-footer {
  padding: 14px 22px 18px;
  border-top: 1px solid var(--glass-border);
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-shrink: 0;
}

.modal-url-display {
  font-size: 12px;
  color: var(--text-secondary);
  word-break: break-all;
  background: var(--bg-input);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.modal-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.modal-meta span {
  background: var(--bg-input);
  border-radius: 10px;
  padding: 2px 8px;
}

textarea {
  resize: vertical;
  min-height: 80px;
}

select option { background: var(--bg-input); color: var(--text-primary); }

.modal-description {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  border-left: 3px solid var(--border);
  padding: 4px 10px;
  font-style: italic;
}

/* ── Tags input ──────────────────────────────────────────────── */
.tags-input-wrapper {
  background: var(--glass-input);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.tags-input-wrapper:focus-within {
  border-color: color-mix(in srgb, var(--accent) 60%, transparent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent);
}

.tags-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: color-mix(in srgb, var(--accent) 15%, var(--bg-input));
  color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 12px;
  padding: 2px 8px 2px 10px;
  font-size: 12px;
  font-weight: 500;
}

.tag-remove {
  font-size: 14px;
  line-height: 1;
  color: var(--accent);
  opacity: 0.6;
  padding: 0 1px;
  border-radius: 50%;
}

.tag-remove:hover { opacity: 1; background: color-mix(in srgb, var(--accent) 20%, transparent); }

.tags-input-row {
  position: relative;
}

.tags-input-row input {
  background: transparent;
  border: none;
  padding: 2px 4px;
  font-size: 13px;
  width: 100%;
}

.tags-input-row input:focus { border: none; }

.tags-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--glass-modal);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-modal);
  z-index: 200;
  max-height: 180px;
  overflow-y: auto;
}

.tags-suggestion {
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text-primary);
  transition: background 0.1s;
}

.tags-suggestion:hover { background: color-mix(in srgb, var(--accent) 10%, var(--bg-modal)); }

/* ── Public toggle ───────────────────────────────────────────── */
.toggle-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
  font-size: 13px;
  color: var(--text-primary);
}

.toggle-input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-switch {
  display: inline-block;
  position: relative;
  vertical-align: middle;
  width: 38px;
  height: 20px;
  padding: 0px 20px;
  background: var(--border);
  border-radius: 11px;
  flex-shrink: 0;
  transition: background 0.2s;
}

.toggle-switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
}

.toggle-input:checked + .toggle-switch { background: var(--accent); }
.toggle-input:checked + .toggle-switch::after { transform: translateX(16px); }

/* ── Public badge on card ────────────────────────────────────── */
.favicon-wrap {
  position: relative;
  flex-shrink: 0;
  width: 24px;
  height: 24px;
}

.public-dot {
  position: absolute;
  bottom: 8px;
  right: 30px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 1px solid var(--bg-card);
}

/* ── Import Modal ────────────────────────────────────────────── */
.imp-drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  padding: 28px 20px 20px;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
  cursor: default;
}

.imp-drop-zone.drag-active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 6%, var(--bg-modal));
}

.imp-drop-icon {
  font-size: 32px;
  line-height: 1;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.imp-drop-label {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.imp-drop-or {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.imp-file-label {
  cursor: pointer;
  width: auto;
  display: inline-flex;
}

.imp-file-label input[type="file"] {
  display: none;
}

.imp-drop-hint {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
  margin-top: 10px;
}

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

.imp-stat-cell {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 10px;
  text-align: center;
}

.imp-stat-num {
  display: block;
  font-size: 24px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.imp-stat-accent .imp-stat-num { color: var(--accent); }
.imp-stat-muted  .imp-stat-num { color: var(--text-muted); }

.imp-stat-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.imp-hint {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.imp-ws-field { margin-top: 4px; }

.imp-new-ws-row {
  display: flex;
  gap: 8px;
  margin-top: 6px;
  align-items: center;
}

.imp-new-ws-row .color-swatches { flex-shrink: 0; }

.imp-new-ws-row input[type="color"] {
  width: 42px;
  height: 36px;
  padding: 3px 4px;
  cursor: pointer;
  flex-shrink: 0;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-card);
}

.imp-progress-label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.imp-progress-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.imp-progress-track {
  flex: 1;
  height: 8px;
  background: var(--bg-input);
  border-radius: 4px;
  overflow: hidden;
  border: 1px solid var(--border);
}

.imp-progress-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 4px;
  transition: width 0.12s linear;
}

.imp-progress-pct {
  font-size: 12px;
  color: var(--text-secondary);
  width: 36px;
  text-align: right;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.imp-progress-url {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-height: 16px;
  margin-bottom: 12px;
}

.imp-mini-stats {
  display: flex;
  gap: 16px;
  font-size: 12px;
}

.imp-mini-success { color: #34C759; }
.imp-mini-skip    { color: var(--text-muted); }
.imp-mini-err     { color: var(--danger); }

.imp-result-check {
  font-size: 40px;
  text-align: center;
  color: #34C759;
  line-height: 1;
  margin-bottom: 6px;
}

.imp-result-title {
  text-align: center;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.imp-result-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.imp-result-row {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 13px;
  color: var(--text-secondary);
}

.imp-r-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.imp-r-success { background: #34C759; }
.imp-r-muted   { background: var(--text-muted); }
.imp-r-danger  { background: var(--danger); }

/* ── Utility ─────────────────────────────────────────────────── */
.hidden { display: none !important; }

.error-msg {
  color: var(--danger);
  font-size: 12px;
  margin-top: 4px;
}

/* ── Account / billing modal ────────────────────────────────── */
.acct-modal-box { max-width: 380px; }
.acct-modal-box > *:not(.modal-header) { padding-left: 20px; padding-right: 20px; }
.acct-modal-box > #acct-upgrade-section,
.acct-modal-box > #acct-manage-section { padding-bottom: 20px; }
.acct-modal-box > #acct-error:not(.hidden) { padding-bottom: 20px; }

.acct-current-plan {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 16px;
  margin-bottom: 16px;
}
#acct-plan-label {
  font-weight: 600;
  color: var(--accent);
}

.acct-pitch {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 14px;
}

.acct-plan-cards {
  display: flex;
  gap: 10px;
}

.acct-plan-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 12px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
  position: relative;
}
.acct-plan-card:hover {
  border-color: var(--accent);
}
.acct-plan-card:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.acct-plan-card--featured {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-input));
}

.acct-plan-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-on-accent);
  background: var(--accent);
  padding: 2px 7px;
  border-radius: 20px;
  margin-bottom: 2px;
}

.acct-plan-name {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
}

.acct-plan-trial {
  font-size: 12px;
  color: var(--accent);
  font-weight: 500;
}

.acct-plan-cta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}
.acct-plan-card:hover .acct-plan-cta,
.acct-plan-card--featured .acct-plan-cta {
  color: var(--accent);
}

.acct-manage-btn {
  width: 100%;
}

/* ── Color swatch picker (replaces native <input type="color">) ── */
.color-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 0;
}
.color-swatches-compact {
  gap: 6px;
  padding: 0;
}
.swatch {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--swatch);
  border: 2px solid transparent;
  cursor: pointer;
  padding: 0;
  transition: transform 0.12s, box-shadow 0.12s;
  flex-shrink: 0;
}
.swatch:hover { transform: scale(1.1); }
.swatch.active {
  box-shadow:
    0 0 0 2px var(--bg-app),
    0 0 0 4px var(--swatch);
}
.color-swatches-compact .swatch {
  width: 22px;
  height: 22px;
}

/* ── Cross-cutting: focus-visible rings ──────────────────────── */
:where(button, a, input, textarea, select, [tabindex]):focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 70%, transparent);
  outline-offset: 2px;
}
.swatch:focus-visible {
  outline-offset: 4px;
  border-radius: 50%;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: none; /* the box-shadow ring handles it */
}

/* ── Cross-cutting: custom scrollbars ───────────────────────── */
.canvas-wrap, #panel-content, .modal-body {
  scrollbar-color: color-mix(in srgb, var(--accent) 40%, transparent) transparent;
  scrollbar-width: thin;
}
.canvas-wrap::-webkit-scrollbar,
#panel-content::-webkit-scrollbar,
.modal-body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.canvas-wrap::-webkit-scrollbar-track,
#panel-content::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track { background: transparent; }
.canvas-wrap::-webkit-scrollbar-thumb,
#panel-content::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--accent) 40%, transparent);
  border-radius: 4px;
}
.canvas-wrap::-webkit-scrollbar-thumb:hover,
#panel-content::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover {
  background: color-mix(in srgb, var(--accent) 60%, transparent);
}

/* ── Cross-cutting: reduced motion ───────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .btn:active,
  .btn-oauth:active,
  .swatch:hover { transform: none; }
}

/* ── Help / About modal ─────────────────────────────────────── */
.modal-lg { max-width: 680px; width: 90vw; }

.help-tabs {
  display: flex;
  border-bottom: 1px solid var(--border);
  padding: 0 22px;
  flex-shrink: 0;
}
.help-tab {
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
  background: none;
  cursor: pointer;
}
.help-tab.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}
.help-tab:hover:not(.active) { color: var(--text-primary); }

.help-panel { display: none; }
.help-panel.active { display: block; }

.help-about-brand {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 20px;
}
.help-about-logo {
  max-width: 300px;
  width: 100%;
  height: auto;
}
.help-feature-list {
  margin: 14px 0 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: var(--text-secondary);
}
.help-version {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 18px;
  text-align: center;
}

.help-panel h3 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.help-effective { font-size: 12px; color: var(--text-muted); margin-bottom: 16px; }
.help-section { margin-bottom: 16px; }
.help-section h4 { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 4px; }
.help-section p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 6px; }
.help-section ul {
  margin: 6px 0 6px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.help-section kbd {
  font-family: monospace;
  font-size: 11px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
}
.help-link {
  color: var(--accent);
  text-decoration: none;
}
.help-link:hover { text-decoration: underline; }

.acct-legal-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12px;
}
.acct-legal-link {
  color: var(--text-muted);
  text-decoration: none;
}
.acct-legal-link:hover { color: var(--accent); text-decoration: underline; }
.acct-legal-sep { color: var(--text-muted); }
.help-legal-disclaimer {
  margin-top: 18px;
  padding: 10px 14px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-secondary);
  background: color-mix(in srgb, var(--warning) 12%, var(--bg-input));
  border: 1px solid color-mix(in srgb, var(--warning) 40%, transparent);
  border-radius: var(--radius-sm);
}
