.ql-toolbar.ql-snow {
  border: none;
  border-bottom: 1px solid rgb(19 32 36 / 0.08);
  border-radius: 0.75rem 0.75rem 0 0;
  background: rgba(251,250,247,0.7);
  padding: 6px 8px;
}
.ql-container.ql-snow {
  border: none;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
}
.ql-editor {
  min-height: 90px;
  padding: 12px 14px;
}
.ql-editor a { color: #1c655f; text-decoration: underline; }
.ql-editor.ql-blank::before { color: rgba(19,32,36,0.35); font-style: normal; }
.quill-wrap {
  border: 1px solid rgba(19,32,36,0.09);
  border-radius: 0.75rem;
  overflow: hidden;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.dark .ql-toolbar.ql-snow {
  background: rgba(26,36,39,0.7);
  border-bottom-color: rgba(255,255,255,0.10);
}
.dark .ql-snow .ql-stroke { stroke: rgba(255,255,255,0.65); }
.dark .ql-snow .ql-fill { fill: rgba(255,255,255,0.65); }
.dark .ql-snow.ql-toolbar button:hover .ql-stroke,
.dark .ql-snow .ql-toolbar button:hover .ql-stroke { stroke: #41bfae; }
.dark .ql-snow.ql-toolbar button:hover .ql-fill { fill: #41bfae; }
.dark .ql-editor { color: rgba(255,255,255,0.88); }
.dark .ql-editor.ql-blank::before { color: rgba(255,255,255,0.3); }
.dark .ql-editor a { color: #72d8c9; }
.dark .quill-wrap { background: rgba(22,31,34,0.55); border-color: rgba(255,255,255,0.12); }
.dark .ql-snow .ql-picker { color: rgba(255,255,255,0.65); }
.dark .ql-snow .ql-picker-options { background: #1a2427; border-color: rgba(255,255,255,0.12) !important; }

.rich-content a { color: #1c655f; text-decoration: underline; text-underline-offset: 2px; }
.rich-content a:hover { color: #1a4441; }
.rich-content ul { list-style: disc; padding-left: 1.4em; }
.rich-content ol { list-style: decimal; padding-left: 1.4em; }
.rich-content p { margin-bottom: 0.5em; }
.rich-content p:last-child { margin-bottom: 0; }
.dark .rich-content a { color: #72d8c9; }
.dark .rich-content a:hover { color: #a8e9df; }

.drag-handle { cursor: grab; touch-action: none; }
.drag-handle:active { cursor: grabbing; }
.sortable-ghost { opacity: 0.35; }
.sortable-drag { box-shadow: 0 10px 40px -10px rgba(19,32,36,0.35); }

[x-cloak] { display: none !important; }

.input-plain {
  width: 100%;
  border-radius: 0.5rem;
  border: 1px solid transparent;
  background: transparent;
  color: #132024;
  padding: 0.375rem 0.5rem;
  font-size: 0.875rem;
  transition: all 0.15s ease;
}
.input-plain:hover { background: rgba(19,32,36,0.03); }
.input-plain:focus {
  outline: none;
  background: white;
  border-color: rgba(19,32,36,0.1);
  box-shadow: 0 0 0 3px rgba(65,191,174,0.25);
}
.input-plain::placeholder { color: rgba(19,32,36,0.32); }

.dark .input-plain { color: rgba(255,255,255,0.9); }
.dark .input-plain:hover { background: rgba(255,255,255,0.05); }
.dark .input-plain:focus {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.15);
  box-shadow: 0 0 0 3px rgba(65,191,174,0.25);
}
.dark .input-plain::placeholder { color: rgba(255,255,255,0.28); }
.dark .input-plain[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1) opacity(0.7); }

.field {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid rgba(19,32,36,0.10);
  padding: 0.625rem 1rem;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #132024;
  font-size: 0.95rem;
  transition: all 0.15s ease;
}
.field::placeholder { color: rgba(19,32,36,0.35); }
.field:focus { outline: none; border-color: #41bfae; background: rgba(255,255,255,0.85); box-shadow: 0 0 0 3px rgba(65,191,174,0.25); }
.dark .field { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.14); color: rgba(255,255,255,0.92); }
.dark .field:focus { background: rgba(255,255,255,0.07); }
.dark .field::placeholder { color: rgba(255,255,255,0.3); }
.dark .field[type="date"]::-webkit-calendar-picker-indicator { filter: invert(1) opacity(0.7); }

.lightbox-enter { animation: lightboxIn 0.18s ease-out; }
@keyframes lightboxIn { from { opacity: 0; transform: scale(0.97); } to { opacity: 1; transform: scale(1); } }

.htmx-settling img { opacity: 0; }

/* ==========================================================================
   Liquid glass system — CSS-only equivalent of an Apple-style "verre liquide"
   effect (no React/build step): layered translucency + blur + specular
   highlights + a cursor-reactive sheen, applied via utility classes.
   ========================================================================== */

.ambient-blobs { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }
.ambient-blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.22; }
.ambient-blob.b1 { width: 40vw; height: 40vw; max-width: 560px; max-height: 560px; top: -14vw; left: -10vw; background: radial-gradient(circle, #72d8c9, transparent 72%); animation: driftA 28s ease-in-out infinite alternate; }
.ambient-blob.b2 { width: 34vw; height: 34vw; max-width: 480px; max-height: 480px; bottom: -12vw; right: -8vw; background: radial-gradient(circle, #e6c179, transparent 72%); animation: driftB 32s ease-in-out infinite alternate; }
.ambient-blob.b3 { width: 24vw; height: 24vw; max-width: 340px; max-height: 340px; top: 32vh; right: 10vw; background: radial-gradient(circle, #a8e9df, transparent 72%); animation: driftA 24s ease-in-out infinite alternate-reverse; }
.dark .ambient-blob { opacity: 0.10; }
@keyframes driftA { from { transform: translate(0,0) scale(1); } to { transform: translate(4vw,3vw) scale(1.08); } }
@keyframes driftB { from { transform: translate(0,0) scale(1); } to { transform: translate(-3vw,-4vw) scale(1.05); } }
@media (prefers-reduced-motion: reduce) { .ambient-blob { animation: none; } }

/* Large panels: nav, cards, modals — real backdrop blur */
.glass {
  background: linear-gradient(135deg, rgba(255,255,255,0.6), rgba(255,255,255,0.24));
  backdrop-filter: blur(22px) saturate(180%);
  -webkit-backdrop-filter: blur(22px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.55);
  box-shadow: 0 1px 0 rgba(255,255,255,0.7) inset, 0 10px 34px -12px rgba(19,32,36,0.20);
  position: relative;
}
.dark .glass {
  background: linear-gradient(135deg, rgba(255,255,255,0.10), rgba(255,255,255,0.02));
  border-color: rgba(255,255,255,0.12);
  box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset, 0 10px 34px -12px rgba(0,0,0,0.55);
}

/* Nested elements: cheaper frosted look, no blur (avoid stacked backdrop-filter cost) */
.glass-inset {
  background: rgba(255,255,255,0.55);
  border: 1px solid rgba(19,32,36,0.07);
  box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset;
}
.dark .glass-inset {
  background: rgba(255,255,255,0.045);
  border-color: rgba(255,255,255,0.09);
  box-shadow: 0 1px 0 rgba(255,255,255,0.05) inset;
}

/* Modals: higher opacity for legibility over busy backgrounds */
.glass-modal {
  background: linear-gradient(160deg, rgba(255,255,255,0.88), rgba(255,255,255,0.7));
  backdrop-filter: blur(26px) saturate(180%);
  -webkit-backdrop-filter: blur(26px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.65);
  box-shadow: 0 1px 0 rgba(255,255,255,0.85) inset, 0 30px 60px -20px rgba(19,32,36,0.45);
}
.dark .glass-modal {
  background: linear-gradient(160deg, rgba(26,36,39,0.94), rgba(22,31,34,0.88));
  border-color: rgba(255,255,255,0.10);
  box-shadow: 0 1px 0 rgba(255,255,255,0.08) inset, 0 30px 60px -20px rgba(0,0,0,0.7);
}

.glass-nav {
  background: linear-gradient(180deg, rgba(247,245,240,0.82), rgba(247,245,240,0.55));
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,0.55);
  box-shadow: 0 1px 0 rgba(255,255,255,0.6) inset, 0 10px 30px -22px rgba(19,32,36,0.35);
}
.dark .glass-nav {
  background: linear-gradient(180deg, rgba(14,21,23,0.82), rgba(14,21,23,0.55));
  border-bottom-color: rgba(255,255,255,0.08);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06) inset, 0 10px 30px -22px rgba(0,0,0,0.6);
}

/* Solid-colored buttons: same idea minus transparency, via a top gloss layer */
.glass-solid { position: relative; overflow: hidden; box-shadow: 0 1px 0 rgba(255,255,255,0.4) inset, 0 6px 18px -8px rgba(19,32,36,0.4); }
.glass-solid::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.32), rgba(255,255,255,0) 60%);
  pointer-events: none;
}

/* Cursor-reactive specular highlight (JS sets --mx/--my on pointermove) */
.glass-shine { overflow: hidden; }
.glass-shine::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(circle at var(--mx,50%) var(--my,15%), rgba(255,255,255,0.4), transparent 55%);
  opacity: 0; transition: opacity 0.35s ease; pointer-events: none;
}
.glass-shine:hover::after, .glass-shine:focus-within::after { opacity: 1; }
.dark .glass-shine::after { background: radial-gradient(circle at var(--mx,50%) var(--my,15%), rgba(255,255,255,0.14), transparent 55%); }

.glass-lift { transition: transform 0.3s cubic-bezier(.22,1,.36,1), box-shadow 0.3s ease; }
.glass-lift:hover { transform: translateY(-3px); }
@media (prefers-reduced-motion: reduce) { .glass-lift { transition: none; } .glass-lift:hover { transform: none; } }
