/* =========================================================
   Design tokens
   ========================================================= */
:root {
  --bg: #f6f5f1;
  --app-bg: #fffdfa;
  --surface: #fffdfa;
  --surface-alt: #f0efe9;
  --text: #262622;
  --text-muted: #8b8a80;
  --border: #e6e4da;
  --accent: #5c8a6a;
  --accent-strong: #45704f;
  --accent-contrast: #ffffff;
  --danger: #d1493c;
  --success: #4c9d63;
  --shadow: rgba(30, 30, 20, 0.10);
  --shadow-strong: rgba(30, 30, 20, 0.22);
  --skeleton-base: #ecece0;
  --skeleton-shine: #f8f7f2;

  --font-display: "Manrope", ui-sans-serif, system-ui, sans-serif;
  --font-body: "Inter", ui-sans-serif, system-ui, sans-serif;

  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #0e0f0d;
  --app-bg: #16180f;
  --surface: #1d2018;
  --surface-alt: #262a20;
  --text: #f3f2ec;
  --text-muted: #9a9c8f;
  --border: #33372c;
  --accent: #8fbf9b;
  --accent-strong: #a6d0b0;
  --accent-contrast: #10130f;
  --danger: #e2695c;
  --success: #6bc283;
  --shadow: rgba(0, 0, 0, 0.45);
  --shadow-strong: rgba(0, 0, 0, 0.6);
  --skeleton-base: #23261d;
  --skeleton-shine: #2c3024;

  color-scheme: dark;
}

* { box-sizing: border-box; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-size: 16px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body {
  transition: background-color 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

button, input, textarea {
  font-family: inherit;
  color: inherit;
}

button { cursor: pointer; }

/* =========================================================
   Page root — positioning anchor for sheets/backdrop/toasts
   ========================================================= */
.page-root {
  position: relative;
  height: 100dvh;
  overflow: hidden;
  background: var(--app-bg);
  transition: background-color 0.3s ease;
}

/* ---------- Auth pages: centered card, phone-like on all sizes ---------- */
.device-shell {
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.device {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 100dvh;
  background: var(--app-bg);
  color: var(--text);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
}

@media (min-width: 560px) {
  .device-shell { padding: 40px 20px; }
  .device {
    max-width: 420px;
    min-height: 800px;
    max-height: 860px;
    border-radius: 36px;
    box-shadow: 0 30px 60px var(--shadow-strong), 0 2px 8px var(--shadow);
    border: 1px solid var(--border);
  }
}

/* ---------- Dashboard: sidebar + main panel, full desktop app feel ---------- */
.workspace {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.sidebar {
  display: flex;
  flex-direction: column;
  height: 100%;
  flex: 1;
  min-width: 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-contrast);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.brand-icon svg { width: 19px; height: 19px; }
.brand-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
}

.sidebar-new-btn {
  margin: 4px 16px 12px;
  background: var(--surface-alt);
  color: var(--accent);
  border: none;
  border-radius: 12px;
  padding: 12px;
  font-weight: 700;
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-shrink: 0;
  transition: background-color 0.15s ease;
}
.sidebar-new-btn:hover { background: var(--border); }
.sidebar-new-btn svg { width: 16px; height: 16px; }

.account-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color 0.15s ease;
}
.account-row:hover { background: var(--surface-alt); }
.account-row-text { flex: 1; min-width: 0; }
.account-row-name {
  font-weight: 700;
  font-size: 0.9rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-row-email {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.account-row > svg { width: 16px; height: 16px; color: var(--text-muted); flex-shrink: 0; }

/* ---------- Avatar ---------- */
.avatar {
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.size-sm { width: 34px; height: 34px; font-size: 0.8rem; }
.avatar.size-lg { width: 76px; height: 76px; font-size: 1.6rem; }

/* ---------- Desktop-only editor empty state ---------- */
.editor-empty {
  flex: 1;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-align: center;
  padding: 40px;
}
.editor-empty svg { width: 52px; height: 52px; margin-bottom: 14px; color: var(--border); }
.editor-empty strong { display: block; color: var(--text); font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 4px; }

/* ---------- Utility visibility classes ---------- */
.mobile-only { display: block; }
.desktop-only { display: none; }
button.mobile-only { display: flex; }
button.desktop-only { display: none; }

@media (min-width: 900px) {
  .workspace { flex-direction: row; }
  .sidebar {
    width: 360px;
    flex: none;
    border-right: 1px solid var(--border);
  }
  .mobile-only { display: none !important; }
  .desktop-only { display: flex !important; }
}

/* =========================================================
   Top nav / large title
   ========================================================= */
.app-topbar {
  padding: 18px 20px 8px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-shrink: 0;
}

.app-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: -0.02em;
  margin: 0;
}

.app-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 2px 0 0;
}

/* Theme toggle switch */
.theme-toggle {
  position: relative;
  width: 56px;
  height: 32px;
  border-radius: 999px;
  border: none;
  background: var(--surface-alt);
  padding: 3px;
  flex-shrink: 0;
  margin-top: 4px;
  transition: background-color 0.3s ease;
}

.theme-toggle .icon-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 6px;
  height: 100%;
  color: var(--text-muted);
}

.theme-toggle .icon-row svg { width: 14px; height: 14px; }

.theme-toggle .knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 2px 6px var(--shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.3s ease;
}

.theme-toggle .knob svg { width: 15px; height: 15px; }

html[data-theme="dark"] .theme-toggle .knob {
  transform: translateX(24px);
}

/* =========================================================
   Search bar
   ========================================================= */
.search-wrap {
  padding: 8px 20px 12px;
  flex-shrink: 0;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-alt);
  border-radius: 12px;
  padding: 9px 12px;
  transition: background-color 0.3s ease;
}

.search-bar svg { width: 17px; height: 17px; color: var(--text-muted); flex-shrink: 0; }

.search-bar input {
  border: none;
  background: transparent;
  outline: none;
  font-size: 1rem;
  width: 100%;
  color: var(--text);
}

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

/* =========================================================
   Notes list
   ========================================================= */
.notes-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 4px 12px 100px;
  -webkit-overflow-scrolling: touch;
}

.note-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 10px;
  border-radius: 14px;
  cursor: pointer;
  transition: background-color 0.15s ease;
  animation: rowIn 0.25s ease both;
}

.note-row:hover { background: var(--surface-alt); }
.note-row:active { background: var(--surface-alt); transform: scale(0.995); }

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

.note-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: 6px;
  flex-shrink: 0;
}

.note-row-body { flex: 1; min-width: 0; }

.note-row-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.note-row-preview {
  font-size: 0.86rem;
  color: var(--text-muted);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.note-row-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.note-row-delete {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.note-row-delete:hover { background: rgba(255, 59, 48, 0.1); color: var(--danger); }
.note-row-delete svg { width: 18px; height: 18px; }

/* Empty state */
.empty-state {
  text-align: center;
  padding: 70px 24px 30px;
  color: var(--text-muted);
}
.empty-state svg { width: 46px; height: 46px; margin-bottom: 14px; color: var(--border); }
.empty-state p { margin: 0; font-size: 0.9rem; }
.empty-state strong { display: block; color: var(--text); font-family: var(--font-display); font-size: 1.05rem; margin-bottom: 4px; }

/* Skeletons */
.skeleton-row { display: flex; gap: 12px; padding: 14px 10px; }
.skeleton-dot, .skeleton-line {
  border-radius: 8px;
  background: linear-gradient(100deg, var(--skeleton-base) 30%, var(--skeleton-shine) 50%, var(--skeleton-base) 70%);
  background-size: 200% 100%;
  animation: shimmer 1.3s ease-in-out infinite;
}
.skeleton-dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.skeleton-lines { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.skeleton-line.w70 { width: 70%; height: 12px; }
.skeleton-line.w40 { width: 40%; height: 10px; }
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* =========================================================
   FAB
   ========================================================= */
.fab {
  position: absolute;
  right: 22px;
  bottom: 28px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: var(--accent-contrast);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px rgba(92, 138, 106, 0.4);
  transition: transform 0.15s ease, background-color 0.3s ease;
  z-index: 20;
}
.fab:hover { background: var(--accent-strong); }
.fab:active { transform: scale(0.92); }
.fab svg { width: 24px; height: 24px; }

/* =========================================================
   Bottom sheets (editor + action sheet)
   ========================================================= */
.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  z-index: 30;
}
.sheet-backdrop.open { opacity: 1; pointer-events: auto; }

.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--surface);
  border-radius: 22px 22px 0 0;
  box-shadow: 0 -10px 30px var(--shadow-strong);
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.32, 0.72, 0, 1);
  z-index: 31;
  max-height: 88%;
  display: flex;
  flex-direction: column;
}
.sheet.open { transform: translateY(0); }

.sheet-handle {
  width: 36px;
  height: 5px;
  border-radius: 3px;
  background: var(--border);
  margin: 10px auto 4px;
  flex-shrink: 0;
}

.sheet-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px 12px;
  flex-shrink: 0;
}

.sheet-header-btn {
  background: none;
  border: none;
  font-size: 0.95rem;
  font-weight: 600;
  padding: 6px 4px;
}
.sheet-header-btn.cancel { color: var(--text-muted); }
.sheet-header-btn.save { color: var(--accent); display: flex; align-items: center; gap: 6px; }
.sheet-header-btn:disabled { opacity: 0.5; }

.sheet-body { padding: 4px 20px 24px; overflow-y: auto; }

.sheet-title-input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.4rem;
  padding: 6px 0;
  color: var(--text);
}
.sheet-title-input::placeholder { color: var(--text-muted); }

.sheet-content-input {
  width: 100%;
  min-height: 220px;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  font-size: 1rem;
  line-height: 1.5;
  padding: 6px 0;
  color: var(--text);
}
.sheet-content-input::placeholder { color: var(--text-muted); }

/* Action sheet (delete confirm) */
.action-sheet { padding: 8px 12px 20px; }
.action-sheet-group {
  background: var(--surface-alt);
  border-radius: 14px;
  overflow: hidden;
  margin-bottom: 8px;
}
.action-sheet-btn {
  width: 100%;
  background: none;
  border: none;
  padding: 15px;
  font-size: 1rem;
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  text-align: center;
}
.action-sheet-btn:last-child { border-bottom: none; }
.action-sheet-btn.destructive { color: var(--danger); font-weight: 600; }
.action-sheet-btn.cancel-group {
  background: var(--surface-alt);
  border-radius: 14px;
  font-weight: 700;
}

/* ---------- Desktop: editor becomes a docked panel, other sheets become modals ---------- */
@media (min-width: 900px) {
  .editor-panel.sheet {
    position: relative;
    inset: auto;
    transform: none !important;
    width: auto;
    flex: 1;
    height: 100%;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
    display: flex;
  }
  .editor-panel .sheet-handle { display: none; }
  .editor-panel .sheet-header {
    border-bottom: 1px solid var(--border);
    padding: 18px 32px;
  }
  .editor-panel .sheet-body { padding: 24px 40px; flex: 1; }
  .editor-panel .sheet-title-input { font-size: 1.7rem; }
  .editor-panel .sheet-content-input { min-height: 320px; }

  .modal-sheet.sheet {
    left: 50%;
    right: auto;
    bottom: auto;
    top: 50%;
    width: 420px;
    max-height: 80vh;
    border-radius: 20px;
    transform: translate(-50%, -46%);
    opacity: 0;
    pointer-events: none;
    box-shadow: 0 30px 60px var(--shadow-strong);
    transition: transform 0.25s ease, opacity 0.25s ease;
  }
  .modal-sheet.sheet.open {
    transform: translate(-50%, -50%);
    opacity: 1;
    pointer-events: auto;
  }
  .modal-sheet .sheet-handle { display: none; }
  .modal-sheet.settings-panel { width: 460px; }
}

/* ---------- Account settings sheet ---------- */
.settings-section { margin-bottom: 26px; }
.settings-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.avatar-upload-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.btn-secondary {
  background: var(--surface-alt);
  color: var(--text);
  border: none;
  border-radius: 10px;
  padding: 9px 14px;
  font-size: 0.85rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-secondary:hover { background: var(--border); }

.danger-zone {
  border: 1px solid rgba(255, 59, 48, 0.25);
  background: rgba(255, 59, 48, 0.06);
  border-radius: 14px;
  padding: 16px;
}
.danger-zone p {
  margin: 0 0 12px;
  font-size: 0.84rem;
  color: var(--text-muted);
}
.btn-danger-block {
  width: 100%;
  background: var(--danger);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 12px;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-danger-block:hover { opacity: 0.9; }
.btn-danger-block:disabled { opacity: 0.6; }

.field-input-wrap { position: relative; }
.field-input-wrap .field-input { padding-right: 42px; }
.password-toggle-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  border-radius: 8px;
}
.password-toggle-btn:hover { background: var(--border); }
.password-toggle-btn svg { width: 17px; height: 17px; }

/* =========================================================
   Spinner
   ========================================================= */
.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: currentColor;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
.spinner.dark-on-light { border: 2px solid var(--border); border-top-color: var(--accent); }
@keyframes spin { to { transform: rotate(360deg); } }

/* =========================================================
   Toasts
   ========================================================= */
.toast-stack {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  z-index: 50;
}

.toast {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--text);
  color: var(--app-bg);
  padding: 11px 16px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 500;
  box-shadow: 0 8px 20px var(--shadow-strong);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  max-width: 88%;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast svg { width: 16px; height: 16px; flex-shrink: 0; }
.toast.success svg { color: var(--success); }
.toast.error svg { color: var(--danger); }

/* =========================================================
   Welcome / intro screen
   ========================================================= */
.welcome-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 0 26px;
}

.hero {
  position: relative;
  height: 240px;
  margin: 4px 0 8px;
  overflow: visible;
}

.hero-card {
  position: absolute;
  border-radius: 16px;
  background: var(--accent);
  box-shadow: 0 16px 30px var(--shadow);
  animation: heroDrift 6s ease-in-out infinite;
}
.hero-card.c1 { width: 92px; height: 122px; left: 6%; top: 10px; opacity: 0.18; --r: -14deg; animation-delay: 0s; }
.hero-card.c2 { width: 100px; height: 132px; right: 4%; top: 26px; opacity: 0.28; --r: 11deg; animation-delay: 0.6s; }
.hero-card.c3 { width: 84px; height: 110px; left: 20%; bottom: 6px; opacity: 0.16; --r: 8deg; animation-delay: 1.2s; }

@keyframes heroDrift {
  0%, 100% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50% { transform: translateY(-10px) rotate(var(--r, 0deg)); }
}

.hero-mark {
  position: relative;
  z-index: 2;
  width: 84px;
  height: 84px;
  margin: 18px auto 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-mark svg { width: 100%; height: 100%; filter: drop-shadow(0 10px 18px var(--shadow-strong)); }

.welcome-scroll h1 {
  position: relative;
  z-index: 2;
  text-align: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.9rem;
  letter-spacing: -0.02em;
  margin: 18px 0 10px;
  line-height: 1.15;
}

.welcome-scroll > p.sub {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
  margin: 0 auto 28px;
  max-width: 340px;
}

.feature-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 30px;
}

.feature-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--surface-alt);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.feature-icon svg { width: 20px; height: 20px; }

.feature-text strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.95rem;
  margin-bottom: 2px;
}
.feature-text p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.welcome-actions {
  flex-shrink: 0;
  padding: 12px 26px 28px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-ghost-full {
  width: 100%;
  background: transparent;
  color: var(--text);
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 0.95rem;
  font-weight: 700;
  text-align: center;
}
.btn-ghost-full:hover { background: var(--surface-alt); }

/* =========================================================
   Auth screens
   ========================================================= */
.auth-scroll {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 26px 40px;
}

.auth-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--accent);
  color: var(--accent-contrast);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.auth-icon svg { width: 26px; height: 26px; }

.auth-scroll h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.7rem;
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}

.auth-scroll p.sub {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0 0 26px;
}

.field-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 6px;
  display: block;
}

.field-group { margin-bottom: 16px; }

.field-input {
  width: 100%;
  background: var(--surface-alt);
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 13px 14px;
  font-size: 1rem;
  outline: none;
  transition: border-color 0.15s ease, background-color 0.3s ease;
}
.field-input:focus { border-color: var(--accent); }

.btn-primary {
  width: 100%;
  background: var(--accent);
  color: var(--accent-contrast);
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-size: 0.98rem;
  font-weight: 700;
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background-color 0.2s ease, opacity 0.2s ease;
}
.btn-primary:hover { background: var(--accent-strong); }
.btn-primary:disabled { opacity: 0.7; cursor: default; }

.auth-footer {
  text-align: center;
  margin-top: 22px;
  font-size: 0.88rem;
  color: var(--text-muted);
}
.auth-footer a { color: var(--accent); font-weight: 600; text-decoration: none; }

.inline-error {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 59, 48, 0.1);
  color: var(--danger);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.84rem;
  margin-top: 14px;
  display: none;
}
.inline-error.show { display: flex; }
.inline-error svg { width: 15px; height: 15px; flex-shrink: 0; }
