/* ═══════════════════════════════════════
   gallery.css — Gallery Page
   ═══════════════════════════════════════ */

.gallery-main {
  min-height: 100vh;
}

/* ── Loading ── */
.dash-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  gap: 16px;
  color: #9ca3af;
}

.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid rgba(255,255,255,0.1);
  border-top-color: #60a5fa;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Sign-in prompt ── */
/* ── Sign-in page ── */
.dash-signin {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 80px;
  min-height: 100vh;
  padding: 60px 40px;
  overflow: hidden;
}

.signin-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.signin-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.14;
}

.signin-blob-1 {
  width: 520px;
  height: 520px;
  background: radial-gradient(circle, #3b82f6, transparent 70%);
  top: -120px;
  left: -60px;
}

.signin-blob-2 {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, #8b5cf6, transparent 70%);
  bottom: -80px;
  right: -40px;
}

/* Back to Home button */
.signin-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 32px;
  padding: 7px 14px 7px 10px;
  border-radius: 20px;
  background: rgba(96, 165, 250, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.22);
  color: #93c5fd;
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.signin-back-btn svg {
  color: #60a5fa;
  transition: transform 0.2s;
}

.signin-back-btn:hover {
  background: rgba(96, 165, 250, 0.15);
  border-color: rgba(96, 165, 250, 0.4);
  color: #bfdbfe;
}

.signin-back-btn:hover svg {
  transform: translateX(-3px);
}

/* Left branding panel */
.signin-left {
  position: relative;
  z-index: 1;
  flex: 1;
  max-width: 460px;
}

.signin-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 36px;
}

.signin-brand svg {
  width: 28px;
  height: 28px;
  color: #60a5fa;
}

.signin-brand span {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

.signin-headline {
  font-size: 38px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
  letter-spacing: -0.03em;
  margin-bottom: 16px;
}

.signin-subtext {
  font-size: 16px;
  color: #6b7280;
  line-height: 1.7;
  margin-bottom: 44px;
  max-width: 380px;
}

.signin-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.signin-features li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.signin-feat-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: rgba(96, 165, 250, 0.08);
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #60a5fa;
}

.signin-feat-icon svg {
  width: 18px;
  height: 18px;
}

.signin-features li strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #e5e7eb;
  margin-bottom: 3px;
}

.signin-features li span {
  font-size: 13px;
  color: #6b7280;
  line-height: 1.5;
}

/* Right sign-in card */
.signin-right {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 380px;
}

.signin-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 20px;
  padding: 44px 36px;
  backdrop-filter: blur(12px);
}

.signin-card-icon {
  width: 52px;
  height: 52px;
  background: rgba(96, 165, 250, 0.1);
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  color: #60a5fa;
}

.signin-card-icon svg {
  width: 26px;
  height: 26px;
}

.signin-card h2 {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.signin-card > p {
  color: #6b7280;
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 32px;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  background: #fff;
  color: #3c4043;
  border: 1px solid #dadce0;
  padding: 13px 20px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: 20px;
}

.btn-google:hover {
  background: #f8f9fa;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  transform: translateY(-1px);
}

.btn-google:active {
  transform: translateY(0);
}

.btn-google:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

.signin-privacy {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  color: #4b5563;
  line-height: 1.6;
}

.signin-privacy svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: #6b7280;
}

@keyframes signin-spin {
  to { transform: rotate(360deg); }
}

.signin-spinner {
  animation: signin-spin 0.75s linear infinite;
}

/* Responsive */
@media (max-width: 860px) {
  .dash-signin {
    flex-direction: column;
    gap: 40px;
    padding: 40px 24px;
    align-items: stretch;
  }

  .signin-left {
    max-width: 100%;
  }

  .signin-headline {
    font-size: 28px;
  }

  .signin-subtext {
    margin-bottom: 28px;
  }

  .signin-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .signin-right {
    width: 100%;
  }
}

@media (max-width: 500px) {
  .dash-signin {
    padding: 32px 20px;
  }

  .signin-features {
    grid-template-columns: 1fr;
  }

  .signin-card {
    padding: 32px 24px;
  }
}

/* ── Extension sign-in success overlay ── */
.ext-signin-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 12, 28, 0.85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: ext-signin-fade-in 0.25s ease;
}

@keyframes ext-signin-fade-in {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

.ext-signin-card {
  background: #111827;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 48px 40px;
  max-width: 440px;
  width: 90%;
  text-align: center;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
}

.ext-signin-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
}

.ext-signin-icon svg {
  width: 36px;
  height: 36px;
  color: #4ade80;
}

.ext-signin-icon--warn {
  background: rgba(251, 191, 36, 0.12);
  border-color: rgba(251, 191, 36, 0.3);
}

.ext-signin-icon--warn svg {
  color: #fbbf24;
}

.ext-signin-card h2 {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 16px;
}

.ext-signin-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  padding: 10px 16px;
  border-radius: 8px;
  margin-bottom: 28px;
  line-height: 1.5;
}

.ext-signin-status svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.ext-signin-status--success {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #86efac;
}

.ext-signin-status--warn {
  background: rgba(251, 191, 36, 0.1);
  border: 1px solid rgba(251, 191, 36, 0.25);
  color: #fde68a;
}

.ext-signin-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.ext-signin-btn-close {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 11px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  min-width: 160px;
}

.ext-signin-btn-close:hover {
  background: #1d4ed8;
}

.ext-signin-btn-stay {
  background: transparent;
  color: #6b7280;
  border: 1px solid rgba(255,255,255,0.1);
  padding: 11px 20px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
}

.ext-signin-btn-stay:hover {
  color: #d1d5db;
  border-color: rgba(255,255,255,0.2);
}

.ext-signin-btn-retry {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(99, 102, 241, 0.15);
  color: #a5b4fc;
  border: 1px solid rgba(99, 102, 241, 0.4);
  padding: 11px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.ext-signin-btn-retry:hover {
  background: rgba(99, 102, 241, 0.28);
  border-color: rgba(99, 102, 241, 0.7);
  color: #c7d2fe;
}

.ext-signin-btn-retry:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.ext-signin-hint {
  font-size: 12px;
  color: #4b5563;
  margin-top: 16px;
  margin-bottom: 0;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.spin {
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

/* ── Gallery content ── */
.dash-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 16px;
}

.dash-title {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.dash-title h1 {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
}

.dash-count {
  font-size: 14px;
  color: #6b7280;
}

.dash-filters {
  display: flex;
  gap: 10px;
}

.dash-select {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #e5e7eb;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  outline: none;
}
.dash-select option {
  background: #1e1e30;
  color: #e5e7eb;
}

.dash-select:focus {
  border-color: rgba(96,165,250,0.4);
}

/* ── Empty state ── */
.dash-empty {
  text-align: center;
  padding: 80px 24px;
  color: #6b7280;
}

.dash-empty svg {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  opacity: 0.3;
}

.dash-empty p {
  font-size: 18px;
  color: #9ca3af;
  margin-bottom: 8px;
}

.dash-empty span {
  font-size: 14px;
}

/* ── Grid ── */
.dash-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

.dash-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.2s;
  cursor: pointer;
  text-decoration: none;
  display: block;
}

.dash-card:hover {
  border-color: rgba(96,165,250,0.3);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

.dash-card-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: rgba(255,255,255,0.05);
  display: block;
}

.dash-card-thumb.video-thumb {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #0f1729 0%, #1a1040 100%);
  display: block;
}

.video-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(to top, rgba(0,0,0,0.35) 0%, transparent 60%);
}

.video-play-btn {
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.18);
  border: 2px solid rgba(255,255,255,0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  padding-left: 3px;
  transition: background 0.15s, transform 0.15s;
}

.dash-card:hover .video-play-btn {
  background: rgba(167,139,250,0.4);
  border-color: rgba(167,139,250,0.7);
  transform: scale(1.08);
}

.card-duration {
  position: absolute;
  bottom: 7px;
  right: 8px;
  background: rgba(0,0,0,0.75);
  color: #e5e7eb;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  letter-spacing: 0.02em;
}

.dash-card-body {
  padding: 14px 16px;
}

.dash-card-title {
  font-size: 14px;
  font-weight: 600;
  color: #e5e7eb;
  margin-bottom: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-card-meta {
  font-size: 12px;
  color: #6b7280;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-card-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(96,165,250,0.15);
  border: 1px solid rgba(96,165,250,0.25);
  color: #93c5fd;
}

.dash-card-badge.video {
  background: rgba(167,139,250,0.15);
  border-color: rgba(167,139,250,0.25);
  color: #c4b5fd;
}

.dash-card-badge.compare {
  background: rgba(20,184,166,0.12);
  border-color: rgba(20,184,166,0.28);
  color: #5eead4;
}

.card-meta-badges {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.card-folder-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 2px 7px;
  border-radius: 4px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  color: #9ca3af;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-folder-badge svg {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
}

/* ── Compare thumbnail ── */
.compare-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  display: flex;
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,0.03);
}

.compare-thumb-half {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.compare-thumb-half img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.compare-thumb-half.is-empty {
  background: rgba(255,255,255,0.04);
  display: flex;
  align-items: center;
  justify-content: center;
}

.compare-thumb-divider {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 26px;
  height: 26px;
  background: rgba(10, 15, 35, 0.9);
  border: 1px solid rgba(94,234,212,0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  color: #5eead4;
}

.compare-thumb-divider svg {
  width: 12px;
  height: 12px;
}

/* ── Load more ── */
.dash-loadmore {
  text-align: center;
  margin-top: 32px;
}

.btn-loadmore {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: #e5e7eb;
  padding: 12px 32px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-loadmore:hover {
  background: rgba(96,165,250,0.15);
  border-color: rgba(96,165,250,0.3);
}

.hidden { display: none !important; }


@media (max-width: 600px) {
  .dash-header { flex-direction: column; align-items: flex-start; }
  .dash-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  #nav-name { display: none; }
}

@media (max-width: 400px) {
  .dash-grid { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════
   SIDEBAR + FOLDER LAYOUT
   ════════════════════════════════════════ */

.dash-layout {
  display: flex;
  min-height: 100vh;
}

.dash-sidebar {
  width: 220px;
  flex-shrink: 0;
  border-right: 1px solid rgba(255,255,255,0.07);
  padding: 0 0 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.dash-main {
  flex: 1;
  min-width: 0;
  padding: 28px 28px 64px;
}

/* ── Sidebar profile ── */
.sidebar-profile {
  padding: 12px 10px 8px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  margin-bottom: 4px;
}

.sidebar-profile-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  text-align: left;
  transition: background 0.15s;
}

.sidebar-profile-btn:hover {
  background: rgba(255,255,255,0.07);
}

.sidebar-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(96,165,250,0.35);
  background: #1f2937;
}

.sidebar-profile-info {
  flex: 1;
  min-width: 0;
}

.sidebar-profile-name {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #e5e7eb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-profile-email {
  display: block;
  font-size: 11px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-profile-chevron {
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  color: #6b7280;
  transition: transform 0.2s;
}

.sidebar-profile-btn.is-open .sidebar-profile-chevron {
  transform: rotate(180deg);
}

.sidebar-profile-menu {
  margin-top: 4px;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 8px;
  overflow: hidden;
}

.sidebar-signout-btn {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  background: none;
  border: none;
  color: #f87171;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.sidebar-signout-btn:hover {
  background: rgba(239,68,68,0.1);
  color: #fca5a5;
}

/* ── Sidebar navigation ── */
.sidebar-nav {
  padding: 0 10px;
  margin-bottom: 4px;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  background: transparent;
  color: #9ca3af;
  font-size: 13.5px;
  font-weight: 500;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}

.sidebar-nav-item svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.sidebar-nav-item:hover { background: rgba(255,255,255,0.06); color: #e5e7eb; }
.sidebar-nav-item.is-active { background: rgba(96,165,250,0.12); color: #60a5fa; }

/* ── Section header ── */
.sidebar-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 14px 8px;
  color: #6b7280;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.btn-new-folder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 5px;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.15s;
  padding: 0;
}

.btn-new-folder svg { width: 12px; height: 12px; }

.btn-new-folder:hover {
  background: rgba(96,165,250,0.15);
  border-color: rgba(96,165,250,0.35);
  color: #60a5fa;
}

/* ── Folder list ── */
.sidebar-folder-list { padding: 0 10px 12px; }

.folder-empty-hint {
  font-size: 12px;
  color: #4b5563;
  padding: 10px 10px;
  text-align: center;
}

.sidebar-folder-item {
  display: flex;
  align-items: center;
  border-radius: 8px;
  transition: background 0.15s;
  margin-bottom: 1px;
  position: relative;
}

.sidebar-folder-item:hover { background: rgba(255,255,255,0.05); }
.sidebar-folder-item:hover .folder-item-actions { opacity: 1; }

.sidebar-folder-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  padding: 8px 10px;
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  min-width: 0;
  border-radius: 8px;
  transition: color 0.15s;
}

.sidebar-folder-btn svg { width: 14px; height: 14px; flex-shrink: 0; opacity: 0.7; }

.sidebar-folder-btn .folder-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-folder-btn .folder-count {
  font-size: 11px;
  color: #4b5563;
  background: rgba(255,255,255,0.06);
  border-radius: 10px;
  padding: 1px 7px;
  flex-shrink: 0;
}

.sidebar-folder-item.is-active .sidebar-folder-btn { color: #60a5fa; }
.sidebar-folder-item.is-active .sidebar-folder-btn svg { opacity: 1; }

.folder-item-actions {
  display: flex;
  gap: 2px;
  padding-right: 6px;
  opacity: 0;
  transition: opacity 0.15s;
}

.folder-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: transparent;
  border: none;
  border-radius: 5px;
  color: #6b7280;
  cursor: pointer;
  transition: all 0.15s;
  padding: 0;
}

.folder-action-btn svg { width: 13px; height: 13px; }
.folder-action-btn:hover { background: rgba(255,255,255,0.1); color: #e5e7eb; }
.folder-action-btn.delete:hover { background: rgba(239,68,68,0.15); color: #fca5a5; }

/* ════════════════════════════════════════
   CARD MENU BUTTON + FOLDER TAG
   ════════════════════════════════════════ */

.dash-card { position: relative; }

.card-menu-btn {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 28px;
  height: 28px;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 6px;
  color: #e5e7eb;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s, background 0.15s;
  z-index: 2;
  padding: 0;
  letter-spacing: 1px;
}

.dash-card:hover .card-menu-btn { opacity: 1; }
.card-menu-btn:hover { background: rgba(96,165,250,0.35); border-color: rgba(96,165,250,0.5); }

.card-folder-tag {
  position: absolute;
  bottom: 50px;
  left: 8px;
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(0,0,0,0.65);
  border: 1px solid rgba(255,255,255,0.12);
  color: #d1d5db;
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  z-index: 1;
}

.card-folder-tag svg { width: 10px; height: 10px; flex-shrink: 0; }

/* ════════════════════════════════════════
   CARD CONTEXT MENU POPUP
   ════════════════════════════════════════ */

.card-menu-popup {
  position: fixed;
  background: #1e2433;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.55);
  min-width: 190px;
  max-width: 230px;
  z-index: 9999;
  overflow: hidden;
  animation: popupIn 0.1s ease;
}

@keyframes popupIn {
  from { opacity: 0; transform: scale(0.94) translateY(-4px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}

.cmp-title {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #6b7280;
  padding: 10px 14px 6px;
}

.cmp-folder-list { max-height: 200px; overflow-y: auto; }

.cmp-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 9px 14px;
  background: transparent;
  border: none;
  color: #d1d5db;
  font-size: 13px;
  cursor: pointer;
  text-align: left;
  transition: background 0.1s;
}

.cmp-item svg { width: 14px; height: 14px; flex-shrink: 0; color: #9ca3af; }
.cmp-item:hover { background: rgba(255,255,255,0.07); }
.cmp-item.cmp-active { color: #60a5fa; }
.cmp-item.cmp-active svg { color: #60a5fa; }
.cmp-item .cmp-check { margin-left: auto; width: 13px; height: 13px; color: #60a5fa; }

.cmp-divider { height: 1px; background: rgba(255,255,255,0.08); margin: 4px 0; }

.cmp-remove { color: #fca5a5; }
.cmp-remove svg { color: #fca5a5; }
.cmp-remove:hover { background: rgba(239,68,68,0.12); }

.cmp-no-folders {
  font-size: 12px;
  color: #4b5563;
  padding: 10px 14px;
  text-align: center;
}

/* ════════════════════════════════════════
   FOLDER MODAL
   ════════════════════════════════════════ */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  backdrop-filter: blur(4px);
}

.modal-box {
  background: #1a2035;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  padding: 28px 32px;
  width: 360px;
  max-width: 90vw;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  animation: popupIn 0.15s ease;
}

.modal-box h3 { font-size: 18px; font-weight: 700; color: #fff; margin-bottom: 16px; }

.modal-box input {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.15);
  color: #e5e7eb;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}

.modal-box input:focus { border-color: rgba(96,165,250,0.5); }

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
  justify-content: flex-end;
}

.btn-modal-cancel {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  color: #9ca3af;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-modal-cancel:hover { background: rgba(255,255,255,0.1); }

.btn-modal-confirm {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  border: none;
  color: #fff;
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-modal-confirm:hover { opacity: 0.9; box-shadow: 0 4px 16px rgba(99,102,241,0.3); }

/* ════════════════════════════════════════
   RESPONSIVE
   ════════════════════════════════════════ */

@media (max-width: 768px) {
  .dash-layout { flex-direction: column; }

  .dash-sidebar {
    width: 100%;
    height: auto;
    position: static;
    border-right: none;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    padding: 10px 0 0;
  }

  .sidebar-nav {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    padding: 0 12px 6px;
  }

  .sidebar-nav-item { white-space: nowrap; flex-shrink: 0; }

  .sidebar-section-header { padding: 10px 14px 4px; }

  .sidebar-folder-list {
    display: flex;
    overflow-x: auto;
    gap: 6px;
    padding: 4px 12px 12px;
  }

  .sidebar-folder-item { flex-shrink: 0; margin-bottom: 0; }
  .folder-item-actions { opacity: 1; }

  .dash-main { padding: 20px 16px 48px; }

  .sidebar-profile { padding: 8px 10px; }
  .sidebar-profile-email { display: none; }
}
