@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;
  --bg-main: #f5f7fb;
  --bg-card: rgba(255, 255, 255, 0.92);
  --bg-card-hover: #ffffff;
  --bg-input: #ffffff;
  --border-color: rgba(15, 23, 42, 0.1);
  --border-focus: rgba(99, 102, 241, 0.5);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --accent-primary: #6366f1;
  --accent-secondary: #8b5cf6;
  --accent-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
  --accent-hover: #4f46e5;
  --accent-glow: rgba(99, 102, 241, 0.35);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --shadow-sm: 0 4px 6px -1px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 25px -5px rgba(15, 23, 42, 0.1);
  --shadow-glow: 0 4px 14px rgba(99, 102, 241, 0.25);
  --backdrop-blur: blur(16px);
  --transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  background-image: 
    radial-gradient(circle at 15% 15%, rgba(99, 102, 241, 0.12) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(236, 72, 153, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.05) 0%, transparent 60%);
  background-attachment: fixed;
  overflow-x: hidden;
}

h1, h2, h3, h4, .brand-title {
  font-family: 'Outfit', sans-serif;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.12);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.22);
}

/* Container */
.container {
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Glass Card */
.glass-panel {
  background: var(--bg-card);
  backdrop-filter: var(--backdrop-blur);
  -webkit-backdrop-filter: var(--backdrop-blur);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: var(--backdrop-blur);
  border-bottom: 1px solid var(--border-color);
}
.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text-primary);
  cursor: pointer;
}
.brand-logo {
  width: 38px;
  height: 38px;
  background: var(--accent-gradient);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: var(--shadow-glow);
}
.brand-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(135deg, #1e1b4b 30%, #4f46e5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.brand-badge {
  font-size: 0.7rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.18);
  color: #4338ca;
  border: 1px solid rgba(99, 102, 241, 0.3);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* User Pill & Token Pill */
.token-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  color: #4338ca;
  cursor: pointer;
  transition: var(--transition);
}
.token-badge:hover {
  background: rgba(99, 102, 241, 0.22);
  border-color: rgba(99, 102, 241, 0.5);
  box-shadow: 0 0 15px rgba(99, 102, 241, 0.25);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
}
.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: white;
}
.user-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  font-family: inherit;
}
.btn-primary {
  background: var(--accent-gradient);
  color: white;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
}
.btn-primary:hover {
  opacity: 0.92;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}
.btn-secondary {
  background: rgba(15, 23, 42, 0.05);
  border-color: var(--border-color);
  color: var(--text-primary);
}
.btn-secondary:hover {
  background: rgba(15, 23, 42, 0.1);
  border-color: rgba(15, 23, 42, 0.15);
}
.btn-danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: rgba(239, 68, 68, 0.3);
  color: #b91c1c;
}
.btn-danger:hover {
  background: rgba(239, 68, 68, 0.25);
  border-color: rgba(239, 68, 68, 0.5);
}
.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}
.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--radius-sm);
}

/* Auth View */
.auth-wrapper {
  min-height: calc(100vh - 100px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  padding: 36px;
  position: relative;
  overflow: hidden;
}
.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent-gradient);
}
.auth-header {
  text-align: center;
  margin-bottom: 28px;
}
.auth-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.auth-header p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.auth-tabs {
  display: flex;
  background: rgba(15, 23, 42, 0.05);
  padding: 4px;
  border-radius: var(--radius-md);
  margin-bottom: 24px;
  border: 1px solid var(--border-color);
}
.auth-tab {
  flex: 1;
  padding: 8px;
  text-align: center;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.auth-tab.active {
  background: var(--bg-card-hover);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}
.form-group {
  margin-bottom: 18px;
}
.form-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text-secondary);
}
.input-control {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.9rem;
  font-family: inherit;
  transition: var(--transition);
}
.input-control:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Detailed Auth Card & Input Groups */
.auth-card-detailed {
  max-width: 580px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 620px) {
  .auth-card-detailed {
    padding: 30px 22px;
  }
}

@media (max-width: 480px) {
  .auth-card-detailed {
    padding: 24px 16px;
  }
}

.auth-header .auth-title {
  font-size: 1.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.auth-header .auth-subtitle {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.form-group-detailed {
  margin-bottom: 18px;
  min-width: 0;
  width: 100%;
}

.form-label-detailed {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 7px;
  color: #1e293b;
}

.required-star {
  color: #ef4444;
  margin-left: 2px;
  font-weight: 700;
}

.input-group {
  display: flex;
  align-items: stretch;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.input-group:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18);
}

.input-addon-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-width: 40px;
  max-width: 40px;
  flex: 0 0 40px;
  background: #f8fafc;
  border-right: 1px solid #e2e8f0;
  color: #475569;
}

.input-addon-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.input-group-field {
  flex: 1 1 0%;
  min-width: 0;
  width: 100%;
  padding: 11px 12px;
  border: none;
  outline: none;
  background: transparent;
  font-size: 0.9rem;
  font-family: inherit;
  color: #0f172a;
  box-sizing: border-box;
}

.input-group-field::placeholder {
  color: #94a3b8;
  font-size: 0.88rem;
}

.btn-send-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 5px 6px;
  padding: 0 14px;
  background: #ffffff;
  border: 1.5px solid #2563eb;
  color: #2563eb;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-send-code:hover:not(:disabled) {
  background: #eff6ff;
  border-color: #1d4ed8;
  color: #1d4ed8;
}

.btn-send-code:disabled {
  border-color: #cbd5e1;
  color: #94a3b8;
  background: #f8fafc;
  cursor: not-allowed;
}

.btn-toggle-password {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  min-width: 40px;
  max-width: 40px;
  flex: 0 0 40px;
  background: #f8fafc;
  border: none;
  border-left: 1px solid #e2e8f0;
  color: #64748b;
  cursor: pointer;
  transition: all 0.15s ease;
  padding: 0;
}

.btn-toggle-password:hover {
  color: #0f172a;
  background: #f1f5f9;
}

.btn-toggle-password svg {
  width: 18px;
  height: 18px;
}

.btn-send-code,
.btn-verify-code {
  background: #f1f5f9;
  border: none;
  border-left: 1px solid #cbd5e1;
  color: #2563eb;
  font-weight: 600;
  font-size: 0.85rem;
  padding: 0 16px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-send-code:hover,
.btn-verify-code:hover {
  background: #e2e8f0;
  color: #1d4ed8;
}

.btn-send-code:disabled,
.btn-verify-code:disabled {
  background: #f8fafc;
  color: #94a3b8;
  cursor: not-allowed;
}

.btn-verify-code.verified {
  background: #ecfdf5 !important;
  color: #059669 !important;
  border-left: 1px solid #a7f3d0 !important;
  font-weight: 700;
  cursor: default !important;
}

.form-row-2col {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  margin-bottom: 16px;
  width: 100%;
}

.form-row-2col > * {
  min-width: 0;
  width: 100%;
}

@media (max-width: 580px) {
  .form-row-2col {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

.form-hint {
  font-size: 0.78rem;
  color: #64748b;
  margin-top: 5px;
  display: block;
}

.hint-accent {
  color: #2563eb;
  font-weight: 600;
}

/* Valid / invalid field states */
.input-group.is-invalid {
  border-color: #ef4444;
}
.input-group.is-invalid:focus-within {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15);
}
.input-group.is-valid {
  border-color: #10b981;
}
.input-group.is-valid:focus-within {
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

[hidden] {
  display: none !important;
}

/* Password strength meter */
.pw-strength {
  margin-top: 8px;
}
.pw-strength-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pw-strength-bar {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
.pw-strength-bar span {
  height: 5px;
  border-radius: 3px;
  background: #e2e8f0;
  transition: background 0.2s ease;
}
.pw-strength-label {
  font-size: 0.76rem;
  font-weight: 700;
  min-width: 62px;
  text-align: right;
}
.pw-strength[data-level="weak"] .pw-strength-bar span.on { background: #ef4444; }
.pw-strength[data-level="fair"] .pw-strength-bar span.on { background: #f59e0b; }
.pw-strength[data-level="good"] .pw-strength-bar span.on { background: #3b82f6; }
.pw-strength[data-level="strong"] .pw-strength-bar span.on { background: #10b981; }
.pw-strength[data-level="weak"] .pw-strength-label { color: #dc2626; }
.pw-strength[data-level="fair"] .pw-strength-label { color: #d97706; }
.pw-strength[data-level="good"] .pw-strength-label { color: #2563eb; }
.pw-strength[data-level="strong"] .pw-strength-label { color: #059669; }

.pw-rules {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px 10px;
  font-size: 0.74rem;
  color: #94a3b8;
}
.pw-rules li::before {
  content: '○ ';
}
.pw-rules li.met {
  color: #059669;
}
.pw-rules li.met::before {
  content: '✓ ';
}

.pw-match-hint {
  min-height: 1em;
  font-weight: 600;
}
.pw-match-hint.ok { color: #059669; }
.pw-match-hint.bad { color: #dc2626; }

.auth-inline-link {
  display: block;
  text-align: right;
  font-size: 0.8rem;
  font-weight: 600;
  color: #2563eb;
  margin-top: 6px;
  text-decoration: none;
}
.auth-inline-link:hover {
  text-decoration: underline;
}

.form-checkbox-group {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 18px 0 20px 0;
  font-size: 0.88rem;
  color: #334155;
  line-height: 1.45;
}

.form-checkbox-group input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  accent-color: #2563eb;
  cursor: pointer;
}

.form-checkbox-group a {
  color: #2563eb;
  text-decoration: underline;
  font-weight: 500;
  cursor: pointer;
}

.form-checkbox-group a:hover {
  color: #1d4ed8;
}

.btn-create-account {
  width: 100%;
  padding: 13px 20px;
  font-size: 1.02rem;
  font-weight: 700;
  color: #ffffff;
  background: #3b82f6;
  background-image: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.28);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-create-account:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.38);
  background-image: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
}

.btn-create-account:active {
  transform: translateY(0);
}

.btn-create-account:disabled {
  background: #cbd5e1;
  background-image: none;
  color: #f8fafc;
  box-shadow: none;
  transform: none;
  cursor: not-allowed;
}

.submit-hint {
  text-align: center;
  margin-top: 8px;
}

/* Modals for Terms & Privacy */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-overlay.open,
.modal-overlay.active {
  display: flex !important;
}

.modal-box,
.modal-card {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 520px;
  width: 100%;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 50px -12px rgba(15, 23, 42, 0.25);
  border: 1px solid var(--border-color);
  animation: modalPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

@keyframes modalPop {
  from { opacity: 0; transform: scale(0.92) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title,
.modal-header h3 {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.modal-close-btn {
  background: none;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: var(--transition);
}

.modal-close-btn:hover {
  color: var(--text-primary);
  background: rgba(15, 23, 42, 0.05);
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.modal-body h4 {
  color: var(--text-primary);
  margin: 14px 0 6px 0;
}

.modal-footer {
  padding: 14px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background: #f8fafc;
}

/* =========================================================================
   Toast Notification System
   ========================================================================= */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-width: 420px;
  width: calc(100% - 48px);
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #ffffff;
  color: var(--text-primary);
  border-radius: var(--radius-md);
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.15), 0 4px 6px -2px rgba(15, 23, 42, 0.05);
  border-left: 4px solid var(--accent-primary);
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  border-right: 1px solid rgba(15, 23, 42, 0.06);
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  font-size: 0.9rem;
  font-weight: 500;
  animation: toastSlideIn 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  transition: all 0.25s ease;
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(40px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

.toast.toast-hide {
  opacity: 0;
  transform: translateX(40px);
}

.toast.toast-success,
.toast.toast-celebrate {
  border-left-color: #10b981;
}

.toast.toast-error,
.toast.toast-danger {
  border-left-color: #ef4444;
}

.toast.toast-warning {
  border-left-color: #f59e0b;
}

.toast-icon-box {
  width: 22px;
  height: 22px;
  min-width: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast.toast-success .toast-icon-box,
.toast.toast-celebrate .toast-icon-box {
  color: #10b981;
}

.toast.toast-error .toast-icon-box,
.toast.toast-danger .toast-icon-box {
  color: #ef4444;
}

.toast.toast-warning .toast-icon-box {
  color: #f59e0b;
}

.toast.toast-info .toast-icon-box {
  color: var(--accent-primary);
}

.toast-content-text {
  flex: 1;
  line-height: 1.45;
}

.toast-close-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.3rem;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}

.toast-close-btn:hover {
  color: var(--text-primary);
}

/* =========================================================================
   Custom Modal Dialogs (Alert, Confirm, Prompt)
   ========================================================================= */
.custom-dialog-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 100000;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: dialogFadeIn 0.2s ease-out;
}

.custom-dialog-overlay.dialog-fade-out {
  opacity: 0;
  transition: opacity 0.2s ease;
}

@keyframes dialogFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.custom-dialog-box {
  background: #ffffff;
  border-radius: var(--radius-lg);
  max-width: 440px;
  width: 100%;
  padding: 32px 28px 24px 28px;
  text-align: center;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(15, 23, 42, 0.08);
  animation: dialogScaleIn 0.24s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-dialog-box.dialog-leave {
  transform: scale(0.92);
  opacity: 0;
  transition: all 0.2s ease;
}

@keyframes dialogScaleIn {
  from { opacity: 0; transform: scale(0.9) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.dialog-icon-circle {
  width: 58px;
  height: 58px;
  margin: 0 auto 18px auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dialog-icon-circle svg {
  width: 28px;
  height: 28px;
}

.dialog-icon-circle.celebrate {
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
  box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.06);
}

.dialog-icon-circle.success {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
  box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.06);
}

.dialog-icon-circle.danger {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
  box-shadow: 0 0 0 6px rgba(239, 68, 68, 0.06);
}

.dialog-icon-circle.warning {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
  box-shadow: 0 0 0 6px rgba(245, 158, 11, 0.06);
}

.dialog-icon-circle.info {
  background: rgba(99, 102, 241, 0.12);
  color: #4f46e5;
  box-shadow: 0 0 0 6px rgba(99, 102, 241, 0.06);
}

.custom-dialog-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.custom-dialog-desc {
  font-size: 0.94rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 22px;
}

.custom-dialog-input-wrap {
  margin-bottom: 20px;
  text-align: left;
}

.custom-dialog-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
}

.custom-dialog-actions .btn {
  flex: 1;
  padding: 11px 18px;
  font-size: 0.94rem;
  font-weight: 600;
}


/* Stats Section */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin: 30px 0 24px 0;
}
.stat-card {
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: var(--transition);
}
.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 23, 42, 0.15);
}
.stat-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-val {
  font-size: 1.6rem;
  font-weight: 700;
  font-family: 'Outfit', sans-serif;
  color: var(--text-primary);
}
.stat-lbl {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Dashboard Action Bar */
.action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.search-wrapper {
  position: relative;
  flex: 1;
  max-width: 440px;
  min-width: 240px;
}
.search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.search-input {
  width: 100%;
  padding: 10px 38px 10px 42px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-family: inherit;
  transition: var(--transition);
}
.search-input:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.18);
}
.search-clear-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(15, 23, 42, 0.08);
  border: none;
  color: var(--text-muted);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 1;
  cursor: pointer;
  transition: var(--transition);
  padding: 0;
}
.search-clear-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}
.action-buttons {
  display: flex;
  gap: 10px;
}

/* Main Layout Grid */
.dashboard-layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: start;
  margin-bottom: 60px;
}

/* Sidebar: Folders */
.folder-sidebar {
  padding: 20px;
}
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-color);
}
.sidebar-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.folder-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 600px;
  overflow-y: auto;
}
.folder-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
  color: var(--text-secondary);
  border: 1px solid transparent;
}
.folder-nav-item:hover {
  background: rgba(15, 23, 42, 0.04);
  color: var(--text-primary);
}
.folder-nav-item.active {
  background: rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.35);
  color: #4338ca;
  font-weight: 600;
}
.folder-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.folder-count-pill {
  font-size: 0.72rem;
  background: rgba(15, 23, 42, 0.08);
  padding: 2px 7px;
  border-radius: var(--radius-full);
  color: var(--text-muted);
}

/* Main Content: Bookmarks */
.content-panel {
  padding: 24px;
  min-height: 500px;
}
.content-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-color);
}
.content-header-title {
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.folder-actions {
  display: flex;
  gap: 8px;
}

/* Bookmark Cards Grid */
.bookmark-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.bookmark-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: var(--transition);
  position: relative;
}
.bookmark-card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(15, 23, 42, 0.16);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.bookmark-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.bookmark-favicon {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.bookmark-favicon img {
  width: 16px;
  height: 16px;
  border-radius: 3px;
}
.bookmark-info {
  flex: 1;
  overflow: hidden;
}
.bookmark-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: var(--transition);
}
.bookmark-title:hover {
  color: var(--accent-primary);
}
.bookmark-domain {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.bookmark-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid rgba(15, 23, 42, 0.05);
  font-size: 0.76rem;
  color: var(--text-muted);
}
.bookmark-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bookmark-card-actions {
  display: flex;
  gap: 6px;
}
.action-icon-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 4px;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}
.action-icon-btn:hover {
  color: var(--text-primary);
  background: rgba(15, 23, 42, 0.08);
}
.action-icon-btn.danger:hover {
  color: var(--danger);
  background: rgba(239, 68, 68, 0.15);
}

/* Modals */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  backdrop-filter: var(--backdrop-blur);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}
.modal-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-md);
  overflow: hidden;
  transform: scale(0.96);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.modal-overlay.active .modal-box {
  transform: scale(1);
}
.modal-header {
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.modal-title {
  font-size: 1.15rem;
  font-weight: 700;
}
.modal-body {
  padding: 24px;
}
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-color);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* =========================================================================
   Custom Modal Dialog System (Replacing generic browser alert, confirm, prompt)
   ========================================================================= */
.custom-dialog-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: dialogOverlayFadeIn 0.22s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.custom-dialog-overlay.dialog-fade-out {
  animation: dialogOverlayFadeOut 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes dialogOverlayFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes dialogOverlayFadeOut {
  from { opacity: 1; }
  to { opacity: 0; }
}

.custom-dialog-box {
  background: #ffffff;
  border-radius: 20px;
  max-width: 440px;
  width: 100%;
  padding: 32px 28px 24px;
  text-align: center;
  box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.3), 0 0 0 1px rgba(15, 23, 42, 0.06);
  animation: dialogBoxPopIn 0.26s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.custom-dialog-box.dialog-leave {
  animation: dialogBoxPopOut 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes dialogBoxPopIn {
  from { opacity: 0; transform: scale(0.9) translateY(12px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes dialogBoxPopOut {
  from { opacity: 1; transform: scale(1) translateY(0); }
  to { opacity: 0; transform: scale(0.92) translateY(8px); }
}

.custom-dialog-icon {
  margin-bottom: 18px;
}

.dialog-icon-circle {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
}

.dialog-icon-circle svg {
  width: 30px;
  height: 30px;
}

.dialog-icon-circle.celebrate {
  background: linear-gradient(135deg, #fef08a 0%, #fde047 50%, #f59e0b 100%);
  color: #78350f;
  box-shadow: 0 10px 25px rgba(245, 158, 11, 0.35);
  animation: celebratePulse 1.8s infinite ease-in-out;
}

@keyframes celebratePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.dialog-icon-circle.success {
  background: #ecfdf5;
  color: #059669;
  border: 2px solid #a7f3d0;
}

.dialog-icon-circle.danger {
  background: #fef2f2;
  color: #dc2626;
  border: 2px solid #fecaca;
}

.dialog-icon-circle.warning {
  background: #fffbeb;
  color: #d97706;
  border: 2px solid #fde68a;
}

.dialog-icon-circle.info {
  background: #eef2ff;
  color: #4f46e5;
  border: 2px solid #c7d2fe;
}

.custom-dialog-title {
  font-size: 1.28rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 10px;
  line-height: 1.35;
  font-family: 'Outfit', sans-serif;
}

.custom-dialog-desc {
  font-size: 0.92rem;
  color: #475569;
  line-height: 1.55;
  margin-bottom: 22px;
  max-width: 380px;
}

.custom-dialog-input-wrap {
  width: 100%;
  margin-bottom: 22px;
}

.custom-dialog-input-wrap input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid #cbd5e1;
  font-size: 0.95rem;
  transition: all 0.2s ease;
  background: #f8fafc;
}

.custom-dialog-input-wrap input:focus {
  outline: none;
  border-color: #4f46e5;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.15);
}

.custom-dialog-actions {
  display: flex;
  gap: 12px;
  width: 100%;
  justify-content: center;
}

.custom-dialog-actions button {
  flex: 1;
  padding: 11px 18px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

/* =========================================================================
   Toast Notification System
   ========================================================================= */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 100001;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 420px;
  width: calc(100% - 48px);
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  background: #ffffff;
  border-radius: 12px;
  padding: 14px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.15), 0 0 0 1px rgba(15, 23, 42, 0.05);
  animation: toastSlideIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transition: all 0.25s ease;
}

@keyframes toastSlideIn {
  from { opacity: 0; transform: translateX(40px) scale(0.95); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

.toast.toast-hide {
  opacity: 0;
  transform: translateX(40px) scale(0.9);
}

.toast-icon-box {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toast-icon-box svg {
  width: 20px;
  height: 20px;
}

.toast-info .toast-icon-box { color: #4f46e5; }
.toast-success .toast-icon-box { color: #059669; }
.toast-celebrate .toast-icon-box { color: #d97706; }
.toast-warning .toast-icon-box { color: #d97706; }
.toast-error .toast-icon-box,
.toast-danger .toast-icon-box { color: #dc2626; }

.toast-content-text {
  flex: 1;
  font-size: 0.9rem;
  color: #1e293b;
  font-weight: 500;
  line-height: 1.4;
}

.toast-close-btn {
  background: none;
  border: none;
  font-size: 1.3rem;
  color: #94a3b8;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.15s ease;
}

.toast-close-btn:hover {
  color: #334155;
}

/* Empty State */
.empty-state-card {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}
.empty-state-icon {
  margin-bottom: 16px;
  opacity: 0.4;
}

/* Responsive */
@media (max-width: 900px) {
  .dashboard-layout {
    grid-template-columns: 1fr;
  }
  .nav-actions {
    gap: 8px;
  }
  .user-name {
    display: none;
  }
}

/* Flask auth pages */
a.auth-tab {
  display: block;
  text-decoration: none;
}
.flash-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
}
.flash-msg {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  margin-bottom: 8px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #b91c1c;
}
.flash-msg.success {
  background: rgba(16, 185, 129, 0.12);
  border-color: rgba(16, 185, 129, 0.35);
  color: #047857;
}
.logout-form {
  display: inline;
  margin: 0;
}
.auth-footnote {
  margin-top: 20px;
  font-size: 0.82rem;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.55;
}

/* Connect Extension page */
/* Profile page */
a.user-profile {
  text-decoration: none;
  transition: var(--transition);
}
a.user-profile:hover,
a.user-profile[aria-current="page"] {
  border-color: var(--border-focus);
  box-shadow: var(--shadow-glow);
}
.profile-page {
  max-width: 1080px;
  padding-top: 32px;
  padding-bottom: 60px;
}

/* Cover banner */
.profile-hero {
  position: relative;
  overflow: hidden;
  padding: 0;
  margin-bottom: 24px;
}
.profile-cover {
  height: 120px;
  background:
    radial-gradient(circle at 15% 120%, rgba(255, 255, 255, 0.35) 0, transparent 45%),
    radial-gradient(circle at 85% -20%, rgba(255, 255, 255, 0.25) 0, transparent 40%),
    var(--accent-gradient);
}
.profile-hero-body {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 0 28px 22px;
  margin-top: -44px;
}
.profile-avatar {
  width: 96px;
  height: 96px;
  flex: 0 0 96px;
  border-radius: 50%;
  background: var(--accent-gradient);
  color: #fff;
  font-family: 'Outfit', sans-serif;
  font-size: 2.6rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 5px solid #fff;
  box-shadow: 0 10px 30px -8px rgba(99, 102, 241, 0.55);
}
.profile-identity {
  flex: 1;
  min-width: 0;
  padding-top: 56px;
}
.profile-hero h1 {
  font-size: 1.65rem;
  margin: 0;
  overflow-wrap: anywhere;
}
.profile-email {
  margin: 2px 0 10px;
  color: var(--text-secondary);
  overflow-wrap: anywhere;
}
.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.profile-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.05);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
}
.profile-tag-plan {
  background: rgba(99, 102, 241, 0.12);
  color: #4338ca;
}
.profile-hero-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
  padding-top: 60px;
}
.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border-color);
  margin: 0;
}
.profile-stats > div {
  padding: 16px 28px;
  border-left: 1px solid var(--border-color);
}
.profile-stats > div:first-child { border-left: 0; }
.profile-stats dt {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}
.profile-stats dd {
  margin: 4px 0 0;
  font-family: 'Outfit', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

/* Side navigation + sections */
.profile-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.profile-nav {
  position: sticky;
  top: 90px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
}
.profile-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid transparent;
  transition: var(--transition);
}
.profile-nav a:hover {
  background: rgba(15, 23, 42, 0.04);
  color: var(--text-primary);
}
.profile-nav a.active {
  background: rgba(99, 102, 241, 0.12);
  border-color: rgba(99, 102, 241, 0.3);
  color: #4338ca;
  font-weight: 600;
}
.profile-sections > .profile-card:last-child { margin-bottom: 0; }
.profile-card {
  padding: 28px;
  margin-bottom: 24px;
  scroll-margin-top: 90px;
}
.profile-card h2 {
  font-size: 1.1rem;
  margin: 0 0 2px;
}
.profile-card-title {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}
.profile-card-icon {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 13%, transparent);
}
#personal-details .profile-card-head {
  margin-bottom: 22px;
  padding-bottom: 18px;
  border-bottom: 1px solid #e2e8f0;
}
#signin-activity .profile-card-head,
#account-activity .profile-card-head {
  margin-bottom: 18px;
}
@media (max-width: 900px) {
  .profile-layout { grid-template-columns: minmax(0, 1fr); }
  .profile-nav {
    position: static;
    flex-direction: row;
    overflow-x: auto;
    scrollbar-width: none;
    padding: 8px;
  }
  .profile-nav a { flex-shrink: 0; white-space: nowrap; }
  .profile-stats { grid-template-columns: repeat(2, 1fr); }
  .profile-stats > div:nth-child(3) { border-left: 0; }
  .profile-stats > div:nth-child(n+3) { border-top: 1px solid var(--border-color); }
}
@media (max-width: 680px) {
  .profile-hero-body {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    padding: 0 18px 18px;
  }
  .profile-identity, .profile-hero-actions { padding-top: 0; }
  .profile-hero-actions { width: 100%; }
  .profile-hero-actions .btn { flex: 1; justify-content: center; }
  .profile-stats > div { padding: 14px 18px; }
}
.profile-save {
  width: auto;
  margin-left: auto;
}
.profile-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.profile-card-head .form-hint {
  margin: 0;
}
.profile-password-form {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
}
.profile-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.profile-actions .profile-save {
  margin-left: 0;
}
.input-group-readonly {
  background: #f8fafc;
}
.input-group-readonly .input-group-field {
  color: #64748b;
}
@media (max-width: 480px) {
  .profile-card {
    padding: 22px 16px;
  }
  .profile-save {
    width: 100%;
  }
}

.connect-page {
  max-width: 820px;
  padding-top: 36px;
  padding-bottom: 60px;
}
.connect-page a {
  color: var(--accent-primary);
}
.connect-hero {
  margin-bottom: 24px;
}
.connect-hero h1 {
  font-size: 1.9rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.connect-hero p {
  color: var(--text-secondary);
}
.api-key-card {
  padding: 24px;
  margin-bottom: 28px;
  border-top: 4px solid var(--accent-primary);
}
.api-key-head h2 {
  font-size: 1.2rem;
  margin-bottom: 4px;
}
.api-key-head p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 16px;
}
.api-key-row {
  display: flex;
  gap: 10px;
}
.api-key-row .btn {
  white-space: nowrap;
}
.api-key-input {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 0.85rem;
}
.connect-steps {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.connect-step {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  padding: 20px 22px;
}
.connect-step h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}
.connect-step p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}
.step-num {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-full);
  background: var(--accent-gradient);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
kbd {
  font-family: inherit;
  font-size: 0.78rem;
  padding: 1px 6px;
  border: 1px solid var(--border-color);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: #fff;
}
/* Connect page: Email & Password / API Key switch */
.connect-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  margin-bottom: 22px;
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
}
.connect-mode-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 12px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: var(--transition);
}
.connect-mode-btn:hover {
  color: var(--text-primary);
}
.connect-mode-btn.active {
  color: var(--accent-hover);
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.connect-mode-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 2px 7px;
  border-radius: var(--radius-full);
  background: #ecfdf5;
  color: #059669;
}
.connect-mode-panel[hidden] {
  display: none;
}
.connect-method-card {
  padding: 24px;
  margin-bottom: 28px;
  border-top: 4px solid var(--accent-primary);
}
.connect-method-card h2 {
  font-size: 1.2rem;
  margin-bottom: 4px;
}
.connect-method-card > p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 16px;
}
.connect-login-details {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}
.connect-login-details span {
  color: var(--text-muted);
}
.connect-login-details strong {
  overflow-wrap: anywhere;
}
.connect-steps {
  counter-reset: step;
}
.connect-step {
  counter-increment: step;
}
.step-num::before {
  content: counter(step);
}

/* Connect page: how to use (both methods) */
.connect-usage {
  margin-bottom: 28px;
}
.connect-usage h2 {
  font-size: 1.3rem;
  margin-bottom: 2px;
}
.connect-usage-intro {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 14px;
}
.usage-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.usage-card {
  padding: 18px 20px;
}
.usage-card h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}
.usage-card p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
}
@media (max-width: 600px) {
  .usage-grid {
    grid-template-columns: 1fr;
  }
  .connect-mode-tag {
    display: none;
  }
}

.connect-help {
  padding: 22px;
}
.connect-help h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
}
.connect-help p {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin-bottom: 14px;
}
@media (max-width: 600px) {
  .api-key-row {
    flex-wrap: wrap;
  }
}

/* =========================================================================
   Legal Pages (Terms of Service & Privacy Policy)
   ========================================================================= */
.legal-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

/* Legal pages use the body font for every piece of text, headings included */
.legal-page h1,
.legal-page h2 {
  font-family: inherit;
}

.legal-hero {
  margin-bottom: 30px;
}

.legal-breadcrumb {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 18px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #4f46e5;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  transition: transform 0.15s ease;
}

.back-link:hover {
  transform: translateX(-3px);
  color: #3730a3;
}

.legal-badge {
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.12);
  color: #4338ca;
  border: 1px solid rgba(99, 102, 241, 0.25);
}

.legal-badge.privacy-badge {
  background: rgba(16, 185, 129, 0.12);
  color: #065f46;
  border-color: rgba(16, 185, 129, 0.25);
}

.legal-title {
  font-size: 2.3rem;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 10px;
  line-height: 1.25;
}

.legal-subtitle {
  font-size: 1.05rem;
  color: #475569;
  line-height: 1.6;
  margin-bottom: 14px;
}

.legal-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.85rem;
  color: #64748b;
  font-weight: 500;
}

.legal-toc {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 20px;
  margin-bottom: 28px;
  border-radius: var(--radius-md);
  background: #ffffff;
}

.toc-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: #334155;
  margin-right: 4px;
}

.toc-pill {
  font-size: 0.8rem;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: #f1f5f9;
  color: #475569;
  text-decoration: none;
  transition: all 0.15s ease;
}

.toc-pill:hover {
  background: #e0e7ff;
  color: #4338ca;
}

.legal-card {
  padding: 40px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  display: flex;
  flex-direction: column;
  gap: 36px;
}

.legal-section {
  display: flex;
  gap: 20px;
  align-items: flex-start;
  padding-bottom: 30px;
  border-bottom: 1px solid #f1f5f9;
}

.legal-section:last-of-type {
  border-bottom: none;
  padding-bottom: 10px;
}

.section-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 4px 10px rgba(99, 102, 241, 0.25);
}

.section-body {
  flex: 1;
}

.section-body h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 12px;
}

.section-body p {
  font-size: 0.95rem;
  color: #334155;
  line-height: 1.7;
  margin-bottom: 14px;
}

.legal-list {
  padding-left: 20px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-list li {
  font-size: 0.92rem;
  color: #334155;
  line-height: 1.6;
}

.callout-box {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-left: 4px solid #3b82f6;
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 0.9rem;
  color: #1e40af;
  margin-top: 14px;
}

.contact-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 18px 22px;
  margin-top: 10px;
  font-size: 0.92rem;
  color: #334155;
}

.contact-box p {
  margin-bottom: 4px;
}

.legal-footer-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  padding-top: 24px;
  margin-top: 10px;
  border-top: 2px solid #f1f5f9;
}

.footer-nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
  color: #64748b;
}

@media (max-width: 680px) {
  .legal-card {
    padding: 24px 18px;
  }
  .legal-section {
    flex-direction: column;
    gap: 12px;
  }
  .legal-title {
    font-size: 1.8rem;
  }
}

/* =========================================================================
   Site Footer
   ========================================================================= */
.site-footer {
  margin-top: 40px;
  background: #f1f4f9;
  border-top: 1px solid var(--border-color);
}

.site-footer-inner {
  padding-top: 56px;
  padding-bottom: 48px;
}

.site-footer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px 40px;
  padding-bottom: 28px;
  border-bottom: 1px solid #e2e8f0;
}

.site-footer-about .brand {
  display: inline-flex;
  margin-bottom: 10px;
}

.site-footer-about p {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.site-footer-about {
  flex-shrink: 0;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 22px;
}

.site-footer-links a,
.site-footer-bottom a {
  color: #2563eb;
  font-weight: 500;
  text-decoration: none;
}

.site-footer-links a {
  font-size: 0.95rem;
}

.site-footer-links a:hover,
.site-footer-bottom a:hover {
  text-decoration: underline;
}

.site-footer-links a[aria-current="page"] {
  color: var(--text-primary);
  font-weight: 600;
}

.site-footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 10px 24px;
  flex-wrap: wrap;
  padding-top: 24px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.site-footer-bottom a.site-footer-report {
  color: var(--danger);
}

@media (max-width: 1100px) {
  .site-footer-top {
    flex-direction: column;
    align-items: flex-start;
  }
  .site-footer-about {
    flex-shrink: 1;
  }
  .site-footer-links {
    justify-content: flex-start;
  }
}

/* ---------------------------------------------------------------------------
   Login page (interactive)
   --------------------------------------------------------------------------- */
.login-stage {
  position: relative;
  overflow: hidden;
}
.login-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.45;
  pointer-events: none;
  animation: loginBlob 16s ease-in-out infinite alternate;
}
.login-blob-a { width: 420px; height: 420px; background: #a5b4fc; top: -120px; left: -100px; }
.login-blob-b { width: 360px; height: 360px; background: #f9a8d4; bottom: -120px; right: -80px; animation-delay: -8s; }
@keyframes loginBlob {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(60px, 40px) scale(1.12); }
  100% { transform: translate(-30px, 70px) scale(0.95); }
}

.login-split {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 440px;
  gap: 56px;
  align-items: center;
  width: 100%;
  max-width: 1040px;
}

.login-showcase-inner { max-width: 460px; }
.login-kicker {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #4338ca;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.28);
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 18px;
}
.login-headline {
  font-size: 2.6rem;
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 16px;
}
.login-rotator {
  display: inline-block;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.login-rotator.out { opacity: 0; transform: translateY(10px); }
.login-lede {
  color: var(--text-secondary);
  font-size: 1rem;
  margin-bottom: 28px;
}

.login-float-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}
.login-float-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: max-content;
  padding: 12px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  margin-left: var(--x);
  animation: loginFloat 5s ease-in-out infinite;
  animation-delay: var(--d);
}
.login-float-card strong { display: block; font-size: 0.9rem; }
.login-float-card small { color: var(--text-muted); font-size: 0.78rem; }
.lf-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex-shrink: 0;
}
.lf-lock {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0f172a;
  color: #fff;
}
@keyframes loginFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.login-perks {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  color: var(--text-secondary);
  font-size: 0.86rem;
  font-weight: 600;
}
.login-perks li::before {
  content: '✓';
  color: var(--success);
  margin-right: 6px;
}

/* Card */
.login-card {
  max-width: 440px;
  animation: loginCardIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.login-card::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, -200px), rgba(99, 102, 241, 0.09), transparent 60%);
}
.login-card > * { position: relative; z-index: 1; }
.login-card .brand-logo { animation: loginLogo 3.5s ease-in-out infinite; }
@keyframes loginCardIn {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}
@keyframes loginLogo {
  0%, 100% { transform: rotate(0deg); }
  50%      { transform: rotate(-8deg) scale(1.06); }
}
.login-card.shake { animation: loginShake 0.45s cubic-bezier(0.36, 0.07, 0.19, 0.97); }
@keyframes loginShake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(4px); }
  30%, 50%, 70% { transform: translateX(-7px); }
  40%, 60% { transform: translateX(7px); }
}

.login-field-check {
  display: flex;
  align-items: center;
  padding: 0 12px;
  color: var(--success);
  opacity: 0;
  transform: scale(0.4);
  transition: var(--transition);
}
.input-group.is-valid .login-field-check { opacity: 1; transform: scale(1); }

.login-hint {
  font-size: 0.78rem;
  color: #dc2626;
  margin-top: 6px;
  min-height: 0;
}
.login-hint:empty { display: none; }
.login-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.login-row .auth-inline-link { margin-left: auto; }
.login-caps { color: #b45309; font-weight: 600; }

.login-remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  user-select: none;
  margin: 4px 0 18px;
}
.login-remember input { accent-color: var(--accent-primary); width: 16px; height: 16px; }

.login-submit {
  position: relative;
  width: 100%;
  padding: 12px 18px;
  font-size: 0.95rem;
  overflow: hidden;
}
.login-submit::before {
  content: '';
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  transform: skewX(-20deg);
  transition: left 0.7s ease;
}
.login-submit:hover::before { left: 130%; }
.login-submit-arrow { transition: transform 0.25s ease; }
.login-submit:hover .login-submit-arrow { transform: translateX(4px); }
.login-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2.5px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: loginSpin 0.7s linear infinite;
}
.login-submit.is-loading { cursor: wait; opacity: 0.9; }
.login-submit.is-loading .login-spinner { display: inline-block; }
.login-submit.is-loading .login-submit-arrow { display: none; }
@keyframes loginSpin { to { transform: rotate(360deg); } }

.login-card .auth-footnote a { color: var(--accent-primary); font-weight: 600; text-decoration: none; }
.login-card .auth-footnote a:hover { text-decoration: underline; }

@media (max-width: 900px) {
  .login-split { grid-template-columns: 1fr; justify-items: center; gap: 0; }
  .login-showcase { display: none; }
}
@media (max-width: 480px) {
  .login-card { padding: 28px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  .login-blob, .login-float-card, .login-card, .login-card .brand-logo { animation: none; }
}

/* ---------------------------------------------------------------------------
   Home page + guide
   --------------------------------------------------------------------------- */
.home { padding-bottom: 40px; }
.home-grad {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--delay, 0s);
}
.reveal.in { opacity: 1; transform: none; }

.home-hero {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 48px;
  align-items: center;
  padding-top: 64px;
  padding-bottom: 48px;
}
.home-hero h1 {
  font-size: 3.2rem;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -1.5px;
  margin-bottom: 18px;
}
.home-lede {
  font-size: 1.08rem;
  color: var(--text-secondary);
  margin-bottom: 28px;
  max-width: 540px;
}
.home-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 22px;
}
.home-btn-lg { padding: 13px 24px; font-size: 0.98rem; }
.home-btn-lg svg { transition: transform 0.25s ease; }
.home-btn-lg:hover svg { transform: translateX(4px); }

.home-hero-visual {
  position: relative;
  padding: 20px 0;
}
.home-shot-frame {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 30px 60px -20px rgba(49, 46, 129, 0.35), 0 0 0 1px var(--border-color);
  transform: perspective(1200px) rotateY(-6deg) rotateX(3deg);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  background: #fff;
}
.home-shot-frame img { display: block; width: 100%; height: auto; }
.home-chip {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  font-size: 0.85rem;
  font-weight: 700;
  animation: loginFloat 5s ease-in-out infinite;
}
.home-chip-a { top: 0; left: -18px; }
.home-chip-b { bottom: 0; right: 24px; animation-delay: -2.5s; }

.home-section { padding-top: 56px; padding-bottom: 24px; }
.home-section-head { text-align: center; margin-bottom: 32px; }
.home-section-head h2 { font-size: 2.1rem; font-weight: 800; letter-spacing: -0.8px; margin-bottom: 6px; }
.home-section-head p { color: var(--text-secondary); }

/* "See it in action": alternating screenshot + text rows */
.home-showcase { display: flex; flex-direction: column; gap: 72px; }
.home-showcase-row {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 56px;
  align-items: center;
}
.home-showcase-row.flip { grid-template-columns: 1.15fr 0.85fr; }
.home-showcase-row.flip .home-showcase-copy { order: 2; }
.home-showcase-kicker {
  display: inline-block;
  padding: 4px 12px;
  margin-bottom: 14px;
  border-radius: var(--radius-full);
  background: color-mix(in srgb, var(--c) 13%, transparent);
  color: color-mix(in srgb, var(--c) 75%, #0f172a);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.home-showcase-copy h3 {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-bottom: 12px;
}
.home-showcase-copy p { color: var(--text-secondary); line-height: 1.65; margin-bottom: 18px; }
.home-showcase-copy ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.home-showcase-copy li {
  position: relative;
  padding-left: 28px;
  font-weight: 600;
  font-size: 0.95rem;
}
.home-showcase-copy li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--c) 16%, transparent)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23334155' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 11px no-repeat;
}
.home-showcase-shot {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  box-shadow: 0 30px 60px -24px color-mix(in srgb, var(--c) 55%, rgba(15, 23, 42, 0.4)), 0 0 0 1px var(--border-color);
}
.home-showcase-shot img { display: block; width: 100%; height: auto; }
@media (max-width: 900px) {
  .home-showcase { gap: 52px; }
  .home-showcase-row,
  .home-showcase-row.flip { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .home-showcase-row.flip .home-showcase-copy { order: 0; }
  .home-showcase-copy h3 { font-size: 1.5rem; }
}

.home-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
.home-feature {
  padding: 24px;
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.35s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  transition-delay: var(--delay, 0s), 0s, 0s, 0s;
}
.home-feature.in:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--c) 40%, transparent);
  box-shadow: 0 16px 30px -12px color-mix(in srgb, var(--c) 45%, transparent);
}
.home-feature-icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--c);
  background: color-mix(in srgb, var(--c) 14%, transparent);
  margin-bottom: 14px;
  transition: transform 0.3s ease;
}
.home-feature:hover .home-feature-icon { transform: rotate(-8deg) scale(1.08); }
.home-feature h3 { font-size: 1.08rem; margin-bottom: 6px; }
.home-feature p { color: var(--text-secondary); font-size: 0.9rem; }

/* Guide stepper */
.guide {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 22px;
  align-items: start;
}
.guide-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.guide-step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  text-align: left;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-family: inherit;
  color: var(--text-primary);
  overflow: hidden;
  transition: var(--transition);
}
.guide-step:hover { background: rgba(99, 102, 241, 0.06); }
.guide-step.active {
  background: var(--bg-card-hover);
  border-color: var(--border-color);
  box-shadow: var(--shadow-sm);
}
.guide-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  background: rgba(15, 23, 42, 0.06);
  color: var(--text-secondary);
  transition: var(--transition);
}
.guide-step.active .guide-num { background: var(--accent-gradient); color: #fff; box-shadow: var(--shadow-glow); }
.guide-step.done .guide-num { background: rgba(16, 185, 129, 0.15); color: #047857; }
.guide-step-text strong { display: block; font-size: 0.9rem; }
.guide-step-text small { color: var(--text-muted); font-size: 0.78rem; }
.guide-progress {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 3px;
  width: 0;
  background: var(--accent-gradient);
}
.guide.autoplay .guide-step.active .guide-progress { animation: guideProgress 6s linear forwards; }
@keyframes guideProgress { to { width: 100%; } }

.guide-stage { padding: 24px; min-height: 420px; display: flex; flex-direction: column; }
.guide-panel {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 26px;
  align-items: center;
  flex: 1;
}
.guide-panel[hidden] { display: none; }
.guide-panel.active { animation: guidePanelIn 0.45s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes guidePanelIn {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: none; }
}
.guide-visual {
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: linear-gradient(135deg, #eef2ff, #fdf2f8);
}
.guide-visual img { display: block; width: 100%; height: auto; }
.guide-copy h3 { font-size: 1.3rem; margin-bottom: 12px; }
.guide-copy ul { padding-left: 18px; margin-bottom: 14px; color: var(--text-secondary); font-size: 0.92rem; }
.guide-copy li { margin-bottom: 7px; }
.guide-copy li strong { color: var(--text-primary); }
.guide-note {
  font-size: 0.82rem;
  color: var(--text-secondary);
  background: rgba(99, 102, 241, 0.07);
  border-left: 3px solid var(--accent-primary);
  padding: 8px 12px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin-bottom: 14px;
}
.guide-keys { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 12px; font-size: 0.84rem; color: var(--text-secondary); }
kbd {
  display: inline-block;
  padding: 2px 7px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-primary);
  background: #fff;
  border: 1px solid var(--border-color);
  border-bottom-width: 2px;
  border-radius: 6px;
}
.guide-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-color);
}
.guide-nav .btn:disabled { opacity: 0.45; cursor: default; transform: none; }
.guide-count { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }

/* Illustrated mock-ups for steps without a screenshot */
.guide-mock {
  aspect-ratio: 16 / 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
}
.guide-mock-card {
  width: min(280px, 100%);
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.guide-mock-title { font-family: 'Outfit', sans-serif; font-weight: 700; text-align: center; margin-bottom: 4px; }
.guide-mock-field {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 7px 10px;
}
.guide-mock-tag { font-size: 0.68rem; color: #047857; font-weight: 700; }
.guide-mock-btn {
  text-align: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: #fff;
  background: var(--accent-gradient);
  border-radius: 6px;
  padding: 8px;
  margin-top: 2px;
}
.guide-mock-tabs, .guide-mock-seg { display: flex; font-size: 0.72rem; font-weight: 600; color: var(--text-muted); }
.guide-mock-tabs span { flex: 1; text-align: center; padding-bottom: 6px; border-bottom: 2px solid #eef2f7; }
.guide-mock-tabs span.on { color: var(--accent-primary); border-color: var(--accent-primary); }
.guide-mock-seg { background: #f1f5f9; border-radius: 6px; padding: 3px; }
.guide-mock-seg span { flex: 1; text-align: center; padding: 4px; border-radius: 4px; }
.guide-mock-seg span.on { background: #fff; color: var(--accent-primary); box-shadow: var(--shadow-sm); }
.guide-mock-toolbar {
  width: min(340px, 100%);
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 10px 12px;
}
.guide-mock-url { flex: 1; height: 26px; border-radius: var(--radius-full); background: #f1f5f9; }
.guide-mock-ext { color: var(--text-secondary); display: flex; }
.guide-mock-pin { width: 30px; height: 30px; border-radius: 8px; animation: guidePulse 2s ease-in-out infinite; }
@keyframes guidePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.5); }
  50%      { box-shadow: 0 0 0 8px rgba(99, 102, 241, 0); }
}
.guide-mock-caption { font-size: 0.8rem; font-weight: 600; color: var(--text-secondary); }

/* FAQ */
.home-faq-wrap { max-width: 820px; }
.home-faq { display: flex; flex-direction: column; gap: 10px; }
.home-faq details {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0 18px;
  transition: var(--transition);
}
.home-faq details[open] { box-shadow: var(--shadow-sm); background: var(--bg-card-hover); }
.home-faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 0;
  font-weight: 700;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.home-faq summary::-webkit-details-marker { display: none; }
.home-faq summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--accent-primary); transition: transform 0.25s ease; }
.home-faq details[open] summary::after { transform: rotate(45deg); }
.home-faq details p { padding-bottom: 16px; color: var(--text-secondary); font-size: 0.92rem; }
.home-faq a { color: var(--accent-primary); font-weight: 600; }
.home-faq code { background: rgba(15, 23, 42, 0.06); padding: 1px 6px; border-radius: 4px; font-size: 0.85em; }

/* Final call to action */
.home-final {
  text-align: center;
  padding: 48px 24px;
  border-radius: var(--radius-lg);
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 24px 50px -20px rgba(99, 102, 241, 0.6);
}
.home-final h2 { font-size: 2rem; font-weight: 800; margin-bottom: 8px; }
.home-final p { opacity: 0.9; margin-bottom: 24px; }
.home-final .home-cta { justify-content: center; margin-bottom: 0; }
.home-btn-light { background: #fff; color: #4338ca; box-shadow: 0 6px 18px rgba(15, 23, 42, 0.18); }
.home-btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.home-btn-ghost:hover { background: rgba(255, 255, 255, 0.14); }

@media (max-width: 1000px) {
  .home-hero { grid-template-columns: 1fr; padding-top: 40px; }
  .home-features { grid-template-columns: repeat(2, 1fr); }
  .guide { grid-template-columns: 1fr; }
  .guide-steps { flex-direction: row; overflow-x: auto; padding-bottom: 6px; scrollbar-width: none; }
  .guide-steps li { flex: 0 0 auto; }
  .guide-step-text small { display: none; }
}
@media (max-width: 700px) {
  .home-hero h1 { font-size: 2.3rem; }
  .home-section-head h2, .home-final h2 { font-size: 1.6rem; }
  .home-features { grid-template-columns: 1fr; }
  .guide-panel { grid-template-columns: 1fr; }
  .guide-stage { padding: 16px; }
  .home-nav-link { display: none; }
  .home-chip-a { left: 0; }
  .guide-step-text { display: none; }
  .guide-step { padding: 8px; }
}
@media (max-width: 480px) {
  .nav-content .brand-badge { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .home-chip, .guide-mock-pin, .guide-panel.active { animation: none; }
}
html { scroll-behavior: smooth; }
#guide { scroll-margin-top: 80px; }
.guide > *, .guide-panel > * { min-width: 0; }
.nav-actions .btn { white-space: nowrap; }
@media (max-width: 480px) {
  .nav-content { gap: 10px; }
  .nav-actions { gap: 6px; }
  .nav-actions .btn-sm { padding: 6px 10px; }
}

/* ---------------------------------------------------------------------------
   Profile: sign-in activity (IP history)
   --------------------------------------------------------------------------- */
.ip-alert-toggle {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  margin: 4px 0 18px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.04);
  cursor: pointer;
}
.ip-alert-toggle strong { display: block; font-size: 0.9rem; }
.ip-alert-toggle small { color: var(--text-muted); font-size: 0.8rem; }
.ip-switch { position: relative; flex-shrink: 0; width: 42px; height: 24px; margin-top: 2px; }
.ip-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.ip-switch-track {
  position: absolute;
  inset: 0;
  border-radius: var(--radius-full);
  background: #cbd5e1;
  transition: var(--transition);
  pointer-events: none;
}
.ip-switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
  transition: var(--transition);
}
.ip-switch input:checked + .ip-switch-track { background: var(--accent-primary); }
.ip-switch input:checked + .ip-switch-track::after { transform: translateX(18px); }
.ip-switch input:focus-visible + .ip-switch-track { box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.3); }
.ip-switch input:disabled + .ip-switch-track { opacity: 0.6; }

.ip-list { list-style: none; display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.ip-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card-hover);
}
.ip-row.is-new { border-color: rgba(245, 158, 11, 0.45); background: rgba(245, 158, 11, 0.05); }
.ip-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-primary);
  background: rgba(99, 102, 241, 0.1);
}
.ip-main { flex: 1; min-width: 0; }
.ip-addr {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  font-size: 0.9rem;
  word-break: break-all;
}
.ip-main small { color: var(--text-muted); font-size: 0.8rem; }
.ip-badge {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: var(--radius-full);
}
.ip-badge-current { background: rgba(16, 185, 129, 0.14); color: #047857; }
.ip-badge-new { background: rgba(245, 158, 11, 0.16); color: #b45309; }
.ip-time { flex-shrink: 0; font-size: 0.8rem; color: var(--text-secondary); text-align: right; }
.ip-empty { color: var(--text-muted); font-size: 0.9rem; margin-bottom: 16px; }
.ip-help { font-size: 0.84rem; color: var(--text-secondary); }
.ip-help a { color: var(--accent-primary); font-weight: 600; }

@media (max-width: 560px) {
  .ip-row { flex-wrap: wrap; }
  .ip-time { width: 100%; text-align: left; padding-left: 48px; }
}

/* Footer links: their own row, one line when there's room, else two centred lines */
.site-footer-top {
  flex-direction: column;
  align-items: stretch;
  gap: 22px;
}
.site-footer-links {
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 10px 22px;
  padding-top: 20px;
  border-top: 1px dashed #e2e8f0;
}
.site-footer-links a { white-space: nowrap; }
@media (max-width: 1100px) {
  .site-footer-links {
    flex-wrap: wrap;
    justify-content: center;
    max-width: 560px;
    margin: 0 auto;
    border-top: none;
    padding-top: 0;
  }
}
@media (max-width: 600px) {
  .site-footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    max-width: none;
    margin: 0;
    gap: 12px 16px;
  }
  .site-footer-links a { white-space: normal; }
  .site-footer-links a:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ---------------------------------------------------------------------------
   Sign-up page (shares the login page's split layout)
   --------------------------------------------------------------------------- */
.login-split-wide {
  grid-template-columns: 1fr 580px;
  max-width: 1160px;
}
.login-card.auth-card-detailed { max-width: 580px; }

.signup-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
  position: relative;
}
.signup-steps::before {
  content: "";
  position: absolute;
  left: 33px;
  top: 24px;
  bottom: 24px;
  width: 2px;
  background: linear-gradient(#6366f1, #ec4899);
  opacity: 0.35;
}
.signup-step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  max-width: 100%;
  padding: 12px 18px 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  animation: loginFloat 5s ease-in-out infinite;
  animation-delay: var(--d);
}
.signup-step strong { display: block; font-size: 0.9rem; }
.signup-step small { color: var(--text-muted); font-size: 0.78rem; }
.signup-step-num {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  color: #fff;
  background: var(--accent-gradient);
  box-shadow: var(--shadow-glow);
}

.signup-progress { margin-bottom: 22px; }
.signup-progress-head {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.signup-progress-head span:last-child { color: var(--accent-primary); }
.signup-progress-bar {
  height: 6px;
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.07);
  overflow: hidden;
}
.signup-progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: var(--accent-gradient);
  transition: width 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}
.signup-progress-bar span.complete { background: linear-gradient(90deg, #10b981, #34d399); }

/* Gradient submit button, greyed out until the form is complete */
.login-submit:disabled:not(.is-loading) {
  background: #cbd5e1;
  color: #f8fafc;
  box-shadow: none;
  transform: none;
  opacity: 1;
  cursor: not-allowed;
}
.login-submit:disabled:not(.is-loading)::before,
.login-submit:disabled .login-submit-arrow { display: none; }

@media (max-width: 1100px) {
  .login-split-wide { grid-template-columns: 1fr; justify-items: center; gap: 0; }
  .login-split-wide .login-showcase { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .signup-step { animation: none; }
}

/* ---------------------------------------------------------------------------
   Profile: account activity log (filter by IP / type)
   --------------------------------------------------------------------------- */
.act-filters {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px 14px;
  align-items: start;
  margin: 4px 0 18px;
}
.act-filter-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
  padding-top: 7px;
}
.act-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.act-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  background: var(--bg-card-hover);
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
}
.act-chip:hover { border-color: rgba(99, 102, 241, 0.4); color: var(--text-primary); }
.act-chip.active {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #fff;
}
.act-chip-ip { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.act-chip-count {
  font-size: 0.7rem;
  padding: 0 6px;
  border-radius: var(--radius-full);
  background: rgba(15, 23, 42, 0.07);
}
.act-chip.active .act-chip-count { background: rgba(255, 255, 255, 0.25); }
.act-chip.active .ip-badge-current { background: rgba(255, 255, 255, 0.9); }

.act-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  margin-bottom: 12px;
  transition: opacity 0.2s ease;
}
.act-list.loading { opacity: 0.5; }
.act-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 4px;
  border-bottom: 1px solid var(--border-color);
  animation: guidePanelIn 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}
.act-row:last-child { border-bottom: none; }
.act-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  background: rgba(99, 102, 241, 0.08);
}
.act-main { flex: 1; min-width: 0; }
.act-title { font-size: 0.9rem; overflow-wrap: anywhere; }
.act-details { color: var(--text-secondary); margin-left: 6px; }
.act-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin-top: 3px;
  font-size: 0.78rem;
  color: var(--text-muted);
}
.act-ip {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 1px 8px;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  background: var(--bg-card-hover);
  color: var(--text-secondary);
  cursor: pointer;
}
.act-ip:hover { border-color: var(--accent-primary); color: var(--accent-primary); }
.act-ip.is-current { border-color: rgba(16, 185, 129, 0.4); color: #047857; }
.act-time { flex-shrink: 0; font-size: 0.78rem; color: var(--text-secondary); padding-top: 2px; }
.act-more { display: block; margin: 0 auto; }

@media (max-width: 560px) {
  .act-filters { grid-template-columns: 1fr; gap: 6px; }
  .act-filter-label { padding-top: 4px; }
  .act-row { flex-wrap: wrap; }
  .act-time { width: 100%; padding-left: 46px; }
}

/* Dashboard: "Visited Today" history list */
.history-list {
  grid-column: 1 / -1;
  list-style: none;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  overflow: hidden;
}
.history-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 11px 16px;
  border-top: 1px solid var(--border-color);
  transition: var(--transition);
}
.history-row:first-child { border-top: 0; }
.history-row:hover { background: rgba(99, 102, 241, 0.05); }
.history-time {
  flex: 0 0 72px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.history-favicon { width: 20px; height: 20px; flex-shrink: 0; border-radius: 4px; }
.history-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.history-title {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.history-title:hover { color: var(--accent-hover); text-decoration: underline; }
.history-domain { font-size: 0.78rem; color: var(--text-muted); }
@media (max-width: 560px) {
  .history-row { gap: 10px; padding: 10px 12px; }
  .history-time { flex-basis: 58px; }
}


/* =========================================================================
   Folder Open Bookmarks Quick Button
   ========================================================================= */
.folder-item-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.folder-open-all-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(255, 255, 255, 0.75);
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0;
  transition: var(--transition);
}

.folder-open-all-btn:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: #ffffff;
  transform: translateY(-1px);
}

.folder-nav-item.active .folder-open-all-btn {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
  color: #ffffff;
}

.folder-nav-item.active .folder-open-all-btn:hover {
  background: #ffffff;
  color: var(--accent-primary);
}

.folder-item-left {
  flex: 1;
  min-width: 0;
}

.folder-item-left svg {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
}

.folder-item-left span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
