:root {
  --bg: #000000;
  --panel: #111319;
  --text: #e6e8ee;
  --muted: #9aa3b2;
  --accent: #6aa1ff;
  --accent-weak: #2a66ff1a;
  --danger: #ff6a6a;
  --success: #3cd07e;
}

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

html, body { 
  height: 100%; 
  margin: 0;
  padding: 0px;
}

@font-face {
  font-family: 'Berkeley Mono';
  src: url('./fonts/BerkeleyMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Berkeley Mono';
  src: url('./fonts/BerkeleyMono-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
}

@font-face {
  font-family: 'Berkeley Mono';
  src: url('./fonts/BerkeleyMono-Oblique.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
}

@font-face {
  font-family: 'Berkeley Mono';
  src: url('./fonts/BerkeleyMono-Bold-Oblique.woff2') format('woff2');
  font-weight: 700;
  font-style: italic;
}

body {
  background: var(--bg);
  color: var(--text);
  font-size: 12px;
  line-height: 1.6;
  font-family: "Berkeley Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* removed topbar */

.nav {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  position: fixed;
  right: 2px;
  bottom: 2px;
  z-index: 20;
  background: rgba(0, 0, 0, 0.013);
  backdrop-filter: blur(8px);
  border-radius: 12px;
}

.nav button {
  appearance: none;
  background: #202334;
  color: var(--text);
  border: 1px solid #2a2f45;
  padding: 0px 0px;
  margin: 0px;
  cursor: pointer;
}
.nav button:hover { background: #262a3f; }

.date-label {
  min-width: 0;
  font-family: "Berkeley Mono", monospace;
  text-align: left;
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
  order: 1;
}

.status-pill {
  font-size: 10px;
  padding: 0px 0px;
  border-radius: 6px;
  border: 1px solid #2a2f45;
  background: #1a1d2b;
  color: var(--muted);
}
.status-pill.syncing { color: var(--accent); background: var(--accent-weak); border-color: #2a66ff33; }
.status-pill.saved { color: var(--success); border-color: #1f7a4a; }
.status-pill.offline { color: var(--danger); border-color: #7a1f1f; }



textarea#noteArea {
  width: 100%;
  height: 100%;
  background: transparent;
  color: var(--text);
  border: none;
  outline: none;
  resize: none;
  font: 16px/1.6 "Berkeley Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

textarea[readonly] {
  color: #aab1c2;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  background: #1f2436;
  border: 1px solid #2a2f45;
  color: var(--text);
  padding: 10px 14px;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.25);
}

/* Floating navigation arrows at bottom-right */
#nextBtn {
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  background: transparent;
  transition: none;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  order: 3;
}

#prevBtn {
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  background: transparent;
  transition: none;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  order: 2;
}

#lockBtn {
  width: 20px;
  height: 20px;
  padding: 0;
  border: none;
  background: transparent;
  transition: none;
  border-radius: 8px;
  justify-content: center;
  color: var(--muted);
  order: 4;
  font-size: 10px;
}

/* Hover shows white background with immediate change (no transition) */
#prevBtn:hover, #nextBtn:hover, #lockBtn:hover {
  background: rgba(255, 255, 255, 0.074);
}

/* Status pill positioned as left-most in the group */
.status-pill {
  order: 0;
}

.content {
    height: 100dvh;
    padding: 8px;
  }

.auth-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.auth-form {
  border-radius: 12px;
  padding: 24px;
  width: 100%;
  max-width: 300px;
}

.auth-form h2 {
  color: var(--text);
  margin-bottom: 16px;
  font-size: 16px;
  text-align: center;
}

.auth-form input {
  width: 100%;
  background: var(--bg);
  border: 1px solid #2a2f4500;
  border-radius: 6px;
  padding: 8px 12px;
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 12px;
  text-align: center;
}

.auth-form input:focus {
  outline: none;
  border: none;
  border-color: var(--accent);
}

.auth-form button {
  width: 100%;
  background: var(--accent);
  border: none;
  border-radius: 6px;
  padding: 8px 12px;
  color: white;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
}

.auth-form button:hover {
  background: #5a91ef;
}

.auth-error {
  color: var(--danger);
  font-size: 12px;
  text-align: center;
  margin-top: 8px;
}