/* ===================== CSS Variables ===================== */
:root {
  --bg: #090916;
  --bg-gradient: radial-gradient(circle at 15% 50%, rgba(76, 29, 149, 0.25), transparent 40%),
                 radial-gradient(circle at 85% 30%, rgba(14, 165, 233, 0.25), transparent 40%);
  
  --surface-1: rgba(20, 20, 40, 0.4);
  --surface-2: rgba(30, 30, 55, 0.45);
  --surface-3: rgba(45, 45, 75, 0.5);
  --surface-4: rgba(60, 60, 95, 0.6);
  
  --border: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.15);

  --accent: #a78bfa;
  --accent-2: #818cf8;
  --accent-3: #f472b6;
  --accent-4: #38bdf8;

  --gradient-primary: linear-gradient(135deg, #a78bfa 0%, #818cf8 100%);
  --gradient-teal: linear-gradient(135deg, #38bdf8 0%, #a78bfa 100%);
  --gradient-danger: linear-gradient(135deg, #f472b6 0%, #fb7185 100%);

  --text: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;

  --sidebar-w: 250px;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow: 0 8px 32px rgba(0,0,0,0.3);
  --shadow-lg: 0 12px 64px rgba(0,0,0,0.4);
  --glow-accent: 0 0 20px rgba(167, 139, 250, 0.3);
}

/* ===================== Reset ===================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  scroll-behavior: smooth;
  background: #080914 !important;
  background-color: #080914 !important;
  min-height: 100%;
}
body {
  font-family: 'Outfit', 'Inter', -apple-system, sans-serif;
  background: #080914 url('/bg.jpg') no-repeat center center fixed !important;
  background-size: cover !important;
  background-color: #080914 !important;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===================== Static Background Accent (GPU-optimized) ===================== */
/* Removed animated blurred orbs - they caused 90%+ GPU load.
   Using static background gradients instead for the same visual effect with near-zero GPU cost. */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 60% 50% at 10% 10%, rgba(167, 139, 250, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 90%, rgba(56, 189, 248, 0.14) 0%, transparent 60%);
  pointer-events: none;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }
input, textarea, select { font-family: inherit; }

/* ===================== Scrollbar ===================== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-4); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-dim); }

/* ===================== Layout ===================== */
.app-layout { display: flex; min-height: 100vh; flex-direction: column; padding: 2rem; }
.main-content {
  flex: 1;
  align-content: start;
  justify-content: center; width: 100%; max-width: 1400px; margin: 0 auto 120px; transition: all 0.3s ease;
  background: rgba(18, 18, 32, 0.92);
  /* backdrop-filter removed — caused high GPU load on Electron/desktop builds */
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 16px 60px rgba(0,0,0,0.3);
  overflow: hidden;
}

/* ===================== Page & Components (macOS Style) ===================== */
.page-header { padding: 2.5rem 2.5rem 1.5rem; }
.page-body { padding: 0 2.5rem 2.5rem; }
.page-header h2 { font-size: 2rem; font-weight: 600; letter-spacing: -0.5px; }
.page-header p { color: var(--text-muted); margin-top: 0.5rem; font-size: 1.1rem; }

/* Stats Grid */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; margin-bottom: 2rem; }
.stat-card {
  display: flex; align-items: center; gap: 1rem;
  background: rgba(30, 30, 50, 0.88);
  /* backdrop-filter removed — high GPU cost */
  padding: 1.25rem 1.5rem; border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  transition: transform 0.2s, box-shadow 0.2s;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,0.25); border-color: rgba(255,255,255,0.15); }
.stat-icon { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; }
.stat-icon.purple { background: rgba(167,139,250,0.15); color: #a78bfa; border: 1px solid rgba(167,139,250,0.2); }
.stat-icon.teal { background: rgba(56,189,248,0.15); color: #38bdf8; border: 1px solid rgba(56,189,248,0.2); }
.stat-icon.orange { background: rgba(251,146,60,0.15); color: #fb923c; border: 1px solid rgba(251,146,60,0.2); }
.stat-icon.red { background: rgba(244,114,182,0.15); color: #f472b6; border: 1px solid rgba(244,114,182,0.2); }
.stat-value { font-size: 1.6rem; font-weight: 600; color: var(--text); line-height: 1.1; }
.stat-label { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; margin-top: 4px; }

/* Cards */
.card {
  background: rgba(30, 30, 50, 0.88);
  /* backdrop-filter removed — high GPU cost */
  border-radius: 18px; border: 1px solid rgba(255,255,255,0.08);
  padding: 1.5rem; box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}

/* Buttons */
.btn {
  padding: 8px 16px; font-weight: 500; font-family: inherit; font-size: 0.95rem;
  border-radius: 10px; border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}
.btn:active { transform: scale(0.96); }
.btn-primary {
  background: linear-gradient(180deg, #4c8bf5, #1a62dd); color: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn-primary:hover { background: linear-gradient(180deg, #5b96f6, #1c6bee); box-shadow: 0 4px 10px rgba(26,98,221,0.4), inset 0 1px 0 rgba(255,255,255,0.2); }
.btn-ghost {
  background: rgba(255,255,255,0.05); color: var(--text); border: 1px solid rgba(255,255,255,0.08);
}
.btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.15); }
.btn-danger {
  background: linear-gradient(180deg, #f87171, #dc2626); color: white;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.2);
}
.btn-danger:hover { box-shadow: 0 4px 10px rgba(220,38,38,0.4); }

/* Forms */
.form-group { margin-bottom: 1.25rem; }
.form-label { display: block; margin-bottom: 0.5rem; font-size: 0.85rem; font-weight: 500; color: var(--text-muted); }
.form-input {
  width: 100%; padding: 10px 12px;
  background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px; color: var(--text); font-family: inherit; font-size: 0.95rem;
  outline: none; transition: all 0.2s;
}
.form-input:focus { border-color: #4c8bf5; box-shadow: 0 0 0 3px rgba(76,139,245,0.3); background: rgba(0,0,0,0.3); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }

/* ===================== Responsive ===================== */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .topbar { display: flex; }
  .page-header { padding: 1.5rem 1.5rem 0; }
  .page-body { padding: 1.25rem 1.5rem 1.5rem; }
  .form-row { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .photo-grid { grid-template-columns: repeat(2, 1fr); }
  .recipe-grid { grid-template-columns: 1fr; }
}

/* ===================== Documents ===================== */
.docs-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1.25rem;
  align-items: start;
}

/* Category sidebar */
.docs-sidebar {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.5rem;
  position: sticky;
  top: 1rem;
}

.docs-cat-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s;
  position: relative;
  font-size: 0.9rem;
  user-select: none;
}
.docs-cat-item:hover { background: var(--surface-3); }
.docs-cat-item.active { background: var(--surface-3); color: var(--accent); font-weight: 600; }
.docs-cat-icon { font-size: 1rem; flex-shrink: 0; }
.docs-cat-name { flex: 1;
  align-content: start;
  justify-content: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.docs-cat-count {
  font-size: 0.75rem;
  background: var(--surface-4);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 0 0.4rem;
  min-width: 1.25rem;
  text-align: center;
}
.docs-cat-actions { display: none; gap: 0.1rem; }
.docs-cat-item:hover .docs-cat-actions { display: flex; }
.docs-cat-btn {
  background: none; border: none; font-size: 0.8rem; padding: 0.15rem 0.25rem;
  border-radius: 4px; opacity: 0.7; transition: opacity 0.15s;
}
.docs-cat-btn:hover { opacity: 1; background: var(--surface-4); }
.docs-cat-divider {
  height: 1px; background: var(--border); margin: 0.5rem 0.25rem;
}

/* Files area */
.docs-files {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.docs-files-header {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.docs-empty {
  text-align: center;
  padding: 3rem 2rem;
  color: var(--text-muted);
}

/* File cards */
.doc-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.1s;
}
.doc-card:hover {
  border-color: var(--border-hover);
  background: var(--surface-2);
  transform: translateX(2px);
}
.doc-card-icon { font-size: 1.75rem; flex-shrink: 0; }
.doc-card-info { flex: 1;
  align-content: start;
  justify-content: center; overflow: hidden; }
.doc-card-name {
  font-size: 0.9rem; font-weight: 500;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.doc-card-meta {
  display: flex; gap: 0.75rem; margin-top: 0.25rem;
  font-size: 0.78rem; color: var(--text-muted);
}
.doc-card-cat {
  background: var(--surface-3);
  border-radius: 999px;
  padding: 0 0.5rem;
}
.doc-card-actions {
  display: flex; gap: 0.25rem; flex-shrink: 0;
}

/* Upload drop zone */
.doc-drop-zone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
}
.doc-drop-zone:hover, .doc-drop-zone.dragging {
  border-color: var(--accent);
  background: rgba(245, 166, 35, 0.05);
}
.doc-drop-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.doc-upload-item {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  background: var(--surface-2);
  border-radius: 6px;
  margin-bottom: 0.4rem;
  font-size: 0.85rem;
}
.doc-upload-name { flex: 1;
  align-content: start;
  justify-content: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-upload-size { color: var(--text-muted); flex-shrink: 0; }

/* Icon picker */
.doc-icon-picker {
  display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.25rem;
}
.doc-icon-opt {
  font-size: 1.4rem; padding: 0.3rem;
  border-radius: 8px; cursor: pointer;
  transition: background 0.15s;
  border: 2px solid transparent;
}
.doc-icon-opt:hover { background: var(--surface-3); }
.doc-icon-opt.selected { border-color: var(--accent); background: var(--surface-3); }

/* Viewer */
#docViewerModal { align-items: stretch; }
#docViewerModal .modal-overlay > div { border-radius: 0; }

.doc-html-view {
  padding: 2rem 3rem;
  max-width: 860px;
  margin: 0 auto;
  color: var(--text);
  line-height: 1.8;
  font-size: 0.95rem;
}
.doc-html-view h1, .doc-html-view h2, .doc-html-view h3 { margin: 1.5rem 0 0.75rem; color: var(--accent); }
.doc-html-view p { margin-bottom: 0.75rem; }
.doc-html-view table { border-collapse: collapse; width: 100%; margin-bottom: 1rem; }
.doc-html-view td, .doc-html-view th { border: 1px solid var(--border); padding: 0.4rem 0.6rem; }

.doc-sheet-view {
  padding: 1rem;
  overflow: auto;
}
.doc-sheet-view table { border-collapse: collapse; font-size: 0.85rem; }
.doc-sheet-view td, .doc-sheet-view th {
  border: 1px solid var(--border);
  padding: 0.3rem 0.6rem;
  white-space: nowrap;
  min-width: 60px;
}
.doc-sheet-view tr:nth-child(even) td { background: var(--surface-2); }

.doc-text-view {
  padding: 1.5rem 2rem;
  font-family: 'Courier New', monospace;
  font-size: 0.85rem;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--text);
  line-height: 1.7;
}

/* Responsive */
@media (max-width: 768px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-sidebar { position: static; }
  .doc-html-view { padding: 1rem; }
}

/* ===================== Notes ===================== */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

.notes-empty {
  text-align: center;
  padding: 4rem 2rem;
  grid-column: 1 / -1;
}

/* ── Apple Glass Note Card ── */
.note-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 185px;
  cursor: pointer;
  border-radius: 20px;
  background: rgba(255,255,255,0.045);
  /* backdrop-filter: blur(20px); */ /* removed-gpu */
  -webkit-/* backdrop-filter: blur(20px); */ /* removed-gpu */
  border: 1px solid rgba(255,255,255,0.09);
  box-shadow: 0 4px 24px rgba(0,0,0,0.28);
  transition: transform 0.22s cubic-bezier(.34,1.56,.64,1),
              box-shadow 0.22s ease,
              border-color 0.22s ease,
              background 0.22s ease;
}

/* inner shine layer */
.note-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 20px;
  background: radial-gradient(ellipse at 20% 10%, rgba(255,255,255,0.07) 0%, transparent 65%);
  pointer-events: none;
}

.note-card:hover {
  transform: translateY(-6px) scale(1.012);
  background: rgba(255,255,255,0.075);
  box-shadow:
    0 16px 48px rgba(0,0,0,0.4),
    0 0 0 1px var(--note-color, #a78bfa),
    0 0 28px color-mix(in srgb, var(--note-color, #a78bfa) 25%, transparent);
  border-color: var(--note-color, #a78bfa);
}

/* coloured top stripe */
.note-card-accent {
  height: 3px;
  background: var(--note-color, #a78bfa);
  flex-shrink: 0;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 0 10px var(--note-color, #a78bfa);
}

.note-card-body {
  flex: 1;
  padding: 0.9rem 1rem 0.4rem;
}

.note-card-title {
  font-size: 0.97rem;
  font-weight: 700;
  margin-bottom: 0.45rem;
  color: #fff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.note-card-preview {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.42);
  line-height: 1.55;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

.note-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.45rem 1rem 0.7rem;
  margin-top: auto;
}

.note-card-date {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.28);
  font-weight: 500;
}

.note-card-actions {
  display: flex;
  gap: 0.25rem;
  opacity: 0;
  transition: opacity 0.18s;
}
.note-card:hover .note-card-actions { opacity: 1; }

.note-card-actions button {
  padding: 3px 8px;
  font-size: 0.72rem;
  border-radius: 8px;
  background: rgba(239,68,68,0.15);
  border: 1px solid rgba(239,68,68,0.3);
  color: #f87171;
  cursor: pointer;
  transition: background 0.15s;
}
.note-card-actions button:hover { background: rgba(239,68,68,0.32); }

/* pin badge */
.note-pin {
  position: absolute;
  top: 0.55rem;
  right: 0.7rem;
  font-size: 0.78rem;
  filter: drop-shadow(0 0 5px rgba(255,210,0,0.7));
  z-index: 1;
}

/* Color picker buttons in editor */
.note-color-btn {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-block;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.15s, border-color 0.15s;
  flex-shrink: 0;
}
.note-color-btn:hover { transform: scale(1.2); }
.note-color-btn.active {
  border-color: white;
  transform: scale(1.15);
  box-shadow: 0 0 0 2px var(--bg);
}

/* Note editor textarea */
.note-editor-textarea {
  flex: 1;
  background: var(--bg-card);
  color: var(--text);
  border: none;
  outline: none;
  resize: none;
  padding: 1.25rem 1.5rem;
  font-size: 0.95rem;
  line-height: 1.8;
  font-family: 'Inter', sans-serif;
}
.note-editor-textarea::placeholder { color: var(--text-dim); }

/* Full-screen viewer modal */
#noteEditorModal { align-items: center; padding: 2rem; }
@media (max-width: 768px) {
  #noteEditorModal { padding: 0; }
  #noteEditorModal > div { border-radius: 0; height: 100%; max-width: 100%; }
  .notes-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .notes-grid { grid-template-columns: 1fr; }
}

/* ===================== Quill Dark Theme ===================== */
.ql-toolbar.ql-snow {
  background: var(--surface-2) !important;
  border: none !important;
  border-bottom: 1px solid var(--border) !important;
  padding: 6px 12px !important;
  flex-wrap: wrap;
}
.ql-toolbar.ql-snow .ql-formats { margin-right: 10px; }
.ql-toolbar.ql-snow button,
.ql-toolbar.ql-snow .ql-picker-label { color: var(--text-muted) !important; border-color: transparent !important; }
.ql-toolbar.ql-snow button:hover,
.ql-toolbar.ql-snow button.ql-active { color: var(--accent) !important; }
.ql-toolbar.ql-snow button .ql-stroke { stroke: var(--text-muted) !important; }
.ql-toolbar.ql-snow button:hover .ql-stroke,
.ql-toolbar.ql-snow button.ql-active .ql-stroke { stroke: var(--accent) !important; }
.ql-toolbar.ql-snow button .ql-fill { fill: var(--text-muted) !important; }
.ql-toolbar.ql-snow button:hover .ql-fill,
.ql-toolbar.ql-snow button.ql-active .ql-fill { fill: var(--accent) !important; }
.ql-toolbar.ql-snow .ql-picker-label { color: var(--text-muted) !important; }
.ql-toolbar.ql-snow .ql-picker-options {
  background: var(--surface-3) !important;
  border-color: var(--border) !important;
  border-radius: 8px !important;
  box-shadow: var(--shadow) !important;
}
.ql-toolbar.ql-snow .ql-picker-item { color: var(--text) !important; }
.ql-toolbar.ql-snow .ql-picker-item:hover { color: var(--accent) !important; }
.ql-container.ql-snow {
  border: none !important;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  height: 100%;
}
.ql-editor {
  color: var(--text) !important;
  padding: 1.5rem 2rem !important;
  min-height: 100%;
  line-height: 1.8;
}
.ql-editor.ql-blank::before { color: var(--text-dim) !important; font-style: normal !important; }
.ql-editor blockquote {
  border-left: 3px solid var(--accent) !important;
  color: var(--text-muted) !important;
  padding-left: 1rem; margin: 0.75rem 0;
}
.ql-editor pre.ql-syntax {
  background: var(--surface-3) !important;
  color: #a8ff78 !important;
  border-radius: 8px; padding: 0.75rem 1rem; font-size: 0.85rem;
}
.ql-tooltip {
  background: var(--surface-3) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
  border-radius: 8px !important;
  box-shadow: var(--shadow) !important;
}
.ql-tooltip input[type=text] {
  background: var(--surface-2) !important;
  border-color: var(--border) !important;
  color: var(--text) !important;
  border-radius: 6px !important;
}
#noteQuillEditor { display: flex; flex-direction: column; }
#noteQuillEditor .ql-container { flex: 1;
  align-content: start;
  justify-content: center; }

/* ===================== Reminders ===================== */
.reminder-badge {
  background: var(--danger);
  color: white;
  font-size: 0.7rem;
  font-weight: bold;
  padding: 0.1rem 0.4rem;
  border-radius: 12px;
  margin-left: auto;
  line-height: 1.2;
}

.reminders-group-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 1rem 0;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.reminder-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.25rem;
  margin-bottom: 0.75rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
}
.reminder-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  border-color: var(--border-hover);
}

.reminder-card.done {
  opacity: 0.5;
}
.reminder-card.done .reminder-card-title {
  text-decoration: line-through;
  color: var(--text-muted);
}

.reminder-card.overdue {
  border-color: var(--danger);
}
.reminder-card.overdue .reminder-card-timeleft {
  color: var(--danger);
  font-weight: bold;
}

.reminder-card-icon {
  font-size: 1.5rem;
  margin-top: 0.1rem;
}

.reminder-card-body {
  flex: 1;
  align-content: start;
  justify-content: center;
  min-width: 0;
}

.reminder-card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.reminder-card-note {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
  white-space: pre-wrap;
}

.reminder-card-meta {
  display: flex;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.reminder-card-timeleft {
  color: var(--accent);
}

.reminder-card-actions {
  display: flex;
  gap: 0.5rem;
  opacity: 0;
  transition: opacity 0.15s;
}
.reminder-card:hover .reminder-card-actions {
  opacity: 1;
}

@media (max-width: 600px) {
  .reminder-card {
    flex-direction: column;
  }
  .reminder-card-actions {
    opacity: 1;
    margin-top: 0.5rem;
    width: 100%;
    justify-content: flex-end;
  }
}

/* ===================== BROWSER UI ===================== */
.browser-container {
  display: flex;
  flex-direction: column;
  height: 85vh;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--bg-tertiary);
}
.browser-header {
  display: flex;
  align-items: center;
  background: rgba(0,0,0,0.4);
  padding: 5px 10px 0 10px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  overflow-x: auto;
}
.browser-tabs {
  display: flex;
  gap: 5px;
}
.browser-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 15px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 150px;
  transition: background 0.2s;
}
.browser-tab:hover {
  background: rgba(255,255,255,0.1);
}
.browser-tab.active {
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 600;
  border-bottom: 2px solid var(--accent-blue);
}
.tab-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  align-content: start;
  justify-content: center;
}
.tab-close {
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-muted);
}
.tab-close:hover {
  color: var(--error);
}
.browser-new-tab-btn {
  background: transparent;
  color: var(--text-primary);
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 10px;
  margin-left: 5px;
}
.browser-new-tab-btn:hover {
  color: var(--accent-blue);
}
.browser-address-bar {
  display: flex;
  gap: 10px;
  padding: 10px;
  background: var(--bg-secondary);
  align-items: center;
}
.browser-address-bar input {
  flex: 1;
  align-content: start;
  justify-content: center;
  background: var(--bg-tertiary);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-primary);
  padding: 8px 15px;
  border-radius: 20px;
  outline: none;
}
.browser-address-bar input:focus {
  border-color: var(--accent-blue);
}
.nav-btn {
  background: rgba(255,255,255,0.05);
  border: none;
  color: var(--text-primary);
  border-radius: 50%;
  width: 35px;
  height: 35px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.nav-btn:hover {
  background: rgba(255,255,255,0.15);
}
.nav-btn.primary {
  border-radius: var(--radius);
  width: auto;
  padding: 0 15px;
  background: var(--accent-blue);
  color: white;
}
.nav-btn.primary:hover {
  background: var(--accent-purple);
}
.browser-views {
  flex: 1;
  align-content: start;
  justify-content: center;
  position: relative;
}
.browser-webview-container {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

/* ===================== Kanban Board ===================== */
.kanban-board { display: flex; gap: 1.5rem; overflow-x: auto; padding-bottom: 1rem; align-items: flex-start; }
.kanban-column { flex: 0 0 300px; background: rgba(0,0,0,0.15); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 180px); border: 1px solid var(--border); }
.kanban-column-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem; border-bottom: 1px solid var(--border); }
.kanban-column-header h3 { font-size: 1rem; margin: 0; font-weight: 600; }
.kanban-count { background: var(--surface-3); padding: 0.2rem 0.6rem; border-radius: 20px; font-size: 0.8rem; font-weight: bold; }
.kanban-dropzone { padding: 1rem; display: flex; flex-direction: column; gap: 1rem; overflow-y: auto; flex: 1;
  align-content: start;
  justify-content: center; min-height: 150px; }
.kanban-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem; cursor: grab; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; position: relative; }
.kanban-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.kanban-card:active { cursor: grabbing; }
.kanban-card.dragging { opacity: 0.5; transform: scale(0.95); }
.kanban-card-color { width: 40px; height: 6px; border-radius: 3px; margin-bottom: 0.8rem; }
.kanban-card-title { font-weight: 600; margin-bottom: 0.5rem; font-size: 0.95rem; }
.kanban-card-desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.4; white-space: pre-wrap; word-break: break-word; }

/* ===================== BROWSER UI ===================== */
.browser-container {
  display: flex;
  flex-direction: column;
  height: 85vh;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: var(--bg-tertiary);
}
.browser-header {
  display: flex;
  align-items: center;
  background: rgba(0,0,0,0.4);
  padding: 5px 10px 0 10px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  overflow-x: auto;
}
.browser-tabs {
  display: flex;
  gap: 5px;
}
.browser-tab {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 15px;
  background: rgba(255,255,255,0.05);
  border-radius: 8px 8px 0 0;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 0.9rem;
  max-width: 150px;
  transition: background 0.2s;
}
.browser-tab:hover {
  background: rgba(255,255,255,0.1);
}
.browser-tab.active {
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 600;
  border-bottom: 2px solid var(--accent-blue);
}
.tab-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
  align-content: start;
  justify-content: center;
}
.tab-close {
  cursor: pointer;
  font-size: 1.1rem;
  color: var(--text-muted);
}
.tab-close:hover {
  color: var(--error);
}
.browser-new-tab-btn {
  background: transparent;
  color: var(--text-primary);
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0 10px;
  margin-left: 5px;
}
.browser-new-tab-btn:hover {
  color: var(--accent-blue);
}
.browser-address-bar {
  display: flex;
  gap: 10px;
  padding: 10px;
  background: var(--bg-secondary);
  align-items: center;
}
.browser-address-bar input {
  flex: 1;
  align-content: start;
  justify-content: center;
  background: var(--bg-tertiary);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-primary);
  padding: 8px 15px;
  border-radius: 20px;
  outline: none;
}
.browser-address-bar input:focus {
  border-color: var(--accent-blue);
}
.nav-btn {
  background: rgba(255,255,255,0.05);
  border: none;
  color: var(--text-primary);
  border-radius: 50%;
  width: 35px;
  height: 35px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}
.nav-btn:hover {
  background: rgba(255,255,255,0.15);
}
.nav-btn.primary {
  border-radius: var(--radius);
  width: auto;
  padding: 0 15px;
  background: var(--accent-blue);
  color: white;
}
.nav-btn.primary:hover {
  background: var(--accent-purple);
}
.browser-views {
  flex: 1;
  align-content: start;
  justify-content: center;
  position: relative;
}
.browser-webview-container {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

/* ===================== Kanban Board ===================== */
.kanban-board { display: flex; gap: 1.5rem; overflow-x: auto; padding-bottom: 1rem; align-items: flex-start; }
.kanban-column { flex: 0 0 300px; background: rgba(0,0,0,0.15); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 180px); border: 1px solid var(--border); }
.kanban-column-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem; border-bottom: 1px solid var(--border); }
.kanban-column-header h3 { font-size: 1rem; margin: 0; font-weight: 600; }
.kanban-count { background: var(--surface-3); padding: 0.2rem 0.6rem; border-radius: 20px; font-size: 0.8rem; font-weight: bold; }
.kanban-dropzone { padding: 1rem; display: flex; flex-direction: column; gap: 1rem; overflow-y: auto; flex: 1;
  align-content: start;
  justify-content: center; min-height: 150px; }
.kanban-card { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem; cursor: grab; transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s; position: relative; }
.kanban-card:hover { border-color: var(--border-hover); transform: translateY(-2px); }
.kanban-card:active { cursor: grabbing; }
.kanban-card.dragging { opacity: 0.5; transform: scale(0.95); }
.kanban-card-color { width: 40px; height: 6px; border-radius: 3px; margin-bottom: 0.8rem; }
.kanban-card-title { font-weight: 600; margin-bottom: 0.5rem; font-size: 0.95rem; }
.kanban-card-desc { font-size: 0.85rem; color: var(--text-muted); line-height: 1.4; white-space: pre-wrap; word-break: break-word; }
.color-picker { display: flex; gap: 0.5rem; margin-top: 0.5rem; }
.color-swatch { width: 30px; height: 30px; border-radius: 50%; cursor: pointer; border: 2px solid transparent; transition: transform 0.2s; }
.color-swatch:hover { transform: scale(1.1); }
.color-swatch.selected { border-color: #fff; transform: scale(1.1); }

/* Invoices Module */
.invoices-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.stat-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}
.stat-card.warning { border-color: rgba(245, 166, 35, 0.4); background: rgba(245, 166, 35, 0.05); }
.stat-card.success { border-color: rgba(46, 213, 115, 0.4); background: rgba(46, 213, 115, 0.05); }
.stat-title { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0.5rem; text-transform: uppercase; font-weight: 600; letter-spacing: 0.05em; }
.stat-value { font-size: 1.8rem; font-weight: 700; color: var(--text); margin-bottom: 0.5rem; }
.stat-sub { font-size: 0.85rem; color: var(--text-dim); }

.invoices-filters { display: flex; gap: 0.5rem; margin-bottom: 1.5rem; }
.invoices-filters .btn {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-muted);
  border-radius: 20px;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.2s;
}
.invoices-filters .btn:hover {
  background: var(--surface-3);
  color: var(--text);
}
.invoices-filters .btn.active {
  background: var(--surface-3);
  border-color: var(--border-hover);
  color: var(--text);
}

.invoices-table-container {
  overflow-x: auto;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-1);
}
.invoices-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}
.invoices-table th {
  padding: 1rem 1.2rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border);
}
.invoices-table td {
  padding: 1rem 1.2rem;
  font-size: 0.9rem;
  color: var(--text);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.invoices-table tr:last-child td {
  border-bottom: none;
}
.invoices-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

.status-pill {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
}
.status-review {
  background: rgba(245, 166, 35, 0.15);
  color: #f5a623;
}
.status-approved {
  background: rgba(46, 213, 115, 0.15);
  color: #2ed573;
}
.status-paid {
  background: rgba(138, 43, 226, 0.15);
  color: #a78bfa;
}

.actions-cell {
  display: flex;
  gap: 0.4rem;
}
.action-icon {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.action-icon:hover {
  background: var(--surface-3);
  color: var(--text);
}
.currency-badge { display: inline-block; margin-right: 0.5rem; }

/* ===================== macOS Dock ===================== */
.macos-dock {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  background: rgba(30, 30, 50, 0.4);
  /* backdrop-filter: blur(40px); */ /* removed-gpu */
  -webkit-/* backdrop-filter: blur(40px); */ /* removed-gpu */
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.1);
  z-index: 9000;
  transition: all 0.3s ease;
}
.macos-dock .nav-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.25, 1, 0.5, 1);
  background: transparent;
  border: none;
  position: relative;
  font-size: 1.4rem;
}
.macos-dock .nav-item:hover {
  transform: scale(1.25) translateY(-12px);
  color: var(--text);
  background: rgba(255,255,255,0.1);
  box-shadow: 0 10px 20px rgba(0,0,0,0.3);
  z-index: 2;
}
.macos-dock .nav-item.active {
  background: rgba(96, 165, 250, 0.15);
  color: #60a5fa;
  box-shadow: 0 0 15px rgba(96, 165, 250, 0.4), inset 0 0 10px rgba(96, 165, 250, 0.2);
  border: 1px solid rgba(96, 165, 250, 0.3);
  transform: scale(1.1);
}
.macos-dock .nav-item.active .nav-icon {
  filter: drop-shadow(0 0 5px rgba(96,165,250,0.8));
}
.macos-dock .nav-item.active::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}
.macos-dock .nav-item::before {
  content: attr(data-tooltip);
  position: absolute;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20,20,30,0.9);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,0.1);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
}
.macos-dock .nav-item:hover::before {
  opacity: 1;
}

/* ===================== macOS Topbar ===================== */
.macos-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 24px;
  background: rgba(15, 15, 25, 0.4);
  /* backdrop-filter: blur(20px); */ /* removed-gpu */
  -webkit-/* backdrop-filter: blur(20px); */ /* removed-gpu */
  border-bottom: 1px solid rgba(255,255,255,0.05);
  position: sticky;
  top: 0;
  z-index: 100;
}
.topbar-left { display: flex; align-items: center; gap: 12px; width: 150px; }

.topbar-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 12px;
}
.topbar-center .logo-mark {
  display: flex; align-items: center; justify-content: center;
  color: var(--accent);
}
.topbar-center .logo-text { 
  font-weight: 600; 
  font-size: 1rem; 
  letter-spacing: 2px;
  text-transform: uppercase;
  font-family: 'Inter', sans-serif;
  color: #fff;
  opacity: 0.9;
}

.topbar-right { width: 150px; display: flex; justify-content: flex-end; }
.topbar-right .user-badge {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.05);
  padding: 6px 14px 6px 6px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
}
.user-badge .user-avatar {
  width: 28px; height: 28px;
  background: var(--surface-3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; font-weight: 600;
}
.user-badge .user-name { font-size: 0.9rem; font-weight: 500; color: var(--text-muted); }


/* ===================== Sections & Transitions ===================== */
.section {
  display: none;
  animation: fadeIn 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}
.section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(15px); }
  to { opacity: 1; transform: translateY(0); }
}


/* ===================== Modals (macOS Style) ===================== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  /* backdrop-filter: blur(8px); */ /* removed-gpu */
  -webkit-/* backdrop-filter: blur(8px); */ /* removed-gpu */
  z-index: 10000;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.2s ease-out;
}
.modal-overlay.open { display: flex; }

.modal {
  background: rgba(30, 30, 45, 0.65);
  /* backdrop-filter: blur(25px); */ /* removed-gpu */
  -webkit-/* backdrop-filter: blur(25px); */ /* removed-gpu */
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 16px 40px rgba(0,0,0,0.3);
  padding: 2rem;
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.modal h3 {
  margin-top: 0; margin-bottom: 1.5rem;
  font-size: 1.4rem; font-weight: 600;
  color: var(--text);
}

.close-btn, .modal-close {
  position: absolute;
  top: 1.2rem; right: 1.2rem;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-muted);
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.close-btn:hover, .modal-close:hover { background: rgba(255,255,255,0.1); color: var(--text); }

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}


/* ===================== Lightbox ===================== */
.lightbox {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100000 !important;
  align-items: center;
  justify-content: center;
  user-select: none;
}
.lightbox.open {
  display: flex !important;
}
.lightbox-close {
  position: absolute;
  top: 24px;
  right: 24px;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: white;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer !important;
  z-index: 100005 !important;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  pointer-events: auto !important;
  -webkit-app-region: no-drag !important;
}
.lightbox-close:hover {
  background: rgba(239, 68, 68, 0.8);
  border-color: #ef4444;
  transform: scale(1.1);
}
.lightbox-nav {
  z-index: 100005 !important;
  pointer-events: auto !important;
  cursor: pointer !important;
  -webkit-app-region: no-drag !important;
}
#lightboxContent {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 100001 !important;
  pointer-events: auto;
}
#lightboxContent img, #lightboxContent video {
  max-width: 90vw;
  max-height: 85vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
  object-fit: contain;
}


.welcome-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2.8rem !important;
  font-weight: 700 !important;
  background: linear-gradient(135deg, #ffffff 0%, #a78bfa 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
  letter-spacing: -1px !important;
}


/* ===================== Photos Gallery ===================== */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 20px;
}
.photo-item {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-1);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  border: 1px solid rgba(255,255,255,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
}
.photo-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}
.photo-item img, .photo-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  opacity: 0;
  transition: opacity 0.2s;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 10px;
  pointer-events: none;
}
.photo-item:hover .photo-overlay {
  opacity: 1;
}
.photo-overlay button {
  pointer-events: auto;
}


/* ===================== Recipes ===================== */
.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-top: 20px;
}
.recipe-card {
  background: var(--surface-1);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
}
.recipe-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0,0,0,0.3);
}
.recipe-img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}
.recipe-img-placeholder {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
  color: var(--text-muted);
}
.recipe-body {
  padding: 16px;
  flex: 1;
  align-content: start;
  justify-content: center;
  display: flex;
  flex-direction: column;
}
.recipe-title {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}
.recipe-meta {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}
.recipe-meta i {
  width: 14px;
  height: 14px;
}
.recipe-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: auto;
}
.badge-teal {
  background: rgba(45, 212, 191, 0.15);
  color: #2dd4bf;
  border: 1px solid rgba(45, 212, 191, 0.2);
}

/* ===================== UI Elements (Tabs & Search) ===================== */
.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}
.tab-btn {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}
.tab-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}
.tab-btn.active {
  background: var(--accent-blue);
  color: white;
  border-color: var(--accent-blue);
  box-shadow: 0 2px 10px rgba(96, 165, 250, 0.3);
}
.search-bar {
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 0 12px;
  height: 40px;
  transition: border-color 0.2s;
}
.search-bar:focus-within {
  border-color: var(--accent-blue);
}
.search-icon {
  color: var(--text-muted);
  display: flex;
  align-items: center;
  margin-right: 8px;
}
.search-bar input {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 0.9rem;
  width: 100%;
  outline: none;
}
.search-bar input::placeholder {
  color: var(--text-muted);
}

/* ===================== Auto-hide Dock ===================== */
.dock-hitbox {
    position: fixed;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 12px;
    z-index: 900;
}
.macos-dock {
    transform: translateX(-50%) translateY(150%);
    opacity: 0;
    visibility: hidden;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) 10s, opacity 0.4s 10s, visibility 0s 10.4s;
}
.dock-hitbox:hover ~ .macos-dock,
.macos-dock:hover {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    visibility: visible;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1) 0s, opacity 0.4s 0s, visibility 0s 0s;
}
@media (max-width: 768px) {
    .macos-dock {
        transform: translateX(-50%) translateY(0);
        opacity: 1;
        visibility: visible;
        transition: none;
    }
    .dock-hitbox { display: none; }
}
/* ===================== Quick Actions Widget ===================== */
.quick-actions-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  flex: 1;
  align-content: flex-start;
}
.quick-action-card {
  aspect-ratio: 1 / 1;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  width: 96px;
  height: 96px;
  transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
  text-align: center;
}
.quick-action-card:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}
.quick-action-card span {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text);
  line-height: 1.1;
}
.qa-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2px;
}
.qa-icon i {
  width: 20px;
  height: 20px;
}

/* ===================== Server Stats Widget ===================== */
.stat-widget {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: transform 0.2s;
}
.stat-widget:hover {
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px);
}
.stat-widget-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-widget-icon i {
  width: 20px;
  height: 20px;
}
.stat-widget-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat-widget-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stat-widget-value {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}
/* === VISUAL UPGRADES === */

/* Glow Reveal Effect */
.card, .stat-card, .quick-action-card {
  position: relative;
  overflow: hidden;
}

.card::after, .stat-card::after, .quick-action-card::after {
  content: "";
  position: absolute;
  top: 0; left: 0; width: 100%; height: 100%;
  background: radial-gradient(400px circle at var(--mouse-x, 0) var(--mouse-y, 0), rgba(255,255,255,0.06), transparent 40%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 0;
  border-radius: inherit;
}
.card:hover::after, .stat-card:hover::after, .quick-action-card:hover::after {
  opacity: 1;
}

/* Fix z-index for inner elements so glow is behind them but over the background */
.card > *, .stat-card > *, .quick-action-card > * {
  position: relative;
  z-index: 1;
}

/* Micro-interactions (Icon Animations on Hover) */
.stat-card:hover i[data-lucide="key"], .quick-action-card:hover i[data-lucide="key"] {
    transform: rotate(15deg) scale(1.15);
    transition: transform 0.3s ease;
}
.stat-card:hover i[data-lucide="shield"], .quick-action-card:hover i[data-lucide="shield"] {
    animation: shield-pulse 1.2s infinite ease-in-out;
}
@keyframes shield-pulse { 0% { transform: scale(1); } 50% { transform: scale(1.15); } 100% { transform: scale(1); } }

.stat-card:hover i[data-lucide="image"], .quick-action-card:hover i[data-lucide="image"] {
    transform: scale(1.15) rotate(-5deg);
    transition: all 0.3s ease;
}

.stat-card:hover i[data-lucide="chef-hat"], .quick-action-card:hover i[data-lucide="chef-hat"] {
    transform: translateY(-4px) scale(1.15);
    transition: all 0.3s ease;
}

.stat-card:hover i[data-lucide="cloud-sun"] {
    animation: cloud-float 2s infinite ease-in-out;
}
@keyframes cloud-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }

.quick-action-card:hover i[data-lucide="monitor"] {
    transform: scale(1.15);
    transition: all 0.3s ease;
}

/* Ensure smooth transition back when not hovering */
i[data-lucide] {
    transition: all 0.3s ease;
}

/* ===== VISUAL UPGRADE PACK v2 ===== */

/* 1. Aurora Borealis Background (static - GPU optimized) */
body::before {
  /* Already set above as static radial-gradient — this duplicate overridden block removed */
}

/* @keyframes aurora-shift removed — was running infinite animation on full viewport, causing high GPU load */

/* 5. Particles canvas */
#particles-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

/* 2. Custom Cursor — DISABLED, using default cursor */
/* * { cursor: none !important; } */

#custom-cursor, #custom-cursor-dot { display: none !important; }

/* 6. Gradient logo in sidebar */
.macos-dock::before {
  content: '🖥';
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, rgba(99,102,241,0.3) 0%, rgba(168,85,247,0.3) 100%);
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.12);
  margin-bottom: 4px;
  flex-shrink: 0;
}

/* ===== FEATURE PACK: CLOCK, ACCENTS, DYNAMIC BACKGROUND ===== */

/* 1. Live Clock in Topbar */
.topbar-clock {
  display: flex;
  align-items: center;
  gap: 10px;
  user-select: none;
}
.clock-time {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  padding: 3px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.clock-date {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* 2. Accent Swatches in Topbar */
.accent-picker {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  padding: 5px 9px;
  border-radius: 20px;
  border: 1px solid var(--border);
  margin-right: 12px;
}
.accent-swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
  padding: 0;
  outline: none;
}
.accent-swatch:hover {
  transform: scale(1.3);
}
.accent-swatch.active {
  border-color: #ffffff;
  box-shadow: 0 0 10px currentColor;
  transform: scale(1.25);
}

/* Accent Theme Variables Overrides */
:root[data-theme-accent="purple"] {
  --accent: #a78bfa;
  --accent-2: #818cf8;
  --gradient-primary: linear-gradient(135deg, #a78bfa 0%, #818cf8 100%);
  --glow-accent: 0 0 20px rgba(167, 139, 250, 0.3);
}
:root[data-theme-accent="blue"] {
  --accent: #38bdf8;
  --accent-2: #60a5fa;
  --gradient-primary: linear-gradient(135deg, #38bdf8 0%, #60a5fa 100%);
  --glow-accent: 0 0 20px rgba(56, 189, 248, 0.3);
}
:root[data-theme-accent="emerald"] {
  --accent: #34d399;
  --accent-2: #10b981;
  --gradient-primary: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  --glow-accent: 0 0 20px rgba(52, 211, 153, 0.3);
}
:root[data-theme-accent="sunset"] {
  --accent: #f472b6;
  --accent-2: #e879f9;
  --gradient-primary: linear-gradient(135deg, #f472b6 0%, #e879f9 100%);
  --glow-accent: 0 0 20px rgba(244, 114, 182, 0.3);
}
:root[data-theme-accent="amber"] {
  --accent: #fb923c;
  --accent-2: #facc15;
  --gradient-primary: linear-gradient(135deg, #fb923c 0%, #facc15 100%);
  --glow-accent: 0 0 20px rgba(251, 146, 60, 0.3);
}

/* 3. Time-of-Day Dynamic Aurora Background Shifts */
body[data-time-of-day="morning"]::before {
  background:
    radial-gradient(ellipse 80% 60% at 20% 30%, rgba(251, 146, 60, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 70%, rgba(244, 114, 182, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 10%, rgba(56, 189, 248, 0.16) 0%, transparent 60%);
}

body[data-time-of-day="day"]::before {
  background:
    radial-gradient(ellipse 80% 60% at 20% 30%, rgba(56, 189, 248, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 70%, rgba(99, 102, 241, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 10%, rgba(168, 85, 247, 0.15) 0%, transparent 60%);
}

body[data-time-of-day="evening"]::before {
  background:
    radial-gradient(ellipse 80% 60% at 20% 30%, rgba(168, 85, 247, 0.25) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 70%, rgba(244, 114, 182, 0.22) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 10%, rgba(251, 146, 60, 0.18) 0%, transparent 60%);
}

body[data-time-of-day="night"]::before {
  background:
    radial-gradient(ellipse 80% 60% at 20% 30%, rgba(30, 27, 75, 0.35) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 70%, rgba(76, 29, 149, 0.30) 0%, transparent 60%),
    radial-gradient(ellipse 50% 40% at 50% 10%, rgba(15, 23, 42, 0.40) 0%, transparent 60%);
}

/* ===== COMPREHENSIVE VISUAL & THEME REFIX ===== */

/* 1. Fix Body & App-Layout z-indices so Aurora background is visible */
.app-layout {
  position: relative;
  z-index: 1;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1 !important;
  pointer-events: none;
  opacity: 0.85;
  mix-blend-mode: screen;
  /* animation: aurora-shift removed — caused high GPU load */
}

/* Time-of-Day Dynamic Background Tints */
body[data-time-of-day="morning"]::before {
  background:
    radial-gradient(ellipse 80% 60% at 20% 30%, rgba(251, 146, 60, 0.40) 0%, transparent 65%),
    radial-gradient(ellipse 60% 50% at 80% 70%, rgba(244, 114, 182, 0.35) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 50% 10%, rgba(56, 189, 248, 0.30) 0%, transparent 65%) !important;
}

body[data-time-of-day="day"]::before {
  background:
    radial-gradient(ellipse 80% 60% at 20% 30%, rgba(56, 189, 248, 0.35) 0%, transparent 65%),
    radial-gradient(ellipse 60% 50% at 80% 70%, rgba(99, 102, 241, 0.30) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 50% 10%, rgba(168, 85, 247, 0.28) 0%, transparent 65%) !important;
}

body[data-time-of-day="evening"]::before {
  background:
    radial-gradient(ellipse 80% 60% at 20% 30%, rgba(168, 85, 247, 0.40) 0%, transparent 65%),
    radial-gradient(ellipse 60% 50% at 80% 70%, rgba(244, 114, 182, 0.35) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 50% 10%, rgba(251, 146, 60, 0.30) 0%, transparent 65%) !important;
}

body[data-time-of-day="night"]::before {
  background:
    radial-gradient(ellipse 80% 60% at 20% 30%, rgba(30, 27, 75, 0.50) 0%, transparent 65%),
    radial-gradient(ellipse 60% 50% at 80% 70%, rgba(76, 29, 149, 0.45) 0%, transparent 65%),
    radial-gradient(ellipse 50% 40% at 50% 10%, rgba(14, 165, 233, 0.25) 0%, transparent 65%) !important;
}

/* 2. Accent Swatches & Themes */
:root[data-theme-accent="purple"] {
  --accent: #a78bfa;
  --accent-2: #818cf8;
  --gradient-primary: linear-gradient(135deg, #a78bfa 0%, #818cf8 100%);
  --glow-accent: 0 0 20px rgba(167, 139, 250, 0.4);
  --accent-rgb: 167, 139, 250;
}
:root[data-theme-accent="blue"] {
  --accent: #38bdf8;
  --accent-2: #60a5fa;
  --gradient-primary: linear-gradient(135deg, #38bdf8 0%, #60a5fa 100%);
  --glow-accent: 0 0 20px rgba(56, 189, 248, 0.4);
  --accent-rgb: 56, 189, 248;
}
:root[data-theme-accent="emerald"] {
  --accent: #34d399;
  --accent-2: #10b981;
  --gradient-primary: linear-gradient(135deg, #34d399 0%, #10b981 100%);
  --glow-accent: 0 0 20px rgba(52, 211, 153, 0.4);
  --accent-rgb: 52, 211, 153;
}
:root[data-theme-accent="sunset"] {
  --accent: #f472b6;
  --accent-2: #e879f9;
  --gradient-primary: linear-gradient(135deg, #f472b6 0%, #e879f9 100%);
  --glow-accent: 0 0 20px rgba(244, 114, 182, 0.4);
  --accent-rgb: 244, 114, 182;
}
:root[data-theme-accent="amber"] {
  --accent: #fb923c;
  --accent-2: #facc15;
  --gradient-primary: linear-gradient(135deg, #fb923c 0%, #facc15 100%);
  --glow-accent: 0 0 20px rgba(251, 146, 60, 0.4);
  --accent-rgb: 251, 146, 60;
}

/* Overrides to make all elements respond dynamically to --accent */
.btn-primary, .btn.primary, .nav-btn.primary {
  background: var(--gradient-primary) !important;
  border: none !important;
  color: #ffffff !important;
  box-shadow: var(--glow-accent) !important;
}

.macos-dock .nav-item.active {
  color: var(--accent) !important;
  background: rgba(var(--accent-rgb, 167, 139, 250), 0.18) !important;
  box-shadow: 0 0 15px rgba(var(--accent-rgb, 167, 139, 250), 0.5), inset 0 0 10px rgba(var(--accent-rgb, 167, 139, 250), 0.2) !important;
  border: 1px solid rgba(var(--accent-rgb, 167, 139, 250), 0.4) !important;
}

.macos-dock .nav-item.active .nav-icon {
  filter: drop-shadow(0 0 5px var(--accent)) !important;
}

.welcome-title {
  background: linear-gradient(135deg, #ffffff 30%, var(--accent) 100%) !important;
  -webkit-background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
}

.user-badge .user-avatar {
  background: var(--gradient-primary) !important;
  color: #ffffff !important;
}

.clock-time {
  border-color: var(--accent) !important;
  box-shadow: 0 0 10px rgba(var(--accent-rgb, 167, 139, 250), 0.3) !important;
}

.settings-accent-btn:hover {
  border-color: var(--accent) !important;
  box-shadow: 0 0 12px rgba(var(--accent-rgb, 167, 139, 250), 0.25) !important;
}

/* ===== VIVID TIME-OF-DAY BACKGROUND GRADIENTS ===== */

body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1 !important;
  pointer-events: none;
  opacity: 0.95;
  mix-blend-mode: screen;
  /* animation: aurora-shift removed — caused high GPU load */
  transition: background 1.2s ease-in-out;
}

/* Morning: Warm Amber & Sunset Rose Glow */
body[data-time-of-day="morning"]::before {
  background:
    radial-gradient(ellipse 90% 70% at 15% 25%, rgba(251, 146, 60, 0.65) 0%, transparent 70%),
    radial-gradient(ellipse 70% 60% at 85% 75%, rgba(244, 114, 182, 0.55) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 50% 5%, rgba(250, 204, 21, 0.45) 0%, transparent 65%) !important;
}

/* Day: Electric Sky Blue & Violet Glow */
body[data-time-of-day="day"]::before {
  background:
    radial-gradient(ellipse 90% 70% at 15% 25%, rgba(56, 189, 248, 0.65) 0%, transparent 70%),
    radial-gradient(ellipse 70% 60% at 85% 75%, rgba(99, 102, 241, 0.55) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 50% 5%, rgba(168, 85, 247, 0.45) 0%, transparent 65%) !important;
}

/* Evening: Vibrant Sunset Purple & Hot Magenta Glow */
body[data-time-of-day="evening"]::before {
  background:
    radial-gradient(ellipse 90% 70% at 15% 25%, rgba(217, 70, 239, 0.65) 0%, transparent 70%),
    radial-gradient(ellipse 70% 60% at 85% 75%, rgba(251, 146, 60, 0.55) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 50% 5%, rgba(168, 85, 247, 0.50) 0%, transparent 65%) !important;
}

/* Night: Deep Midnight Blue & Emerald Cyan Glow */
body[data-time-of-day="night"]::before {
  background:
    radial-gradient(ellipse 90% 70% at 15% 25%, rgba(14, 165, 233, 0.45) 0%, transparent 70%),
    radial-gradient(ellipse 70% 60% at 85% 75%, rgba(124, 58, 237, 0.55) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 50% 5%, rgba(15, 23, 42, 0.80) 0%, transparent 65%) !important;
}

/* ===== APPLE GLASS SERVER GRID (VPN REDESIGN) ===== */
.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 1.5rem;
  width: 100%;
}

.vpn-server-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  padding: 1.25rem 1.5rem;
  /* backdrop-filter: blur(16px); */ /* removed-gpu */
  -webkit-/* backdrop-filter: blur(16px); */ /* removed-gpu */
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.vpn-server-card:hover {
  transform: translateY(-4px);
  border-color: rgba(var(--accent-rgb, 167, 139, 250), 0.35);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35), 0 0 20px rgba(var(--accent-rgb, 167, 139, 250), 0.15);
}

.vpn-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.vpn-flag-box {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.vpn-title-group {
  flex: 1;
  min-width: 0;
}

.vpn-server-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.vpn-server-host {
  font-size: 0.85rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.vpn-status-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.vpn-status-badge.online {
  background: rgba(34, 197, 94, 0.12);
  border-color: rgba(34, 197, 94, 0.3);
  color: #4ade80;
}

.vpn-status-badge.offline {
  background: rgba(239, 68, 68, 0.12);
  border-color: rgba(239, 68, 68, 0.3);
  color: #f87171;
}

.vpn-status-badge.checking {
  background: rgba(234, 179, 8, 0.12);
  border-color: rgba(234, 179, 8, 0.3);
  color: #facc15;
}

.vpn-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.vpn-status-badge.online .vpn-pulse-dot {
  background: #4ade80;
  box-shadow: 0 0 8px #4ade80;
}

.vpn-status-badge.offline .vpn-pulse-dot {
  background: #f87171;
}

.vpn-status-badge.checking .vpn-pulse-dot {
  background: #facc15;
}

.vpn-tags-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.vpn-tag {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 3px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.vpn-traffic-box {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-bottom: 1rem;
}

.vpn-traffic-header {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.vpn-traffic-bar-bg {
  width: 100%;
  height: 6px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 3px;
  overflow: hidden;
}

.vpn-traffic-bar-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 3px;
  transition: width 0.4s ease;
}

.vpn-card-footer {
  display: flex;
  gap: 8px;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 0.85rem;
  margin-top: auto;
}

/* ===== APPLE GLASS CLIENT CARDS (VPN INBOUNDS REDESIGN) ===== */
.client-card-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: 1rem;
}

.client-card-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 16px;
  padding: 0.85rem 1.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  transition: all 0.2s ease;
}

.client-card-item:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(var(--accent-rgb, 167, 139, 250), 0.3);
  transform: translateX(3px);
}

.client-device-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--accent);
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.client-info-group {
  flex: 1;
  min-width: 0;
}

.client-email-name {
  font-weight: 700;
  font-size: 0.98rem;
  color: #ffffff;
  margin-bottom: 3px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.client-traffic-stats {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 12px;
}

.client-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.client-badge-active {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.client-badge-inactive {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  background: rgba(239, 68, 68, 0.15);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.3);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ===== CENTER SERVER GRID FOR 1 OR MULTIPLE CARDS ===== */
.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 480px));
  justify-content: center;
  gap: 1.5rem;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
}

/* ===== PERFECT DEAD-CENTERED MODALS ===== */
.modal-overlay {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  margin: 0 !important;
  padding: 0 !important;
  background: rgba(0, 0, 0, 0.75) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 0 !important;
  pointer-events: none !important;
  transition: opacity 0.2s ease !important;
  z-index: 99999 !important;
}

.modal-overlay.open {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.modal-overlay .modal {
  position: fixed !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
  padding: 0 !important;
  background: rgba(20, 20, 36, 0.96) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  border-radius: 24px !important;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 40px rgba(var(--accent-rgb, 167, 139, 250), 0.15) !important;
  width: 90vw !important;
  max-width: 580px !important;
  max-height: 85vh !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  z-index: 100000 !important;
}

/* ===== Apple Glass Password Vault Cards ===== */
.pwd-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.5rem;
}

.pwd-card {
  position: relative;
  background: rgba(255, 255, 255, 0.03) !important;
  backdrop-filter: blur(20px) !important;
  -webkit-backdrop-filter: blur(20px) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 24px !important;
  padding: 1.5rem !important;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2) !important;
  overflow: hidden;
  cursor: default;
}

/* Subtle corner gradient shine */
.pwd-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  background: radial-gradient(circle at top left, rgba(255,255,255,0.06), transparent 70%);
  pointer-events: none;
}

.pwd-card:hover {
  transform: translateY(-6px) scale(1.01);
  background: rgba(255, 255, 255, 0.06) !important;
  border-color: rgba(255, 255, 255, 0.18) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 
              0 0 25px rgba(var(--cat-color-rgb, 167, 139, 250), 0.15) !important;
}

.pwd-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.pwd-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.pwd-card:hover .pwd-card-icon {
  transform: scale(1.08) rotate(3deg);
}

.pwd-card-title-wrap {
  flex: 1;
  min-width: 0;
}

.pwd-card-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: -0.01em;
}

.pwd-card-category {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: 20px;
  display: inline-block;
  margin-top: 0.25rem;
  border: 1px solid currentColor;
}

.pwd-card-fields {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  background: rgba(0, 0, 0, 0.15);
  padding: 1rem;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.pwd-field-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.pwd-field-label {
  font-size: 0.65rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.3);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.pwd-field-value-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.pwd-field-value {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.85);
  font-family: 'Outfit', sans-serif;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  user-select: text;
}

.pwd-field-value.monospace {
  font-family: 'Space Mono', monospace, 'Courier New';
  letter-spacing: 0.12em;
}

.pwd-icon-btn {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.4);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.pwd-icon-btn:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
}

.pwd-card-url {
  font-size: 0.8rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pwd-card-url a {
  color: var(--accent-4);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.2s;
}

.pwd-card-url a:hover {
  color: #ffffff;
  text-decoration: underline;
}

.pwd-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  opacity: 0.3;
  transition: opacity 0.2s ease;
}

.pwd-card:hover .pwd-card-actions {
  opacity: 1;
}

.pwd-btn-action {
  padding: 6px 12px;
  font-size: 0.75rem;
  border-radius: 8px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s ease;
  border: none;
  cursor: pointer;
}

.pwd-btn-action.edit {
  background: rgba(167, 139, 250, 0.12);
  border: 1px solid rgba(167, 139, 250, 0.25);
  color: #c084fc;
}

.pwd-btn-action.edit:hover {
  background: rgba(167, 139, 250, 0.25);
  color: #ffffff;
}

.pwd-btn-action.delete {
  background: rgba(244, 114, 182, 0.1);
  border: 1px solid rgba(244, 114, 182, 0.2);
  color: #f472b6;
}

.pwd-btn-action.delete:hover {
  background: rgba(244, 114, 182, 0.25);
  color: #ffffff;
}

/* ===== Form Elements (Select, Textarea) styling for Dark Theme ===== */
.form-select, .form-textarea {
  width: 100%; 
  padding: 10px 12px;
  background: rgba(0,0,0,0.2) !important; 
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 10px !important; 
  color: var(--text) !important; 
  font-family: inherit !important; 
  font-size: 0.95rem !important;
  outline: none !important; 
  transition: all 0.2s !important;
  box-sizing: border-box !important;
}

.form-select {
  appearance: none !important;
  -webkit-appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='rgba%28255,255,255,0.5%29' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 16px !important;
  padding-right: 40px !important;
}

.form-select option {
  background: #141428 !important;
  color: #ffffff !important;
}

.form-textarea {
  min-height: 100px !important;
  resize: vertical !important;
  background: rgba(0,0,0,0.2) !important;
  color: var(--text) !important;
}

.form-select:focus, .form-textarea:focus { 
  border-color: #4c8bf5 !important; 
  box-shadow: 0 0 0 3px rgba(76,139,245,0.3) !important; 
  background: rgba(0,0,0,0.3) !important; 
}

/* ===== Scrollable Modal Layout Fixes ===== */
.modal-header {
  padding: 1.5rem 1.5rem 1rem !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

.modal-body {
  padding: 1.5rem !important;
  overflow-y: auto !important;
  flex: 1 1 auto !important;
  min-height: 0 !important;
}

.modal-footer {
  padding: 1rem 1.5rem 1.5rem !important;
  display: flex !important;
  justify-content: flex-end !important;
  gap: 0.75rem !important;
  border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
}

/* ===== Toast Notifications ===== */
.toast-container {
  position: fixed !important;
  top: 24px !important;
  right: 24px !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
  z-index: 999999 !important;
  pointer-events: none !important;
}

.toast {
  pointer-events: auto !important;
  background: rgba(20, 20, 36, 0.9) !important;
  backdrop-filter: blur(12px) !important;
  -webkit-backdrop-filter: blur(12px) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 14px !important;
  padding: 12px 20px !important;
  color: #ffffff !important;
  font-size: 0.9rem !important;
  font-weight: 500 !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3),
              0 0 1px rgba(255, 255, 255, 0.2) !important;
  animation: slideInToast 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
  max-width: 350px !important;
}

.toast.success {
  border-left: 4px solid #4ade80 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3),
              0 0 15px rgba(74, 222, 128, 0.15) !important;
}

.toast.error {
  border-left: 4px solid #f87171 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3),
              0 0 15px rgba(248, 113, 113, 0.15) !important;
}

.toast.info {
  border-left: 4px solid #60a5fa !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3),
              0 0 15px rgba(96, 165, 250, 0.15) !important;
}

@keyframes slideInToast {
  from {
    transform: translateX(100%) translateY(0);
    opacity: 0;
  }
  to {
    transform: translateX(0) translateY(0);
    opacity: 1;
  }
}

