@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;

  /* Palette */
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --bg-body: #f1f5f9;
  --bg-sidebar: #ffffff;
  --border: #e2e8f0;
  --text-main: #0f172a;
  --text-muted: #64748b;

  /* Dimensions */
  --sidebar-width: 320px;
  --chat-width: 360px;

  /* Effects */
  --radius: 12px;
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --transition: 0.15s ease;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg-body);
  color: var(--text-main);
  min-height: 100vh;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Layout Grid */
.layout {
  display: grid;
  grid-template-columns: 56px var(--sidebar-width) 1fr;
  height: 100vh;
  background: #ffffff;
  position: relative;
}

.layout.sidebar-collapsed {
  grid-template-columns: 56px 0px 1fr;
}

/* Advanced Mode Vertical Sidebar (Icon Bar) */
.icon-sidebar {
  grid-column: 1;
  background: #fafbfc;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px 0 12px;
  width: 56px;
  z-index: 15;
  contain: layout style;
}

.icon-sidebar-btn {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
  transition: background-color 0.15s ease, color 0.15s ease;
  will-change: background-color;
}

.icon-sidebar-btn::before {
  content: '';
  position: absolute;
  left: -4px;
  top: 50%;
  transform: translateY(-50%) scaleY(0);
  width: 3px;
  height: 20px;
  background: var(--primary);
  border-radius: 0 2px 2px 0;
  transition: transform 0.15s ease;
}

.icon-sidebar-btn:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
}

.icon-sidebar-btn:active {
  background: rgba(37, 99, 235, 0.12);
}

/* Active state */
.icon-sidebar-btn.active {
  color: var(--primary);
  background: rgba(37, 99, 235, 0.1);
}

.icon-sidebar-btn.active::before {
  transform: translateY(-50%) scaleY(1);
}

/* When sidebar is collapsed */
.layout.sidebar-collapsed .icon-sidebar-btn.active {
  background: transparent;
}

.layout.sidebar-collapsed .icon-sidebar-btn.active::before {
  transform: translateY(-50%) scaleY(0);
}

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

/* Sidebar */
.sidebar {
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  position: relative;
  z-index: 10;
  contain: layout style;
}

.sidebar-top {
  padding: 16px 14px 0 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-sidebar);
  position: relative;
  z-index: 2;
}

/* Search Header */
.nav-header {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

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

.icon-button {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: background-color 0.1s ease, color 0.1s ease, border-color 0.1s ease;
  font-size: 16px;
}

.icon-button:hover {
  background: #f8fafc;
  color: var(--primary);
  border-color: rgba(37, 99, 235, 0.3);
}

.icon-button:active {
  background: #f1f5f9;
}

.search-box {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0 12px;
  height: 40px;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.search-box:focus-within {
  background: #ffffff;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08);
}

.search-box:hover:not(:focus-within) {
  border-color: #cbd5e1;
}

.search-box svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.search-box:focus-within svg {
  color: var(--primary);
}

.search-box input {
  border: none;
  background: transparent;
  width: 100%;
  font-size: 14px;
  color: var(--text-main);
  outline: none;
}

.search-box input::placeholder {
  color: #94a3b8;
}

/* Premium Panel */
.premium-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}

.premium-panel.is-hidden {
  display: none;
}

.premium-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 10px 12px;
  background: #f1f5f9;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: background 0.15s ease;
}

.premium-toggle:hover {
  background: #e2e8f0;
}

.premium-toggle.has-premium {
  background: linear-gradient(135deg, #fffbeb, #fef3c7);
  border: 1px solid #fcd34d;
  color: #92400e;
}

.premium-toggle-indicator {
  transition: transform 0.2s ease;
  font-size: 16px;
  line-height: 1;
  color: var(--text-muted);
}
.premium-panel[data-state='expanded'] .premium-toggle-indicator {
  transform: rotate(90deg);
}

.premium-collapsible {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.premium-banner {
  background: linear-gradient(135deg, #f59e0b, #fbbf24);
  color: #ffffff;
  font-weight: 600;
  font-size: 13px;
  padding: 8px;
  border-radius: 6px;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.premium-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.premium-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.premium-input-row {
  display: flex;
  gap: 8px;
}

.premium-input-row input {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
  font-size: 13px;
  outline: none;
}
.premium-input-row input:focus {
  border-color: var(--primary);
}

/* Locked input state (when logged in) */
.input-locked,
input.input-locked {
  background-color: #f1f5f9 !important;
  color: var(--text-muted) !important;
  cursor: not-allowed !important;
  border-color: #e2e8f0 !important;
}
.input-locked:focus,
input.input-locked:focus {
  border-color: #e2e8f0 !important;
  box-shadow: none !important;
}

/* Locked input hint */
.input-locked-hint {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
  padding: 4px 8px;
  background: #f8fafc;
  border-radius: 4px;
  border: 1px solid var(--border);
}
.input-locked-hint svg {
  color: var(--text-muted);
  flex-shrink: 0;
}

.primary-button {
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}
.primary-button:hover {
  background: var(--primary-hover);
}

.secondary-button {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-main);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  cursor: pointer;
}
.secondary-button:hover {
  background: #f8fafc;
}

.auth-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border);
}
.auth-user-meta {
  display: flex;
  flex-direction: column;
}
.auth-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
}
.auth-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}
.auth-email {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-main);
}
.logout-button {
  font-size: 11px;
  padding: 4px 8px;
}

.premium-status-message {
  font-size: 12px;
  color: var(--text-muted);
}
.premium-status-message[data-variant='error'] { color: #ef4444; }
.premium-status-message[data-variant='success'] { color: #10b981; }

/* Navigation Area */
.nav-area {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  contain: strict;
}

.nav-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0, 0, 0, 0.15) transparent;
  contain: content;
  will-change: scroll-position;
}

.nav-scroll::-webkit-scrollbar {
  width: 6px;
}

.nav-scroll::-webkit-scrollbar-track {
  background: transparent;
}

.nav-scroll::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
  border-radius: 3px;
}

.nav-scroll::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.25);
}

.nav-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.nav-section {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.nav-section-heading {
  position: sticky;
  top: 0;
  background: var(--section-color);
  padding: 8px 12px;
  font-size: 14px;
  font-weight: 600;
  text-transform: none;
  letter-spacing: 0;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  text-align: left;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  z-index: 1;
  margin-bottom: 0;
  margin-top: 0;
}

.nav-section-heading:hover {
  opacity: 0.92;
}

.nav-section-heading:active {
  opacity: 0.85;
}

.nav-section-arrow {
  display: inline-flex;
  transition: transform 0.15s ease;
  transform: rotate(90deg);
  font-size: 14px;
  color: rgba(255, 255, 255, 0.8);
}

.nav-section.is-collapsed .nav-section-arrow {
  transform: rotate(0deg);
}

.nav-section.is-collapsed .nav-section-list {
  display: none;
}

.nav-section-list {
  list-style: none;
  padding: 6px 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.nav-item {
  display: flex;
  flex-direction: column;
}

.nav-link {
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  padding: 5px 12px;
  border: none;
  background: transparent;
  border-radius: 0;
  text-align: left;
  cursor: pointer;
  color: var(--text-main);
}

.nav-link:hover {
  background: #f1f5f9;
}

.nav-link:active {
  background: #e2e8f0;
}

.nav-label {
  min-width: 22px;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: var(--section-color);
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-shrink: 0;
  margin-top: 0;
}

.nav-title {
  font-size: 14px;
  line-height: 1.4;
  font-weight: 400;
  color: var(--text-main);
}

.nav-link:hover .nav-title {
  color: #000000;
}

/* Subtables */
.nav-sublist {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
}

.nav-link.is-subtable {
  padding-left: 12px;
}

.nav-link.is-subtable .nav-label {
  background: transparent;
  color: #000000;
  font-weight: 700;
  min-width: 20px;
  justify-content: flex-end;
  margin-left: 12px;
}

.nav-link.is-subtable .nav-title {
  font-size: 14px;
  font-weight: 400;
  font-style: italic;
  color: #000000;
}

.nav-link.is-subtable:hover .nav-title {
  color: #000000;
}

/* Theme Colors */
.nav-section[data-theme='algemeen'], .nav-item[data-theme='algemeen'] { --section-color: #c94195; }
.nav-section[data-theme='natuurkunde'], .nav-item[data-theme='natuurkunde'] { --section-color: #0163ac; }
.nav-section[data-theme='wiskunde'], .nav-item[data-theme='wiskunde'] { --section-color: #a0341a; }
.nav-section[data-theme='scheikunde'], .nav-item[data-theme='scheikunde'] { --section-color: #ff3b2d; }
.nav-section[data-theme='biologie'], .nav-item[data-theme='biologie'] { --section-color: #2c9a44; }
.nav-section[data-theme='register'], .nav-item[data-theme='register'] { --section-color: #aa9b88; }

.nav-item[data-theme] .nav-label {
  color: var(--section-color);
  font-weight: 700;
}

/* Viewer Area */
.viewer {
  background: #ffffff;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.viewer-area {
  flex: 1;
  background: #111827; /* Dark background for PDF viewer */
  display: flex;
  position: relative;
}

.viewer-frame-wrapper {
  flex: 1;
  position: relative;
}
.viewer-frame-wrapper iframe {
  width: 100%;
  height: 100%;
  border: none;
}

/* Chat Sidebar */
.chat-sidebar {
  background: #ffffff;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  position: relative;
  z-index: 10;
  /* Removed animation */
}

.chat-embed {
  width: 100%;
  height: 100%;
}
.chat-embed iframe {
  width: 100%;
  height: 100%;
}

/* Floating Toggles */
.sidebar-toggle-floating {
  position: fixed;
  left: 20px;
  bottom: 20px;
  z-index: 20;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
  cursor: pointer;
  display: none; /* Only show when collapsed */
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: transform 0.2s;
}
.sidebar-toggle-floating:hover {
  transform: scale(1.05);
}
.sidebar-toggle-floating.visible {
  display: flex;
}

/* Chat Toggle Improved */
.chat-toggle-floating {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  height: 48px;
  border-radius: 24px;
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border);
  box-shadow: 0 4px 15px rgba(0,0,0,0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px 0 16px;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.chat-toggle-floating:hover {
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}

.chat-toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
}
.chat-toggle-icon svg {
  width: 20px;
  height: 20px;
}

.chat-toggle-label {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
}

.chat-toggle-icon-close, .chat-toggle-label-close { display: none; }

/* State when chat is open: Button moves or stays?
   If we want it to "collapse" the menu, it should indicate 'Close'.
   The button is fixed at bottom-right.
   When chat is open, the menu is there. The button can stay there or move.
   Let's keep it floating at bottom right.
*/

.chat-toggle-floating.is-open {
  background: var(--primary);
  color: #ffffff;
  border-color: transparent;
  /* If sidebar is open, it might overlay it? No, grid handles layout.
     The toggle stays fixed. */
}
.chat-toggle-floating.is-open .chat-toggle-icon { color: #ffffff; }

.chat-toggle-floating.is-open .chat-toggle-icon-open,
.chat-toggle-floating.is-open .chat-toggle-label-open {
  display: none;
}
.chat-toggle-floating.is-open .chat-toggle-icon-close,
.chat-toggle-floating.is-open .chat-toggle-label-close {
  display: flex;
}

/* Dialogs & Overlays */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 9;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}
.sidebar-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}

.nav-dialog {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.15s ease, visibility 0.15s ease;
  will-change: opacity;
}

.nav-dialog.visible {
  opacity: 1;
  visibility: visible;
}

.nav-dialog-content,
.purchase-modal,
.overlay-small {
  transform: scale(0.9);
  opacity: 0;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.15s ease;
  will-change: transform, opacity;
}

.nav-dialog.visible .nav-dialog-content,
.nav-dialog.visible .purchase-modal,
.nav-dialog.visible .overlay-small {
  transform: scale(1);
  opacity: 1;
}

.nav-dialog-content {
  background: #ffffff;
  width: min(800px, 92vw);
  height: min(80vh, 800px);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

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

.nav-dialog-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-dialog-title {
  font-size: 18px;
  font-weight: 700;
}

.nav-dialog-toggle {
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
}

.nav-dialog-toggle:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

.nav-dialog-toggle[aria-pressed="true"] {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}

.nav-dialog-close {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: var(--text-muted);
  transition: color 0.15s;
}

.nav-dialog-close:hover {
  color: var(--text-main);
}

.nav-dialog-search {
  margin: 16px 16px 0 16px;
  height: 36px;
  flex: 0 0 auto;
}

.nav-dialog-list-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.footer-note {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: #111827;
  color: #fff;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 12px;
  z-index: 5;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  pointer-events: none;
}

/* Debug Log (Hidden mostly) */
.debug-log {
  font-family: monospace;
  font-size: 10px;
  background: #f1f5f9;
  padding: 8px;
  border-radius: 4px;
  max-height: 100px;
  overflow: auto;
}

/* Responsive */
@media (max-width: 1100px) {
  .layout {
    grid-template-columns: 56px var(--sidebar-width) 1fr;
  }

  .chat-sidebar {
    position: fixed;
    right: 0;
    top: 0;
    bottom: 0;
    width: min(var(--chat-width), 90vw);
    box-shadow: -4px 0 20px rgba(0,0,0,0.1);
    transform: translateX(100%);
  }

  .layout:not(.chat-collapsed) .chat-sidebar {
    transform: translateX(0);
  }

  .layout.chat-collapsed .chat-sidebar {
    transform: translateX(100%);
  }
}

@media (max-width: 900px) {
  :root {
    --sidebar-width: 280px;
  }

  .layout {
    grid-template-columns: 56px 1fr;
  }

  .layout.sidebar-collapsed {
    grid-template-columns: 56px 1fr;
  }

  .sidebar {
    position: fixed;
    left: 56px;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    box-shadow: 4px 0 16px rgba(0,0,0,0.08);
    transform: translateX(0);
    transition: transform 0.2s ease;
    z-index: 30;
    will-change: transform;
  }

  .layout.sidebar-collapsed .sidebar {
    transform: translateX(-120%);
    box-shadow: none;
  }

  .viewer {
    grid-column: 2;
  }

  .chat-sidebar {
     z-index: 40;
  }
  
  /* Slightly smaller buttons on mobile */
  .icon-sidebar-btn {
    width: 36px;
    height: 36px;
  }
  
  .icon-sidebar-btn svg {
    width: 18px;
    height: 18px;
  }
}

/* Icon Sidebar Updates */
.icon-sidebar-top, .icon-sidebar-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  gap: 2px;
}

.icon-sidebar-spacer {
  flex: 1;
}

.icon-sidebar-divider {
  width: 28px;
  height: 1px;
  background: var(--border);
  margin: 8px 0;
}

.account-btn {
  padding: 0;
  overflow: hidden;
}

.account-circle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
  border: 2px solid transparent;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  overflow: hidden;
}

/* Google profile photo in account circle */
.account-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.account-btn:hover .account-circle {
  background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
  border-color: rgba(37, 99, 235, 0.2);
}

.account-circle.gold-border {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 2px solid #f59e0b;
  color: #92400e;
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.15);
}

.account-circle.gold-border svg {
  color: #d97706;
}

/* Gold hover highlight on account button when Plus active */
.account-btn:hover .account-circle.gold-border {
  background: linear-gradient(135deg, #fde68a, #fcd34d);
  border-color: #d97706;
  box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.gold-icon {
  color: #d97706 !important;
}

.gold-icon svg {
  fill: rgba(251, 191, 36, 0.15);
  stroke: #d97706;
}

/* Gold icon active/hover state */
.icon-sidebar-btn.gold-icon:hover {
  background: rgba(251, 191, 36, 0.15);
  color: #d97706;
}

.icon-sidebar-btn.gold-icon.active {
  color: #d97706;
  background: rgba(251, 191, 36, 0.15);
}

.icon-sidebar-btn.gold-icon.active::before {
  background: #f59e0b;
}

.layout.sidebar-collapsed .icon-sidebar-btn.gold-icon.active {
  background: transparent;
}

/* Plus Active Indicator - Subtle badge for active Plus users */
.plus-indicator {
  margin-bottom: 6px;
  appearance: none;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #f59e0b;
  color: #d97706;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.plus-indicator:hover {
  background: linear-gradient(135deg, #fde68a, #fcd34d);
  box-shadow: 0 3px 10px rgba(245, 158, 11, 0.3);
}

.plus-indicator.is-static {
  animation: none;
}

.plus-indicator svg {
  stroke: #d97706;
  width: 14px;
  height: 14px;
}

/* Plus Promo Button - Professional, clear design */
.plus-promo-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  width: 42px;
  padding: 0;
  margin-bottom: 8px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.plus-promo-btn:hover {
  border-color: #f59e0b;
  box-shadow: 0 2px 12px rgba(245, 158, 11, 0.15);
}

.plus-promo-label {
  width: 100%;
  padding: 8px 4px 6px;
  font-size: 10px;
  font-weight: 700;
  color: #ffffff;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  text-align: center;
}

.plus-promo-divider {
  display: none;
}

.plus-promo-features {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 110px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  overflow: hidden;
  padding: 8px 0;
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 100%);
}

.plus-promo-text {
  font-size: 11px;
  font-weight: 500;
  color: #92400e;
  white-space: nowrap;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.plus-promo-text.fade-out {
  opacity: 0;
}

/* Overlays */
.overlay-small {
  width: min(400px, 90vw);
  height: auto;
  max-height: 80vh;
}

.overlay-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
}

.overlay-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.overlay-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.benefits-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}

/* Context Menu */
.context-menu {
  position: fixed;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12), 0 0 1px rgba(0, 0, 0, 0.1);
  z-index: 100;
  padding: 6px;
  min-width: 180px;
}

.context-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  text-align: left;
  background: transparent;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-main);
}

.context-menu-item:hover {
  background: rgba(37, 99, 235, 0.08);
  color: var(--primary);
}

.context-menu-item:active {
  background: rgba(37, 99, 235, 0.12);
}

/* Favorites View */
.favorites-view {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.favorites-header {
  padding: 16px 16px 12px 16px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
  background: var(--bg-sidebar);
}

.favorites-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-main);
}

/* Upsell UI - AI Chat Plus Feature */
.upsell-container {
  padding: 40px 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  background: #ffffff;
}

.upsell-icon {
  width: 56px;
  height: 56px;
  margin-bottom: 20px;
  color: var(--primary);
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-radius: 14px;
  padding: 14px;
  box-sizing: content-box;
}

.upsell-title {
  margin: 0 0 8px 0;
  font-size: 17px;
  font-weight: 600;
  color: var(--text-main);
}

.upsell-text {
  color: var(--text-muted);
  margin: 0 0 24px 0;
  font-size: 14px;
  line-height: 1.6;
  max-width: 260px;
}

.upsell-button {
  width: 100%;
  max-width: 220px;
  background: linear-gradient(180deg, #fcd34d 0%, #f59e0b 100%);
  color: #1a1a1a;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.upsell-button:hover {
  background: linear-gradient(180deg, #fde68a 0%, #fbbf24 100%);
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
}

.upsell-button:active {
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.25);
}

/* Split Labels */
.label-part-num {
  font-weight: 700;
  color: var(--section-color);
}
.label-part-suffix {
  font-weight: 700;
  color: #000000; /* Black for the letter */
}

/* Toast Notifications */
.binas-toast {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%) translateY(-100px);
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  z-index: 10000;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(400px, 90vw);
  opacity: 0;
  transition: transform 0.2s ease, opacity 0.2s ease;
  will-change: transform, opacity;
}

.binas-toast--visible {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.binas-toast--hiding {
  transform: translateX(-50%) translateY(-20px);
  opacity: 0;
}

.binas-toast__content {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.binas-toast__icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}

.binas-toast--success .binas-toast__icon {
  background: #dcfce7;
  color: #16a34a;
}

.binas-toast--error .binas-toast__icon {
  background: #fee2e2;
  color: #dc2626;
}

.binas-toast--info .binas-toast__icon {
  background: #dbeafe;
  color: #2563eb;
}

.binas-toast__message {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-main);
  line-height: 1.4;
}

.binas-toast__close {
  background: transparent;
  border: none;
  font-size: 20px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background 0.15s, color 0.15s;
}

.binas-toast__close:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

/* Confirmation Dialog */
.binas-confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.binas-confirm-overlay--visible {
  opacity: 1;
}

.binas-confirm-dialog {
  background: #ffffff;
  border-radius: 16px;
  padding: 24px;
  max-width: min(420px, 90vw);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  transform: scale(0.95);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.binas-confirm-overlay--visible .binas-confirm-dialog {
  transform: scale(1);
}

.binas-confirm-title {
  margin: 0 0 12px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-main);
}

.binas-confirm-text {
  margin: 0 0 16px 0;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.5;
}

.binas-confirm-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 20px;
}

.binas-confirm-option {
  font-size: 13px;
  color: var(--text-main);
  padding: 8px 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px solid var(--border);
}

.binas-confirm-buttons {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.binas-confirm-btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.binas-confirm-btn--cancel {
  background: #f1f5f9;
  border: 1px solid var(--border);
  color: var(--text-main);
}

.binas-confirm-btn--cancel:hover {
  background: #e2e8f0;
}

.binas-confirm-btn--confirm {
  background: var(--primary);
  border: 1px solid var(--primary);
  color: #ffffff;
}

.binas-confirm-btn--confirm:hover {
  background: var(--primary-hover);
}

/* ===== PURCHASE MODAL - Conversion Focused Design ===== */

.purchase-modal {
  background: linear-gradient(135deg, #1e3a5f 0%, #1e40af 100%);
  width: min(520px, 94vw);
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  -webkit-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

.purchase-modal-header {
  background: transparent;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.purchase-modal-title {
  color: #ffffff;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.purchase-modal-close {
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.15s ease;
}

.purchase-modal-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}

.purchase-modal-body {
  padding: 24px 28px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: #ffffff;
  border-radius: 0 0 16px 16px;
}

.purchase-modal-icon {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
  border: 3px solid #2563eb;
}

.purchase-modal-icon svg {
  width: 40px;
  height: 40px;
}

/* Social Proof */
.purchase-social-proof {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.purchase-stars {
  color: #fbbf24;
  font-size: 14px;
  letter-spacing: 1px;
}

.purchase-users {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.purchase-modal-heading {
  margin: 0 0 4px 0;
  font-size: 21px;
  font-weight: 700;
  color: var(--text-main);
  text-align: center;
}

.purchase-modal-subtitle {
  margin: 0 0 16px 0;
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.4;
}

.purchase-modal-subtitle strong {
  color: var(--text-main);
  font-weight: 700;
}

/* Sale pricing */
.price-original {
  text-decoration: line-through;
  color: #9ca3af;
  font-size: 13px;
  margin-right: 2px;
}

.price-original-small {
  text-decoration: line-through;
  color: rgba(0, 0, 0, 0.45);
  font-weight: 400;
}

/* CTA Button Loading State */
.purchase-cta-button.is-loading {
  pointer-events: none;
  opacity: 0.9;
}

.purchase-cta-button.is-loading .purchase-sale-badge,
.purchase-cta-button.is-loading .purchase-cta-main,
.purchase-cta-button.is-loading .purchase-cta-sub {
  display: none;
}

.purchase-loading-dots {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 0;
}

.purchase-cta-button.is-loading .purchase-loading-dots {
  display: flex;
}

.purchase-loading-dot {
  width: 10px;
  height: 10px;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 50%;
  animation: purchaseLoadingBounce 1.4s ease-in-out infinite;
}

.purchase-loading-dot:nth-child(1) {
  animation-delay: 0s;
}

.purchase-loading-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.purchase-loading-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes purchaseLoadingBounce {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}


/* Features List */
.purchase-features {
  width: 100%;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.purchase-feature {
  display: flex;
  align-items: center;
  gap: 8px;
}

.purchase-feature-icon {
  font-size: 14px;
  line-height: 1;
  flex-shrink: 0;
  width: 18px;
  text-align: center;
  color: #10b981;
  font-weight: 700;
}

.purchase-feature-text {
  font-size: 13px;
  color: var(--text-main);
  line-height: 1.3;
}

.purchase-feature-text strong {
  font-weight: 600;
}

/* Price Display */
.purchase-price-display {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.purchase-price-badge {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  letter-spacing: 0.02em;
}

.purchase-price-was {
  font-size: 14px;
  color: var(--text-muted);
}

.purchase-price-was .config-original-price {
  text-decoration: line-through;
}

.purchase-price-now {
  font-size: 14px;
  color: var(--text-main);
}

.purchase-price-now strong {
  font-size: 18px;
  font-weight: 700;
  color: #10b981;
}

/* Account Box (logged in) */
.purchase-account-box {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 16px;
  margin-top: 4px;
}

.purchase-account-avatar {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.purchase-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

.purchase-avatar-letter {
  font-weight: 700;
  font-size: 16px;
  color: var(--text-main);
}

.purchase-account-info-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.purchase-account-email {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.purchase-account-notice {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 1px;
}

/* CTA Button */
.purchase-cta-button {
  position: relative;
  width: 100%;
  background: linear-gradient(180deg, #fcd34d 0%, #f59e0b 100%);
  border: none;
  border-radius: 10px;
  padding: 12px 24px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.35);
  transition: background 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.purchase-cta-button:hover {
  background: linear-gradient(180deg, #fde68a 0%, #fbbf24 100%);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.45);
}

.purchase-cta-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}
.purchase-cta-button.is-disabled,
.purchase-cta-button:disabled {
  background: #e5e7eb;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
}
.purchase-cta-button.is-disabled:hover,
.purchase-cta-button:disabled:hover {
  background: #e5e7eb;
  box-shadow: none;
  transform: none;
}
.purchase-cta-button.is-disabled .purchase-cta-main,
.purchase-cta-button:disabled .purchase-cta-main {
  color: #6b7280;
}
.purchase-cta-button.is-disabled .purchase-cta-sub,
.purchase-cta-button:disabled .purchase-cta-sub {
  color: #9ca3af;
}

.purchase-cta-main {
  font-size: 16px;
  font-weight: 700;
  color: #1a1a1a;
}

.purchase-cta-sub {
  font-size: 13px;
  font-weight: 500;
  color: rgba(0, 0, 0, 0.65);
}

/* Status Message */
.purchase-status-message {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  margin-top: 10px;
}

.purchase-status-message:empty {
  display: none;
}

.purchase-status-message[data-variant='error'] {
  color: #ef4444;
}

.purchase-status-message[data-variant='success'] {
  color: #10b981;
}

/* Trust Badge */
.purchase-trust-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  width: 100%;
}

.purchase-trust-badge svg {
  flex-shrink: 0;
}

.purchase-trust-badge span {
  font-size: 13px;
  color: var(--text-muted);
}

.purchase-trust-badge strong {
  color: var(--text-main);
  font-weight: 600;
}

/* Mobile adjustments */
@media (max-width: 540px) {
  .purchase-modal {
    width: 95vw;
    border-radius: 12px;
  }
  
  .purchase-modal-body {
    padding: 16px 18px 14px;
  }
  
  .purchase-modal-icon {
    width: 56px;
    height: 56px;
    margin-bottom: 10px;
  }
  
  .purchase-modal-icon svg {
    width: 30px;
    height: 30px;
  }
  
  .purchase-modal-heading {
    font-size: 19px;
  }
  
  .purchase-modal-subtitle {
    font-size: 13px;
    margin-bottom: 14px;
  }
  
  .purchase-features {
    padding: 10px 12px;
    gap: 6px;
    margin-bottom: 12px;
  }
  
  .purchase-feature-text {
    font-size: 12px;
  }
  
  .purchase-account-box {
    margin-bottom: 12px;
  }
  
  .purchase-cta-button {
    padding: 10px 20px;
  }
  
  .purchase-cta-main {
    font-size: 15px;
  }
  
  .purchase-trust-badge {
    margin-top: 12px;
  }
}

/* ===== PASSKEY STYLES ===== */

.passkey-section {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 8px;
}

.passkey-description {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0 0 12px 0;
  line-height: 1.5;
}

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

.passkey-loading {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #f8fafc;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.passkey-loading-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.passkey-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 20px 12px;
  background: #f8fafc;
  border-radius: 8px;
  border: 1px dashed var(--border);
  color: var(--text-muted);
}

.passkey-empty svg {
  opacity: 0.5;
}

.passkey-empty span {
  font-size: 13px;
}

.passkey-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.15s ease;
}

.passkey-item:hover {
  border-color: #cbd5e1;
}

.passkey-item-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.passkey-item-icon {
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.passkey-item-icon svg {
  width: 16px;
  height: 16px;
  color: var(--primary);
}

.passkey-item-details {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.passkey-item-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.passkey-item-date {
  font-size: 11px;
  color: var(--text-muted);
}

.passkey-item-delete {
  background: transparent;
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.passkey-item-delete:hover {
  background: #fee2e2;
  color: #dc2626;
}

.passkey-item-delete svg {
  width: 14px;
  height: 14px;
}

.passkey-add-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 10px 16px;
  background: linear-gradient(135deg, #eff6ff, #dbeafe);
  border: 1px solid var(--primary);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.passkey-add-btn:hover {
  background: var(--primary);
  color: #ffffff;
}

.passkey-add-btn:hover svg {
  stroke: #ffffff;
}

.passkey-add-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.passkey-add-btn svg {
  transition: stroke 0.15s ease;
}

/* Passkey Login Button */
.passkey-login-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 12px 16px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.passkey-login-btn:hover {
  background: #f8fafc;
  border-color: var(--primary);
  color: var(--primary);
}

.passkey-login-btn:hover svg {
  stroke: var(--primary);
}

.passkey-login-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.passkey-login-btn svg {
  color: var(--text-muted);
  transition: stroke 0.15s ease;
}

/* Passkey signup form */
.passkey-signup-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 12px;
}

.passkey-signup-form input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease;
}

.passkey-signup-form input:focus {
  border-color: var(--primary);
}

.passkey-signup-form .passkey-signup-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--primary);
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  cursor: pointer;
  transition: background 0.15s ease;
}

.passkey-signup-form .passkey-signup-btn:hover {
  background: var(--primary-hover);
}

.passkey-signup-form .passkey-signup-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}


/* Favorites View Enhancements */
.favorites-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Folder Styles */
.folder-container {
  display: flex;
  flex-direction: column;
  background: transparent;
  border-radius: 8px;
}

.folder-header {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 8px 12px;
  background: transparent;
  border: none;
  cursor: pointer;
  border-radius: 8px;
  transition: background 0.15s ease;
  position: relative;
  gap: 8px;
}

.folder-header:hover {
  background: #f1f5f9;
}

.folder-arrow {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: transform 0.2s ease;
  transform: rotate(90deg);
}

.folder-container.collapsed .folder-arrow {
  transform: rotate(0deg);
}

.folder-color-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background-color: var(--text-muted);
  flex-shrink: 0;
}

.folder-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  flex: 1;
  text-align: left;
}

.folder-items {
  display: flex;
  flex-direction: column;
  padding-left: 12px; /* Indentation */
  gap: 0;
}

.folder-container.collapsed .folder-items {
  display: none;
}

/* Item Styles Enhancements */
.nav-item-content {
  display: flex;
  align-items: center;
  width: 100%;
}

.note-indicator {
  margin-left: 4px;
  color: #f59e0b;
}

.item-actions {
  display: flex;
  align-items: center;
  padding-right: 12px;
  gap: 4px;
}

.action-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 6px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.1s, color 0.1s;
}

.action-btn:hover {
  background: rgba(0,0,0,0.05);
  color: var(--text-main);
}

.action-btn svg {
  width: 16px;
  height: 16px;
}

/* Drag and Drop */
.dragging {
  opacity: 0.5;
  background: #f1f5f9;
}

.drag-over {
  background: rgba(37, 99, 235, 0.1) !important;
  border-radius: 8px;
  box-shadow: inset 0 0 0 2px var(--primary);
}

/* Color Picker Dialog (Reusing existing patterns or simple list) */
.color-picker-grid {
  display: flex;
  gap: 8px;
  padding: 8px;
  justify-content: center;
}

.color-option {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.1s;
}

.color-option:hover {
  transform: scale(1.1);
}

.color-option.selected {
  border-color: var(--text-main);
}
