*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg-primary: #0f0f14;
  --bg-secondary: #1a1a24;
  --bg-tertiary: #22222f;
  --bg-hover: #2a2a3a;
  --bg-active: #32324a;
  --text-primary: #eaeaf0;
  --text-secondary: #9494a8;
  --text-muted: #6a6a7e;
  --accent: #6c5ce7;
  --accent-hover: #7d6ff0;
  --accent-glow: rgba(108, 92, 231, 0.25);
  --danger: #e74c3c;
  --danger-hover: #c0392b;
  --success: #2ecc71;
  --border: #2d2d3e;
  --shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  --radius: 12px;
  --radius-sm: 8px;
  --transition: 0.2s ease;
  --sidebar-width: 300px;
}

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  overflow: hidden;
}

.hidden {
  display: none !important;
}

/* ===================== LOGIN SCREEN ===================== */
.screen {
  height: 100vh;
  width: 100%;
}

.login-screen {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: var(--bg-primary);
  background-image:
    radial-gradient(ellipse at 20% 50%, rgba(108, 92, 231, 0.08) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 20%, rgba(108, 92, 231, 0.05) 0%, transparent 50%);
  padding: 24px;
}

.login-container {
  width: 100%;
  max-width: 420px;
  text-align: center;
}

.login-brand {
  margin-bottom: 40px;
}

.brand-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--accent), #a29bfe);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #fff;
  box-shadow: 0 8px 24px var(--accent-glow);
}

.login-brand h1 {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.5px;
  color: var(--text-primary);
}

.login-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
  margin-top: 8px;
  font-weight: 400;
}

.login-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
}

.form-group {
  margin-bottom: 16px;
  text-align: left;
}

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

.form-group label i {
  margin-right: 6px;
  font-size: 12px;
}

.form-group input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}

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

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

.btn-primary {
  width: 100%;
  padding: 13px 20px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), #7d6ff0);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition);
  box-shadow: 0 4px 16px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px var(--accent-glow);
}

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

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  width: 100%;
  padding: 13px 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition);
}

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

.login-divider {
  display: flex;
  align-items: center;
  margin: 20px 0;
  gap: 12px;
}

.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.login-divider span {
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.login-footer {
  margin-top: 24px;
  font-size: 13px;
  color: var(--text-muted);
}

.login-error {
  margin-top: 16px;
  padding: 12px 20px;
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.3);
  border-radius: var(--radius-sm);
  color: #e74c3c;
  font-size: 14px;
  max-width: 420px;
  width: 100%;
}

/* ===================== APP SCREEN ===================== */
.app-screen {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* ===================== SIDEBAR ===================== */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  height: 100vh;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  z-index: 100;
}

.sidebar-header {
  padding: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.sidebar-brand i {
  color: var(--accent);
  font-size: 20px;
}

.btn-new-note {
  margin: 16px 16px 0;
  padding: 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--accent);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition);
}

.btn-new-note:hover {
  background: var(--accent-glow);
  border-color: var(--accent);
}

.sidebar-search {
  margin: 12px 16px;
  position: relative;
}

.sidebar-search i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: 13px;
}

.sidebar-search input {
  width: 100%;
  padding: 10px 12px 10px 36px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}

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

.sidebar-search input:focus {
  border-color: var(--accent);
}

/* ===================== SIDEBAR FILTERS ===================== */
.sidebar-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 16px;
}

.filter-chip {
  flex-shrink: 0;
  padding: 6px 12px;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all var(--transition);
  white-space: nowrap;
}

.filter-chip i {
  font-size: 10px;
}

.filter-chip:hover {
  background: var(--bg-hover);
  color: var(--text-secondary);
  border-color: var(--text-muted);
}

.filter-chip.active {
  background: var(--accent-glow);
  color: var(--accent);
  border-color: var(--accent);
}

/* ===================== CATEGORY SELECTOR (EDITOR) ===================== */
.category-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 32px 8px;
  flex-wrap: wrap;
}

.category-label {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.cat-chip {
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: all var(--transition);
}

.cat-chip i {
  font-size: 11px;
}

.cat-chip:hover {
  background: var(--bg-hover);
  color: var(--text-secondary);
  border-color: var(--text-muted);
}

.cat-chip.active {
  background: var(--accent-glow);
  color: var(--accent);
  border-color: var(--accent);
}

.cat-chip[data-cat="trabalho"].active {
  background: rgba(52, 152, 219, 0.15);
  color: #3498db;
  border-color: #3498db;
}

.cat-chip[data-cat="escola"].active {
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
  border-color: #2ecc71;
}

.cat-chip[data-cat="outro"].active {
  background: rgba(241, 196, 15, 0.15);
  color: #f1c40f;
  border-color: #f1c40f;
}

.notes-list {
  flex: 1;
  overflow-y: auto;
  padding: 4px 8px;
}

.notes-list::-webkit-scrollbar {
  width: 4px;
}

.notes-list::-webkit-scrollbar-track {
  background: transparent;
}

.notes-list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 4px;
}

.note-item {
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  margin-bottom: 2px;
  border: 1px solid transparent;
}

.note-item:hover {
  background: var(--bg-hover);
}

.note-item.active {
  background: var(--bg-active);
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent-glow);
}

.note-item-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.note-item-title .note-title-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.note-item-star {
  flex-shrink: 0;
  font-size: 11px;
  color: #f1c40f;
}

.note-item-preview {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.note-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 6px;
  gap: 8px;
}

.note-item-date {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.7;
}

.note-item-cat {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.note-item-cat.cat-trabalho {
  background: rgba(52, 152, 219, 0.15);
  color: #3498db;
}

.note-item-cat.cat-escola {
  background: rgba(46, 204, 113, 0.15);
  color: #2ecc71;
}

.note-item-cat.cat-outro {
  background: rgba(241, 196, 15, 0.15);
  color: #f1c40f;
}

.notes-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--text-muted);
  font-size: 14px;
  gap: 8px;
  padding: 20px;
  text-align: center;
}

.notes-empty i {
  font-size: 28px;
  opacity: 0.4;
}

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

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  color: inherit;
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  margin: -4px -8px;
  transition: background var(--transition);
}

.user-info:hover {
  background: var(--bg-hover);
}

.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-glow);
  border: 2px solid var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--accent);
  flex-shrink: 0;
  overflow: hidden;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-info span {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-secondary);
}

.btn-icon {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}

.btn-icon:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-danger:hover {
  background: rgba(231, 76, 60, 0.15);
  color: var(--danger);
}

/* ===================== EDITOR ===================== */
.editor-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--bg-primary);
}

.editor-toolbar {
  padding: 12px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: var(--bg-secondary);
  min-height: 56px;
}

.editor-toolbar > .btn-icon:first-child {
  display: none;
}

.editor-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.save-status {
  font-size: 12px;
  color: var(--success);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  transition: all var(--transition);
}

.save-status.saving {
  color: #f39c12;
}

/* ===================== FAVORITE BUTTON ===================== */
.btn-fav {
  color: var(--text-muted);
  font-size: 16px;
  transition: all var(--transition);
}

.btn-fav:hover {
  color: #f1c40f;
  background: rgba(241, 196, 15, 0.1);
}

.btn-fav.active {
  color: #f1c40f;
}

.btn-fav.active i {
  font-weight: 900;
}

.editor-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  gap: 12px;
  padding: 40px;
}

.empty-icon {
  width: 80px;
  height: 80px;
  border-radius: 24px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: var(--text-muted);
  opacity: 0.5;
  margin-bottom: 8px;
}

.editor-empty h2 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-secondary);
}

.editor-empty p {
  font-size: 14px;
}

.editor-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.note-title-input {
  width: 100%;
  padding: 28px 32px 8px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 28px;
  font-weight: 700;
  font-family: inherit;
  outline: none;
  letter-spacing: -0.5px;
}

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

.note-body-input {
  flex: 1;
  width: 100%;
  padding: 16px 32px 32px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 16px;
  font-family: inherit;
  line-height: 1.7;
  outline: none;
  resize: none;
}

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

.editor-footer {
  padding: 10px 32px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  background: var(--bg-secondary);
}

/* ===================== TOAST ===================== */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 14px 20px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  color: var(--text-primary);
  z-index: 9999;
  animation: toastIn 0.3s ease;
}

.toast.toast-success {
  border-color: rgba(46, 204, 113, 0.4);
}

.toast.toast-success i {
  color: var(--success);
}

.toast.toast-error {
  border-color: rgba(231, 76, 60, 0.4);
}

.toast.toast-error i {
  color: var(--danger);
}

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

/* ===================== MODAL ===================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  padding: 24px;
  animation: fadeIn 0.2s ease;
}

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

.modal-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  max-width: 400px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow);
  animation: modalIn 0.25s ease;
}

@keyframes modalIn {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(231, 76, 60, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: var(--danger);
}

.modal-card h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.modal-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 24px;
}

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

.btn-modal {
  padding: 10px 24px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all var(--transition);
}

.btn-modal-cancel {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

.btn-modal-cancel:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.btn-modal-danger {
  background: var(--danger);
  color: #fff;
}

.btn-modal-danger:hover {
  background: var(--danger-hover);
}

/* ===================== SIDEBAR OVERLAY (MOBILE) ===================== */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 99;
}

.mobile-only {
  display: none;
}

/* ===================== PROFILE PAGE ===================== */
.profile-screen {
  display: flex;
  justify-content: center;
  background: var(--bg-primary);
  min-height: 100vh;
  padding: 24px 24px 80px;
  overflow-y: auto;
}

.profile-container {
  width: 100%;
  max-width: 480px;
}

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

.profile-header h1 {
  font-size: 20px;
  font-weight: 700;
}

.profile-back {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition);
}

.profile-back:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}

.profile-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  margin-bottom: 24px;
}

.profile-avatar {
  width: 80px;
  height: 80px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #a29bfe);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #fff;
  box-shadow: 0 8px 24px var(--accent-glow);
}

.profile-email {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.profile-uid {
  font-size: 13px;
  color: var(--text-muted);
  word-break: break-all;
}

.profile-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.profile-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-section-title i {
  color: var(--accent);
  font-size: 14px;
}

.profile-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}

.profile-info-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.profile-info-label {
  font-size: 14px;
  color: var(--text-secondary);
}

.profile-info-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  text-align: right;
}

.profile-action-btn {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition);
}

.profile-action-btn:hover {
  background: var(--bg-hover);
  border-color: var(--accent);
}

/* ===================== LANGUAGE SELECTOR ===================== */
.lang-selector {
  display: flex;
  gap: 10px;
}

.lang-btn {
  flex: 1;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition);
}

.lang-btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--accent);
}

.lang-btn.active {
  background: var(--accent-glow);
  color: var(--accent);
  border-color: var(--accent);
}

.lang-flag {
  font-size: 20px;
}

.btn-logout {
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(231, 76, 60, 0.3);
  border-radius: var(--radius-sm);
  background: rgba(231, 76, 60, 0.08);
  color: var(--danger);
  font-size: 15px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition);
  margin-top: 8px;
}

.btn-logout:hover {
  background: rgba(231, 76, 60, 0.15);
  border-color: var(--danger);
}

.profile-footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 24px;
  opacity: 0.5;
}

@media (max-width: 768px) {
  .profile-screen {
    padding: 16px 16px 80px;
  }

  .profile-card {
    padding: 24px;
  }
}

/* ===================== BOTTOM NAV (MOBILE) ===================== */
.bottom-nav {
  display: none;
}

@media (max-width: 768px) {
  .bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    z-index: 200;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 500;
    transition: all var(--transition);
  }

  .bottom-nav-item i {
    font-size: 20px;
    transition: all var(--transition);
  }

  .bottom-nav-item.active {
    color: var(--accent);
  }

  .bottom-nav-item.active i {
    transform: scale(1.1);
  }

  .bottom-nav-item:not(.active):hover {
    color: var(--text-secondary);
  }

  .sidebar-footer {
    display: none;
  }
}

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    box-shadow: var(--shadow);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .sidebar-header {
    position: sticky;
    top: 0;
    background: var(--bg-secondary);
    z-index: 1;
  }

  .sidebar-footer {
    position: sticky;
    bottom: 0;
    background: var(--bg-secondary);
    z-index: 1;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.visible {
    display: block;
  }

  .editor-toolbar .btn-icon:first-child {
    display: flex;
  }

  .mobile-only {
    display: flex;
  }

  .note-title-input {
    padding: 20px 20px 8px;
    font-size: 22px;
  }

  .note-body-input {
    padding: 12px 20px 20px;
    font-size: 15px;
  }

  .editor-footer {
    padding: 10px 20px;
  }

  .editor-toolbar {
    padding: 12px 16px;
  }

  .editor-area {
    padding-bottom: 60px;
  }

  .login-brand h1 {
    font-size: 26px;
  }

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

  .toast {
    bottom: 76px;
  }
}

@media (max-width: 480px) {
  .login-container {
    padding: 0 4px;
  }

  .brand-icon {
    width: 60px;
    height: 60px;
    font-size: 26px;
  }

  .login-brand h1 {
    font-size: 22px;
  }

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

/* ===================== LOADING SPINNER ===================== */
.spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  display: inline-block;
}

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

/* ===================== SCROLLBAR GLOBAL ===================== */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}
