/*
  GFS Task Manager — base stylesheet
  Dark mode only — adapted from the sibling GFS Acct app's core.css + dark.css,
  merged into a single set of :root variables (dark values baked in directly,
  no light/dark toggle needed). Follow the same rule as the source app: use
  these semantic variables instead of hard-coded colors in page/feature CSS.
  Propose a new variable here rather than hardcoding a one-off color.
*/

@font-face {
  font-family: 'Roboto Condensed';
  src: url('../fonts/RobotoCondensed-VariableFont_wght.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Roboto Condensed';
  src: url('../fonts/RobotoCondensed-Italic-VariableFont_wght.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --base-font-family:
    'Roboto Condensed', 'Roboto', 'Arial Narrow', 'DejaVu Sans',
    'Liberation Sans', 'Segoe UI', Arial, sans-serif;

  /* === App-level colors === */
  --app-bg: #1f2937;
  --app-text: #e6eef8;

  /* === Form elements === */
  --input-bg: #0b0f17;
  --input-text: #e6eef8;
  --input-border: #242c59;
  --input-error-bg: #3d1a1a;
  --input-placeholder-text: #94a3b8;

  /* === Buttons (semantic) === */
  --button-bg: #182a46;
  --button-text: #e6eef8;
  --button-border: #3e4c77;
  --button-hover-bg: #0f1f35;

  --button-red: #b92121;
  --button-red-text: #ffffff;
  --button-red-hover: #a81d1d;
  --button-green: #008230;
  --button-green-text: #ffffff;
  --button-green-hover: #006422;
  --button-blue: #0e36ae;
  --button-blue-text: #ffffff;
  --button-blue-hover: #0b2d92;
  --modal-button-hover-bg: #0f1f35;

  /* === Links === */
  --link-text: #60a5fa;
  --link-hover-text: #93c5fd;
  --link-visited-text: #60a5fa;

  /* === Sections / Surfaces === */
  --card-bg: #0f182b;
  --section-bg: #0f182b;
  --section-border: #374151;
  --section-secondary-bg: #070e22;
  --section-secondary-border: #1b2f4f;
  --shadow-elev-1: #0f0f0f;

  /* === Modal-specific === */
  --modal-header-bg: #1a252f;
  --modal-content-bg: #131c2d;

  /* === Spinner === */
  --spinner-bg: #1e264d;
  --spinner-indicator: #00ff88;

  /* === Toast shadows === */
  --toast-shadow-1: #0f0f0f;
  --toast-shadow-2: #080808;

  /* === Tooltip === */
  --tooltip-bg: #1a202c;
  --tooltip-text: #e6eef8;
  --tooltip-border: #2d3748;
  --tooltip-interactive-border: #757575;
  --tooltip-shadow: #000000;

  /* === Generic color palette === */
  --color-green: #22c55e;
  --color-blue: #60a5fa;
  --color-yellow: #fffc53;
  --color-red: #f87171;
  --color-pink: #f472b6;
  --color-purple: #c084fc;
  --color-orange: #fb923c;
  --color-muted: #acacac;

  /* === Horizontal rule === */
  --hr-color: #374151;

  /* === App-specific: per-user customizable colors (see Settings) ===
     Defaults match the matching user_settings columns. Pages set these via
     JS from the logged-in user's settings row (board.js's
     applyUserSettingsToPage()), not by editing this file. Dedicated
     --list-bg-color/--task-bg-color (rather than reusing --card-bg/
     --section-bg) so a user customizing their board doesn't also re-theme
     modals and other unrelated card-bg-using UI. */
  --list-title-color: #5eead4;
  --task-title-color: #e4e5ff;
  --list-bg-color: #192544;
  --task-bg-color: #131d31;
  --accent-color: #3b82f6;
  --list-header-font-size: 20px;
  --task-font-size: 20px;

  /* Avatar circle background (login name-picker tiles, shared-task assignee
     chips). Was a per-user setting (users.avatar_color); removed from
     Settings for now as not worth the customization surface — hardcoded to
     a dark neutral gray instead. The DB column is left in place in case this
     gets revisited later, just unused for the moment. */
  --avatar-bg-color: #334155;
}

html, body {
  height: 100%;
}

body {
  margin: 5px;
  font-family: var(--base-font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: var(--app-text);
  background: var(--app-bg);
}

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

/* === Sensible defaults for form elements === */
input, button, textarea, select {
  font-family: inherit;
  background: var(--input-bg);
  color: var(--input-text);
  border: 1px solid var(--input-border);
  border-radius: 4px;
}

/* Baseline padding so no input/select is ever accidentally left with none —
   deliberately low-specificity (bare element selectors) so every existing
   page/component-specific padding rule (e.g. .auth-form input, .settings-page
   input[type="text"]) still wins over this and is unaffected. Buttons are
   excluded — they already get padding from .btn/.btn-red/.btn-green/.btn-blue
   or their own component rule for icon-only buttons. */
input, textarea, select {
  padding: 6px 8px;
}

/* Dropdown text must stay legible at a glance — 18px floor, low-specificity
   so a more specific rule can still go bigger, just never smaller. */
select {
  font-size: 18px;
}

/* Padding renders inconsistently on native checkbox/radio controls across
   browsers instead of just adding breathing room, so they opt back out. */
input[type="checkbox"], input[type="radio"] {
  padding: 0;
}

input::placeholder, textarea::placeholder {
  color: var(--input-placeholder-text);
}

button {
  background: var(--button-bg);
  color: var(--button-text);
  border: 1px solid var(--button-border);
  cursor: pointer;
}

button:hover {
  background: var(--button-hover-bg);
}

button:disabled {
  background-color: #cccccc;
  color: #666666;
  cursor: not-allowed;
  opacity: 0.6;
  border-color: #999;
}

button:disabled:hover {
  background-color: #cccccc;
}

a {
  color: var(--link-text);
  text-decoration: none;
  transition: color 150ms ease;
}

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

a:visited {
  color: var(--link-visited-text);
}

a:visited:hover,
a:active {
  color: var(--link-hover-text);
}

/* !important is deliberate: this is a hard-override utility class, and without
   it any other single-class rule that sets `display` on the same element
   (e.g. .login-pin-step) wins the tie on source order alone — silently
   defeating the hide. Bit us for real: login.css loads after base.css, so
   .login-pin-step's `display: flex` was beating .hidden's `display: none`,
   showing every login step at once instead of just the active one. */
.hidden {
  display: none !important;
}

/* Forces the "grabbing" cursor across the whole page during an active drag
   (js/drag-drop.js and js/board-canvas.js both toggle this on <body>).
   !important is required here too: cursor is inherited, and a descendant's
   own explicit `cursor` (list/task headers' `grab`, task cards' `pointer`,
   etc.) always wins over an inherited value no matter how it was set —
   setting body.style.cursor alone never actually showed while hovering any
   of those, which is why "grabbing" looked like it didn't exist. */
body.is-dragging,
body.is-dragging * {
  cursor: grabbing !important;
}

textarea {
  display: block;
  width: 100%;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 14px;
  line-height: 1.5;
  resize: vertical;
}

/* === Typography / alignment utility classes === */
.bold { font-weight: 700; }
.semibold { font-weight: 600; }
.underline { text-decoration: underline; }
.italic { font-style: italic; }

.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

.small { font-size: 14px; }
.medium { font-size: 16px; }
.large { font-size: 18px; }
.xlarge { font-size: 20px; }

.green { color: var(--color-green) !important; }
.blue { color: var(--color-blue) !important; }
.yellow { color: var(--color-yellow) !important; }
.red { color: var(--color-red) !important; }
.pink { color: var(--color-pink) !important; }
.purple { color: var(--color-purple) !important; }
.orange { color: var(--color-orange) !important; }
.default-text-color { color: var(--app-text) !important; }
.muted { color: var(--color-muted) !important; }

/* === Layout utilities (for dynamically-built modal content in board.js/
   tasks.js/settings.js — kept few and generic rather than a full utility
   framework, since the rest of the app's CSS is semantic/component-scoped) === */
.field-full { width: 100%; }
.field-narrow { width: 100px; }
.field-gap { margin-bottom: 10px; }
.row-flex { display: flex; align-items: center; gap: 8px; }
.label-inline { margin: 0; }
.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list--gap { margin-bottom: 14px; }
.plain-list__row { display: flex; align-items: center; gap: 8px; padding: 4px 0; }
.hr-tight { margin: 10px 0; }
.hr-spaced { margin: 24px 0; }

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: normal;
}

.btn-red, .btn-green, .btn-blue {
  display: inline-block;
  padding: 5px 8px;
  border-radius: 6px;
  text-decoration: none;
  font-weight: normal;
  border: 1px solid transparent;
}

.btn-small {
  padding: 3px 6px;
  font-size: 13px;
}

button.btn-red { background-color: var(--button-red); color: var(--button-red-text); }
button.btn-red:hover { background-color: var(--button-red-hover); }
button.btn-green { background-color: var(--button-green); color: var(--button-green-text); }
button.btn-green:hover { background-color: var(--button-green-hover); }
button.btn-blue { background-color: var(--button-blue); color: var(--button-blue-text); }
button.btn-blue:hover { background-color: var(--button-blue-hover); }

/* === Info blocks (contextual help icon — do not include the icon in markup) === */
.info-block::before {
  content: "ℹ️";
  font-size: 14px;
  display: inline-block;
  line-height: 1;
  margin: 0 2px;
  cursor: help;
}

/* === Emoji button (list/task icon picker trigger) === */
.emoji-button {
  font-size: 16px;
  cursor: pointer;
  text-decoration: none;
}

.emoji-button:hover {
  text-decoration: none;
}

hr {
  border: none;
  border-top: 1px solid var(--hr-color);
  margin: 0;
  padding: 0;
  width: 100%;
}

/* === Forms: radio / checkbox option wrappers === */
.radio-options, .checkbox-options {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.radio-option, .checkbox-option {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  cursor: pointer;
}

.radio-option.input-error, .checkbox-option.input-error {
  padding: 3px;
  border: 1px solid var(--color-red) !important;
  border-radius: 4px;
}

/* === Input error states === */
.input-error {
  border-color: var(--color-red) !important;
  background-color: var(--input-error-bg) !important;
}

/* ===========================================================================
   Toast notifications
   =========================================================================== */
#toast-container {
  position: fixed;
  right: 16px;
  bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 10001;
}

.toast {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 260px;
  max-width: 420px;
  padding: 16px 14px 12px 14px;
  border-radius: 8px;
  color: #fff;
  box-shadow: 0 8px 20px var(--toast-shadow-1), 0 2px 6px var(--toast-shadow-2);
  transform: translateY(0);
  opacity: 1;
  animation: toast-in 220ms ease-out;
}

.toast.enter { animation: toast-in 220ms ease-out; }
.toast.exit { animation: toast-out 180ms ease-in forwards; }

.toast__icon { font-size: 18px; line-height: 1; }
.toast__message { flex: 1; white-space: pre-line; }
.toast__close {
  position: absolute;
  top: -3px;
  right: 3px;
  appearance: none;
  border: none;
  background: transparent;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  padding: 0 2px;
  cursor: pointer;
}

button.toast__close:hover {
  color: #d1d1d1;
  background: transparent !important;
}

.toast__close:focus { outline: 2px solid #bfbfbf; outline-offset: 2px; }

.toast--success { background: #0f7a39; }
.toast--error { background: #9b1c25; }
.toast--info { background: #1f4fbf; }

@keyframes toast-in {
  from { transform: translateY(12px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes toast-out {
  from { transform: translateY(0); opacity: 1; }
  to { transform: translateY(12px); opacity: 0; }
}

/* ===========================================================================
   Modal system
   =========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  transition: opacity 200ms ease-in-out;
}

.modal-overlay--visible {
  opacity: 1;
}

.modal {
  background: var(--card-bg);
  color: var(--app-text);
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  max-width: 90vw;
  max-height: 90vh;
  overflow: hidden;
  transform: scale(0.9);
  transition: transform 200ms ease-in-out;
}

.modal-overlay--visible .modal {
  transform: scale(1);
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 16px;
  border-bottom: 1px solid var(--input-border);
  background: var(--modal-header-bg);
}

.modal__header--minimal {
  justify-content: center;
  border-bottom: none;
}

.modal__title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: var(--app-text);
}

.modal-paragraph {
  font-size: 14px;
}

.modal__close {
  background: transparent;
  border: none;
  color: var(--app-text);
  font-size: 24px;
  line-height: 1;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 4px;
  transition: background 150ms ease;
}

.modal__close:focus {
  outline: 2px solid var(--color-blue);
  outline-offset: 2px;
}

.modal__close:hover {
  background: transparent !important;
}

.modal__content {
  padding: 20px;
  overflow-y: auto;
  flex: 1;
  background: var(--modal-content-bg);
  line-height: 26px;
  font-size: 18px;
}

.modal__content label:has(+ input, + select) {
  margin-right: 15px;
}

.modal__loader, .modal__error {
  text-align: center;
  padding: 40px 20px;
  color: var(--color-muted);
}

.modal__error {
  color: var(--color-red);
}

.modal__footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 7px 16px;
  border-top: 1px solid var(--input-border);
  background: var(--modal-header-bg);
}

.modal__button {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: all 150ms ease;
  border: 1px solid var(--button-border);
  background: var(--button-bg);
  color: var(--button-text);
}

.modal__button:hover {
  background: var(--modal-button-hover-bg);
}

.modal__button--primary {
  background: var(--button-blue);
  color: #ffffff;
  border-color: var(--button-border);
}

.modal__button--primary:hover {
  background: var(--button-blue-hover);
  border-color: var(--button-blue-hover);
}

.modal__button--danger {
  background: var(--button-red);
  color: #ffffff;
  border-color: var(--button-border);
}

.modal__button--danger:hover {
  background: var(--button-red-hover);
  border-color: var(--button-border);
}

.modal__button--cancel {
  border-color: var(--input-border);
  color: var(--app-text);
}

.modal__button--cancel:hover {
  background: var(--modal-button-hover-bg);
}

.modal--minimal .modal__content {
  text-align: center;
  padding: 30px;
}

.modal-validation-list {
  margin: 8px 0 0;
  padding-left: 20px;
}

/* ===========================================================================
   Loading spinners
   =========================================================================== */
.spinner {
  display: inline-block;
  border: 3px solid var(--spinner-bg);
  border-top-color: var(--spinner-indicator);
  border-radius: 50%;
  animation: spinner-rotate 0.8s linear infinite;
}

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

.spinner-small {
  display: inline-block;
  width: 16px; height: 16px;
  border: 2px solid var(--spinner-bg);
  border-top-color: var(--spinner-indicator);
  border-radius: 50%;
  animation: spinner-rotate 0.8s linear infinite;
  vertical-align: middle;
}

.spinner-medium {
  display: inline-block;
  width: 24px; height: 24px;
  border: 3px solid var(--spinner-bg);
  border-top-color: var(--spinner-indicator);
  border-radius: 50%;
  animation: spinner-rotate 0.8s linear infinite;
  vertical-align: middle;
}

.spinner-large {
  display: inline-block;
  width: 48px; height: 48px;
  border: 4px solid var(--spinner-bg);
  border-top-color: var(--spinner-indicator);
  border-radius: 50%;
  animation: spinner-rotate 0.8s linear infinite;
  vertical-align: middle;
}

.spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 20px;
  min-height: 100px;
}

.spinner-container p {
  color: var(--app-text);
  font-size: 0.9em;
  margin: 0;
}

/* ===========================================================================
   Tooltip system
   =========================================================================== */
#tooltip-container {
  position: fixed;
  top: 0; left: 0;
  z-index: 10002;
  pointer-events: none;
}

.tooltip {
  position: fixed;
  pointer-events: auto;
  background-color: var(--tooltip-bg);
  color: var(--tooltip-text);
  border: 1px solid var(--tooltip-border);
  border-radius: 6px;
  box-shadow: 0 4px 12px var(--tooltip-shadow);
  z-index: 10002;
}

.tooltip--default {
  max-width: 350px;
  padding: 8px 12px;
  font-size: 15px;
  animation: tooltip-fade-in 200ms ease-out;
  display: flex;
  white-space: normal;
}

.tooltip--default .tooltip__content {
  padding: 0;
}

.tooltip--interactive {
  padding: 0;
  display: flex;
  flex-direction: column;
  animation: tooltip-fade-in 200ms ease-out;
  position: relative;
  border: 2px solid var(--tooltip-interactive-border) !important;
}

.tooltip__header {
  height: 29px;
  flex-shrink: 0;
  position: relative;
}

.tooltip--hiding {
  animation: tooltip-fade-out 150ms ease-in forwards;
}

.tooltip__content {
  word-wrap: break-word;
  overflow-wrap: break-word;
  flex: 1;
  overflow-y: auto;
  padding: 0 12px 12px 12px;
}

.tooltip__loader {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: var(--color-muted);
}

.tooltip__error {
  color: var(--color-red);
  margin: 0;
  font-size: 12px;
}

.tooltip__close {
  position: absolute;
  top: 4px; right: 4px;
  background: transparent;
  border: none;
  color: var(--color-muted);
  font-size: 24px;
  line-height: 1;
  padding: 0;
  width: 24px; height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 3px;
  transition: color 150ms ease, background 150ms ease;
}

.tooltip__close:hover {
  color: var(--tooltip-text);
  background-color: var(--input-border);
}

@keyframes tooltip-fade-in {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes tooltip-fade-out {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.95); }
}

/* ===========================================================================
   Context menu system (right-click menus)
   =========================================================================== */
.context-menu {
  position: fixed;
  z-index: 10003;
  min-width: 180px;
  max-width: 280px;
  padding: 4px;
  background: var(--card-bg);
  border: 1px solid var(--section-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.context-menu__item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  background: transparent;
  border: none;
  border-radius: 5px;
  color: var(--app-text);
  font-size: 14px;
  text-align: left;
  cursor: pointer;
}

.context-menu__item:hover:not(.context-menu__item--disabled) {
  background: var(--button-hover-bg);
}

.context-menu__item--disabled {
  color: var(--color-muted);
  cursor: not-allowed;
}

.context-menu__icon {
  flex-shrink: 0;
  width: 18px;
  text-align: center;
  font-size: 14px;
}

.context-menu__label {
  flex: 1;
}

.context-menu__separator {
  height: 1px;
  margin: 4px 6px;
  background: var(--section-border);
}

/* ===========================================================================
   Color picker system
   =========================================================================== */
.color-picker-row {
  display: flex;
  align-items: center;
  gap: 6px;
}

.color-picker-row input {
  flex: 1;
  min-width: 0;
}

.color-picker-trigger {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 5px;
  border: 1px solid var(--input-border);
  cursor: pointer;
}

.color-picker-popover {
  position: fixed;
  z-index: 10003;
  width: 260px;
  background: var(--card-bg);
  border: 1px solid var(--section-border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  overflow: hidden;
}

.color-picker-popover__tabs {
  display: flex;
  border-bottom: 1px solid var(--section-border);
}

.color-picker-popover__tab {
  flex: 1;
  padding: 8px 10px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--color-muted);
  font-size: 13px;
  cursor: pointer;
}

.color-picker-popover__tab--active {
  color: var(--app-text);
  border-bottom-color: var(--accent-color);
}

.color-picker-popover__body {
  padding: 12px;
}

.color-picker-swatches {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  gap: 6px;
}

.color-picker-swatch-btn {
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  border-radius: 4px;
  border: 1px solid var(--input-border);
  cursor: pointer;
}

.color-picker-spectrum__sv-wrap {
  position: relative;
  width: 100%;
  margin-bottom: 12px;
  line-height: 0;
}

.color-picker-spectrum__sv-canvas {
  width: 100%;
  height: 140px;
  border-radius: 4px;
  cursor: crosshair;
  touch-action: none;
  /* Saturation (white->transparent, left to right) and value (black->transparent,
     bottom to top) as pure CSS gradients, layered over the hue's flat color
     (set via JS as background-color). No <canvas> involved — see color-picker.js
     for why: some browser privacy/fingerprinting protections interfere with
     canvas rendering, and this component never needed canvas's pixel-read
     capability in the first place, only the visual gradient. */
  background-image:
    linear-gradient(to top, #000, transparent),
    linear-gradient(to right, #fff, transparent);
}

.color-picker-spectrum__sv-handle {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.color-picker-spectrum__hue-track {
  position: relative;
  width: 100%;
  height: 14px;
  margin-bottom: 12px;
  border-radius: 7px;
  background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
  cursor: pointer;
  touch-action: none;
}

.color-picker-spectrum__hue-handle {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.color-picker-spectrum__preview-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.color-picker-spectrum__preview {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  border: 1px solid var(--input-border);
  flex-shrink: 0;
}

.color-picker-spectrum__hex-field {
  flex: 1;
  padding: 6px 8px;
  font-family: var(--monospace-font-family, monospace);
  text-transform: lowercase;
}

/* ===========================================================================
   App nav — intentionally short; the board needs maximum vertical space
   =========================================================================== */
.app-nav {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 8px 14px;
  background: var(--section-bg);
  border-bottom: 1px solid var(--section-border);
}

.app-nav__brand {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
}

.app-nav__logo { font-size: 16px; }

.app-nav__links {
  display: flex;
  align-items: center;
  gap: 14px;
  flex: 1;
}

.app-nav__links a {
  font-size: 14px;
  color: var(--app-text);
}

.app-nav__links a:hover {
  color: var(--link-text);
}

.app-nav__tasks-btn {
  background: none;
  border: none;
  padding: 0;
  font-family: inherit;
  line-height: inherit;
  font-size: 14px;
  color: var(--app-text);
  cursor: pointer;
}

.app-nav__tasks-btn:hover {
  color: var(--link-text);
}

.app-nav__user {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  white-space: nowrap;
}

.app-nav__user-avatar { font-size: 16px; }

.app-nav__logout {
  color: var(--color-muted);
  margin-left: 4px;
}

/* === Mobile === */
@media (max-width: 768px) {
  .app-nav {
    flex-wrap: wrap;
    gap: 10px;
  }

  .app-nav__links {
    order: 3;
    flex-basis: 100%;
    gap: 16px;
  }

  .modal {
    width: 94vw !important;
    max-width: 94vw;
  }

  .color-picker-popover,
  .emoji-picker-popover,
  .context-menu {
    max-width: 90vw;
  }
}

.app-nav__bell {
  position: relative;
  background: transparent;
  border: none;
  cursor: pointer;
  font-size: 15px;
  color: var(--app-text);
  padding: 2px 4px;
}

.app-nav__bell-count {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 15px;
  padding: 0 3px;
  border-radius: 8px;
  background: var(--button-red);
  color: #fff;
  font-size: 10px;
  line-height: 15px;
  text-align: center;
}
