/* ========================================
   NOTAS - Modern Clean UI
   Inspired by Notion & Linear
   ======================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

/* CSS Variables */
:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-hover: #f5f5f5;
  --border: #e5e5e5;
  --border-light: #f0f0f0;
  --text-primary: #1a1a1a;
  --text-secondary: #666666;
  --text-tertiary: #999999;
  --accent: #2563eb;
  --accent-hover: #1d4ed8;
  --accent-light: #eff6ff;
  --danger: #dc2626;
  --danger-light: #fef2f2;
  --success: #16a34a;
  --warning: #ca8a04;
  --warning-light: #fefce8;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 12px 32px rgba(0,0,0,0.12);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #f3f4f6;
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* App Container */
.app {
  max-width: 1000px;
  margin: 0 auto;
  padding: 32px 24px;
}

/* Header */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
}

header h1 {
  font-size: 28px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.5px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* Sync Status */
.sync-status {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-tertiary);
  font-weight: 500;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  transition: background 0.2s;
}

.sync-status.syncing .status-dot {
  background: var(--warning);
  animation: pulse 1.5s ease-in-out infinite;
}

.sync-status.error .status-dot {
  background: var(--danger);
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.9); }
}

/* Icon Button */
.btn-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 16px;
  cursor: pointer;
  padding: 8px 12px;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.btn-header:hover {
  background: var(--surface-hover);
  border-color: var(--border);
  transform: translateY(-1px);
  color: var(--text-primary);
}

/* Search Bar */
.search-bar {
  position: relative;
  margin-bottom: 28px;
}

.search-bar input {
  width: 100%;
  padding: 14px 48px 14px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  font-size: 15px;
  font-family: inherit;
  background: var(--surface);
  color: var(--text-primary);
  outline: none;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

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

.search-bar input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light), var(--shadow-sm);
}

.clear-search {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  display: none;
  color: var(--text-tertiary);
}

.clear-search:hover {
  color: var(--text-secondary);
  background: var(--surface-hover);
}

/* Notes Grid */
.notes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 20px;
}

/* Note Card */
.note-card {
  background: var(--surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 140px;
}

.note-card:hover {
  border-color: var(--border);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.note-card:hover .card-actions {
  opacity: 1;
}

/* Pinned note style */
.note-card.pinned {
  border: 2px solid var(--accent);
  background: var(--accent-light);
}

.note-card.pinned::before {
  content: '';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 20px;
  height: 20px;
  background: var(--accent);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M12 17v5M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4.76z'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M12 17v5M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V17h14v-1.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V6a2 2 0 0 0-2-2h-2a2 2 0 0 0-2 2v4.76z'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Card Actions (hover) */
.card-actions {
  position: absolute;
  top: 40px;
  right: 8px;
  display: flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.card-action-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: var(--surface);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  transition: all 0.15s ease;
}

.card-action-btn:hover {
  color: var(--text-primary);
  transform: scale(1.1);
}

.card-action-btn.delete:hover {
  background: var(--danger-light);
  color: var(--danger);
}

.card-action-btn.archive:hover {
  background: var(--warning-light);
  color: var(--warning);
}

.note-card-title {
  font-weight: 600;
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.4;
  padding-right: 30px;
}

.note-card-preview {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.note-card-preview .markdown-body {
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.note-card-preview .markdown-body p {
  margin: 0;
}

.note-card-preview .markdown-body code {
  background: rgba(0,0,0,0.05);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 12px;
}

.note-card-date {
  font-size: 11px;
  color: var(--text-tertiary);
  margin-top: auto;
  padding-top: 12px;
  font-weight: 500;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-tertiary);
}

.empty-state .emoji {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 15px;
  margin-top: 8px;
  color: var(--text-secondary);
}

.search-results-info {
  font-size: 13px;
  color: var(--text-tertiary);
  margin-bottom: 16px;
  font-weight: 500;
  padding-left: 4px;
}

/* FAB */
.fab {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  border: none;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(37, 99, 235, 0.35);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.fab:hover {
  background: var(--accent-hover);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.4);
}

.fab:active {
  transform: translateY(-1px) scale(0.98);
}

/* Modal Overlay */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 100;
  justify-content: center;
  align-items: center;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}

.modal.active {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Modal Content */
.modal-content {
  background: var(--surface);
  border-radius: var(--radius-xl);
  width: 100%;
  max-width: 720px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.25s ease;
}

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

/* Modal Header */
.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-light);
}

.note-title-input {
  flex: 1;
  border: none;
  font-size: 18px;
  font-weight: 600;
  font-family: inherit;
  color: var(--text-primary);
  outline: none;
  background: transparent;
}

.note-title-input::placeholder {
  color: var(--text-tertiary);
}

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

.btn-icon {
  background: var(--surface-hover);
  border: none;
  font-size: 16px;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  transition: all 0.15s ease;
  opacity: 0.7;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
}

.btn-icon:hover {
  background: var(--border-light);
  opacity: 1;
}

.btn-icon.active {
  opacity: 1;
  background: var(--accent-light);
  color: var(--accent);
}

.view-toggle {
  display: flex;
  gap: 2px;
  background: var(--surface-hover);
  padding: 3px;
  border-radius: var(--radius-sm);
}

.toggle-btn {
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: 5px;
  transition: all 0.15s ease;
  opacity: 0.6;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-btn:hover {
  opacity: 0.9;
}

.toggle-btn.active {
  opacity: 1;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  color: var(--accent);
}

.close-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-tertiary);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  transition: all 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  background: var(--surface-hover);
  color: var(--text-secondary);
}

/* Modal Body */
.modal-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-body textarea {
  flex: 1;
  border: none;
  padding: 20px;
  font-size: 15px;
  resize: none;
  outline: none;
  font-family: 'Inter', monospace;
  line-height: 1.7;
  color: var(--text-primary);
  background: transparent;
  min-height: 400px;
}

.modal-body textarea::placeholder {
  color: var(--text-tertiary);
}

.modal-body #notePreview {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  border: none;
  display: none;
}

.modal-body #notePreview .markdown-body {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-primary);
}

.modal-body #notePreview .markdown-body h1,
.modal-body #notePreview .markdown-body h2,
.modal-body #notePreview .markdown-body h3 {
  margin-top: 1.5em;
  margin-bottom: 0.5em;
}

.modal-body #notePreview .markdown-body h1:first-child {
  margin-top: 0;
}

.modal-body #notePreview .markdown-body p {
  margin-bottom: 1em;
}

.modal-body #notePreview .markdown-body code {
  background: var(--surface-hover);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 13px;
}

.modal-body #notePreview .markdown-body pre {
  background: var(--surface-hover);
  padding: 16px;
  border-radius: var(--radius-md);
  overflow-x: auto;
  margin: 1em 0;
}

.modal-body #notePreview .markdown-body pre code {
  background: none;
  padding: 0;
}

.modal-body #notePreview .markdown-body ul,
.modal-body #notePreview .markdown-body ol {
  margin: 1em 0;
  padding-left: 1.5em;
}

.modal-body #notePreview .markdown-body li {
  margin-bottom: 0.5em;
}

.modal-body #notePreview .markdown-body blockquote {
  border-left: 3px solid var(--accent);
  margin: 1em 0;
  padding-left: 1em;
  color: var(--text-secondary);
}

/* Modal Actions */
.modal-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-top: 1px solid var(--border-light);
  background: var(--surface);
}

.action-left {
  display: flex;
  gap: 8px;
}

.btn {
  padding: 9px 16px;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-copy {
  background: var(--surface-hover);
  color: var(--text-secondary);
}

.btn-copy:hover {
  background: var(--border-light);
  color: var(--text-primary);
}

.btn-delete {
  background: var(--danger-light);
  color: var(--danger);
}

.btn-delete:hover {
  background: #fee2e2;
}

.auto-save-hint {
  font-size: 12px;
  color: var(--text-tertiary);
  font-style: italic;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary);
  color: white;
  padding: 12px 24px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 500;
  z-index: 200;
  animation: toastIn 0.3s ease;
  box-shadow: var(--shadow-lg);
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Responsive */
@media (max-width: 640px) {
  .app {
    padding: 20px 16px;
  }
  
  header {
    margin-bottom: 24px;
  }
  
  header h1 {
    font-size: 24px;
  }
  
  .notes-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  
  .fab {
    bottom: 24px;
    right: 24px;
    width: 48px;
    height: 48px;
  }
  
  .modal {
    padding: 16px;
  }
  
  .modal-content {
    max-height: 90vh;
    border-radius: var(--radius-lg);
  }
  
  .modal-header {
    padding: 14px 16px;
  }
  
  .note-title-input {
    font-size: 16px;
  }
  
  .card-actions {
    opacity: 1;
  }
}

/* Limit preview height in grid cards - explicit max-height */
.note-card-preview {
  max-height: 100px;
  overflow: hidden;
}

.note-card-preview .markdown-body {
  max-height: 100px;
  overflow: hidden;
}

/* Pinned card - transparent preview background */
.note-card.pinned .note-card-preview {
  background: transparent;
}

.note-card.pinned .note-card-preview .markdown-body {
  background: transparent;
}

/* Tabs toggle */
.tabs-toggle {
  display: flex;
  gap: 0;
  background: var(--surface-hover);
  padding: 3px;
  border-radius: var(--radius-md);
}

.tabs-toggle .toggle-btn {
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
}

/* Archived note style - yellow/orange */
.note-card.archived {
  border: 2px solid var(--warning);
  background: var(--warning-light);
  opacity: 0.85;
}

.note-card.archived:hover {
  opacity: 1;
}

.note-card.archived::before {
  content: '';
  position: absolute;
  top: 12px;
  right: 12px;
  width: 18px;
  height: 18px;
  background: var(--warning);
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M21 8v13H3V8M1 3h22v5H1z'/%3E%3Cpath d='M10 12h4'/%3E%3C/svg%3E") center/contain no-repeat;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Cpath d='M21 8v13H3V8M1 3h22v5H1z'/%3E%3Cpath d='M10 12h4'/%3E%3C/svg%3E") center/contain no-repeat;
}

.note-card.archived .note-card-preview {
  background: transparent;
}

.note-card.archived .note-card-preview .markdown-body {
  background: transparent;
}

/* Auth Modal */
.auth-modal-content {
  max-width: 380px;
  padding: 40px;
  text-align: center;
}

.auth-header {
  margin-bottom: 32px;
}

.auth-header svg {
  color: var(--accent);
  margin-bottom: 16px;
}

.auth-header h2 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
}

.auth-header p {
  color: var(--text-secondary);
  font-size: 14px;
}

.auth-form {
  text-align: left;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.btn-block {
  width: 100%;
  padding: 12px;
  font-size: 14px;
}

.btn-primary {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: var(--radius-md);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-primary:hover {
  background: var(--accent-hover);
}

.auth-footer {
  margin-top: 20px;
  font-size: 13px;
}

.auth-footer a {
  color: var(--accent);
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.auth-error {
  margin-top: 16px;
  padding: 10px;
  background: var(--danger-light);
  color: var(--danger);
  border-radius: var(--radius-sm);
  font-size: 13px;
  display: none;
}

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

/* Enhanced Auth Modal */
.auth-modal-content {
  width: 100%;
  max-width: 400px;
  padding: 48px 40px;
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.auth-header {
  text-align: center;
  margin-bottom: 32px;
}

.auth-header .logo-img {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 16px;
  object-fit: contain;
}

.auth-header h2 {
  font-size: 26px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.auth-header p {
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-form {
  margin-bottom: 24px;
}

.auth-form .form-group {
  margin-bottom: 20px;
}

.auth-form .form-group input {
  height: 48px;
  font-size: 15px;
  border-radius: var(--radius-md);
}

.auth-form .form-group input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.btn-auth {
  width: 100%;
  height: 48px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent) 0%, #3b82f6 100%);
  color: white;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.btn-auth:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.btn-auth:active {
  transform: translateY(0);
}

.btn-auth.loading {
  opacity: 0.7;
  pointer-events: none;
}

.btn-auth .spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.auth-footer {
  text-align: center;
  font-size: 14px;
  color: var(--text-secondary);
}

.auth-footer a {
  color: var(--accent);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s;
}

.auth-footer a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}

.auth-error {
  margin-top: 16px;
  padding: 12px 16px;
  background: var(--danger-light);
  color: var(--danger);
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  display: none;
  animation: slideIn 0.2s ease;
}

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

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Navbar */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  min-height: 56px;
  position: sticky;
  top: 0;
  z-index: 100;
  margin: -32px -24px 32px -24px;
  width: calc(100% + 48px);
  box-sizing: border-box;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.navbar-logo {
  width: 28px;
  height: 28px;
}

.navbar-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary);
}

.navbar-tabs {
  display: flex;
  gap: 4px;
  background: var(--surface-hover);
  padding: 4px;
  border-radius: 10px;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: rgba(0,0,0,0.04);
}

.tab-btn.active {
  color: var(--accent);
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.tab-btn svg {
  width: 14px;
  height: 14px;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-shrink: 0;
}

.sync-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.status-dot {
  width: 8px;
  height: 8px;
  background: var(--success);
  border-radius: 50%;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-email {
  font-size: 13px;
  color: #6b7280;
  font-weight: 500;
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 500;
  color: #6b7280;
  background: transparent;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
}

.logout-btn:hover {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}

/* Empty state */
.empty-state {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: calc(100vh - 200px);
  padding: 60px 20px;
  color: var(--text-tertiary);
}

.empty-state svg {
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  opacity: 0.5;
}

.empty-state p {
  font-size: 14px;
  max-width: 260px;
  line-height: 1.5;
}

/* Auth header logo */
.auth-header .logo-img {
  width: 64px;
  height: 64px;
  margin: 0 auto 20px;
  border-radius: 14px;
}
