/* ============================================
   PRIME PROJECTS – style.css v2
   Premium dark/light theme with gold accents
   Quick Capture, AI Insights & Project Notes
   ============================================ */

/* --- CSS Variables (Dark Mode Default) --- */
:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #141414;
  --bg-card: #1a1a1a;
  --bg-card-hover: #222222;
  --text-primary: #f0f0f0;
  --text-secondary: #999999;
  --text-muted: #666666;
  --border-color: #2a2a2a;
  --border-hover: #3a3a3a;
  --gold-1: #b8860b;
  --gold-2: #d4a017;
  --gold-3: #ffd700;
  --gold-4: #f0e68c;
  --gold-glow: rgba(212, 160, 23, 0.15);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-gold: 0 0 30px rgba(212, 160, 23, 0.1);
  --transition: 0.3s ease;
  --radius: 12px;
  --radius-lg: 20px;
}

/* --- Light Mode --- */
[data-theme="light"] {
  --bg-primary: #f5f0e8;
  --bg-secondary: #ebe5d9;
  --bg-card: #ffffff;
  --bg-card-hover: #faf7f2;
  --text-primary: #1a1a1a;
  --text-secondary: #555555;
  --text-muted: #888888;
  --border-color: #e0d9cc;
  --border-hover: #d0c9bb;
  --gold-glow: rgba(212, 160, 23, 0.1);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
  --shadow-gold: 0 0 30px rgba(212, 160, 23, 0.08);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  transition: background-color var(--transition), color var(--transition);
  line-height: 1.6;
  overflow-x: hidden;
}

/* --- Gold Gradient Text --- */
.gold-text {
  background: linear-gradient(
    135deg,
    var(--gold-1) 0%,
    var(--gold-2) 25%,
    var(--gold-3) 50%,
    var(--gold-4) 75%,
    var(--gold-2) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: goldShimmer 4s ease-in-out infinite;
}

@keyframes goldShimmer {
  0%, 100% { background-position: 0% center; }
  50% { background-position: 200% center; }
}

/* --- Theme Toggle --- */
.theme-toggle {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1000;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  padding: 10px 14px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all var(--transition);
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-secondary);
}

.theme-toggle:hover {
  border-color: var(--gold-2);
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);
}

.theme-toggle .toggle-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ============================================
   LANDING PAGE (Not logged in)
   ============================================ */

.landing {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 40px 20px;
  text-align: center;
  position: relative;
}

.landing::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 50% 30%, var(--gold-glow) 0%, transparent 70%);
  pointer-events: none;
}

.landing-content {
  position: relative;
  z-index: 1;
}

.site-title {
  font-size: clamp(3rem, 8vw, 6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: 16px;
  filter: drop-shadow(0 2px 10px rgba(212, 160, 23, 0.2));
}

.site-tagline {
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  color: var(--text-secondary);
  margin-bottom: 48px;
  font-weight: 300;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* --- Login Button (Landing) --- */
.login-trigger {
  background: transparent;
  border: 1px solid var(--gold-2);
  color: var(--gold-3);
  padding: 14px 48px;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.login-trigger::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(212, 160, 23, 0.1), transparent);
  transition: left 0.5s ease;
}

.login-trigger:hover {
  background: rgba(212, 160, 23, 0.1);
  box-shadow: 0 0 30px rgba(212, 160, 23, 0.15);
  transform: translateY(-2px);
}

.login-trigger:hover::before {
  left: 100%;
}

/* --- Login Modal --- */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

.login-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  width: 100%;
  max-width: 400px;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  position: relative;
}

.modal-overlay.active .login-modal {
  transform: translateY(0);
}

.login-modal h2 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 8px;
  text-align: center;
}

.login-modal .login-subtitle {
  color: var(--text-secondary);
  text-align: center;
  margin-bottom: 32px;
  font-size: 0.9rem;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color var(--transition);
  line-height: 1;
}

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

/* --- Password Toggle Eye --- */
.password-wrap {
  position: relative;
}

.password-wrap input {
  padding-right: 50px;
}

.password-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.password-toggle svg {
  width: 22px;
  height: 22px;
  transition: all var(--transition);
}

.password-toggle .eye-open {
  display: none;
}

.password-toggle .eye-closed {
  display: block;
}

.password-toggle.showing .eye-open {
  display: block;
}

.password-toggle.showing .eye-closed {
  display: none;
}

.password-toggle:hover svg {
  filter: drop-shadow(0 0 4px rgba(212, 160, 23, 0.4));
  transform: scale(1.1);
}

/* --- Form Elements (shared) --- */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all var(--transition);
  outline: none;
  font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold-2);
  box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.1);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-muted);
}

.form-group textarea {
  resize: vertical;
  min-height: 100px;
  line-height: 1.6;
}

.form-group select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23999' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 40px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.login-btn,
.capture-btn {
  width: 100%;
  padding: 14px;
  background: linear-gradient(135deg, var(--gold-1), var(--gold-2));
  border: none;
  border-radius: var(--radius);
  color: #0a0a0a;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all var(--transition);
  margin-top: 8px;
}

.login-btn:hover,
.capture-btn:hover {
  background: linear-gradient(135deg, var(--gold-2), var(--gold-3));
  box-shadow: 0 4px 20px rgba(212, 160, 23, 0.3);
  transform: translateY(-1px);
}

.login-error {
  background: rgba(220, 53, 69, 0.1);
  border: 1px solid rgba(220, 53, 69, 0.3);
  color: #ff6b7a;
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 0.85rem;
  text-align: center;
  display: none;
}

.login-error.show {
  display: block;
}

/* ============================================
   DASHBOARD (Logged in)
   ============================================ */

.dashboard {
  min-height: 100vh;
  padding: 40px;
}

/* --- Dashboard Header --- */
.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border-color);
}

.dash-brand {
  display: flex;
  align-items: baseline;
  gap: 16px;
}

.dash-brand h1 {
  font-size: 1.8rem;
  font-weight: 700;
}

.dash-brand .welcome {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 400;
}

.dash-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-right: 100px;
}

.logout-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 10px 24px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  display: inline-block;
}

.logout-btn:hover {
  border-color: #dc3545;
  color: #ff6b7a;
  background: rgba(220, 53, 69, 0.05);
}

/* --- Quick Action Buttons --- */
.quick-actions {
  display: flex;
  gap: 12px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: 50px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-primary);
}

.action-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.action-btn.capture {
  border-color: var(--gold-2);
  color: var(--gold-3);
}

.action-btn.capture:hover {
  background: rgba(212, 160, 23, 0.1);
  box-shadow: var(--shadow-gold);
}

.action-btn.ai-paste {
  border-color: #7c6fe0;
  color: #a59bec;
}

.action-btn.ai-paste:hover {
  background: rgba(124, 111, 224, 0.1);
  box-shadow: 0 0 30px rgba(124, 111, 224, 0.1);
}

.action-btn.info {
  border-color: var(--text-muted);
  color: var(--text-secondary);
}

.action-btn.info:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

.action-btn.settings {
  border-color: var(--text-muted);
  color: var(--text-secondary);
}

.action-btn.settings:hover {
  border-color: var(--text-secondary);
  color: var(--text-primary);
  background: var(--bg-card-hover);
}

/* --- Password Strength Indicator --- */
.pw-strength {
  height: 4px;
  border-radius: 2px;
  background: var(--border-color);
  margin-top: 8px;
  overflow: hidden;
}

.pw-strength-bar {
  height: 100%;
  width: 0%;
  border-radius: 2px;
  transition: all 0.4s ease;
}

.pw-strength-bar.weak { width: 33%; background: #dc3545; }
.pw-strength-bar.medium { width: 66%; background: #f0a500; }
.pw-strength-bar.strong { width: 100%; background: #28a745; }

.pw-strength-label {
  font-size: 0.7rem;
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.pw-strength-label.weak { color: #dc3545; }
.pw-strength-label.medium { color: #f0a500; }
.pw-strength-label.strong { color: #28a745; }

/* --- Info Modal --- */
.info-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 48px 40px;
  width: 100%;
  max-width: 620px;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  position: relative;
  max-height: 85vh;
  overflow-y: auto;
}

.capture-overlay.active .info-modal {
  transform: translateY(0);
}

.info-modal h2 {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 24px;
}

.info-modal .modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color var(--transition);
  line-height: 1;
}

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

.info-section {
  margin-bottom: 28px;
}

.info-section h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-section p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
}

.info-divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 24px 0;
}

.info-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 16px;
}

/* --- Search Bar --- */
.search-bar {
  margin-bottom: 40px;
  position: relative;
  max-width: 600px;
}

.search-input-wrap {
  position: relative;
}

.search-input-wrap .search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  opacity: 0.4;
  pointer-events: none;
}

.search-input {
  width: 100%;
  padding: 16px 20px 16px 48px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-family: inherit;
  outline: none;
  transition: all var(--transition);
}

.search-input:focus {
  border-color: var(--gold-2);
  box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.1);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-clear {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  display: none;
  transition: color var(--transition);
  line-height: 1;
}

.search-clear.show {
  display: block;
}

.search-clear:hover {
  color: var(--text-primary);
}

/* Search Results */
.search-results {
  display: none;
  margin-top: 12px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.search-results.show {
  display: block;
}

.search-results-header {
  padding: 16px 20px;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-color);
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-color);
  transition: all var(--transition);
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: var(--bg-card-hover);
}

.search-result-item .result-icon {
  font-size: 1.3rem;
  opacity: 0.6;
  flex-shrink: 0;
}

.search-result-item .result-info {
  flex: 1;
  min-width: 0;
}

.search-result-item .result-title {
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-item .result-snippet {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-result-item .result-snippet mark {
  background: rgba(212, 160, 23, 0.25);
  color: var(--gold-3);
  border-radius: 2px;
  padding: 0 2px;
}

.search-result-item .result-folder {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.search-no-results {
  padding: 32px 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* --- Recent Activity --- */
.recent-activity {
  margin-bottom: 40px;
  max-width: 800px;
}

.recent-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.recent-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  transition: all var(--transition);
  text-decoration: none;
  color: inherit;
}

.recent-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

.recent-item .recent-icon {
  font-size: 1.2rem;
  opacity: 0.6;
  flex-shrink: 0;
}

.recent-item .recent-name {
  font-weight: 500;
  font-size: 0.9rem;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recent-item .recent-folder-tag {
  font-size: 0.7rem;
  color: var(--gold-2);
  background: var(--gold-glow);
  padding: 3px 10px;
  border-radius: 50px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  flex-shrink: 0;
}

.recent-item .recent-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
}

/* --- Section Title --- */
.section-title {
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-bottom: 24px;
}

/* --- Folder Grid --- */
.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
  max-width: 1200px;
}

.folder-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  overflow: hidden;
}

.folder-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-1), var(--gold-3), var(--gold-1));
  opacity: 0;
  transition: opacity var(--transition);
}

.folder-card:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

.folder-card:hover::before {
  opacity: 1;
}

.folder-card.ai-folder::before {
  background: linear-gradient(90deg, #7c6fe0, #a59bec, #7c6fe0);
}

.folder-icon {
  font-size: 2.5rem;
  line-height: 1;
}

.folder-name {
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.folder-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.folder-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--border-color);
}

/* ============================================
   CAPTURE MODAL (Quick Capture & AI Paste)
   ============================================ */

.capture-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.capture-overlay.active {
  display: flex;
  opacity: 1;
}

.capture-modal {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 560px;
  box-shadow: var(--shadow-lg);
  transform: translateY(20px);
  transition: transform 0.3s ease;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.capture-overlay.active .capture-modal {
  transform: translateY(0);
}

.capture-modal h2 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.capture-modal .capture-subtitle {
  color: var(--text-secondary);
  margin-bottom: 28px;
  font-size: 0.85rem;
}

.capture-modal .modal-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color var(--transition);
  line-height: 1;
}

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

/* AI Paste specific */
.ai-paste-area {
  min-height: 200px;
  font-family: 'Inter', monospace;
  font-size: 0.9rem;
  line-height: 1.7;
}

.source-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
  font-style: italic;
}

/* Success message */
.capture-success {
  display: none;
  text-align: center;
  padding: 40px 20px;
}

.capture-success.show {
  display: block;
}

.capture-success .success-icon {
  font-size: 3rem;
  margin-bottom: 12px;
}

.capture-success h3 {
  font-size: 1.2rem;
  margin-bottom: 8px;
  color: var(--gold-3);
}

.capture-success p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* ============================================
   FOLDER VIEW (Inside a folder)
   ============================================ */

.folder-view {
  min-height: 100vh;
  padding: 40px;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 32px;
  transition: color var(--transition);
}

.back-link:hover {
  color: var(--gold-3);
}

.folder-view h2 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.folder-view .folder-subtitle {
  color: var(--text-secondary);
  margin-bottom: 40px;
  font-size: 0.95rem;
}

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.empty-state .empty-icon {
  font-size: 4rem;
  margin-bottom: 16px;
  opacity: 0.3;
}

.empty-state p {
  font-size: 1rem;
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 800px;
}

.file-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}

.file-item:hover {
  border-color: var(--border-hover);
  background: var(--bg-card-hover);
  transform: translateX(4px);
}

.file-item .file-icon {
  font-size: 1.5rem;
  opacity: 0.6;
}

.file-item .file-name {
  font-weight: 500;
  flex: 1;
}

.file-item .file-size {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.file-item .file-date {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ============================================
   FILE VIEWER (Read/Edit notes)
   ============================================ */

.file-viewer {
  min-height: 100vh;
  padding: 40px;
  max-width: 900px;
}

.file-viewer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
  flex-wrap: wrap;
  gap: 16px;
}

.file-viewer-header h2 {
  font-size: 1.5rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
}

.file-viewer-actions {
  display: flex;
  gap: 10px;
}

.viewer-btn {
  padding: 8px 20px;
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all var(--transition);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-secondary);
}

.viewer-btn:hover {
  border-color: var(--gold-2);
  color: var(--gold-3);
}

.viewer-btn.active {
  background: linear-gradient(135deg, var(--gold-1), var(--gold-2));
  color: #0a0a0a;
  border-color: transparent;
}

.viewer-btn.save-btn {
  background: linear-gradient(135deg, var(--gold-1), var(--gold-2));
  color: #0a0a0a;
  border-color: transparent;
}

.viewer-btn.save-btn:hover {
  background: linear-gradient(135deg, var(--gold-2), var(--gold-3));
  box-shadow: 0 4px 20px rgba(212, 160, 23, 0.3);
}

.file-content-display {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  line-height: 1.8;
  font-size: 0.95rem;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.file-content-display h1,
.file-content-display h2,
.file-content-display h3 {
  color: var(--gold-3);
  margin: 24px 0 12px 0;
}

.file-content-display h1:first-child,
.file-content-display h2:first-child,
.file-content-display h3:first-child {
  margin-top: 0;
}

.file-content-edit {
  width: 100%;
  min-height: 400px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 32px;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.9rem;
  line-height: 1.8;
  resize: vertical;
  outline: none;
  transition: border-color var(--transition);
}

.file-content-edit:focus {
  border-color: var(--gold-2);
  box-shadow: 0 0 0 3px rgba(212, 160, 23, 0.1);
}

.file-meta-bar {
  display: flex;
  gap: 20px;
  margin-bottom: 24px;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.file-meta-bar span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* ============================================
   NOTIFICATIONS / TOASTS
   ============================================ */

.toast {
  position: fixed;
  bottom: 32px;
  right: 32px;
  background: var(--bg-card);
  border: 1px solid var(--gold-2);
  border-radius: var(--radius);
  padding: 16px 24px;
  font-size: 0.9rem;
  color: var(--gold-3);
  box-shadow: var(--shadow-lg);
  z-index: 3000;
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s ease;
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.site-footer a {
  color: var(--gold-2);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--gold-3);
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
  .dashboard, .folder-view, .file-viewer {
    padding: 24px 16px;
  }

  .dash-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .dash-actions {
    margin-right: 0;
  }

  .quick-actions {
    flex-direction: column;
  }

  .action-btn {
    justify-content: center;
  }

  .folder-grid {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .folder-card {
    padding: 24px 20px;
  }

  .theme-toggle {
    top: 16px;
    right: 16px;
  }

  .login-modal, .capture-modal {
    margin: 20px;
    padding: 32px 24px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .file-viewer-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .folder-grid {
    grid-template-columns: 1fr;
  }

  .site-title {
    font-size: 2.5rem;
  }
}

/* ============================================
   DRAG & DROP FILE UPLOAD
   ============================================ */

/* --- Dashboard: folder card drag highlight --- */
.folder-card.drag-over {
  border-color: var(--gold-3);
  background: var(--gold-glow);
  box-shadow: 0 0 30px rgba(212, 160, 23, 0.25), var(--shadow-md);
  transform: translateY(-4px) scale(1.02);
}

.folder-card.drag-over::before {
  opacity: 1;
}

.folder-card.drag-over .folder-icon {
  transform: scale(1.15);
  transition: transform 0.2s ease;
}

/* --- Folder View: drop zone --- */
.drop-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 40px 20px;
  text-align: center;
  margin-bottom: 24px;
  transition: all var(--transition);
  cursor: pointer;
  position: relative;
}

.drop-zone:hover {
  border-color: var(--text-muted);
}

.drop-zone.drag-over {
  border-color: var(--gold-3);
  background: var(--gold-glow);
  box-shadow: 0 0 20px rgba(212, 160, 23, 0.15);
}

.drop-zone-icon {
  font-size: 2.5rem;
  margin-bottom: 12px;
  opacity: 0.4;
  transition: all var(--transition);
}

.drop-zone.drag-over .drop-zone-icon {
  opacity: 0.8;
  transform: scale(1.1);
}

.drop-zone-text {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 4px;
}

.drop-zone-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.drop-zone input[type="file"] {
  display: none;
}

/* --- Upload progress overlay on folder cards --- */
.folder-card .upload-status {
  display: none;
  position: absolute;
  bottom: 12px;
  left: 16px;
  right: 16px;
  font-size: 0.75rem;
  color: var(--gold-3);
  text-align: center;
}

.folder-card .upload-status.show {
  display: block;
}

/* --- Upload progress bar (folder view) --- */
.upload-progress {
  display: none;
  margin-bottom: 16px;
  padding: 16px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
}

.upload-progress.show {
  display: block;
}

.upload-progress-bar {
  height: 4px;
  border-radius: 2px;
  background: var(--border-color);
  overflow: hidden;
  margin-bottom: 8px;
}

.upload-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold-1), var(--gold-3));
  border-radius: 2px;
  transition: width 0.3s ease;
}

.upload-progress-text {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

/* --- Global drag active (subtle body overlay) --- */
body.drag-active::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(212, 160, 23, 0.03);
  pointer-events: none;
  z-index: 1;
}

/* ============================================
   IMAGE GALLERY (Folder View)
   ============================================ */

.image-gallery {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 32px;
  max-width: 900px;
}

.image-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}

.image-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md);
}

.image-preview {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-secondary);
  padding: 16px;
}

.image-preview img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  display: block;
}

.image-info {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-color);
}

.image-name {
  font-weight: 500;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.image-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-left: 16px;
}

@media (max-width: 768px) {
  .image-preview {
    padding: 8px;
  }

  .image-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .image-meta {
    margin-left: 0;
  }
}