:root {
  --ink: #1c2b3a;
  --ink-soft: rgba(28, 43, 58, .22);
  --ink-line: rgba(28, 43, 58, .12);
  --paper: #f2ead4;
  --paper-card: #fdfaf0;
  --cover: #e6dcc0;
  --muted: #7a6f57;
  --accent: #b23a2e;
  --ok: #4f6b3a;
  --amber: #b0731a;
  --indigo: #2c4263;
  --lavender: #6b436b;
  --text-soft: #3a3020;
  --text-dark: #241d15;
  --header-h: 60px;
  --sidebar-w: 320px;
  --font-mono: 'Spline Sans Mono', ui-monospace, monospace;
  --font-hand: 'Caveat', cursive;
  --font-serif: 'EB Garamond', serif;
  --font-title: 'Unbounded', sans-serif;
  --font-badge: 'Fragment Mono', monospace;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
  background: var(--cover);
  color: var(--text-dark);
  font-family: var(--font-mono);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}
::-webkit-scrollbar-track {
  background: rgba(28, 43, 58, 0.04);
}
::-webkit-scrollbar-thumb {
  background: var(--ink-soft);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--ink);
}

/* ============================================================
   1. LOGIN SCREEN (Matching tahablt.net/admin %100)
   ============================================================ */

.admin-shell {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 32px 16px;
  background: var(--cover);
}

.admin-shell--center {
  justify-content: center;
}

.login-card {
  width: 420px;
  max-width: 100%;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, .2);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, .4);
  background: var(--cover);
}

.login-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 26px;
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
}

.login-brand {
  font-family: 'Caveat', cursive;
  font-weight: 700;
  font-size: 22px;
  color: var(--ink);
}

.login-tag {
  font-family: 'Fragment Mono', monospace;
  font-size: 9px;
  letter-spacing: .16em;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 3px 8px;
  border-radius: 2px;
}

.login-body {
  padding: 30px 32px 32px;
  background: var(--paper);
  background-image: radial-gradient(rgba(28, 43, 58, .04) 1px, transparent 1px);
  background-size: 5px 5px;
}

.nb-eyebrow {
  font-family: 'Fragment Mono', monospace;
  font-size: 10px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.login-title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 900;
  font-size: 38px;
  letter-spacing: -.02em;
  margin: 6px 0 20px;
  color: var(--ink);
}

.admin-form .field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}

.admin-form label {
  font-family: 'Fragment Mono', monospace;
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
}

.admin-form input[type="text"],
.admin-form input[type="password"] {
  width: 100%;
  font-family: var(--font-mono);
  font-size: 14px;
  padding: 10px 12px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  color: var(--ink);
  outline: none;
  border-radius: 2px;
}
.admin-form input[type="text"]:focus,
.admin-form input[type="password"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(178, 58, 46, 0.15);
}

.login-actions {
  display: flex;
  margin-top: 20px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'Fragment Mono', monospace;
  font-size: 12px;
  padding: 11px 20px;
  border-radius: 2px;
  border: 1.5px solid var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
  user-select: none;
  font-weight: 600;
}
.btn--ink {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
  width: 100%;
}
.btn--ink:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.login-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 26px;
  background: var(--paper);
  border-top: 1px dashed rgba(28, 43, 58, .3);
  font-family: 'Fragment Mono', monospace;
  font-size: 10px;
  color: var(--muted);
}
.login-foot a {
  color: var(--muted);
  text-decoration: none;
}
.login-foot a:hover {
  color: var(--accent);
}

.flash {
  padding: 10px 14px;
  border-radius: 3px;
  font-family: 'Fragment Mono', monospace;
  font-size: 11px;
  margin-bottom: 16px;
}
.flash--error {
  background: #fbeae8;
  border: 1px solid var(--accent);
  color: var(--accent);
}

/* ============================================================
   2. MAIN APP SHELL & HEADER (PERFECT SIDEBAR ALIGNMENT)
   ============================================================ */

.app-shell {
  height: 100dvh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--cover);
}

/* Header */
.app-header {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0;
  background: var(--cover);
  border-bottom: 2px solid var(--ink);
  z-index: 40;
  flex-shrink: 0;
}

/* Header Left: Exactly 320px matching sidebar width, centered, with seamless right border */
.header-left {
  width: var(--sidebar-w);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border-right: 2px solid var(--ink);
  background: #ebe0c4;
  flex-shrink: 0;
}

/* Header Notify Area: Placed on the leftmost side of the right header area (before reaching brand, left top area) */
.header-notify-area {
  flex: 1;
  display: flex;
  align-items: center;
  padding-left: 18px;
  min-width: 0;
  height: 100%;
}

.header-toast-msg {
  display: none;
  align-items: center;
  gap: 7px;
  background: var(--ink);
  color: var(--paper);
  padding: 5px 13px;
  font-family: var(--font-badge);
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 2px;
  border: 1.5px solid var(--ink);
  box-shadow: 2px 2px 0 rgba(0, 0, 0, 0.25);
  animation: notifySlideIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: none;
}

.header-toast-msg.is-fading-out {
  animation: notifySlideOut 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes notifySlideIn {
  0% {
    opacity: 0;
    transform: translateX(-10px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes notifySlideOut {
  0% {
    opacity: 1;
    transform: translateX(0);
  }
  100% {
    opacity: 0;
    transform: translateX(-10px);
  }
}

.brand-island {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 5px 16px;
  background: var(--paper);
  background-image: radial-gradient(rgba(28, 43, 58, .04) 1px, transparent 1px);
  background-size: 5px 5px;
  border: 2px solid var(--ink);
  cursor: pointer;
  text-decoration: none;
  box-shadow: 2px 2px 0 var(--ink);
  transition: all 0.15s ease;
}
.brand-island:hover {
  transform: translateY(-1px);
  box-shadow: 3px 3px 0 var(--ink);
}

.brand-title {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 23px;
  color: var(--ink);
  white-space: nowrap;
}
.brand-title em {
  font-style: normal;
  color: var(--accent);
}

.brand-badge {
  font-family: var(--font-badge);
  font-size: 10.5px;
  color: var(--muted);
  border: 1px solid var(--muted);
  padding: 2px 6px;
  border-radius: 2px;
  white-space: nowrap;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-right: 16px;
}

/* Button & Action Island Styles */
.island-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-badge);
  font-size: 11.5px;
  font-weight: 600;
  padding: 6px 13px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  color: var(--ink);
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
  user-select: none;
  border-radius: 2px;
  box-shadow: 1.5px 1.5px 0 var(--ink);
}
.island-btn:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-1px);
  box-shadow: 2px 2px 0 var(--ink);
}
.island-btn:active {
  transform: translateY(0);
  box-shadow: 1px 1px 0 var(--ink);
}
.island-btn--primary {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.island-btn--primary:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.island-btn--icon-only {
  padding: 6px 10px;
  font-size: 13px;
}

/* Main Container Area */
.app-main {
  flex: 1;
  display: flex;
  height: calc(100dvh - var(--header-h));
  overflow: hidden;
  position: relative;
}

/* Sidebar (Clean list of all notes) */
.app-sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  height: 100%;
  background: #ebe0c4;
  border-right: 2px solid var(--ink);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 20;
}

.sidebar-search-bar {
  padding: 10px 12px;
  background: #e4d8bc;
  border-bottom: 1.5px solid var(--ink);
  display: flex;
  align-items: center;
  gap: 8px;
}

.search-box {
  width: 100%;
  display: flex;
  align-items: center;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  padding: 5px 10px;
  gap: 6px;
  box-shadow: 1px 1px 0 rgba(28, 43, 58, 0.2);
}
.search-icon {
  color: var(--muted);
  font-size: 13px;
}
.search-input {
  border: none;
  outline: none;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink);
  width: 100%;
}
.search-clear {
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  display: none;
  padding: 0;
}
.search-clear.visible {
  display: block;
}

.sidebar-header-info {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 12px;
  background: rgba(28, 43, 58, 0.04);
  border-bottom: 1px solid var(--ink-line);
  font-family: var(--font-badge);
  font-size: 10.5px;
  color: var(--muted);
}

.sidebar-notes-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.note-card {
  background: var(--paper);
  background-image: radial-gradient(rgba(28, 43, 58, .03) 1px, transparent 1px);
  background-size: 5px 5px;
  border: 1.5px solid var(--ink-line);
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.note-card:hover {
  border-color: var(--ink);
  transform: translateY(-1px);
  box-shadow: 2px 2px 0 var(--ink);
}
.note-card.is-active {
  border-color: var(--ink);
  border-left: 4px solid var(--ink);
  background: #fdfaf0;
  box-shadow: 2px 2px 0 var(--ink);
}

.note-card[data-color="accent"] { border-left: 4px solid var(--accent); }
.note-card[data-color="olive"] { border-left: 4px solid var(--ok); }
.note-card[data-color="amber"] { border-left: 4px solid var(--amber); }
.note-card[data-color="indigo"] { border-left: 4px solid var(--indigo); }
.note-card[data-color="lavender"] { border-left: 4px solid var(--lavender); }
.note-card[data-color="ink"] { border-left: 4px solid var(--ink); }

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.card-title {
  font-family: var(--font-title);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.card-pin-badge {
  color: var(--accent);
  font-size: 11px;
}

.card-snippet {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-soft);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.4;
}

.card-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-top: 2px;
}

.card-date {
  font-family: var(--font-badge);
  font-size: 10px;
  color: var(--muted);
}

.empty-list-notice {
  text-align: center;
  padding: 30px 16px;
  color: var(--muted);
  font-family: var(--font-serif);
  font-size: 15px;
  font-style: italic;
}

/* Desk / Workspace Area */
.app-desk {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--cover);
  background-image: radial-gradient(rgba(28, 43, 58, .04) 1px, transparent 1px);
  background-size: 6px 6px;
  padding: 12px clamp(10px, 2vw, 24px);
}

/* The Notebook Sheet Card */
.notebook-sheet {
  flex: 1;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.25), 4px 4px 0 var(--ink);
  overflow: hidden;
  position: relative;
  transition: all 0.2s ease;
}

/* Paper Background Styles */
.notebook-sheet.paper--plain {
  background: var(--paper);
}
.notebook-sheet.paper--grid {
  background: var(--paper);
  background-image: radial-gradient(rgba(28, 43, 58, .06) 1px, transparent 1px);
  background-size: 16px 16px;
}
.notebook-sheet.paper--ruled {
  background: var(--paper);
  background-image: repeating-linear-gradient(transparent, transparent 27px, rgba(28, 43, 58, 0.12) 28px);
  background-attachment: local;
}
.notebook-sheet.paper--yellow {
  background: #fdf3c6;
  background-image: repeating-linear-gradient(transparent, transparent 27px, rgba(160, 110, 40, 0.15) 28px);
  background-attachment: local;
}

/* ============================================================
   3. MINIMAL & SLEEK SINGLE-ROW TOOLBAR
   ============================================================ */

.sheet-toolbar {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 12px;
  background: #fbf6ea;
  border-bottom: 2px solid var(--ink);
  gap: 8px;
  flex-wrap: nowrap;
  flex-shrink: 0;
  overflow-x: auto;
  user-select: none;
}

.toolbar-left, .toolbar-right {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.toolbar-divider {
  width: 1px;
  height: 20px;
  background: var(--ink-line);
  margin: 0 3px;
  flex-shrink: 0;
}

/* Mode Switcher (Düzenle / Görüntüle) Compact Segment */
.view-segment {
  display: inline-flex;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  border-radius: 2px;
  overflow: hidden;
  box-shadow: 1px 1px 0 rgba(28, 43, 58, 0.2);
}

.segment-btn {
  height: 28px;
  padding: 0 10px;
  font-family: var(--font-badge);
  font-size: 11px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s ease;
}
.segment-btn:hover {
  color: var(--ink);
  background: rgba(28, 43, 58, 0.06);
}
.segment-btn.is-active {
  background: var(--ink);
  color: var(--paper);
}

/* Minimal Icon-Only Formatting Buttons */
.fmt-group {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-shrink: 0;
}

.fmt-btn {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  color: var(--ink);
  font-family: var(--font-badge);
  font-size: 12px;
  font-weight: 700;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.12s ease;
  box-shadow: 1px 1px 0 rgba(28, 43, 58, 0.18);
}
.fmt-btn:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-1px);
  box-shadow: 1.5px 2px 0 var(--ink);
}
.fmt-btn:active {
  transform: translateY(0);
  box-shadow: 1px 1px 0 var(--ink);
}
.fmt-btn--icon-b { font-weight: 900; font-size: 13px; font-family: var(--font-title); }
.fmt-btn--icon-i { font-style: italic; font-family: var(--font-serif); font-size: 14.5px; }
.fmt-btn--icon-h { font-family: var(--font-title); font-size: 11px; font-weight: 800; }
.fmt-btn--danger {
  border-color: var(--accent);
  color: var(--accent);
}
.fmt-btn--danger:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* Color picker pills */
.color-picker {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 3px 5px;
  background: rgba(28, 43, 58, 0.05);
  border: 1px solid var(--ink-line);
  border-radius: 12px;
  flex-shrink: 0;
}
.color-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: transform 0.15s;
}
.color-dot:hover {
  transform: scale(1.3);
}
.color-dot.is-active {
  border-color: var(--ink);
  transform: scale(1.3);
}
.color-dot--ink { background: var(--ink); }
.color-dot--accent { background: var(--accent); }
.color-dot--olive { background: var(--ok); }
.color-dot--amber { background: var(--amber); }
.color-dot--indigo { background: var(--indigo); }
.color-dot--lavender { background: var(--lavender); }

.save-indicator {
  font-family: var(--font-badge);
  font-size: 10.5px;
  color: var(--ok);
  display: flex;
  align-items: center;
  gap: 4px;
  margin-right: 4px;
  font-weight: 600;
  white-space: nowrap;
}
.save-indicator.is-saving {
  color: var(--amber);
}

/* Notebook Content Area */
.sheet-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.note-title-wrap {
  padding: 14px 24px 8px;
  border-bottom: 1.5px solid var(--ink-line);
}
.note-title-input {
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  font-family: var(--font-title);
  font-size: clamp(20px, 2.8vw, 26px);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
}
.note-title-input::placeholder {
  color: rgba(28, 43, 58, 0.35);
}

.note-title-view {
  font-family: var(--font-title);
  font-size: clamp(20px, 2.8vw, 26px);
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -0.02em;
  margin: 0;
  padding: 0;
}

.editor-panes {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* Textarea Editor Pane */
.editor-pane {
  flex: 1;
  height: 100%;
  display: flex;
  overflow: hidden;
  padding: 14px 24px;
}

.note-textarea {
  width: 100%;
  height: 100%;
  border: none;
  outline: none;
  resize: none;
  background: transparent;
  color: var(--text-dark);
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 28px;
  letter-spacing: 0;
}

/* Rendered Preview Pane (Görüntüle Mode) */
.preview-pane {
  flex: 1;
  height: 100%;
  overflow-y: auto;
  padding: 14px 24px;
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-dark);
}

.preview-pane h1, .preview-pane h2, .preview-pane h3 {
  font-family: var(--font-title);
  color: var(--ink);
  margin: 18px 0 8px;
  line-height: 1.3;
}
.preview-pane h1 { font-size: 22px; border-bottom: 2px solid var(--ink); padding-bottom: 4px; }
.preview-pane h2 { font-size: 18px; border-bottom: 1.5px dashed var(--ink-line); padding-bottom: 3px; }
.preview-pane h3 { font-size: 15px; }
.preview-pane p { margin: 8px 0; }
.preview-pane blockquote {
  margin: 12px 0;
  padding: 8px 14px;
  background: rgba(28, 43, 58, 0.04);
  border-left: 3.5px solid var(--accent);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 16px;
}
.preview-pane pre {
  background: #201a14;
  color: #f2ead4;
  padding: 12px 14px;
  border-radius: 4px;
  overflow-x: auto;
  font-family: 'Fragment Mono', monospace;
  font-size: 12px;
  line-height: 1.5;
  margin: 12px 0;
  position: relative;
  border: 1px solid var(--ink);
}
.preview-pane code {
  background: rgba(28, 43, 58, 0.08);
  padding: 2px 5px;
  border-radius: 2px;
  font-family: 'Fragment Mono', monospace;
  font-size: 12.5px;
}
.preview-pane pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}
.preview-pane ul, .preview-pane ol {
  padding-left: 22px;
  margin: 8px 0;
}
.preview-pane li { margin: 4px 0; }
.preview-pane hr {
  border: none;
  border-top: 1.5px dashed var(--ink-line);
  margin: 18px 0;
}

/* Interactive Checkboxes in Preview */
.preview-task {
  list-style-type: none;
  margin-left: -20px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
}
.preview-task input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--ink);
  cursor: pointer;
}
.preview-task.task-done {
  text-decoration: line-through;
  color: var(--muted);
}

/* Sheet Footer Status Bar */
.sheet-statusbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 20px;
  background: rgba(28, 43, 58, 0.04);
  border-top: 1.5px solid var(--ink);
  font-family: var(--font-badge);
  font-size: 10.5px;
  color: var(--muted);
  flex-wrap: wrap;
  gap: 8px;
  flex-shrink: 0;
}

.statusbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.statusbar-sep {
  color: var(--ink-line);
  opacity: 0.5;
  margin: 0 2px;
}

.status-paper-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-family: var(--font-badge);
  font-size: 11px;
  cursor: pointer;
}

.statusbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-select {
  font-family: var(--font-badge);
  font-size: 11px;
  background: var(--paper);
  border: 1.5px solid var(--ink);
  color: var(--ink);
  outline: none;
  padding: 2px 7px;
  border-radius: 2px;
  cursor: pointer;
  box-shadow: 1px 1px 0 var(--ink);
  transition: all 0.15s ease;
}
.status-select:hover {
  border-color: var(--accent);
}

/* Sticky Scratchpad (Floating Note) */
.scratchpad-widget {
  position: fixed;
  bottom: 16px;
  right: 20px;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.scratchpad-toggle-btn {
  background: #fff4b8;
  border: 1.5px solid var(--ink);
  box-shadow: 2px 2px 0 var(--ink);
  padding: 6px 12px;
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transform: rotate(-1deg);
  transition: transform 0.15s;
}
.scratchpad-toggle-btn:hover {
  transform: rotate(0deg) scale(1.04);
}

.scratchpad-panel {
  display: none;
  width: 320px;
  height: 240px;
  background: #fff4b8;
  border: 2px solid var(--ink);
  box-shadow: 4px 4px 0 var(--ink);
  margin-bottom: 8px;
  flex-direction: column;
  padding: 10px;
  position: relative;
}
.scratchpad-panel.is-open {
  display: flex;
}

.scratchpad-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 6px;
  border-bottom: 1px dashed rgba(28, 43, 58, 0.2);
}
.scratchpad-title {
  font-family: var(--font-hand);
  font-weight: 700;
  font-size: 18px;
  color: var(--ink);
}

.scratchpad-textarea {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  resize: none;
  font-family: var(--font-hand);
  font-size: 17px;
  line-height: 1.4;
  color: var(--ink);
  padding: 6px 0;
}

.scratchpad-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 4px;
}

/* Modals */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(28, 43, 58, 0.45);
  backdrop-filter: blur(2px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.modal-backdrop.is-open {
  display: flex;
}

.modal-box {
  background: var(--paper);
  border: 2px solid var(--ink);
  box-shadow: 6px 6px 0 var(--ink);
  max-width: 520px;
  width: 100%;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.modal-title {
  font-family: var(--font-title);
  font-size: 18px;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
}

.shortcuts-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.shortcuts-table tr {
  border-bottom: 1px dashed var(--ink-line);
}
.shortcuts-table td {
  padding: 6px 0;
}
.shortcuts-table td:last-child {
  text-align: right;
  font-family: var(--font-badge);
  font-weight: 600;
}
.kbd {
  background: var(--ink);
  color: var(--paper);
  padding: 2px 6px;
  border-radius: 2px;
  font-family: var(--font-badge);
  font-size: 11px;
}

/* Zen / Focus Fullscreen Mode */
.app-shell.is-zen .app-header,
.app-shell.is-zen .app-sidebar,
.app-shell.is-zen .scratchpad-widget {
  display: none !important;
}
.app-shell.is-zen .app-desk {
  padding: 0;
}
.app-shell.is-zen .notebook-sheet {
  border: none;
  box-shadow: none;
}
