/* ==========================================================================
   LINKVAULT - Link Organization & Bookmark Manager Stylesheet
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&display=swap');

:root {
  color-scheme: dark;

  /* Color Palette - Dark Mode Default */
  --lv-bg-body: #0d101d;
  --lv-bg-sidebar: #131728;
  --lv-bg-card: #1a1f35;
  --lv-bg-card-hover: #222945;
  --lv-bg-input: #101424;
  --lv-border: #262d4a;
  --lv-border-hover: #3b4670;
  --lv-scrollbar-thumb: rgba(148, 163, 184, 0.22);
  --lv-scrollbar-thumb-hover: rgba(148, 163, 184, 0.42);

  /* Text Colors */
  --lv-text-primary: #f8fafc;
  --lv-text-secondary: #94a3b8;
  --lv-text-muted: #64748b;
  --lv-text-heading: #ffffff;

  /* Accent Colors */
  --lv-primary: #3b82f6;
  --lv-primary-hover: #2563eb;
  --lv-primary-light: rgba(59, 130, 246, 0.15);
  --lv-primary-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  --lv-accent-glow: rgba(59, 130, 246, 0.35);

  --lv-purple: #8b5cf6;
  --lv-purple-light: rgba(139, 92, 246, 0.15);
  --lv-pink: #ec4899;
  --lv-pink-light: rgba(236, 72, 153, 0.15);
  --lv-green: #10b981;
  --lv-green-light: rgba(16, 185, 129, 0.15);
  --lv-amber: #f59e0b;
  --lv-amber-light: rgba(245, 158, 11, 0.15);
  --lv-red: #ef4444;
  --lv-red-light: rgba(239, 68, 68, 0.15);
  --lv-cyan: #06b6d4;

  /* UI Tokens */
  --lv-radius-sm: 6px;
  --lv-radius-md: 10px;
  --lv-radius-lg: 16px;
  --lv-radius-full: 9999px;
  --lv-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
  --lv-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --lv-shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);

  /* Transitions */
  --lv-transition-fast: 0.18s ease;
  --lv-transition-normal: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Light Theme */
[data-theme="light"] {
  color-scheme: light;

  --lv-bg-body: #f1f5f9;
  --lv-bg-sidebar: #ffffff;
  --lv-bg-card: #ffffff;
  --lv-bg-card-hover: #f8fafc;
  --lv-bg-input: #f8fafc;
  --lv-border: #e2e8f0;
  --lv-border-hover: #cbd5e1;
  --lv-scrollbar-thumb: rgba(100, 116, 139, 0.28);
  --lv-scrollbar-thumb-hover: rgba(100, 116, 139, 0.5);

  --lv-text-primary: #1e293b;
  --lv-text-secondary: #64748b;
  --lv-text-muted: #94a3b8;
  --lv-text-heading: #0f172a;

  --lv-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --lv-shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --lv-shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
}

/* --------------------------------------------------------------------------
   Custom Sleek Scrollbars (Dark & Light Theme Aware, No White Tracks/Arrows)
   -------------------------------------------------------------------------- */
* {
  scrollbar-width: thin;
  scrollbar-color: var(--lv-scrollbar-thumb) transparent;
}

*::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

*::-webkit-scrollbar-track {
  background: transparent;
}

*::-webkit-scrollbar-thumb {
  background-color: var(--lv-scrollbar-thumb);
  border-radius: 9999px;
}

*::-webkit-scrollbar-thumb:hover {
  background-color: var(--lv-scrollbar-thumb-hover);
}

*::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

*::-webkit-scrollbar-corner {
  background: transparent;
}

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

html {
  font-size: 14px;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: var(--lv-bg-body);
  color: var(--lv-text-primary);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  transition: background-color var(--lv-transition-normal), color var(--lv-transition-normal);
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol, li {
  list-style: none;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  outline: none;
  background: none;
}

button {
  cursor: pointer;
}

/* --------------------------------------------------------------------------
   Layout Structure
   -------------------------------------------------------------------------- */
.lv-app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.lv-sidebar {
  width: 270px;
  background-color: var(--lv-bg-sidebar);
  border-right: 1px solid var(--lv-border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  transition: transform var(--lv-transition-normal);
}

.lv-brand {
  height: 70px;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--lv-border);
}

.lv-logo-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--lv-text-heading);
  letter-spacing: -0.3px;
}

.lv-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--lv-radius-md);
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.15rem;
  box-shadow: 0 4px 14px var(--lv-accent-glow);
}

.lv-sidebar-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.lv-sidebar-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--lv-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0 0.5rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lv-sidebar-nav,
.lv-nav-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  list-style: none;
}

.lv-nav-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.85rem;
  border-radius: var(--lv-radius-md);
  color: var(--lv-text-secondary);
  font-size: 0.92rem;
  font-weight: 600;
  transition: all var(--lv-transition-fast);
  width: 100%;
  text-align: left;
}

.lv-nav-btn-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lv-nav-btn:hover {
  background-color: var(--lv-bg-card-hover);
  color: var(--lv-text-primary);
}

.lv-nav-btn.active {
  background: var(--lv-primary-gradient);
  color: #ffffff;
  box-shadow: 0 4px 15px var(--lv-accent-glow);
}

.lv-nav-btn.active .lv-badge {
  background-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.lv-badge {
  font-size: 0.72rem;
  padding: 0.15rem 0.55rem;
  border-radius: var(--lv-radius-full);
  background-color: var(--lv-bg-input);
  color: var(--lv-text-muted);
  font-weight: 700;
  transition: all var(--lv-transition-fast);
}

.category-dot {
  width: 10px;
  height: 10px;
  border-radius: var(--lv-radius-full);
  flex-shrink: 0;
}

/* Sidebar Footer */
.lv-sidebar-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--lv-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Main Content Area */
.lv-main {
  flex: 1;
  margin-left: 270px;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Top Header Bar */
.lv-header {
  height: 70px;
  background-color: var(--lv-bg-sidebar);
  border-bottom: 1px solid var(--lv-border);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(10px);
}

.lv-header-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex: 1;
  max-width: 540px;
}

.lv-mobile-menu-btn {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: var(--lv-radius-md);
  align-items: center;
  justify-content: center;
  color: var(--lv-text-secondary);
  font-size: 1.2rem;
}

.lv-search-box {
  position: relative;
  width: 100%;
}

.lv-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--lv-text-muted);
  font-size: 0.95rem;
  pointer-events: none;
}

.lv-search-input {
  width: 100%;
  padding: 0.65rem 2.8rem 0.65rem 2.75rem;
  background-color: var(--lv-bg-input);
  border: 1px solid var(--lv-border);
  border-radius: var(--lv-radius-full);
  color: var(--lv-text-primary);
  font-size: 0.9rem;
  transition: all var(--lv-transition-fast);
}

.lv-search-input:focus {
  border-color: var(--lv-primary);
  box-shadow: 0 0 0 3px var(--lv-primary-light);
  background-color: var(--lv-bg-card);
}

.lv-search-clear {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--lv-text-muted);
  cursor: pointer;
  display: none;
}

.lv-search-box.has-val .lv-search-clear {
  display: block;
}

.lv-header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Action Buttons */
.lv-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.25rem;
  border-radius: var(--lv-radius-md);
  font-weight: 600;
  font-size: 0.88rem;
  transition: all var(--lv-transition-fast);
}

.lv-btn-primary {
  background: var(--lv-primary-gradient);
  color: #ffffff;
  box-shadow: 0 4px 14px var(--lv-accent-glow);
}

.lv-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px var(--lv-accent-glow);
}

.lv-btn-secondary {
  background-color: var(--lv-bg-card);
  border: 1px solid var(--lv-border);
  color: var(--lv-text-secondary);
}

.lv-btn-secondary:hover {
  border-color: var(--lv-border-hover);
  color: var(--lv-text-primary);
}

.lv-btn-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--lv-radius-md);
  border: 1px solid var(--lv-border);
  background-color: var(--lv-bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lv-text-secondary);
  transition: all var(--lv-transition-fast);
}

.lv-btn-icon:hover {
  color: var(--lv-text-primary);
  border-color: var(--lv-border-hover);
}

/* --------------------------------------------------------------------------
   Content Dashboard
   -------------------------------------------------------------------------- */
.lv-content {
  padding: 2rem;
  flex: 1;
}

/* Stats Overview Bar */
.lv-stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  margin-bottom: 2rem;
}

.lv-stat-card {
  background-color: var(--lv-bg-card);
  border: 1px solid var(--lv-border);
  border-radius: var(--lv-radius-md);
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform var(--lv-transition-fast), border-color var(--lv-transition-fast);
}

.lv-stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--lv-border-hover);
}

.lv-stat-info .title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--lv-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.lv-stat-info .num {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--lv-text-heading);
  letter-spacing: -0.5px;
  line-height: 1.2;
  margin-top: 0.25rem;
}

.lv-stat-icon-wrapper {
  width: 46px;
  height: 46px;
  border-radius: var(--lv-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.lv-stat-icon-wrapper.blue { background-color: var(--lv-primary-light); color: var(--lv-primary); }
.lv-stat-icon-wrapper.purple { background-color: var(--lv-purple-light); color: var(--lv-purple); }
.lv-stat-icon-wrapper.amber { background-color: var(--lv-amber-light); color: var(--lv-amber); }
.lv-stat-icon-wrapper.green { background-color: var(--lv-green-light); color: var(--lv-green); }

/* Link Control Bar (View Switcher, Sort, Active Category Header) */
.lv-controls-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.lv-view-heading-group {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.lv-view-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--lv-text-heading);
  letter-spacing: -0.3px;
}

.lv-view-counter {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--lv-text-muted);
  padding: 0.2rem 0.65rem;
  background-color: var(--lv-bg-card);
  border: 1px solid var(--lv-border);
  border-radius: var(--lv-radius-full);
}

.lv-actions-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

/* Sort Select Dropdown */
.lv-select {
  padding: 0.55rem 1rem;
  background-color: var(--lv-bg-card);
  border: 1px solid var(--lv-border);
  border-radius: var(--lv-radius-md);
  color: var(--lv-text-primary);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--lv-transition-fast);
}

.lv-select:hover {
  border-color: var(--lv-border-hover);
}

/* View Mode Toggles (Grid / List) */
.lv-view-toggle-group {
  display: flex;
  align-items: center;
  background-color: var(--lv-bg-card);
  border: 1px solid var(--lv-border);
  border-radius: var(--lv-radius-md);
  padding: 3px;
}

.lv-view-btn {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lv-text-muted);
  border-radius: var(--lv-radius-sm);
  transition: all var(--lv-transition-fast);
}

.lv-view-btn:hover {
  color: var(--lv-text-primary);
}

.lv-view-btn.active {
  background-color: var(--lv-primary);
  color: #ffffff;
}

/* Card Size Controller in Controls Bar */
.lv-card-size-group {
  display: flex;
  align-items: center;
  background-color: var(--lv-bg-card);
  border: 1px solid var(--lv-border);
  border-radius: var(--lv-radius-md);
  padding: 3px;
  gap: 2px;
}

.lv-size-btn {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--lv-text-muted);
  border-radius: var(--lv-radius-sm);
  transition: all var(--lv-transition-fast);
}

.lv-size-btn:hover {
  color: var(--lv-text-primary);
  background-color: var(--lv-bg-card-hover);
}

.lv-size-btn.active {
  background-color: var(--lv-primary);
  color: #ffffff;
}

/* Range Slider for Smooth Continuous Zoom */
.lv-size-slider-wrapper {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.35rem 0.85rem;
  background-color: var(--lv-bg-card);
  border: 1px solid var(--lv-border);
  border-radius: var(--lv-radius-md);
}

.lv-range-slider {
  width: 85px;
  height: 4px;
  border-radius: var(--lv-radius-full);
  background: var(--lv-border);
  outline: none;
  -webkit-appearance: none;
  cursor: pointer;
}

.lv-range-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: var(--lv-radius-full);
  background: var(--lv-primary);
  box-shadow: 0 0 8px var(--lv-accent-glow);
  cursor: pointer;
  transition: transform var(--lv-transition-fast);
}

.lv-range-slider::-webkit-slider-thumb:hover {
  transform: scale(1.2);
}

/* --------------------------------------------------------------------------
   LINK CARDS (Grid View with Dynamic Width & Resizing)
   -------------------------------------------------------------------------- */
.lv-links-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(var(--lv-card-min-width, 320px), 1fr));
  gap: 1.25rem;
  transition: gap var(--lv-transition-fast);
}

/* Small / Compact Card Mode */
.lv-links-grid.size-sm {
  --lv-card-min-width: 240px;
  gap: 0.85rem;
}
.lv-links-grid.size-sm .lv-link-card {
  padding: 0.85rem 1rem;
}
.lv-links-grid.size-sm .lv-favicon-box {
  width: 36px;
  height: 36px;
}
.lv-links-grid.size-sm .lv-favicon-img {
  width: 20px;
  height: 20px;
}
.lv-links-grid.size-sm .lv-link-title {
  font-size: 0.95rem;
  -webkit-line-clamp: 1;
}
.lv-links-grid.size-sm .lv-link-desc {
  font-size: 0.78rem;
  -webkit-line-clamp: 1;
  min-height: auto;
  margin-bottom: 0.5rem;
}
.lv-links-grid.size-sm .lv-link-tags {
  margin-bottom: 0.75rem;
}

/* Large / Spacious Card Mode */
.lv-links-grid.size-lg {
  --lv-card-min-width: 440px;
  gap: 1.5rem;
}
.lv-links-grid.size-lg .lv-link-card {
  padding: 1.5rem;
}
.lv-links-grid.size-lg .lv-favicon-box {
  width: 52px;
  height: 52px;
}
.lv-links-grid.size-lg .lv-favicon-img {
  width: 32px;
  height: 32px;
}
.lv-links-grid.size-lg .lv-link-title {
  font-size: 1.2rem;
  -webkit-line-clamp: 2;
}
.lv-links-grid.size-lg .lv-link-desc {
  font-size: 0.88rem;
  -webkit-line-clamp: 3;
  min-height: 3.5em;
}

/* Bento Wide Card Expansion (Per-Card Span 2 Columns) */
.lv-link-card.is-wide {
  grid-column: span 2;
  border-color: var(--lv-border-hover);
  background: linear-gradient(135deg, var(--lv-bg-card) 0%, var(--lv-bg-card-hover) 100%);
}

.lv-icon-btn.resize-card-btn.is-active {
  color: var(--lv-primary);
  background-color: var(--lv-primary-light);
}

@media (max-width: 768px) {
  .lv-link-card.is-wide {
    grid-column: span 1;
  }
}

.lv-link-card {
  background-color: var(--lv-bg-card);
  border: 1px solid var(--lv-border);
  border-radius: var(--lv-radius-md);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: transform var(--lv-transition-fast), border-color var(--lv-transition-fast), box-shadow var(--lv-transition-fast);
}

.lv-link-card:hover {
  transform: translateY(-3px);
  border-color: var(--lv-border-hover);
  box-shadow: var(--lv-shadow-md);
}

.lv-link-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.lv-favicon-box {
  width: 44px;
  height: 44px;
  border-radius: var(--lv-radius-md);
  background-color: var(--lv-bg-input);
  border: 1px solid var(--lv-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: var(--lv-shadow-sm);
}

.lv-favicon-img {
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.lv-favicon-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  color: #fff;
}

.lv-card-top-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.lv-icon-btn {
  width: 30px;
  height: 30px;
  border-radius: var(--lv-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lv-text-muted);
  transition: all var(--lv-transition-fast);
}

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

.lv-icon-btn.is-fav {
  color: var(--lv-amber);
}

.lv-icon-btn.is-fav:hover {
  color: #d97706;
}

.lv-link-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--lv-text-heading);
  margin-bottom: 0.35rem;
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.lv-link-domain {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.78rem;
  color: var(--lv-primary);
  font-weight: 600;
  margin-bottom: 0.75rem;
  word-break: break-all;
}

.lv-link-domain:hover {
  text-decoration: underline;
}

.lv-link-desc {
  font-size: 0.82rem;
  color: var(--lv-text-secondary);
  margin-bottom: 1rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
}

.lv-link-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 1.25rem;
}

.lv-tag-pill {
  font-size: 0.72rem;
  padding: 0.15rem 0.55rem;
  border-radius: var(--lv-radius-full);
  background-color: var(--lv-bg-input);
  color: var(--lv-text-muted);
  font-weight: 600;
  border: 1px solid var(--lv-border);
}

.lv-link-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.85rem;
  border-top: 1px solid var(--lv-border);
  gap: 0.5rem;
}

.lv-category-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.2rem 0.65rem;
  border-radius: var(--lv-radius-full);
}

.lv-card-buttons {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.lv-action-click-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: var(--lv-radius-sm);
  background-color: var(--lv-bg-input);
  border: 1px solid var(--lv-border);
  color: var(--lv-text-primary);
  font-size: 0.8rem;
  font-weight: 600;
  transition: all var(--lv-transition-fast);
}

.lv-action-click-btn:hover {
  border-color: var(--lv-primary);
  color: var(--lv-primary);
}

.lv-open-btn {
  background: var(--lv-primary-gradient);
  color: #fff;
  border: none;
}

.lv-open-btn:hover {
  transform: translateY(-1px);
  color: #fff;
  box-shadow: 0 4px 12px var(--lv-accent-glow);
}

/* --------------------------------------------------------------------------
   COMPACT LIST VIEW
   -------------------------------------------------------------------------- */
.lv-links-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.lv-list-row {
  background-color: var(--lv-bg-card);
  border: 1px solid var(--lv-border);
  border-radius: var(--lv-radius-md);
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  transition: all var(--lv-transition-fast);
}

.lv-list-row:hover {
  border-color: var(--lv-border-hover);
  background-color: var(--lv-bg-card-hover);
}

.lv-list-left {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  min-width: 0;
}

.lv-list-title-group {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.lv-list-title {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--lv-text-heading);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lv-list-url {
  font-size: 0.78rem;
  color: var(--lv-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.lv-list-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

/* --------------------------------------------------------------------------
   EMPTY STATE
   -------------------------------------------------------------------------- */
.lv-empty-state {
  text-align: center;
  padding: 4rem 2rem;
  background-color: var(--lv-bg-card);
  border: 2px dashed var(--lv-border);
  border-radius: var(--lv-radius-lg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lv-empty-icon {
  width: 72px;
  height: 72px;
  border-radius: var(--lv-radius-full);
  background: var(--lv-primary-light);
  color: var(--lv-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin-bottom: 1.25rem;
}

.lv-empty-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--lv-text-heading);
  margin-bottom: 0.4rem;
}

.lv-empty-desc {
  font-size: 0.9rem;
  color: var(--lv-text-secondary);
  max-width: 400px;
  margin-bottom: 1.5rem;
}

/* --------------------------------------------------------------------------
   MODALS & FORMS
   -------------------------------------------------------------------------- */
.lv-modal-backdrop {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(5px);
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.lv-modal-backdrop.open {
  display: flex;
}

.lv-modal {
  background-color: var(--lv-bg-card);
  border: 1px solid var(--lv-border);
  border-radius: var(--lv-radius-lg);
  box-shadow: var(--lv-shadow-lg);
  width: 100%;
  max-width: 540px;
  overflow: hidden;
  animation: modalEnter 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalEnter {
  from { opacity: 0; transform: scale(0.94); }
  to { opacity: 1; transform: scale(1); }
}

.lv-modal-header {
  padding: 1.25rem 1.75rem;
  border-bottom: 1px solid var(--lv-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.lv-modal-title {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--lv-text-heading);
}

.lv-modal-body {
  padding: 1.5rem 1.75rem;
  max-height: 80vh;
  overflow-y: auto;
}

.lv-form-group {
  margin-bottom: 1.25rem;
}

.lv-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--lv-text-primary);
  margin-bottom: 0.45rem;
}

.lv-label .req {
  color: var(--lv-red);
}

.lv-input {
  width: 100%;
  padding: 0.7rem 1rem;
  background-color: var(--lv-bg-input);
  border: 1px solid var(--lv-border);
  border-radius: var(--lv-radius-md);
  color: var(--lv-text-primary);
  font-size: 0.92rem;
  transition: all var(--lv-transition-fast);
}

.lv-input:focus {
  border-color: var(--lv-primary);
  box-shadow: 0 0 0 3px var(--lv-primary-light);
  background-color: var(--lv-bg-card);
}

/* Live Link Preview Box inside Modal */
.lv-preview-box {
  background-color: var(--lv-bg-input);
  border: 1px solid var(--lv-border);
  border-radius: var(--lv-radius-md);
  padding: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.75rem;
}

.lv-modal-footer {
  padding: 1.25rem 1.75rem;
  border-top: 1px solid var(--lv-border);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
}

/* Toast Notifications */
.lv-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  pointer-events: none;
}

.lv-toast {
  pointer-events: auto;
  min-width: 280px;
  padding: 0.85rem 1.25rem;
  background-color: var(--lv-bg-card);
  border: 1px solid var(--lv-border);
  border-radius: var(--lv-radius-md);
  box-shadow: var(--lv-shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--lv-text-heading);
  animation: toastSlide 0.25s ease;
}

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

/* --------------------------------------------------------------------------
   Responsive Media Queries
   -------------------------------------------------------------------------- */
@media (max-width: 1100px) {
  .lv-stats-bar {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 850px) {
  .lv-sidebar {
    transform: translateX(-100%);
  }
  body.lv-mobile-open .lv-sidebar {
    transform: translateX(0);
  }
  .lv-main {
    margin-left: 0;
  }
  .lv-mobile-menu-btn {
    display: flex;
  }
  .lv-header {
    padding: 0 1rem;
  }
  .lv-content {
    padding: 1rem;
  }
}

@media (max-width: 600px) {
  .lv-stats-bar {
    grid-template-columns: 1fr;
  }
  .lv-links-grid {
    grid-template-columns: 1fr;
  }
  .lv-header-left {
    max-width: 200px;
  }
}


/* ==========================================================================
   PHASE B–F UI/UX ENHANCEMENTS
   Link-Type Badges, Hover Actions, Command Palette, Drawers, Bulk Bar,
   Favorites Strip, Group-By View, Insights, Mobile Bottom Nav & Accessibility
   ========================================================================== */

/* 1. Accessible Focus Rings & Reduced Motion */
:focus-visible {
  outline: 2px solid var(--lv-primary);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* 2. Search Box Shortcut Hint & Match Highlighting */
.lv-search-input {
  padding-right: 5.5rem;
}

.lv-search-clear {
  right: 4.1rem;
}

.lv-search-kbd {
  position: absolute;
  right: 0.55rem;
  top: 50%;
  transform: translateY(-50%);
  padding: 0.2rem 0.5rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--lv-text-secondary);
  background: var(--lv-bg-card);
  border: 1px solid var(--lv-border);
  border-radius: 5px;
  cursor: pointer;
  transition: all var(--lv-transition-fast);
}

.lv-search-kbd:hover {
  border-color: var(--lv-primary);
  color: var(--lv-text-primary);
}

mark {
  background-color: rgba(245, 158, 11, 0.28);
  color: inherit;
  padding: 0 2px;
  border-radius: 3px;
  font-weight: 700;
}

/* 3. Sync Status Dot & Sidebar Enhancements */
.lv-sync-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.74rem;
  color: var(--lv-text-secondary);
  font-weight: 600;
}

.lv-sync-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--lv-green);
  box-shadow: 0 0 6px var(--lv-green);
}

.lv-sync-dot.saving {
  background: var(--lv-amber);
  box-shadow: 0 0 6px var(--lv-amber);
}

.lv-sync-dot.offline,
.lv-sync-dot.error {
  background: var(--lv-red);
  box-shadow: 0 0 6px var(--lv-red);
}

.lv-section-add-btn {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--lv-primary);
  transition: background var(--lv-transition-fast);
}

.lv-section-add-btn:hover {
  background: var(--lv-primary-light);
}

.lv-cat-right {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
}

.lv-cat-edit-trigger {
  opacity: 0.55;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--lv-text-secondary);
  transition: opacity var(--lv-transition-fast), background var(--lv-transition-fast);
}

#categoryModal {
  z-index: 240;
}

.lv-nav-btn:hover .lv-cat-edit-trigger,
.lv-cat-edit-trigger:focus-visible {
  opacity: 1;
}

.lv-cat-edit-trigger:hover {
  background: var(--lv-bg-card);
  color: var(--lv-text-primary);
}

.lv-sidebar-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.15rem 0.25rem;
}

.lv-sidebar-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.22rem 0.55rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--lv-text-secondary);
  background: var(--lv-bg-card);
  border: 1px solid var(--lv-border);
  border-radius: var(--lv-radius-full);
  transition: all var(--lv-transition-fast);
}

.lv-sidebar-tag:hover,
.lv-sidebar-tag.active {
  color: #fff;
  background: var(--lv-primary);
  border-color: var(--lv-primary);
}

.lv-tag-count {
  font-size: 0.68rem;
  opacity: 0.75;
}

.lv-tags-empty {
  font-size: 0.78rem;
  color: var(--lv-text-muted);
  padding: 0.25rem 0.5rem;
}

/* 4. Slim / Collapsible Stats Bar (UI 2.1) */
.lv-stats-section {
  margin-bottom: 1.25rem;
}

.lv-slim-stats-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 1rem;
  background: var(--lv-bg-card);
  border: 1px solid var(--lv-border);
  border-radius: var(--lv-radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--lv-text-secondary);
}

.lv-slim-stats-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--lv-primary);
}

.lv-stats-section.is-collapsed .lv-stats-bar {
  display: none;
}

.lv-stats-section:not(.is-collapsed) .lv-stats-bar {
  margin-top: 0.85rem;
  margin-bottom: 0;
}

.lv-stats-section:not(.is-collapsed) .lv-slim-stats-toggle i {
  transform: rotate(180deg);
}

/* 5. Pinned Favorites Strip (UI 2.4) */
.lv-fav-strip {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0.9rem;
  margin-bottom: 1.15rem;
  background: var(--lv-bg-card);
  border: 1px solid var(--lv-border);
  border-radius: var(--lv-radius-md);
}

.lv-fav-strip-label {
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--lv-text-secondary);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding-top: 0.28rem;
}

.lv-fav-strip-items {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.45rem;
  flex: 1;
  min-width: 0;
}

.lv-fav-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  background: var(--lv-bg-input);
  border: 1px solid var(--lv-border);
  border-radius: var(--lv-radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--lv-text-primary);
  white-space: nowrap;
  transition: all var(--lv-transition-fast);
}

.lv-fav-chip:hover {
  border-color: var(--lv-primary);
  transform: translateY(-1px);
}

/* 6. Sticky Controls Bar, Filter Chips & Quick-Add Bar */
.lv-controls-bar {
  position: sticky;
  top: 70px;
  z-index: 25;
  background: var(--lv-bg-body);
  padding: 0.5rem 0;
}

.lv-size-px {
  font-size: 0.75rem;
  color: var(--lv-text-secondary);
  min-width: 40px;
  text-align: right;
  font-weight: 600;
}

.lv-btn-sm {
  padding: 0.4rem 0.75rem;
  font-size: 0.78rem;
}

.lv-btn-danger {
  background: var(--lv-red-light);
  color: var(--lv-red);
  border: 1px solid rgba(239, 68, 68, 0.35);
}

.lv-btn-danger:hover {
  background: var(--lv-red);
  color: #fff;
}

#groupByToggleBtn.active {
  background: var(--lv-primary);
  color: #fff;
  border-color: var(--lv-primary);
}

.lv-filter-chips-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.lv-active-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.28rem 0.65rem;
  font-size: 0.78rem;
  font-weight: 600;
  background: var(--lv-primary-light);
  color: var(--lv-primary);
  border: 1px solid var(--lv-primary);
  border-radius: var(--lv-radius-full);
}

.lv-clear-all-btn {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--lv-text-secondary);
  text-decoration: underline;
  padding: 0.2rem 0.4rem;
}

.lv-quick-add-bar {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.9rem;
  margin-bottom: 1.25rem;
  background: var(--lv-bg-card);
  border: 1px dashed var(--lv-border-hover);
  border-radius: var(--lv-radius-md);
}

.lv-quick-add-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--lv-text-primary);
  font-size: 0.86rem;
  outline: none;
}

/* 7. Enhanced Cards: Type Badges, Color Strip, Hover Actions & Whole-Card Click */
.lv-link-card {
  cursor: pointer;
  overflow: hidden;
}

.lv-list-row {
  cursor: pointer;
}

.lv-card-header-left {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}

.lv-link-card .lv-card-top-actions {
  display: flex;
  align-items: center;
  gap: 0.2rem;
  flex: 0 1 auto;
  min-width: 0;
  max-width: 100%;
  margin-left: auto;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2px 0;
}

.lv-link-card .lv-card-top-actions::-webkit-scrollbar {
  display: none;
}

.lv-link-card .lv-card-top-actions .lv-icon-btn {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  font-size: 0.82rem;
}

.lv-type-box {
  background: color-mix(in srgb, var(--type-color, #3b82f6) 16%, var(--lv-bg-input));
  border-color: color-mix(in srgb, var(--type-color, #3b82f6) 38%, var(--lv-border));
  color: var(--type-color, #3b82f6);
  font-size: 1.15rem;
}

.lv-custom-emoji {
  font-size: 1.25rem;
  line-height: 1;
}

.lv-type-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.52rem;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  border-radius: 5px;
  color: var(--type-color, var(--lv-text-secondary));
  background: color-mix(in srgb, var(--type-color, #64748b) 16%, transparent);
  border: 1px solid color-mix(in srgb, var(--type-color, #64748b) 35%, transparent);
}

.lv-health-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.16rem 0.45rem;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 5px;
}

.lv-health-badge.dead {
  background: var(--lv-red-light);
  color: var(--lv-red);
}

.lv-health-badge.auth,
.lv-health-badge.warn {
  background: var(--lv-amber-light);
  color: var(--lv-amber);
}

/* Keep card actions subtly visible by default and fully opaque on hover */
@media (hover: hover) and (pointer: fine) {
  .lv-link-card .lv-card-top-actions .lv-icon-btn:not(.is-fav):not(.is-active) {
    opacity: 0.65;
  }
  .lv-link-card:hover .lv-card-top-actions .lv-icon-btn,
  .lv-link-card:focus-within .lv-card-top-actions .lv-icon-btn {
    opacity: 1;
  }
}

.lv-icon-btn.is-copied {
  color: var(--lv-green) !important;
  background: var(--lv-green-light) !important;
}

.lv-icon-btn.fav-pop i {
  animation: favPop 0.32s ease;
}

@keyframes favPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.4); }
  100% { transform: scale(1); }
}

.lv-link-meta-line {
  font-size: 0.76rem;
  color: var(--lv-text-secondary);
  margin: 0.35rem 0 0.75rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.lv-slug-pill {
  padding: 0.1rem 0.45rem;
  background: var(--lv-primary-light);
  color: var(--lv-primary);
  border-radius: 4px;
  font-weight: 700;
  font-family: monospace;
}

.lv-tag-pill {
  cursor: pointer;
  transition: all var(--lv-transition-fast);
}

.lv-tag-pill:hover {
  border-color: var(--lv-primary);
  color: var(--lv-primary);
}

.lv-tag-more {
  font-size: 0.7rem;
  color: var(--lv-text-secondary);
  padding: 0.15rem 0.35rem;
}

.lv-open-hint {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--lv-text-secondary);
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  transition: color var(--lv-transition-fast);
}

.lv-link-card:hover .lv-open-hint {
  color: var(--lv-primary);
}

.lv-inline-title-input {
  width: 100%;
  padding: 0.25rem 0.45rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--lv-text-heading);
  background: var(--lv-bg-input);
  border: 1px solid var(--lv-primary);
  border-radius: 6px;
  margin-bottom: 0.3rem;
}

.lv-list-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* Drag & Drop states */
.lv-link-card.is-dragging,
.lv-list-row.is-dragging {
  opacity: 0.45;
}

.is-drop-target {
  outline: 2px dashed var(--lv-primary) !important;
  outline-offset: 2px;
}

/* 8. Bulk Selection Checkbox & Floating Bar */
.lv-select-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  width: 0;
  overflow: hidden;
  margin-right: -0.55rem;
  transition: opacity var(--lv-transition-fast), width var(--lv-transition-fast), margin var(--lv-transition-fast);
  cursor: pointer;
}

.lv-link-card:hover .lv-select-check,
.lv-link-card:focus-within .lv-select-check,
.lv-link-card.is-selected .lv-select-check,
.lv-list-row:hover .lv-select-check,
.lv-list-row.is-selected .lv-select-check {
  opacity: 1;
  width: 16px;
  margin-right: 0;
}

.lv-card-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--lv-primary);
  cursor: pointer;
}

.lv-link-card.is-selected,
.lv-list-row.is-selected {
  border-color: var(--lv-primary);
  box-shadow: 0 0 0 2px var(--lv-primary-light);
}

.lv-bulk-bar {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 130%);
  z-index: 150;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1.1rem;
  background: var(--lv-bg-sidebar);
  border: 1px solid var(--lv-primary);
  border-radius: var(--lv-radius-full);
  box-shadow: var(--lv-shadow-lg);
  transition: transform var(--lv-transition-normal);
}

.lv-bulk-bar.open {
  transform: translate(-50%, 0);
}

.lv-bulk-count {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--lv-primary);
  padding-right: 0.35rem;
}

.lv-bulk-move-group {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.lv-select-sm {
  padding: 0.32rem 0.6rem;
  font-size: 0.78rem;
}

/* 9. Group-by-Category View (UI 2.3) */
.lv-grouped-wrapper {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.lv-cat-group {
  background: color-mix(in srgb, var(--lv-bg-card) 55%, transparent);
  border: 1px solid var(--lv-border);
  border-radius: var(--lv-radius-md);
  padding: 1rem 1.25rem;
}

.lv-cat-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.lv-cat-group-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--lv-text-heading);
}

.lv-cat-group.is-collapsed .lv-group-chevron {
  transform: rotate(-90deg);
}

.lv-cat-group-body {
  margin-top: 1rem;
}

/* 10. Overview & Insights View (UI 9.1, 9.6) */
.lv-insights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 1.25rem;
}

.lv-insight-card {
  background: var(--lv-bg-card);
  border: 1px solid var(--lv-border);
  border-radius: var(--lv-radius-md);
  padding: 1.35rem;
}

.lv-insight-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.lv-insight-header h3 {
  font-size: 1rem;
  font-weight: 800;
  color: var(--lv-text-heading);
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.lv-cat-bars {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.lv-cat-bar-row {
  display: grid;
  grid-template-columns: 160px 1fr 36px;
  align-items: center;
  gap: 0.65rem;
  padding: 0.3rem 0.4rem;
  border-radius: 6px;
  text-align: left;
  color: var(--lv-text-primary);
  font-size: 0.82rem;
  font-weight: 600;
}

.lv-cat-bar-row:hover {
  background: var(--lv-bg-card-hover);
}

.lv-cat-bar-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lv-cat-bar-track {
  height: 8px;
  background: var(--lv-bg-input);
  border-radius: var(--lv-radius-full);
  overflow: hidden;
}

.lv-cat-bar-fill {
  height: 100%;
  border-radius: var(--lv-radius-full);
}

.lv-cat-bar-num {
  text-align: right;
  font-weight: 800;
  color: var(--lv-text-secondary);
}

.lv-insight-types {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.lv-insight-type-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.75rem;
  background: var(--lv-bg-input);
  border: 1px solid var(--lv-border);
  border-radius: var(--lv-radius-md);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--lv-text-primary);
}

.lv-insight-type-chip i {
  color: var(--type-color, var(--lv-primary));
}

.lv-insight-type-chip:hover {
  border-color: var(--type-color, var(--lv-primary));
}

.lv-health-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.65rem;
}

.lv-health-stat {
  background: var(--lv-bg-input);
  border: 1px solid var(--lv-border);
  border-radius: var(--lv-radius-sm);
  padding: 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.lv-health-stat span {
  font-size: 0.72rem;
  color: var(--lv-text-secondary);
}

.lv-health-stat strong {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--lv-text-heading);
}

.lv-health-stat.is-alert strong {
  color: var(--lv-red);
}

.lv-mini-list {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.lv-mini-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  padding: 0.45rem 0.6rem;
  border-radius: 6px;
  color: var(--lv-text-primary);
  font-size: 0.84rem;
  font-weight: 600;
  text-align: left;
}

.lv-mini-link:hover {
  background: var(--lv-bg-card-hover);
}

.lv-mini-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 11. Command Palette (Ctrl+K) */
.lv-cmd-modal {
  max-width: 600px;
  overflow: hidden;
}

.lv-cmd-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--lv-border);
}

.lv-cmd-header input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--lv-text-primary);
  font-size: 1rem;
  outline: none;
}

.lv-cmd-esc {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
  background: var(--lv-bg-input);
  border: 1px solid var(--lv-border);
  border-radius: 5px;
  color: var(--lv-text-secondary);
}

.lv-cmd-list {
  max-height: 360px;
  overflow-y: auto;
  padding: 0.5rem;
}

.lv-cmd-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.85rem;
  border-radius: var(--lv-radius-sm);
  cursor: pointer;
}

.lv-cmd-item.is-active,
.lv-cmd-item:hover {
  background: var(--lv-primary-light);
}

.lv-cmd-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--lv-bg-input);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--lv-primary);
}

.lv-cmd-text {
  flex: 1;
  min-width: 0;
}

.lv-cmd-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--lv-text-heading);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lv-cmd-sub {
  font-size: 0.74rem;
  color: var(--lv-text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lv-cmd-badge {
  font-size: 0.68rem;
  color: var(--lv-text-secondary);
  white-space: nowrap;
}

.lv-cmd-footer {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.65rem 1.25rem;
  border-top: 1px solid var(--lv-border);
  font-size: 0.72rem;
  color: var(--lv-text-secondary);
  flex-wrap: wrap;
}

.lv-cmd-footer kbd,
.lv-shortcuts-list kbd {
  padding: 0.12rem 0.4rem;
  background: var(--lv-bg-input);
  border: 1px solid var(--lv-border);
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 700;
}

.lv-cmd-empty {
  padding: 2rem;
  text-align: center;
  color: var(--lv-text-secondary);
}

/* 12. Side Drawers (Details/QR & Settings) */
.lv-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 7, 15, 0.7);
  backdrop-filter: blur(4px);
  z-index: 220;
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--lv-transition-normal);
}

.lv-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.lv-drawer {
  width: 100%;
  max-width: 440px;
  height: 100%;
  background: var(--lv-bg-card);
  border-left: 1px solid var(--lv-border);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform var(--lv-transition-normal);
}

.lv-drawer-backdrop.open .lv-drawer {
  transform: translateX(0);
}

.lv-drawer-body {
  padding: 1.35rem 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.lv-details-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}

.lv-details-heading {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--lv-text-heading);
  margin-bottom: 0.35rem;
}

.lv-details-url {
  font-size: 0.8rem;
  color: var(--lv-primary);
  word-break: break-all;
}

.lv-details-actions-bar {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0 1.25rem;
  flex-wrap: wrap;
}

.lv-details-section {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--lv-border);
}

.lv-shortlink-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--lv-bg-input);
  border: 1px solid var(--lv-border);
  border-radius: var(--lv-radius-sm);
}

.lv-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.lv-meta-grid > div {
  background: var(--lv-bg-input);
  border: 1px solid var(--lv-border);
  border-radius: var(--lv-radius-sm);
  padding: 0.55rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.lv-meta-grid span {
  font-size: 0.7rem;
  color: var(--lv-text-secondary);
}

.lv-meta-grid strong {
  font-size: 0.84rem;
  color: var(--lv-text-heading);
}

.lv-qr-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 0.4rem;
}

.lv-qr-frame {
  padding: 8px;
  background: #ffffff;
  border-radius: 10px;
  border: 1px solid var(--lv-border);
}

.lv-accent-swatches {
  display: flex;
  gap: 0.6rem;
}

.lv-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
}

.lv-swatch.active {
  border-color: #ffffff;
  box-shadow: 0 0 0 2px var(--lv-primary);
}

/* 13. Modal Form Enhancements (Tag Chips, Duplicate Box, Grid) */
.lv-input-row {
  display: flex;
  gap: 0.5rem;
}

.lv-input-row .lv-input {
  flex: 1;
}

.lv-form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.lv-dup-warning {
  padding: 0.65rem 0.85rem;
  margin-bottom: 1rem;
  background: var(--lv-amber-light);
  border: 1px solid var(--lv-amber);
  color: var(--lv-amber);
  border-radius: var(--lv-radius-sm);
  font-size: 0.8rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.lv-chip-input-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.65rem;
  background: var(--lv-bg-input);
  border: 1px solid var(--lv-border);
  border-radius: var(--lv-radius-md);
}

.lv-chips-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.lv-chip-item {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.5rem;
  background: var(--lv-primary-light);
  color: var(--lv-primary);
  border-radius: var(--lv-radius-full);
  font-size: 0.76rem;
  font-weight: 700;
}

.lv-chip-input-box input {
  flex: 1;
  min-width: 110px;
  background: transparent;
  border: none;
  color: var(--lv-text-primary);
  font-size: 0.86rem;
  outline: none;
}

.lv-checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 0.45rem;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
}

.lv-checkbox-row input {
  width: 17px;
  height: 17px;
  accent-color: var(--lv-primary);
}

.lv-shortcuts-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.lv-shortcuts-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid var(--lv-border);
}

/* 14. Enhanced Toast with Action / Undo Button */
.lv-toast-icon {
  font-size: 1.1rem;
}
.lv-toast-success .lv-toast-icon { color: var(--lv-green); }
.lv-toast-info .lv-toast-icon { color: var(--lv-primary); }
.lv-toast-warning .lv-toast-icon { color: var(--lv-amber); }
.lv-toast-error .lv-toast-icon { color: var(--lv-red); }

.lv-toast-msg {
  flex: 1;
  font-size: 0.86rem;
  font-weight: 600;
}

.lv-toast-action {
  padding: 0.25rem 0.65rem;
  background: var(--lv-primary);
  color: #ffffff;
  border-radius: 5px;
  font-size: 0.78rem;
  font-weight: 700;
}

.lv-toast-close {
  color: var(--lv-text-secondary);
  padding: 0.2rem;
}

.lv-toast.is-leaving {
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.2s ease;
}

/* 15. Skeleton Loading Cards */
.lv-skeleton-card {
  pointer-events: none;
}
.lv-skel-row {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.lv-skel-box {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--lv-border);
}
.lv-skel-pill {
  width: 60px;
  height: 20px;
  border-radius: 10px;
  background: var(--lv-border);
}
.lv-skel-line {
  height: 12px;
  border-radius: 6px;
  background: var(--lv-border);
  margin-bottom: 0.6rem;
}
.lv-skel-line.lg { width: 80%; height: 16px; }
.lv-skel-line.sm { width: 45%; }
.lv-skel-line.md { width: 65%; }

/* 16. Mobile Bottom Nav, FAB & Touch Targets (UI 6.1, 6.2, 6.3, 6.6) */
.lv-mobile-fab,
.lv-mobile-bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .lv-size-slider-wrapper {
    display: none !important;
  }
  .lv-content {
    padding-bottom: 5.5rem;
  }
  .lv-icon-btn {
    width: 38px;
    height: 38px;
  }
  .lv-form-grid-2 {
    grid-template-columns: 1fr;
  }
  .lv-mobile-fab {
    display: flex;
    position: fixed;
    right: 18px;
    bottom: 76px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--lv-primary-gradient);
    color: #fff;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: var(--lv-shadow-lg);
    z-index: 140;
  }
  .lv-mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--lv-bg-sidebar);
    border-top: 1px solid var(--lv-border);
    z-index: 145;
  }
  .lv-mnav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--lv-text-secondary);
  }
  .lv-mnav-btn.active {
    color: var(--lv-primary);
  }
}

/* 17. Print / PDF Directory View (UI 9.10) */
@media print {
  .lv-sidebar,
  .lv-header,
  .lv-stats-section,
  .lv-controls-bar .lv-actions-right,
  .lv-card-top-actions,
  .lv-card-buttons,
  .lv-fav-strip,
  .lv-quick-add-bar,
  .lv-mobile-fab,
  .lv-mobile-bottom-nav,
  .lv-toast-container {
    display: none !important;
  }
  .lv-main {
    margin-left: 0 !important;
  }
  .lv-links-grid {
    display: block !important;
  }
  .lv-link-card {
    break-inside: avoid;
    margin-bottom: 0.75rem;
    border: 1px solid #cbd5e1 !important;
    background: #ffffff !important;
    color: #0f172a !important;
  }
  .lv-link-domain::after {
    content: " (" attr(title) ")";
    font-size: 0.72rem;
    color: #475569;
  }
}

/* 18. Card & Flaticon Customization (Custom Icons, Colors, Surface Styles & Badges) */
.lv-custom-icon-img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
  border-radius: 4px;
}

.lv-fav-pill .lv-custom-icon-img {
  width: 16px;
  height: 16px;
}

.lv-customizer-box {
  margin-top: 0.75rem;
  padding: 0.85rem;
  border-radius: var(--lv-radius-md);
  background: color-mix(in srgb, var(--lv-bg-input) 70%, transparent);
  border: 1px dashed var(--lv-border);
}

.lv-customizer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--lv-text-secondary);
  margin-bottom: 0.65rem;
}

.lv-customizer-hint {
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--lv-text-muted);
}

.lv-flaticon-preset-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.lv-flaticon-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--lv-bg-card);
  border: 1px solid var(--lv-border);
  color: var(--lv-text-secondary);
  cursor: pointer;
  transition: all 0.15s ease;
}

.lv-flaticon-chip img {
  width: 14px;
  height: 14px;
  object-fit: contain;
}

.lv-flaticon-chip:hover {
  border-color: var(--lv-primary);
  color: var(--lv-text-primary);
  transform: translateY(-1px);
}

.lv-flaticon-chip.active {
  background: color-mix(in srgb, var(--lv-primary) 18%, var(--lv-bg-card));
  border-color: var(--lv-primary);
  color: var(--lv-primary);
}

.lv-card-color-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.lv-card-swatches {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  flex-wrap: wrap;
}

.lv-card-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--swatch-color, var(--lv-bg-card));
  border: 2px solid rgba(255, 255, 255, 0.22);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  position: relative;
}

.lv-card-swatch-none {
  background: var(--lv-bg-card);
  border-color: var(--lv-border);
  color: var(--lv-text-muted);
  font-size: 0.68rem;
}

.lv-card-swatch:hover {
  transform: scale(1.12);
}

.lv-card-swatch.active {
  border-color: #ffffff;
  box-shadow: 0 0 0 2px var(--lv-primary);
  transform: scale(1.1);
}

.lv-card-swatch-picker {
  background: conic-gradient(#ef4444, #f59e0b, #10b981, #06b6d4, #3b82f6, #8b5cf6, #ec4899, #ef4444);
  color: #ffffff;
  font-size: 0.68rem;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
  overflow: hidden;
}

.lv-card-swatch-picker input[type="color"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
  border: none;
  padding: 0;
}

.lv-card-style-select {
  width: auto;
  min-width: 155px;
  padding: 0.32rem 0.6rem;
  font-size: 0.78rem;
}

/* Custom Card Color Surface Styles */
.lv-link-card.has-custom-color.style-tinted,
.lv-list-row.has-custom-color.style-tinted,
.lv-preview-box.has-custom-color.style-tinted {
  background: linear-gradient(
    145deg,
    color-mix(in srgb, var(--custom-card-color) 18%, var(--lv-bg-card)) 0%,
    color-mix(in srgb, var(--custom-card-color) 6%, var(--lv-bg-card)) 100%
  );
  border-color: color-mix(in srgb, var(--custom-card-color) 42%, var(--lv-border));
}

.lv-link-card.has-custom-color.style-banner,
.lv-list-row.has-custom-color.style-banner,
.lv-preview-box.has-custom-color.style-banner {
  background: radial-gradient(
    120% 80% at 50% 0%,
    color-mix(in srgb, var(--custom-card-color) 28%, var(--lv-bg-card)) 0%,
    var(--lv-bg-card) 72%
  );
  border-color: color-mix(in srgb, var(--custom-card-color) 35%, var(--lv-border));
  box-shadow: inset 0 3px 0 0 var(--custom-card-color);
}

.lv-link-card.has-custom-color.style-outline,
.lv-list-row.has-custom-color.style-outline,
.lv-preview-box.has-custom-color.style-outline {
  border-color: color-mix(in srgb, var(--custom-card-color) 70%, var(--lv-border));
  box-shadow: 0 0 18px -4px color-mix(in srgb, var(--custom-card-color) 45%, transparent);
}

.lv-link-card.has-custom-color.style-solid,
.lv-list-row.has-custom-color.style-solid,
.lv-preview-box.has-custom-color.style-solid {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--custom-card-color) 34%, var(--lv-bg-card)) 0%,
    color-mix(in srgb, var(--custom-card-color) 16%, var(--lv-bg-card)) 100%
  );
  border-color: color-mix(in srgb, var(--custom-card-color) 55%, var(--lv-border));
}

.lv-link-card.has-custom-color:hover {
  border-color: var(--custom-card-color);
  box-shadow: 0 10px 26px -6px color-mix(in srgb, var(--custom-card-color) 35%, rgba(0, 0, 0, 0.4));
}

/* Folder / Category Custom Flaticon Icon & Modal Preview */
.lv-cat-icon-img {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}

.lv-category-chip .lv-cat-icon-img {
  width: 13px;
  height: 13px;
}

.lv-cat-icon-fa {
  font-size: 0.85rem;
  flex-shrink: 0;
}

.lv-cat-icon-emoji {
  font-size: 0.92rem;
  line-height: 1;
  flex-shrink: 0;
}

.lv-cat-preview-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  margin-bottom: 1rem;
  border-radius: var(--lv-radius-md);
  background: var(--lv-bg-input);
  border: 1px solid var(--lv-border);
}

.lv-cat-preview-label {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--lv-text-muted);
}

#catModalPreviewChip {
  font-size: 0.82rem;
  padding: 0.3rem 0.7rem;
  gap: 0.45rem;
}

#catModalPreviewChip .lv-cat-icon-img {
  width: 16px;
  height: 16px;
}

/* 19. App Logo & Favicon Customization */
.lv-brand-logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.lv-brand-logo-emoji {
  font-size: 1.45rem;
  line-height: 1;
}

.lv-logo-icon.has-custom-logo {
  background: transparent;
  box-shadow: none;
  border-radius: 6px;
}

.lv-form-hint {
  display: block;
  font-size: 0.72rem;
  color: var(--lv-text-muted);
  margin-top: 0.25rem;
}

.lv-settings-icon-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.lv-settings-preview-box {
  width: 42px;
  height: 42px;
  border-radius: var(--lv-radius-md);
  background: var(--lv-bg-input);
  border: 1px solid var(--lv-border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--lv-primary);
  font-size: 1.25rem;
  overflow: hidden;
  padding: 4px;
}

.lv-settings-preview-box.favicon-box {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  font-size: 1.05rem;
}

.lv-settings-preview-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.lv-settings-preview-emoji {
  font-size: 1.35rem;
  line-height: 1;
}

.lv-settings-preview-box.favicon-box .lv-settings-preview-emoji {
  font-size: 1.1rem;
}

/* ==========================================================================
   20. 6-Digit PIN Security & Lock Screen
   ========================================================================== */
/* Anti-FOUC (Flash of Unprotected Content) */
html.lv-locked .lv-app-wrapper {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

html.lv-locked .lv-lock-screen {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.lv-lock-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(10, 14, 26, 0.94);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.28s ease, visibility 0.28s ease;
}

.lv-lock-screen.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.lv-lock-card {
  width: 100%;
  max-width: 440px;
  background: var(--lv-bg-card, #161b2e);
  border: 1px solid var(--lv-border, rgba(255, 255, 255, 0.08));
  border-radius: 20px;
  padding: 2.25rem 2rem 1.75rem;
  text-align: center;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 35px rgba(59, 130, 246, 0.12);
  animation: lvLockPop 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

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

.lv-lock-icon-wrap {
  width: 72px;
  height: 72px;
  margin: 0 auto 1rem;
  border-radius: 18px;
  background: var(--lv-bg-input, #0f1322);
  border: 1px solid var(--lv-border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.lv-lock-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.lv-lock-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--lv-text-heading, #fff);
  margin: 0 0 0.35rem;
}

.lv-lock-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--lv-primary, #3b82f6);
  background: var(--lv-primary-light, rgba(59, 130, 246, 0.15));
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 0.65rem;
}

.lv-lock-subtitle {
  font-size: 0.85rem;
  color: var(--lv-text-secondary, #94a3b8);
  margin: 0 0 1.5rem;
  line-height: 1.45;
}

/* 6-PIN input group */
.lv-pin-inputs {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.1rem;
}

.lv-pin-digit {
  width: 44px;
  height: 52px;
  text-align: center;
  font-size: 1.4rem;
  font-weight: 700;
  border-radius: 10px;
  border: 2px solid var(--lv-border);
  background: var(--lv-bg-input, #0f1322);
  color: var(--lv-text-heading, #fff);
  outline: none;
  transition: all 0.18s ease;
  caret-color: var(--lv-primary, #3b82f6);
}

.lv-pin-digit:focus {
  border-color: var(--lv-primary, #3b82f6);
  box-shadow: 0 0 0 3px var(--lv-primary-light);
  transform: translateY(-2px);
  background: var(--lv-bg-card);
}

.lv-pin-digit.filled {
  border-color: var(--lv-primary, #3b82f6);
}

.lv-pin-inputs.is-success .lv-pin-digit {
  border-color: var(--lv-emerald, #10b981) !important;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25) !important;
  color: var(--lv-emerald, #10b981);
}

.lv-pin-inputs.shake {
  animation: lvPinShake 0.45s ease-in-out;
}

@keyframes lvPinShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-8px); }
  40%, 80% { transform: translateX(8px); }
}

.lv-pin-peek-btn {
  width: 36px;
  height: 52px;
  background: transparent;
  border: none;
  color: var(--lv-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: color 0.15s ease;
  padding: 0;
  margin-left: 2px;
}

.lv-pin-peek-btn:hover {
  color: var(--lv-primary);
}

.lv-pin-error {
  font-size: 0.8rem;
  color: #f87171;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.25);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 1rem;
  line-height: 1.4;
}

.lv-pin-success {
  font-size: 0.8rem;
  color: #34d399;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 8px;
  padding: 0.55rem 0.75rem;
  margin-bottom: 1rem;
  line-height: 1.4;
  text-align: center;
}

.lv-lock-actions {
  margin-top: 0.5rem;
}

.lv-lock-footer {
  margin-top: 1.25rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--lv-border);
}

.lv-pin-dev-btn {
  background: transparent;
  border: none;
  color: var(--lv-text-muted, #64748b);
  font-size: 0.78rem;
  cursor: pointer;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.lv-pin-dev-btn:hover {
  color: var(--lv-primary, #3b82f6);
}

/* Settings Security Card */
.lv-settings-security-card {
  background: var(--lv-bg-input);
  border: 1px solid var(--lv-border);
  border-radius: var(--lv-radius-md);
  padding: 0.95rem;
}

.lv-settings-sec-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.lv-sec-pin-fields {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.lv-sec-pin-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.lv-sec-pin-item .lv-label-sm {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--lv-text-secondary);
}

.lv-pin-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.lv-pin-input-wrap .lv-input {
  width: 100%;
  padding-right: 2.5rem;
  letter-spacing: 1.5px;
  font-family: inherit;
  font-size: 0.92rem;
}

.lv-pin-input-wrap .lv-pin-peek-btn {
  position: absolute;
  right: 0.35rem;
  background: transparent;
  border: none;
  color: var(--lv-text-muted);
  width: 2rem;
  height: 2rem;
  border-radius: var(--lv-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color var(--lv-transition-fast), background var(--lv-transition-fast);
}

.lv-pin-input-wrap .lv-pin-peek-btn:hover {
  color: var(--lv-text-primary);
  background: rgba(255, 255, 255, 0.08);
}

/* ==========================================================================
   21. Database Manager — Data Table View
   ========================================================================== */
.lv-links-table-host {
  display: block;
  width: 100%;
}

.lv-table-container {
  width: 100%;
  background: var(--lv-bg-card);
  border: 1px solid var(--lv-border);
  border-radius: var(--lv-radius-lg);
  overflow: hidden;
  box-shadow: var(--lv-shadow-sm);
  margin-top: 0.5rem;
}

.lv-table-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.15rem;
  background: var(--lv-bg-input);
  border-bottom: 1px solid var(--lv-border);
  font-size: 0.84rem;
  color: var(--lv-text-secondary);
}

.lv-table-scroll {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.lv-db-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.88rem;
}

.lv-db-table th {
  padding: 0.8rem 1rem;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--lv-text-muted);
  background: var(--lv-bg-input);
  border-bottom: 1px solid var(--lv-border);
  white-space: nowrap;
}

.lv-db-table td {
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--lv-border);
  color: var(--lv-text-primary);
  vertical-align: middle;
}

.lv-db-table tbody tr {
  transition: background var(--lv-transition-fast);
}

.lv-db-table tbody tr:hover {
  background: var(--lv-bg-card-hover, rgba(255, 255, 255, 0.03));
}

.lv-db-table tbody tr.is-selected {
  background: rgba(59, 130, 246, 0.08);
}

.lv-db-table .col-check {
  width: 40px;
  text-align: center;
  padding-right: 0.25rem;
}

.lv-db-table .col-title {
  min-width: 240px;
}

.lv-table-title-cell {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.lv-table-title-meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  min-width: 0;
}

.lv-table-title-text {
  font-weight: 600;
  color: var(--lv-text-primary);
  text-decoration: none;
  line-height: 1.35;
  cursor: pointer;
  transition: color var(--lv-transition-fast);
}

.lv-table-title-text:hover {
  color: var(--lv-primary);
}

.lv-table-sub-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.lv-table-slug-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.15rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(245, 158, 11, 0.15);
  color: var(--lv-amber, #f59e0b);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 4px;
}

.lv-db-table .col-folder {
  min-width: 140px;
}

.lv-db-table .col-url {
  min-width: 200px;
  max-width: 260px;
}

.lv-table-url-link {
  color: var(--lv-text-secondary);
  text-decoration: none;
  font-size: 0.82rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
}

.lv-table-url-link:hover {
  color: var(--lv-primary);
  text-decoration: underline;
}

.lv-db-table .col-visits {
  width: 90px;
  text-align: center;
}

.lv-table-visits {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--lv-text-secondary);
}

.lv-db-table .col-qr {
  width: 110px;
  text-align: center;
}

.lv-table-qr-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.65rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--lv-primary);
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.3);
  border-radius: var(--lv-radius-sm);
  cursor: pointer;
  transition: all var(--lv-transition-fast);
}

.lv-table-qr-btn:hover {
  background: var(--lv-primary);
  color: #ffffff;
}

.lv-db-table .col-actions {
  width: 140px;
  text-align: right;
  white-space: nowrap;
}

.lv-table-actions-group {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
}

/* ==========================================================================
   22. Standalone URL Shortener Service (Tools Menu)
   ========================================================================== */
.lv-shortener-container {
  width: 100%;
}

.lv-shortener-card {
  background: var(--lv-bg-card);
  border: 1px solid var(--lv-border);
  border-radius: var(--lv-radius-lg);
  padding: 1.5rem;
  box-shadow: var(--lv-shadow-sm);
  position: relative;
  overflow: hidden;
}

.lv-shortener-header {
  margin-bottom: 1.25rem;
}

.lv-shortener-title {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.lv-shortener-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: var(--lv-radius-md);
  background: rgba(6, 182, 212, 0.12);
  color: var(--lv-cyan, #06b6d4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  flex-shrink: 0;
}

.lv-shortener-title h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--lv-text-primary);
  margin: 0 0 0.2rem 0;
}

.lv-shortener-title p {
  font-size: 0.82rem;
  color: var(--lv-text-secondary);
  margin: 0;
}

.lv-shortener-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.lv-shortener-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.lv-shortener-grid .span-2 {
  grid-column: span 2;
}

@media (max-width: 640px) {
  .lv-shortener-grid {
    grid-template-columns: 1fr;
  }
  .lv-shortener-grid .span-2 {
    grid-column: span 1;
  }
}

.lv-input-prefix-box {
  display: flex;
  align-items: center;
  background: var(--lv-bg-input);
  border: 1px solid var(--lv-border);
  border-radius: var(--lv-radius-md);
  padding: 0 0.75rem;
  gap: 0.5rem;
  transition: border-color var(--lv-transition-fast), box-shadow var(--lv-transition-fast);
}

.lv-input-prefix-box:focus-within {
  border-color: var(--lv-cyan, #06b6d4);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.lv-input-prefix-box i {
  color: var(--lv-text-muted);
  font-size: 0.88rem;
}

.lv-input-static-prefix {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--lv-cyan, #06b6d4);
  user-select: none;
}

.lv-input-prefix-box input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  color: var(--lv-text-primary);
  font-size: 0.88rem;
  padding: 0.65rem 0;
}

.lv-shortener-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 0.5rem;
}

.lv-shortener-result {
  margin-top: 1.25rem;
  padding: 1.15rem;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.25);
  border-radius: var(--lv-radius-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  animation: lvFadeIn 0.25s ease-out;
}

.lv-short-url-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  background: rgba(6, 182, 212, 0.12);
  color: var(--lv-cyan, #06b6d4);
  border: 1px solid rgba(6, 182, 212, 0.3);
  border-radius: var(--lv-radius-sm);
  text-decoration: none;
  transition: all var(--lv-transition-fast);
}

.lv-short-url-pill:hover {
  background: var(--lv-cyan, #06b6d4);
  color: #ffffff;
}

.lv-short-title-text {
  font-weight: 600;
  font-size: 0.86rem;
  color: var(--lv-text-primary);
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: inline-block;
}




