/* ==========================================================================
   Tempat mencari segalanya - Responsive Pinterest Style Design System
   ========================================================================== */

:root {
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  
  /* Color Palette */
  --bg-base: #f0f5fa;
  --text-main: #0c1222;
  --text-muted: #526077;
  --text-light: #7b8ba5;
  --card-bg: #ffffff;
  
  /* Brand Accent Aura */
  --aura-cyan: #34ecd7;
  --aura-cyan-deep: #06b6d4;
  --aura-purple: #a77bf8;
  --aura-purple-deep: #7c3aed;
  --aura-sky: #dbeafe;
  
  /* Category Badge Colors */
  --cat-ai: #059669;
  --cat-ai-bg: #ecfdf5;
  --cat-marketing: #2563eb;
  --cat-marketing-bg: #eff6ff;
  --cat-kpi: #0891b2;
  --cat-kpi-bg: #ecfeff;
  --cat-ads: #4f46e5;
  --cat-ads-bg: #eef2ff;
  --cat-sheets: #16a34a;
  --cat-sheets-bg: #f0fdf4;
  --cat-creative: #d97706;
  --cat-creative-bg: #fffbeb;
  --cat-tasks: #9333ea;
  --cat-tasks-bg: #faf5ff;
  --cat-storage: #475569;
  --cat-storage-bg: #f1f5f9;
  --cat-spotify: #15803d;
  --cat-spotify-bg: #f0fdf4;
  --cat-pending: #ea580c;
  --cat-pending-bg: #fff7ed;

  /* Shadows */
  --shadow-card: 0 4px 18px -2px rgba(12, 18, 34, 0.05), 0 2px 6px -1px rgba(12, 18, 34, 0.03);
  --shadow-card-hover: 0 20px 38px -6px rgba(12, 18, 34, 0.12), 0 8px 16px -4px rgba(12, 18, 34, 0.06);
  --shadow-pill: 0 4px 14px -2px rgba(12, 18, 34, 0.08), 0 2px 4px -1px rgba(12, 18, 34, 0.04);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-base);
  color: var(--text-main);
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  position: relative;
}

/* ==========================================================================
   Full-page Responsive Atmospheric Ambient Gradient Mesh
   ========================================================================== */
.ambient-gradient-mesh {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    /* Bottom Left Turquoise/Cyan Radiant Mesh */
    radial-gradient(circle 580px at 12% 94%, rgba(52, 236, 215, 0.85) 0%, rgba(52, 236, 215, 0.45) 45%, rgba(52, 236, 215, 0) 75%),
    /* Bottom Right Vibrant Periwinkle/Purple Aura */
    radial-gradient(circle 620px at 88% 92%, rgba(167, 123, 248, 0.88) 0%, rgba(167, 123, 248, 0.42) 45%, rgba(167, 123, 248, 0) 80%),
    /* Center Subtle Indigo-Sky Blend */
    radial-gradient(circle 500px at 50% 98%, rgba(130, 180, 255, 0.45) 0%, rgba(130, 180, 255, 0) 70%),
    /* Clean Top Gradient Base */
    linear-gradient(180deg, #f3f7fb 0%, #edf3f9 40%, #e2ecf6 75%, #d8e6f5 100%);
}

/* Container */
.site-container {
  width: 100%;
  max-width: 1380px;
  margin: 0 auto;
  padding: 44px 28px 64px 28px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ==========================================================================
   Header Section
   ========================================================================== */
.main-header {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 38px;
  width: 100%;
  min-width: 0;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  color: #3b82f6;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(12, 18, 34, 0.04);
  margin-bottom: 12px;
  width: fit-content;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #10b981;
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.25);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.main-title {
  font-size: clamp(34px, 5.5vw, 54px);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.04em;
  color: var(--text-main);
  text-rendering: optimizeLegibility;
}

.main-title-sub {
  display: block;
  font-size: clamp(16.5px, 2.1vw, 22px);
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #4b586e;
  margin-top: 10px;
  line-height: 1.38;
}

.main-subtitle {
  font-size: clamp(14px, 1.6vw, 16px);
  color: var(--text-light);
  font-weight: 500;
  max-width: 620px;
  margin-top: 8px;
  line-height: 1.5;
}

/* Control Panel (Search + View Switcher) */
.control-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 6px;
}

/* Glass Search Box */
.search-box {
  flex: 1;
  min-width: 260px;
  max-width: 580px;
  position: relative;
  display: flex;
  align-items: center;
}

.search-box .search-icon {
  position: absolute;
  left: 18px;
  color: var(--text-light);
  pointer-events: none;
}

.search-box input {
  width: 100%;
  padding: 13.5px 44px 13.5px 48px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(12px);
  border: 1.5px solid rgba(226, 232, 240, 0.8);
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-main);
  box-shadow: 0 3px 12px rgba(12, 18, 34, 0.04);
  outline: none;
  transition: all 0.25s ease;
}

.search-box input:focus {
  background: #ffffff;
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15), 0 4px 16px rgba(99, 102, 241, 0.08);
}

.search-box input::placeholder {
  color: var(--text-light);
  font-weight: 500;
}

.clear-btn {
  position: absolute;
  right: 14px;
  background: #e2e8f0;
  border: none;
  color: #64748b;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  transition: background-color 0.2s;
}

.clear-btn.visible {
  display: flex;
}

.clear-btn:hover {
  background-color: #cbd5e1;
  color: #1e293b;
}

/* View Toggle Switcher */
.view-toggle {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(226, 232, 240, 0.9);
  padding: 4px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(12, 18, 34, 0.04);
}

.toggle-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 16px;
  border-radius: 999px;
  border: none;
  background: transparent;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.toggle-btn.active {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: 0 2px 8px rgba(12, 18, 34, 0.1);
}

.toggle-btn:hover:not(.active) {
  color: var(--text-main);
}

/* Filter Chips Navigation */
.filter-chips {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 4px 12px 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  cursor: grab;
  user-select: none;
}

.filter-chips.grabbing {
  cursor: grabbing;
  user-select: none;
}

.filter-chips::-webkit-scrollbar {
  display: none;
}

.chip {
  flex-shrink: 0; /* Crucial: Prevents chips from shrinking so container can scroll horizontally */
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  padding: 9px 20px;
  border-radius: 999px;
  border: 1px solid rgba(226, 232, 240, 0.85);
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(8px);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.chip:hover {
  background: #ffffff;
  color: var(--text-main);
  transform: translateY(-1px);
}

.chip.active {
  background: var(--text-main);
  color: #ffffff;
  border-color: var(--text-main);
  box-shadow: 0 4px 12px rgba(12, 18, 34, 0.18);
}

/* ==========================================================================
   Pinterest Masonry Layout (Responsive Grid)
   ========================================================================== */
.pinterest-masonry {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
  width: 100%;
  margin-top: 10px;
  transition: all 0.3s ease;
}

/* Responsive Column Counts */
@media (max-width: 1240px) {
  .pinterest-masonry {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
  }
}

@media (max-width: 860px) {
  .pinterest-masonry {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
  }
}

@media (max-width: 580px) {
  .pinterest-masonry {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ==========================================================================
   Pinterest Card Component
   ========================================================================== */
.pinterest-card {
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  background: var(--card-bg);
  border-radius: 26px;
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow-card);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.2s ease;
  position: relative;
  overflow: hidden;
  animation: cardFadeIn 0.5s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

@keyframes cardFadeIn {
  0% {
    opacity: 0;
    transform: translateY(16px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.pinterest-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-card-hover);
  border-color: rgba(99, 102, 241, 0.25);
}

.card-inner {
  padding: 24px 22px;
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Card Header (Icon + Tag) */
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.card-icon-wrap {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.pinterest-card:hover .card-icon-wrap {
  transform: scale(1.06);
}

/* Icon Palette Variants */
.icon-ai { background: #ecfdf5; color: #10a37f; }
.icon-marketing { background: #eff6ff; color: #2563eb; }
.icon-kpi { background: #ecfeff; color: #0891b2; }
.icon-ads { background: #eef2ff; color: #4f46e5; }
.icon-sheets { background: #f0fdf4; color: #16a34a; }
.icon-creative { background: #fffbeb; color: #d97706; }
.icon-tasks { background: #faf5ff; color: #9333ea; }
.icon-files { background: #f1f5f9; color: #475569; }
.icon-knowledge { background: #fdf2f8; color: #db2777; }
.icon-proof { background: #fff7ed; color: #ea580c; }
.icon-music { background: #f0fdf4; color: #15803d; }
.icon-qr { background: #fdf4ff; color: #a21caf; }
.icon-remover { background: #f0fdfa; color: #0d9488; }
.icon-forms { background: #f5f3ff; color: #7c3aed; }

/* Category Tags */
.card-category-tag {
  font-size: 11.5px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.tag-ai { background: var(--cat-ai-bg); color: var(--cat-ai); }
.tag-marketing { background: var(--cat-marketing-bg); color: var(--cat-marketing); }
.tag-kpi { background: var(--cat-kpi-bg); color: var(--cat-kpi); }
.tag-ads { background: var(--cat-ads-bg); color: var(--cat-ads); }
.tag-sheets { background: var(--cat-sheets-bg); color: var(--cat-sheets); }
.tag-creative { background: var(--cat-creative-bg); color: var(--cat-creative); }
.tag-tasks { background: var(--cat-tasks-bg); color: var(--cat-tasks); }
.tag-spotify { background: var(--cat-spotify-bg); color: var(--cat-spotify); }
.tag-pending { background: var(--cat-pending-bg); color: var(--cat-pending); }
.tag-qr { background: #fdf4ff; color: #a21caf; }
.tag-remover { background: #f0fdfa; color: #0d9488; }
.tag-forms { background: #f5f3ff; color: #7c3aed; }

/* Card Title */
.card-title {
  font-size: 18px;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.025em;
  color: var(--text-main);
  margin-bottom: 18px;
}

/* Card Bottom Actions */
.card-bottom {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
}

.card-link-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  padding: 9.5px 16px;
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  color: var(--text-main);
  text-decoration: none;
  font-size: 13px;
  font-weight: 700;
  transition: all 0.2s ease;
  overflow: hidden;
}

.card-link-btn:hover {
  background-color: #0c1222;
  border-color: #0c1222;
  color: #ffffff;
  transform: translateY(-1px);
}

.card-link-btn:active {
  transform: scale(0.98);
}

.card-link-btn.pending-link {
  background-color: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.card-link-btn.pending-link:hover {
  background-color: #ea580c;
  border-color: #ea580c;
  color: #ffffff;
}

.url-domain {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.link-arrow {
  font-size: 14px;
  font-weight: 800;
  margin-left: 6px;
  transition: transform 0.2s ease;
}

.card-link-btn:hover .link-arrow {
  transform: translate(2px, -2px);
}

/* Quick Edit Button */
.edit-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: var(--text-muted);
  font-size: 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.edit-btn:hover {
  background-color: #f1f5f9;
  color: var(--text-main);
  border-color: #cbd5e1;
}

/* ==========================================================================
   Alternative View Mode: Compact Pills List
   ========================================================================== */
.site-container.view-pills .pinterest-masonry {
  column-count: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 14px;
  max-width: 680px;
}

.site-container.view-pills .pinterest-card {
  margin-bottom: 0;
  border-radius: 9999px;
  width: fit-content;
  max-width: 100%;
  box-shadow: var(--shadow-pill);
  animation: none;
}

.site-container.view-pills .card-inner {
  padding: 10px 22px;
  flex-direction: row;
  align-items: center;
  gap: 14px;
}

.site-container.view-pills .card-top,
.site-container.view-pills .card-desc {
  display: none;
}

.site-container.view-pills .card-title {
  margin-bottom: 0;
  font-size: 15.5px;
  font-weight: 700;
  white-space: nowrap;
}

.site-container.view-pills .card-bottom {
  margin-top: 0;
  padding-top: 0;
  border-top: none;
  gap: 8px;
}

.site-container.view-pills .card-link-btn {
  padding: 6px 12px;
  font-size: 12px;
}

.site-container.view-pills .edit-btn {
  width: 28px;
  height: 28px;
  font-size: 12px;
}

/* ==========================================================================
   Empty State
   ========================================================================== */
.empty-state {
  text-align: center;
  padding: 64px 20px;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(10px);
  border-radius: 28px;
  margin: 20px 0;
  box-shadow: var(--shadow-card);
}

.empty-icon {
  font-size: 44px;
  margin-bottom: 14px;
}

.empty-state h3 {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 8px;
}

.empty-state p {
  color: var(--text-muted);
  font-size: 14.5px;
  margin-bottom: 20px;
}

.btn-primary-pill {
  padding: 10px 22px;
  border-radius: 999px;
  background: var(--text-main);
  color: #ffffff;
  border: none;
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s;
}

.btn-primary-pill:hover {
  background: #1e293b;
  transform: translateY(-1px);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  margin-top: auto;
  padding-top: 48px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-light);
}

/* ==========================================================================
   Modal Dialog & Bottom Sheet (Responsive)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999;
  background-color: rgba(12, 18, 34, 0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              visibility 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.modal-sheet {
  width: 100%;
  max-width: 480px;
  background: #ffffff;
  border-radius: 28px;
  padding: 28px 28px 32px 28px;
  box-shadow: 0 25px 50px -12px rgba(12, 18, 34, 0.25);
  transform: scale(0.94) translateY(12px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-backdrop.is-active .modal-sheet {
  transform: scale(1) translateY(0);
}

.modal-handle {
  display: none;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.modal-title {
  font-size: 21px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.modal-close {
  background: none;
  border: none;
  font-size: 28px;
  color: #64748b;
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  border-radius: 8px;
  transition: color 0.2s;
}

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

.modal-desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.modal-form .input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 22px;
}

.modal-form label {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text-main);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.modal-form input {
  padding: 13px 18px;
  border-radius: 14px;
  border: 1.5px solid #e2e8f0;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s ease;
}

.modal-form input:focus {
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.modal-actions {
  display: flex;
  gap: 12px;
}

.modal-actions button {
  flex: 1;
  padding: 13px 20px;
  border-radius: 999px;
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.btn-secondary {
  background-color: #f1f5f9;
  color: #475569;
}

.btn-secondary:hover {
  background-color: #e2e8f0;
  color: #0f172a;
}

.btn-primary {
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.3);
}

.btn-primary:hover {
  opacity: 0.95;
  transform: translateY(-1px);
}

.modal-actions button:active {
  transform: scale(0.97);
}

/* ==========================================================================
   Toast Notification
   ========================================================================== */
.toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%) translateY(40px);
  background: rgba(12, 18, 34, 0.92);
  backdrop-filter: blur(10px);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1000;
  white-space: nowrap;
}

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

/* ==========================================================================
   Mobile Bottom-Sheet Adaptation for small screens
   ========================================================================== */
@media (max-width: 600px) {
  .site-container {
    padding: 28px 18px 48px 18px;
  }

  .main-header {
    gap: 18px;
    margin-bottom: 26px;
  }

  .control-panel {
    flex-direction: column;
    align-items: stretch;
  }

  .search-box {
    max-width: 100%;
  }

  .view-toggle {
    align-self: flex-start;
  }

  .filter-chips {
    margin: 0 -18px;
    padding: 6px 18px 14px 18px;
    width: calc(100% + 36px);
    max-width: calc(100% + 36px);
    -webkit-overflow-scrolling: touch;
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal-sheet {
    max-width: 100%;
    border-radius: 28px 28px 0 0;
    padding: 20px 22px 36px 22px;
    transform: translateY(100%);
  }

  .modal-handle {
    display: block;
    width: 38px;
    height: 4px;
    background-color: #cbd5e1;
    border-radius: 99px;
    margin: 0 auto 16px auto;
  }

  .modal-backdrop.is-active .modal-sheet {
    transform: translateY(0);
  }
}

/* ==========================================================================
   Vault Security Modal Styles
   ========================================================================== */
.vault-modal-content {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.vault-icon-bubble {
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, #f0fdf4 0%, #e0e7ff 100%);
  border: 2px solid #c7d2fe;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px auto;
  box-shadow: 0 8px 20px -4px rgba(99, 102, 241, 0.25);
  animation: pulseIcon 2.5s infinite;
}

@keyframes pulseIcon {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(99, 102, 241, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

.vault-emoji {
  font-size: 30px;
  line-height: 1;
}

.vault-title {
  font-size: 24px;
  font-weight: 900;
  letter-spacing: -0.03em;
  color: var(--text-main);
  margin-bottom: 8px;
}

.vault-desc {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-muted);
  max-width: 380px;
  margin-bottom: 22px;
}

.vault-form {
  width: 100%;
}

.pin-field-wrap {
  position: relative;
  width: 100%;
  max-width: 220px;
  margin: 0 auto 10px auto;
}

.vault-pin-input {
  width: 100%;
  text-align: center;
  font-family: var(--font-sans);
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 12px;
  padding: 12px 16px 12px 26px; /* Offset for letter-spacing centering */
  border-radius: 18px;
  border: 2px solid #e2e8f0;
  background-color: #f8fafc;
  color: var(--text-main);
  outline: none;
  transition: all 0.22s ease;
}

.vault-pin-input:focus {
  background-color: #ffffff;
  border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.16);
}

.vault-pin-input.error {
  border-color: #ef4444;
  background-color: #fef2f2;
  color: #ef4444;
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.16);
}

.vault-error-text {
  min-height: 22px;
  font-size: 13px;
  font-weight: 700;
  color: #ef4444;
  margin-bottom: 18px;
  transition: all 0.2s ease;
}

.btn-vault-unlock {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.35);
}

.btn-vault-unlock:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* Shake Animation on Wrong Password */
@keyframes vaultShake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-12px); }
  40%, 80% { transform: translateX(12px); }
}

.vault-modal-sheet.shake {
  animation: vaultShake 0.42s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

/* ==========================================================================
   Anti-Inspect, Selection Shield & DevTools Lock Overlay
   ========================================================================== */
body {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

input, textarea {
  -webkit-user-select: text;
  -moz-user-select: text;
  -ms-user-select: text;
  user-select: text;
}

.security-shield-curtain {
  position: fixed;
  inset: 0;
  z-index: 999999;
  background: rgba(10, 15, 29, 0.94);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.security-shield-curtain.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.security-shield-box {
  background: rgba(23, 31, 51, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  max-width: 480px;
  width: 100%;
  padding: 40px 32px;
  text-align: center;
  box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.7), 0 0 35px rgba(99, 102, 241, 0.25);
  color: #ffffff;
  transform: scale(0.94);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.security-shield-curtain.is-active .security-shield-box {
  transform: scale(1);
}

.security-shield-icon {
  font-size: 52px;
  margin-bottom: 16px;
  filter: drop-shadow(0 6px 12px rgba(239, 68, 68, 0.35));
}

.security-shield-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  color: #ffffff;
}

.security-shield-desc {
  font-size: 14px;
  color: #94a3b8;
  line-height: 1.6;
  margin-bottom: 20px;
}

.security-shield-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: #34d399;
  border-radius: 100px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin-bottom: 16px;
}

.security-shield-subtext {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

