*, ::before, ::after {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

::backdrop {
  --tw-border-spacing-x: 0;
  --tw-border-spacing-y: 0;
  --tw-translate-x: 0;
  --tw-translate-y: 0;
  --tw-rotate: 0;
  --tw-skew-x: 0;
  --tw-skew-y: 0;
  --tw-scale-x: 1;
  --tw-scale-y: 1;
  --tw-pan-x:  ;
  --tw-pan-y:  ;
  --tw-pinch-zoom:  ;
  --tw-scroll-snap-strictness: proximity;
  --tw-gradient-from-position:  ;
  --tw-gradient-via-position:  ;
  --tw-gradient-to-position:  ;
  --tw-ordinal:  ;
  --tw-slashed-zero:  ;
  --tw-numeric-figure:  ;
  --tw-numeric-spacing:  ;
  --tw-numeric-fraction:  ;
  --tw-ring-inset:  ;
  --tw-ring-offset-width: 0px;
  --tw-ring-offset-color: #fff;
  --tw-ring-color: rgb(59 130 246 / 0.5);
  --tw-ring-offset-shadow: 0 0 #0000;
  --tw-ring-shadow: 0 0 #0000;
  --tw-shadow: 0 0 #0000;
  --tw-shadow-colored: 0 0 #0000;
  --tw-blur:  ;
  --tw-brightness:  ;
  --tw-contrast:  ;
  --tw-grayscale:  ;
  --tw-hue-rotate:  ;
  --tw-invert:  ;
  --tw-saturate:  ;
  --tw-sepia:  ;
  --tw-drop-shadow:  ;
  --tw-backdrop-blur:  ;
  --tw-backdrop-brightness:  ;
  --tw-backdrop-contrast:  ;
  --tw-backdrop-grayscale:  ;
  --tw-backdrop-hue-rotate:  ;
  --tw-backdrop-invert:  ;
  --tw-backdrop-opacity:  ;
  --tw-backdrop-saturate:  ;
  --tw-backdrop-sepia:  ;
  --tw-contain-size:  ;
  --tw-contain-layout:  ;
  --tw-contain-paint:  ;
  --tw-contain-style:  ;
}

/*
! tailwindcss v3.4.19 | MIT License | https://tailwindcss.com
*/

/*
1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)
2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)
*/

*,
::before,
::after {
  box-sizing: border-box;
  /* 1 */
  border-width: 0;
  /* 2 */
  border-style: solid;
  /* 2 */
  border-color: #e5e7eb;
  /* 2 */
}

::before,
::after {
  --tw-content: '';
}

/*
1. Use a consistent sensible line-height in all browsers.
2. Prevent adjustments of font size after orientation changes in iOS.
3. Use a more readable tab size.
4. Use the user's configured `sans` font-family by default.
5. Use the user's configured `sans` font-feature-settings by default.
6. Use the user's configured `sans` font-variation-settings by default.
7. Disable tap highlights on iOS
*/

html,
:host {
  line-height: 1.5;
  /* 1 */
  -webkit-text-size-adjust: 100%;
  /* 2 */
  -moz-tab-size: 4;
  /* 3 */
  -o-tab-size: 4;
     tab-size: 4;
  /* 3 */
  font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  /* 4 */
  font-feature-settings: normal;
  /* 5 */
  font-variation-settings: normal;
  /* 6 */
  -webkit-tap-highlight-color: transparent;
  /* 7 */
}

/*
1. Remove the margin in all browsers.
2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.
*/

body {
  margin: 0;
  /* 1 */
  line-height: inherit;
  /* 2 */
}

/*
1. Add the correct height in Firefox.
2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)
3. Ensure horizontal rules are visible by default.
*/

hr {
  height: 0;
  /* 1 */
  color: inherit;
  /* 2 */
  border-top-width: 1px;
  /* 3 */
}

/*
Add the correct text decoration in Chrome, Edge, and Safari.
*/

abbr:where([title]) {
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}

/*
Remove the default font size and weight for headings.
*/

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: inherit;
  font-weight: inherit;
}

/*
Reset links to optimize for opt-in styling instead of opt-out.
*/

a {
  color: inherit;
  text-decoration: inherit;
}

/*
Add the correct font weight in Edge and Safari.
*/

b,
strong {
  font-weight: bolder;
}

/*
1. Use the user's configured `mono` font-family by default.
2. Use the user's configured `mono` font-feature-settings by default.
3. Use the user's configured `mono` font-variation-settings by default.
4. Correct the odd `em` font sizing in all browsers.
*/

code,
kbd,
samp,
pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  /* 1 */
  font-feature-settings: normal;
  /* 2 */
  font-variation-settings: normal;
  /* 3 */
  font-size: 1em;
  /* 4 */
}

/*
Add the correct font size in all browsers.
*/

small {
  font-size: 80%;
}

/*
Prevent `sub` and `sup` elements from affecting the line height in all browsers.
*/

sub,
sup {
  font-size: 75%;
  line-height: 0;
  position: relative;
  vertical-align: baseline;
}

sub {
  bottom: -0.25em;
}

sup {
  top: -0.5em;
}

/*
1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)
2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)
3. Remove gaps between table borders by default.
*/

table {
  text-indent: 0;
  /* 1 */
  border-color: inherit;
  /* 2 */
  border-collapse: collapse;
  /* 3 */
}

/*
1. Change the font styles in all browsers.
2. Remove the margin in Firefox and Safari.
3. Remove default padding in all browsers.
*/

button,
input,
optgroup,
select,
textarea {
  font-family: inherit;
  /* 1 */
  font-feature-settings: inherit;
  /* 1 */
  font-variation-settings: inherit;
  /* 1 */
  font-size: 100%;
  /* 1 */
  font-weight: inherit;
  /* 1 */
  line-height: inherit;
  /* 1 */
  letter-spacing: inherit;
  /* 1 */
  color: inherit;
  /* 1 */
  margin: 0;
  /* 2 */
  padding: 0;
  /* 3 */
}

/*
Remove the inheritance of text transform in Edge and Firefox.
*/

button,
select {
  text-transform: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Remove default button styles.
*/

button,
input:where([type='button']),
input:where([type='reset']),
input:where([type='submit']) {
  -webkit-appearance: button;
  /* 1 */
  background-color: transparent;
  /* 2 */
  background-image: none;
  /* 2 */
}

/*
Use the modern Firefox focus style for all focusable elements.
*/

:-moz-focusring {
  outline: auto;
}

/*
Remove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)
*/

:-moz-ui-invalid {
  box-shadow: none;
}

/*
Add the correct vertical alignment in Chrome and Firefox.
*/

progress {
  vertical-align: baseline;
}

/*
Correct the cursor style of increment and decrement buttons in Safari.
*/

::-webkit-inner-spin-button,
::-webkit-outer-spin-button {
  height: auto;
}

/*
1. Correct the odd appearance in Chrome and Safari.
2. Correct the outline style in Safari.
*/

[type='search'] {
  -webkit-appearance: textfield;
  /* 1 */
  outline-offset: -2px;
  /* 2 */
}

/*
Remove the inner padding in Chrome and Safari on macOS.
*/

::-webkit-search-decoration {
  -webkit-appearance: none;
}

/*
1. Correct the inability to style clickable types in iOS and Safari.
2. Change font properties to `inherit` in Safari.
*/

::-webkit-file-upload-button {
  -webkit-appearance: button;
  /* 1 */
  font: inherit;
  /* 2 */
}

/*
Add the correct display in Chrome and Safari.
*/

summary {
  display: list-item;
}

/*
Removes the default spacing and border for appropriate elements.
*/

blockquote,
dl,
dd,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
figure,
p,
pre {
  margin: 0;
}

fieldset {
  margin: 0;
  padding: 0;
}

legend {
  padding: 0;
}

ol,
ul,
menu {
  list-style: none;
  margin: 0;
  padding: 0;
}

/*
Reset default styling for dialogs.
*/

dialog {
  padding: 0;
}

/*
Prevent resizing textareas horizontally by default.
*/

textarea {
  resize: vertical;
}

/*
1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)
2. Set the default placeholder color to the user's configured gray 400 color.
*/

input::-moz-placeholder, textarea::-moz-placeholder {
  opacity: 1;
  /* 1 */
  color: #9ca3af;
  /* 2 */
}

input::placeholder,
textarea::placeholder {
  opacity: 1;
  /* 1 */
  color: #9ca3af;
  /* 2 */
}

/*
Set the default cursor for buttons.
*/

button,
[role="button"] {
  cursor: pointer;
}

/*
Make sure disabled buttons don't get the pointer cursor.
*/

:disabled {
  cursor: default;
}

/*
1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)
2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)
   This can trigger a poorly considered lint error in some tools but is included by design.
*/

img,
svg,
video,
canvas,
audio,
iframe,
embed,
object {
  display: block;
  /* 1 */
  vertical-align: middle;
  /* 2 */
}

/*
Constrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)
*/

img,
video {
  max-width: 100%;
  height: auto;
}

/* Make elements with the HTML hidden attribute stay hidden by default */

[hidden]:where(:not([hidden="until-found"])) {
  display: none;
}

/* Typography */

.font-display {
  font-family: 'Syne', sans-serif;
}

/* Animations */

.fade-up   {
  animation: fadeUp 0.35s ease both;
}

.delay-1   {
  animation-delay: 0.08s;
}

.delay-2   {
  animation-delay: 0.16s;
}

.delay-3   {
  animation-delay: 0.24s;
}

.delay-4   {
  animation-delay: 0.32s;
}

/* Glow */

.glow-accent {
  box-shadow: 0 4px 14px rgba(217,119,6,0.25), 0 1px 4px rgba(217,119,6,0.15);
}

/* ── Buttons ──────────────────────────────────────────────────────── */

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--accent);
  color: #1C1917;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.9375rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s, transform 0.1s;
  width: 100%;
  text-decoration: none;
}

.btn-primary:hover  {
  background-color: #FBBF24;
}

.btn-primary:active {
  transform: scale(0.98);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: var(--surface-2);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 500;
  font-size: 0.9375rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s;
  width: 100%;
  text-decoration: none;
}

.btn-ghost:hover {
  background-color: #333030;
  border-color: #55504C;
}

/* Small ghost variant used in employee todo detail edit link */

.btn-ghost-sm {
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s;
}

.btn-ghost-sm:hover {
  background: var(--surface);
  border-color: #C5BEB8;
  color: var(--text);
}

/* ── Cards ────────────────────────────────────────────────────────── */

.card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem;
}

/* ── Form inputs ──────────────────────────────────────────────────── */

.\!input {
  width: 100% !important;
  background-color: var(--surface-2) !important;
  border: 1px solid var(--border) !important;
  border-radius: 0.5rem !important;
  color: var(--text) !important;
  font-family: 'DM Sans', sans-serif !important;
  font-size: 0.9375rem !important;
  padding: 0.75rem 1rem !important;
  outline: none !important;
  transition: border-color 0.15s, box-shadow 0.15s !important;
}

.input {
  width: 100%;
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9375rem;
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.\!input::-moz-placeholder {
  color: var(--muted) !important;
}

.\!input::placeholder {
  color: var(--muted) !important;
}

.input::-moz-placeholder {
  color: var(--muted);
}

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

.\!input:focus {
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(245,158,11,0.12) !important;
}

.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245,158,11,0.12);
}

select.\!input {
  -webkit-appearance: none !important;
     -moz-appearance: none !important;
          appearance: none !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2378716C' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.875rem center !important;
  padding-right: 2.5rem !important;
}

select.input {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2378716C' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  padding-right: 2.5rem;
}

select.\!input option {
  background: var(--surface) !important;
}

select.input option {
  background: var(--surface);
}

textarea.\!input {
  resize: vertical !important;
  min-height: 80px !important;
}

textarea.input {
  resize: vertical;
  min-height: 80px;
}

input[type="datetime-local"].\!input::-webkit-calendar-picker-indicator {
  filter: invert(0.5) !important;
  cursor: pointer !important;
}

input[type="datetime-local"].input::-webkit-calendar-picker-indicator {
  filter: invert(0.5);
  cursor: pointer;
}

label.field-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 0.375rem;
}

/* ── Header ───────────────────────────────────────────────────────── */

.site-header {
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
}

/* Identity / avatar button gradient */

.identity-btn {
  background: linear-gradient(135deg, var(--accent) 0%, #F59E0B 100%);
  color: #1C1917;
}

/* Identity dropdown menu */

.identity-menu {
  background: var(--surface);
  border: 1px solid var(--border);
  min-width: 210px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.08);
}

.identity-menu-item {
  color: var(--text);
}

.identity-menu-item:hover {
  background: var(--surface-2);
}

.identity-menu-item-muted {
  color: var(--muted);
  background: transparent;
}

.identity-menu-item-muted:hover {
  background: var(--surface-2);
}

.menu-divider {
  border-top: 1px solid var(--border);
}

.build-info {
  font-size: 0.65rem;
  color: var(--border);
  letter-spacing: 0.03em;
  border-top: 1px solid var(--border);
}

/* Loading bar */

.htmx-loading-bar {
  background: linear-gradient(90deg, var(--accent), transparent);
}

/* ── Flash messages ───────────────────────────────────────────────── */

.flash-error {
  background-color: rgba(127,29,29,0.3);
  border-color: rgba(239,68,68,0.3);
  color: #FCA5A5;
}

.flash-success {
  background-color: rgba(6,78,59,0.3);
  border-color: rgba(110,231,183,0.3);
  color: #6EE7B7;
}

.flash-default {
  background-color: var(--surface);
  border-color: var(--border);
  color: var(--text);
}

/* ── State badges ─────────────────────────────────────────────────── */

.state-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.625rem;
  border-radius: 999px;
  flex-shrink: 0;
}

/* todo_detail uses slightly larger variant — keep consistent */

.state-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-open        {
  background: #A8A29E;
}

.dot-in_progress {
  background: #D97706;
}

.dot-blocked     {
  background: #EAB308;
}

.dot-done        {
  background: #059669;
}

.dot-cancelled   {
  background: #94A3B8;
}

/* ── Todo rows ────────────────────────────────────────────────────── */

.todo-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}

.todo-row:last-child {
  border-bottom: none;
}

.todo-row:hover {
  background: rgba(217,119,6,0.04);
}

.todo-row.is-done {
  opacity: 0.55;
}

.todo-row.is-moved {
  opacity: 0.5;
}

.move-undo-bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.move-undo-label {
  font-size: 0.68rem;
  color: var(--muted);
  white-space: nowrap;
}

.move-undo-btn {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 0.375rem;
  padding: 0.2rem 0.5rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s;
}

.move-undo-btn:hover {
  background: rgba(217,119,6,0.08);
}

.todo-row-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  cursor: pointer;
}

/* ── Move button + popover ───────────────────────────────────────── */

.move-wrap {
  position: relative;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding-right: 0.75rem;
}

.move-drop {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  z-index: 50;
}

.move-btn {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
  padding: 0.2rem 0.5rem;
  border-radius: 0.375rem;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  transition: color 0.12s, background 0.12s, border-color 0.12s;
  white-space: nowrap;
}

.move-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(217,119,6,0.08);
}

.move-popover {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 180px;
  max-width: 240px;
  overflow: hidden;
}

.move-popover-header {
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0.5rem 0.75rem 0.25rem;
}

.move-group {
  padding: 0.25rem 0;
}

.move-group + .move-group {
  border-top: 1px solid var(--border);
}

.move-group-label {
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  padding: 0.25rem 0.75rem 0.1rem;
}

.move-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.4rem 0.75rem;
  font-size: 0.8rem;
  color: var(--text-color);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 0.1s;
}

.move-option:hover {
  background: rgba(217,119,6,0.08);
  color: var(--accent);
}

.move-empty {
  font-size: 0.75rem;
  color: var(--muted);
  padding: 0.5rem 0.75rem;
  text-align: center;
}

.pin-icon {
  flex-shrink: 0;
  color: var(--accent);
  opacity: 0.85;
}

/* ── Overdue badges / indicators ─────────────────────────────────── */

.overdue-badge {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #DC2626;
  background: rgba(220,38,38,0.1);
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  flex-shrink: 0;
  animation: overdueFlash 2.5s ease-in-out infinite;
}

.overdue-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #DC2626;
  flex-shrink: 0;
}

.overdue-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(220,38,38,0.12);
  color: #DC2626;
  flex-shrink: 0;
}

.overdue-banner {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: rgba(220,38,38,0.08);
  border: 1px solid rgba(220,38,38,0.2);
  color: #DC2626;
  font-size: 0.875rem;
  font-weight: 600;
}

.due-label {
  font-size: 0.75rem;
  color: var(--muted);
  flex-shrink: 0;
}

.due-label.overdue {
  color: #DC2626;
}

/* ── Auto-blocked note ────────────────────────────────────────────── */

.system-blocked-note {
  background: rgba(234,179,8,0.1);
  border: 1px solid rgba(234,179,8,0.25);
  color: #A16207;
}

/* ── Refresh dot ──────────────────────────────────────────────────── */

.refresh-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--border);
  transition: background 0.3s;
}

.htmx-request .refresh-dot {
  background: var(--accent);
  animation: refreshPulse 0.8s ease infinite;
}

/* ── Filter components ────────────────────────────────────────────── */

.filter-wrap details > summary {
  list-style: none;
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.filter-wrap details > summary::-webkit-details-marker {
  display: none;
}

.filter-input {
  width: 100%;
  padding: 0.5rem 0.75rem 0.5rem 2.25rem;
  font-size: 0.8125rem;
  border-radius: 0.625rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.filter-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217,119,6,0.12);
}

.filter-date, .filter-select {
  width: 100%;
  padding: 0.4rem 0.6rem;
  font-size: 0.75rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.filter-date:focus, .filter-select:focus {
  border-color: var(--accent);
}

.filter-select {
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%23a8a29e' stroke-width='2.5'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.6rem center;
  padding-right: 1.75rem;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: border-color 0.15s, opacity 0.15s;
  opacity: 0.6;
  position: relative;
}

.filter-pill input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.filter-pill:has(input:checked) {
  opacity: 1;
  border-color: currentColor;
}

.filter-pill:hover {
  opacity: 0.85;
}

.filter-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.35rem 0.5rem;
  border-radius: 0.5rem;
  margin-bottom: 0.25rem;
  transition: background 0.12s;
}

.filter-summary-row:hover {
  background: var(--surface-2);
}

.filter-active-badge {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: rgba(217,119,6,0.15);
  color: #B45309;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
}

.filter-panel {
  padding: 0.75rem;
  border-radius: 0.625rem;
  margin-bottom: 0.5rem;
  border: 1px solid var(--border);
  background: var(--surface);
}

.clear-filters-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #DC2626;
  text-decoration: none;
  padding: 0.3rem 0.6rem;
  border-radius: 0.4rem;
  background: rgba(220,38,38,0.08);
  transition: background 0.12s;
}

.clear-filters-btn:hover {
  background: rgba(220,38,38,0.14);
}

/* ── State selector (todo_detail) ─────────────────────────────────── */

.state-option-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.625rem 0.875rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  text-align: left;
}

.state-option-btn:hover {
  border-color: var(--accent);
  background: rgba(217,119,6,0.06);
}

.state-option-btn.active {
  border-color: var(--accent);
  background: rgba(217,119,6,0.08);
  color: var(--accent);
}

/* ── Employee transition buttons (employees/todo_detail) ──────────── */

.transition-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s, transform 0.1s;
}

.transition-btn:active {
  transform: scale(0.98);
}

.btn-start  {
  background: rgba(217,119,6,0.12);
  color: #B45309;
  border: 1px solid rgba(217,119,6,0.3);
}

.btn-start:hover  {
  background: rgba(217,119,6,0.2);
}

.btn-done   {
  background: rgba(5,150,105,0.12);
  color: #047857;
  border: 1px solid rgba(5,150,105,0.3);
}

.btn-done:hover   {
  background: rgba(5,150,105,0.2);
}

.btn-reopen {
  background: rgba(120,113,108,0.1);
  color: #78716C;
  border: 1px solid rgba(120,113,108,0.25);
}

.btn-reopen:hover {
  background: rgba(120,113,108,0.18);
}

/* ── Meta rows (todo detail) ──────────────────────────────────────── */

.meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.625rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.8125rem;
}

.meta-row:last-child {
  border-bottom: none;
}

.meta-key {
  color: var(--muted);
  font-weight: 500;
}

.meta-val {
  color: var(--text);
  font-weight: 500;
  text-align: right;
}

/* ── Action row / icon buttons (todo_detail, folder_detail) ────────── */

.action-row {
  display: flex;
  gap: 0.5rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
  color: var(--muted);
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  flex-shrink: 0;
  text-decoration: none;
}

/* folder_index / folder_detail use a smaller 28px variant */

.icon-btn {
  width: 38px;
  height: 38px;
}

.icon-btn:hover {
  background: var(--surface);
  color: var(--text);
  border-color: #C5BEB8;
}

.icon-btn.pinned {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(217,119,6,0.08);
}

.icon-btn.danger:hover {
  background: rgba(220,38,38,0.08);
  color: var(--danger);
  border-color: rgba(220,38,38,0.3);
}

/* Smaller icon-btn variant used in folder_index / folder_detail */

.icon-btn-sm {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}

.icon-btn-sm:hover {
  background: var(--surface-2);
  color: var(--text);
}

.icon-btn-sm.danger {
  color: var(--muted);
}

.icon-btn-sm.danger:hover {
  background: rgba(220,38,38,0.1);
  color: var(--danger);
}

/* ── Form components (todo_form) ──────────────────────────────────── */

.field-group {
  margin-bottom: 1.25rem;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color 0.15s;
}

.checkbox-row:hover {
  border-color: var(--accent);
}

.checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.error-msg {
  color: #EF4444;
  font-size: 0.75rem;
  margin-top: 0.3rem;
}

/* ── Archive tabs ─────────────────────────────────────────────────── */

.tab-bar {
  display: flex;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 57px;
  z-index: 30;
  margin: 0 -1rem;
  padding: 0 1rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.tab-bar::-webkit-scrollbar {
  display: none;
}

.tab-item {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.6875rem 0.75rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s;
  flex-shrink: 0;
  margin-bottom: -1px;
}

.tab-item:hover {
  color: var(--text);
}

.tab-item.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  font-size: 0.625rem;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}

.tab-item.active .tab-count {
  background: rgba(217,119,6,0.15);
  color: var(--accent);
}

/* ── Archive rows ─────────────────────────────────────────────────── */

.archive-row {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
}

.archive-row:last-child {
  border-bottom: none;
}

.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  padding: 0 0.625rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
  line-height: 1;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
}

.pill-btn.restore {
  color: var(--accent);
  border-color: rgba(217,119,6,0.3);
}

.pill-btn.restore:hover {
  background: rgba(217,119,6,0.1);
  border-color: var(--accent);
}

.pill-btn.purge {
  color: var(--danger);
  border-color: rgba(220,38,38,0.25);
}

.pill-btn.purge:hover {
  background: rgba(220,38,38,0.08);
  border-color: var(--danger);
}

.item-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
}

.item-icon.round {
  border-radius: 50%;
}

/* ── Archive confirm purge ────────────────────────────────────────── */

.btn-danger {
  background: var(--danger);
}

.btn-danger:hover {
  background: #ef4444;
}

.purge-confirm-card {
  border-color: rgba(220,38,38,0.3);
}

/* ── Folder index ─────────────────────────────────────────────────── */

.chevron-icon {
  transition: transform 0.2s ease;
  flex-shrink: 0;
  color: var(--muted);
}

.collapse-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: background 0.12s;
}

.collapse-btn:hover {
  background: var(--surface-2);
}

.overdue-row {
  display: block;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}

.overdue-row:last-child {
  border-bottom: none;
}

.overdue-row:hover {
  background: rgba(220,38,38,0.03);
}

.days-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: rgba(220,38,38,0.1);
  color: #DC2626;
  flex-shrink: 0;
}

.breadcrumb-row {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.6875rem;
  color: var(--muted);
}

.employee-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.625rem;
  font-weight: 600;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(217,119,6,0.1);
  color: #B45309;
  flex-shrink: 0;
}

.add-list-row {
  color: var(--accent);
}

.add-list-row:hover {
  background: rgba(217,119,6,0.05);
}

/* ── Folder/list detail ───────────────────────────────────────────── */

.section-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.625rem;
}

.list-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  text-decoration: none;
  transition: border-color 0.12s, background 0.12s;
}

a.list-pill:hover {
  border-color: var(--accent);
  background: rgba(217,119,6,0.08);
  color: var(--accent);
}

.employee-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}

.employee-row:last-child {
  border-bottom: none;
}

.employee-row:hover {
  background: rgba(217,119,6,0.03);
}

.avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 0.6875rem;
  background: linear-gradient(135deg, var(--accent) 0%, #F59E0B 100%);
  color: #1C1917;
}

.grant-select {
  flex: 1;
  min-width: 0;
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  padding: 0.5rem 0.75rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  -webkit-appearance: none;
     -moz-appearance: none;
          appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2378716C' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  padding-right: 2rem;
}

.grant-select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245,158,11,0.12);
}

.grant-select option {
  background: var(--surface);
}

.btn-grant {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  background-color: var(--accent);
  color: #1C1917;
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: background-color 0.15s, transform 0.1s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-grant:hover {
  background-color: #FBBF24;
}

.btn-grant:active {
  transform: scale(0.97);
}

/* ── Details chevron ──────────────────────────────────────────────── */

details[open] > summary .details-chevron {
  transform: rotate(90deg);
}

details > summary::-webkit-details-marker {
  display: none;
}

/* ── Attachment components ────────────────────────────────────────── */

.attachment-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.attachment-row:last-of-type {
  border-bottom: none;
}

.attachment-thumb {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 0.5rem;
  -o-object-fit: cover;
     object-fit: cover;
  border: 1px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
  transition: opacity 0.15s;
}

.attachment-thumb:hover {
  opacity: 0.82;
}

.attachment-icon {
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  flex-direction: column;
  gap: 2px;
}

.attachment-icon.pdf {
  background: rgba(220,38,38,0.06);
  border-color: rgba(220,38,38,0.2);
  color: #DC2626;
}

.attachment-info {
  flex: 1;
  min-width: 0;
  padding-right: 2rem;
}

.attachment-name {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s;
}

.attachment-name:hover {
  color: var(--accent);
}

.attachment-meta {
  display: block;
  font-size: 0.6875rem;
  color: var(--muted);
  margin-top: 2px;
  letter-spacing: 0.01em;
}

.attachment-delete-btn {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 0.375rem;
  border: 1px solid rgba(220,38,38,0.2);
  background: rgba(220,38,38,0.06);
  color: var(--danger);
  cursor: pointer;
  padding: 0;
}

.attachment-delete-btn:hover {
  background: rgba(220,38,38,0.14);
  border-color: rgba(220,38,38,0.4);
}

.attachment-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.25rem 0 0.75rem;
  gap: 0.4rem;
  color: var(--muted);
}

.attachment-empty-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.attachment-empty p {
  font-size: 0.8125rem;
  text-align: center;
}

.drop-zone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.375rem;
  padding: 1.25rem 1rem;
  border: 1.5px dashed var(--border);
  border-radius: 0.625rem;
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-align: center;
  margin-top: 0.875rem;
}

.drop-zone:hover, .drop-zone.dragover {
  border-color: var(--accent);
  background: rgba(217,119,6,0.05);
}

.drop-zone input[type=file] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.drop-zone-icon {
  color: var(--muted);
  pointer-events: none;
}

.drop-zone-label {
  font-size: 0.8125rem;
  color: var(--muted);
  pointer-events: none;
}

.drop-zone-label span {
  color: var(--accent);
  font-weight: 600;
}

.drop-zone-hint {
  font-size: 0.6875rem;
  color: var(--muted);
  opacity: 0.7;
  pointer-events: none;
}

.drop-zone-files {
  font-size: 0.75rem;
  color: var(--text);
  font-weight: 500;
  pointer-events: none;
}

.attach-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 0.625rem;
  gap: 0.75rem;
}

.attach-quality-label {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  color: var(--muted);
  cursor: pointer;
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.attach-quality-label input[type=checkbox] {
  accent-color: var(--accent);
}

.attach-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent);
  color: #1C1917;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.45rem 1rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  flex-shrink: 0;
}

.attach-submit-btn:hover {
  background: #FBBF24;
}

.attach-submit-btn:active {
  transform: scale(0.97);
}

.attach-submit-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.attach-error {
  font-size: 0.8125rem;
  color: var(--danger);
  display: flex;
  align-items: flex-start;
  gap: 0.375rem;
  margin-top: 0.5rem;
}

.attach-uploading {
  display: none;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

.spin {
  animation: spin 0.8s linear infinite;
  display: block;
}

/* ── Comment / thread components ──────────────────────────────────── */

.comment-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.comment-row:last-of-type {
  border-bottom: none;
}

.comment-avatar {
  width: 32px;
  height: 32px;
  min-width: 32px;
  border-radius: 50%;
  background: rgba(217,119,6,0.12);
  border: 1px solid rgba(217,119,6,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent);
  flex-shrink: 0;
}

.comment-meta {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.3rem;
  flex-wrap: wrap;
}

.comment-author {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
}

.comment-time {
  font-size: 0.6875rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.comment-body {
  font-size: 0.875rem;
  color: var(--text);
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.comment-mgr-badge {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(217,119,6,0.1);
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
}

.thread-delete-btn {
  position: absolute;
  top: 0.75rem;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 0.375rem;
  border: 1px solid rgba(220,38,38,0.2);
  background: rgba(220,38,38,0.06);
  color: var(--danger);
  cursor: pointer;
  padding: 0;
}

.thread-delete-btn:hover {
  background: rgba(220,38,38,0.14);
  border-color: rgba(220,38,38,0.4);
}

/* employee _comments.html has delete btn at 50% */

.thread-delete-btn-center {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 0.375rem;
  border: 1px solid rgba(220,38,38,0.2);
  background: rgba(220,38,38,0.06);
  color: var(--danger);
  cursor: pointer;
  padding: 0;
}

.thread-delete-btn-center:hover {
  background: rgba(220,38,38,0.14);
  border-color: rgba(220,38,38,0.4);
}

.thread-attach-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  position: relative;
}

.thread-attach-row:last-of-type {
  border-bottom: none;
}

.thread-thumb {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 0.5rem;
  -o-object-fit: cover;
     object-fit: cover;
  border: 1px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
  transition: opacity 0.15s;
  display: block;
}

.thread-thumb:hover {
  opacity: 0.82;
}

.thread-file-icon {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  color: var(--muted);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
}

.thread-file-icon.pdf {
  background: rgba(220,38,38,0.06);
  border-color: rgba(220,38,38,0.2);
  color: #DC2626;
}

.thread-attach-info {
  flex: 1;
  min-width: 0;
  padding-right: 2rem;
}

.thread-attach-name {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s;
}

.thread-attach-name:hover {
  color: var(--accent);
}

.thread-attach-meta {
  display: block;
  font-size: 0.6875rem;
  color: var(--muted);
  margin-top: 2px;
}

.thread-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1.5rem 0 1rem;
  gap: 0.5rem;
  color: var(--muted);
}

.thread-empty-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
}

.thread-empty p {
  font-size: 0.8125rem;
  text-align: center;
}

.comment-form-area {
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  padding-top: 1rem;
}

.comment-textarea {
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  padding: 0.75rem 1rem;
  outline: none;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.15s, box-shadow 0.15s;
  box-sizing: border-box;
}

.comment-textarea::-moz-placeholder {
  color: var(--muted);
}

.comment-textarea::placeholder {
  color: var(--muted);
}

.comment-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(245,158,11,0.12);
}

.comment-error {
  font-size: 0.8125rem;
  color: var(--danger);
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.comment-submit-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.comment-submit-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent);
  color: #1C1917;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.5rem 1.125rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.comment-submit-btn:hover {
  background: #FBBF24;
}

.comment-submit-btn:active {
  transform: scale(0.97);
}

.clip-area {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.clip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}

.clip-btn:hover {
  background: var(--surface);
  color: var(--text);
  border-color: #C5BEB8;
}

.clip-btn input[type=file] {
  display: none;
}

.clip-uploading {
  display: none;
  align-items: center;
  gap: 0.375rem;
  font-size: 0.75rem;
  color: var(--muted);
}

/* ── Hostel settings ──────────────────────────────────────────────── */

.settings-icon-box {
  width: 2rem;
  height: 2rem;
  border-radius: 0.5rem;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.settings-error-block {
  margin-bottom: 1.25rem;
  padding: 0.75rem 1rem;
  border-radius: 0.5rem;
  background: rgba(220,38,38,0.08);
  border: 1px solid rgba(220,38,38,0.2);
}

.settings-logo-preview {
  display: flex;
  align-items: center;
  gap: 0.875rem;
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
}

/* ── Employees list ───────────────────────────────────────────────── */

.emp-avatar {
  background: linear-gradient(135deg, rgba(217,119,6,0.18), rgba(217,119,6,0.08));
  color: var(--accent);
  border: 1.5px solid rgba(217,119,6,0.2);
}

.emp-action-btn {
  color: var(--muted);
  background: transparent;
  transition: background 0.15s, color 0.15s;
}

.emp-action-btn:hover {
  background: var(--surface-2);
}

.emp-delete-btn {
  color: var(--muted);
  background: transparent;
  transition: background 0.15s, color 0.15s;
}

.emp-delete-btn:hover {
  color: var(--danger);
  background: rgba(220,38,38,0.08);
}

/* ── Employees/create info note ───────────────────────────────────── */

.info-note {
  background: rgba(217,119,6,0.07);
  border: 1px solid rgba(217,119,6,0.2);
}

/* ── Home page ────────────────────────────────────────────────────── */

.hero-divider {
  height: 1px;
  background: linear-gradient(90deg, var(--border), transparent);
}

/* ── Dashboard quick nav ──────────────────────────────────────────── */

/* ── Employee dashboard list rows ─────────────────────────────────── */

.emp-list-row {
  text-decoration: none;
  transition: border-color 0.15s;
  padding: 0.875rem 1rem;
}

.emp-list-row:hover {
  border-color: var(--accent);
}

.emp-folder-list-row {
  text-decoration: none;
  transition: background 0.1s;
  border-bottom: 1px solid var(--border);
}

.emp-folder-list-row:hover {
  background: rgba(217,119,6,0.04);
}

/* ── Misc inline patterns promoted to classes ─────────────────────── */

/* ── Folder index section rows ───────────────────────────────────── */

.section-header {
  border-bottom: 1px solid var(--border);
}

.section-body-row {
  border-bottom: 1px solid var(--border);
}

.section-body-row:last-child {
  border-bottom: none;
}

.bg-border-color {
  background: var(--border);
}

.text-border-color {
  color: var(--border);
}

/* ── Employees list empty state ───────────────────────────────────── */

.emp-empty-state {
  border: 1.5px dashed var(--border);
}

/* ── Activity log avatars ─────────────────────────────────────────── */

.activity-avatar-manager {
  background: rgba(217,119,6,0.18);
  color: #B45309;
  border: 1px solid rgba(217,119,6,0.3);
}

.activity-avatar-employee {
  background: rgba(120,113,108,0.18);
  color: #78716C;
  border: 1px solid rgba(120,113,108,0.25);
}

.activity-avatar-system {
  background: rgba(100,116,139,0.15);
  color: #64748B;
  border: 1px solid rgba(100,116,139,0.2);
}

.folder-icon-bg {
  background: rgba(217,119,6,0.12);
}

.list-icon-bg   {
  background: rgba(217,119,6,0.1);
}

.surface-2-bg   {
  background: var(--surface-2);
}

.overdue-icon-bg {
  background: rgba(220,38,38,0.1);
}

.employees-icon-bg {
  background: rgba(59,130,246,0.12);
}

.empty-state-box {
  border: 2px dashed var(--border);
  background: var(--surface);
}

.no-underline {
  text-decoration: none;
}

.login-card {
  box-shadow: 0 4px 24px rgba(28,25,23,0.06);
}

.text-danger {
  color: var(--danger);
}

.hr-divider {
  height: 1px;
  background: var(--border);
}

.card-dashed {
  border-style: dashed;
  background: transparent;
}

.border-top-border {
  border-top: 1px solid var(--border);
}

.btn-flex {
  flex: 1;
}

.btn-inline {
  width: auto;
  padding: 0.5rem 1rem;
  font-size: 0.8125rem;
}

.btn-auto  {
  width: auto;
  display: inline-flex;
  padding: 0.5rem 1.25rem;
  font-size: 0.8125rem;
}

.btn-cta   {
  width: auto;
  display: inline-flex;
  padding: 0.625rem 1.5rem;
  font-size: 0.875rem;
}

.btn-row {
  flex: 1;
  font-size: 0.875rem;
  padding: 0.625rem 1rem;
}

.card-flush {
  padding: 0;
  overflow: hidden;
}

.card-sm {
  padding: 1rem;
}

.card-compact {
  padding: 0.875rem 1rem;
}

.settings-logo-img {
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.accent-count-chip {
  background: var(--surface-2);
  color: var(--muted);
}

.muted-count-chip {
  background: var(--surface-2);
  color: var(--muted);
  border: 1px solid var(--border);
}

/* ── PIN entry ──────────────────────────────────────────────────────── */

.pin-entry-avatar {
  background: linear-gradient(135deg, var(--accent) 0%, #F59E0B 100%);
  color: #1C1917;
  letter-spacing: -0.01em;
}

.pin-entry-lock-badge {
  background: var(--surface);
  border: 2px solid var(--border);
}

.pin-entry-rate-limit-card {
  border-color: rgba(220,38,38,0.3);
  background: rgba(127,29,29,0.12);
}

.pin-entry-rate-limit-icon {
  background: rgba(220,38,38,0.15);
}

.pin-entry-error {
  background: rgba(127,29,29,0.25);
  border: 1px solid rgba(239,68,68,0.3);
  color: #FCA5A5;
}

.text-error-light {
  color: #FCA5A5;
}

.pin-entry-input {
  font-size: 2rem;
  letter-spacing: 0.6em;
  padding-left: 1.75rem;
}

/* ── PIN reveal ─────────────────────────────────────────────────────── */

.pin-reveal-card {
  border-color: rgba(217,119,6,0.35);
  background: linear-gradient(145deg, #FFFBF2, #FFF8E8);
}

.pin-reveal-bar {
  background: linear-gradient(90deg, var(--accent), #FBBF24, transparent);
}

.pin-reveal-avatar {
  background: rgba(217,119,6,0.15);
  border: 1.5px solid rgba(217,119,6,0.3);
}

.pin-digit-box {
  background: var(--surface);
  border: 2px solid rgba(217,119,6,0.4);
  color: var(--text);
  box-shadow: 0 2px 8px rgba(217,119,6,0.1);
}

.copy-pin-btn {
  background: rgba(217,119,6,0.12);
  color: var(--accent);
  border: 1px solid rgba(217,119,6,0.25);
}

.copy-pin-btn:hover {
  background: rgba(217,119,6,0.2);
}

.pin-reveal-warning {
  background: rgba(220,38,38,0.07);
  border: 1px solid rgba(220,38,38,0.2);
}

/* ── Blueprint library ──────────────────────────────────────────────── */

.blueprint-add-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent);
  color: #1C1917;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 0.875rem;
  border-radius: 0.5rem;
  border: none;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  text-decoration: none;
  width: auto;
}

.blueprint-add-btn:hover {
  background: #FBBF24;
}

.blueprint-add-btn:active {
  transform: scale(0.97);
}

.blueprint-card {
  padding: 0;
  overflow: hidden;
}

.blueprint-list-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.625rem 1rem;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
}

.blueprint-rows {
  display: flex;
  flex-direction: column;
}

.blueprint-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}

.blueprint-row:last-child {
  border-bottom: none;
}

.blueprint-row:hover {
  background: rgba(217,119,6,0.03);
}

.blueprint-row-main {
  flex: 1;
  min-width: 0;
}

.blueprint-row-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  margin-bottom: 0.5rem;
}

.blueprint-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.blueprint-todo-title {
  font-size: 0.8125rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.blueprint-list-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  width: -moz-fit-content;
  width: fit-content;
  margin-top: 0.1rem;
}

.blueprint-row-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.bp-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
}

.bp-badge-active   {
  background: rgba(5,150,105,0.12);
  color: #047857;
}

.bp-badge-inactive {
  background: rgba(120,113,108,0.1);
  color: #78716C;
}

.bp-badge-auto     {
  background: rgba(217,119,6,0.12);
  color: #B45309;
}

.bp-badge-offset   {
  background: rgba(100,116,139,0.1);
  color: #64748B;
}

.blueprint-row-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
  padding-top: 0.125rem;
}

.bp-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 0.4rem;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  flex-shrink: 0;
}

.bp-action-btn:hover {
  background: var(--surface-2);
  color: var(--text);
}

.bp-action-danger:hover {
  background: rgba(220,38,38,0.08);
  color: var(--danger);
  border-color: rgba(220,38,38,0.3);
}

.blueprint-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 2.5rem 1rem 2rem;
  gap: 0.5rem;
}

.blueprint-empty-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.25rem;
}

.blueprint-empty-cta {
  margin-top: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent);
  color: #1C1917;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.5rem 1.25rem;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: background 0.15s;
}

.blueprint-empty-cta:hover {
  background: #FBBF24;
}

/* ── Blueprint form extras ──────────────────────────────────────────── */

.form-section-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0.5rem 0 0.375rem;
  border-top: 1px solid var(--border);
  margin-bottom: 0.75rem;
  margin-top: 0.25rem;
}

.form-section-hint {
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  color: var(--muted);
  opacity: 0.75;
}

.error-banner {
  background: rgba(220,38,38,0.07);
  border: 1px solid rgba(220,38,38,0.2);
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
}

.error-msg {
  font-size: 0.8125rem;
  color: var(--danger);
  margin-top: 0.25rem;
}

.input-error {
  border-color: rgba(220,38,38,0.5) !important;
}

.field-group {
  margin-bottom: 1.125rem;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
}

.checkbox-row input[type=checkbox] {
  margin-top: 0.25rem;
  flex-shrink: 0;
  accent-color: var(--accent);
}

/* ── Blueprint pill tag (todo rows & detail) ───────────────────────── */

.bp-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: rgba(100,116,139,0.12);
  color: #64748B;
  white-space: nowrap;
  flex-shrink: 0;
  border: 1px solid rgba(100,116,139,0.2);
}

/* ── Outline button (secondary action beside btn-primary) ──────────── */

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  background: transparent;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.8125rem;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  border: 1px solid var(--border);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.btn-outline:hover {
  background: var(--surface-2);
  color: var(--text);
  border-color: #C5BEB8;
}

.btn-icon {
  padding: 0.5rem;
}

/* ── Blueprint picker dialog ───────────────────────────────────────── */

.bp-dialog {
  border: none;
  border-radius: 0.875rem;
  padding: 0;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  max-width: 420px;
  width: calc(100% - 2rem);
  max-height: 80vh;
  overflow: hidden;
  background: var(--surface);
}

.bp-dialog::backdrop {
  background: rgba(0,0,0,0.45);
}

.bp-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem 0.875rem;
  border-bottom: 1px solid var(--border);
}

.bp-dialog-title {
  font-family: 'Syne', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.bp-dialog-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}

.bp-dialog-close:hover {
  background: var(--surface-2);
  color: var(--text);
}

.bp-dialog-search {
  display: block;
  width: 100%;
  border: none;
  outline: none;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
  padding: 0.75rem 1.25rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.875rem;
  color: var(--text);
}

.bp-dialog-search::-moz-placeholder {
  color: var(--muted);
}

.bp-dialog-search::placeholder {
  color: var(--muted);
}

.bp-dialog-list {
  overflow-y: auto;
  max-height: calc(80vh - 120px);
}

.bp-picker-row {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.75rem 1.25rem;
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  transition: background 0.12s;
}

.bp-picker-row:last-child {
  border-bottom: none;
}

.bp-picker-row:hover {
  background: rgba(217,119,6,0.06);
}

.bp-picker-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
}

.bp-picker-meta {
  font-size: 0.75rem;
  color: var(--muted);
}

.pointer-events-none {
  pointer-events: none;
}

.static {
  position: static;
}

.fixed {
  position: fixed;
}

.absolute {
  position: absolute;
}

.relative {
  position: relative;
}

.sticky {
  position: sticky;
}

.-bottom-2 {
  bottom: -0.5rem;
}

.-right-2 {
  right: -0.5rem;
}

.bottom-0 {
  bottom: 0px;
}

.bottom-3 {
  bottom: 0.75rem;
}

.left-0 {
  left: 0px;
}

.left-3\.5 {
  left: 0.875rem;
}

.right-0 {
  right: 0px;
}

.top-0 {
  top: 0px;
}

.top-3 {
  top: 0.75rem;
}

.z-10 {
  z-index: 10;
}

.z-40 {
  z-index: 40;
}

.z-50 {
  z-index: 50;
}

.-mx-5 {
  margin-left: -1.25rem;
  margin-right: -1.25rem;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.-mt-2 {
  margin-top: -0.5rem;
}

.-mt-5 {
  margin-top: -1.25rem;
}

.mb-0\.5 {
  margin-bottom: 0.125rem;
}

.mb-1 {
  margin-bottom: 0.25rem;
}

.mb-1\.5 {
  margin-bottom: 0.375rem;
}

.mb-10 {
  margin-bottom: 2.5rem;
}

.mb-2 {
  margin-bottom: 0.5rem;
}

.mb-3 {
  margin-bottom: 0.75rem;
}

.mb-4 {
  margin-bottom: 1rem;
}

.mb-5 {
  margin-bottom: 1.25rem;
}

.mb-6 {
  margin-bottom: 1.5rem;
}

.mb-7 {
  margin-bottom: 1.75rem;
}

.mb-8 {
  margin-bottom: 2rem;
}

.ml-1\.5 {
  margin-left: 0.375rem;
}

.ml-3 {
  margin-left: 0.75rem;
}

.ml-auto {
  margin-left: auto;
}

.mt-0\.5 {
  margin-top: 0.125rem;
}

.mt-1 {
  margin-top: 0.25rem;
}

.mt-1\.5 {
  margin-top: 0.375rem;
}

.mt-2 {
  margin-top: 0.5rem;
}

.mt-3 {
  margin-top: 0.75rem;
}

.mt-6 {
  margin-top: 1.5rem;
}

.mt-8 {
  margin-top: 2rem;
}

.block {
  display: block;
}

.inline-block {
  display: inline-block;
}

.flex {
  display: flex;
}

.inline-flex {
  display: inline-flex;
}

.grid {
  display: grid;
}

.hidden {
  display: none;
}

.h-0\.5 {
  height: 0.125rem;
}

.h-1 {
  height: 0.25rem;
}

.h-10 {
  height: 2.5rem;
}

.h-11 {
  height: 2.75rem;
}

.h-12 {
  height: 3rem;
}

.h-14 {
  height: 3.5rem;
}

.h-2 {
  height: 0.5rem;
}

.h-20 {
  height: 5rem;
}

.h-4 {
  height: 1rem;
}

.h-5 {
  height: 1.25rem;
}

.h-7 {
  height: 1.75rem;
}

.h-8 {
  height: 2rem;
}

.h-9 {
  height: 2.25rem;
}

.h-full {
  height: 100%;
}

.min-h-\[65vh\] {
  min-height: 65vh;
}

.w-10 {
  width: 2.5rem;
}

.w-11 {
  width: 2.75rem;
}

.w-12 {
  width: 3rem;
}

.w-14 {
  width: 3.5rem;
}

.w-2 {
  width: 0.5rem;
}

.w-20 {
  width: 5rem;
}

.w-4 {
  width: 1rem;
}

.w-5 {
  width: 1.25rem;
}

.w-7 {
  width: 1.75rem;
}

.w-8 {
  width: 2rem;
}

.w-9 {
  width: 2.25rem;
}

.w-full {
  width: 100%;
}

.w-px {
  width: 1px;
}

.min-w-0 {
  min-width: 0px;
}

.max-w-24 {
  max-width: 6rem;
}

.max-w-lg {
  max-width: 32rem;
}

.flex-1 {
  flex: 1 1 0%;
}

.flex-shrink-0 {
  flex-shrink: 0;
}

.shrink-0 {
  flex-shrink: 0;
}

.transform {
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

.cursor-pointer {
  cursor: pointer;
}

.select-none {
  -webkit-user-select: none;
     -moz-user-select: none;
          user-select: none;
}

.grid-cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.flex-col {
  flex-direction: column;
}

.flex-wrap {
  flex-wrap: wrap;
}

.items-start {
  align-items: flex-start;
}

.items-end {
  align-items: flex-end;
}

.items-center {
  align-items: center;
}

.items-baseline {
  align-items: baseline;
}

.items-stretch {
  align-items: stretch;
}

.justify-end {
  justify-content: flex-end;
}

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

.justify-between {
  justify-content: space-between;
}

.gap-1 {
  gap: 0.25rem;
}

.gap-1\.5 {
  gap: 0.375rem;
}

.gap-2 {
  gap: 0.5rem;
}

.gap-2\.5 {
  gap: 0.625rem;
}

.gap-3 {
  gap: 0.75rem;
}

.space-y-0 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(0px * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(0px * var(--tw-space-y-reverse));
}

.space-y-2 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(0.5rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(0.5rem * var(--tw-space-y-reverse));
}

.space-y-3 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(0.75rem * var(--tw-space-y-reverse));
}

.space-y-4 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(1rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(1rem * var(--tw-space-y-reverse));
}

.space-y-5 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(1.25rem * var(--tw-space-y-reverse));
}

.space-y-6 > :not([hidden]) ~ :not([hidden]) {
  --tw-space-y-reverse: 0;
  margin-top: calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));
  margin-bottom: calc(1.5rem * var(--tw-space-y-reverse));
}

.truncate {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.whitespace-pre-wrap {
  white-space: pre-wrap;
}

.rounded {
  border-radius: 0.25rem;
}

.rounded-2xl {
  border-radius: 1rem;
}

.rounded-3xl {
  border-radius: 1.5rem;
}

.rounded-full {
  border-radius: 9999px;
}

.rounded-lg {
  border-radius: 0.5rem;
}

.rounded-md {
  border-radius: 0.375rem;
}

.rounded-xl {
  border-radius: 0.75rem;
}

.rounded-b-xl {
  border-bottom-right-radius: 0.75rem;
  border-bottom-left-radius: 0.75rem;
}

.rounded-t-xl {
  border-top-left-radius: 0.75rem;
  border-top-right-radius: 0.75rem;
}

.border {
  border-width: 1px;
}

.border-border-color {
  border-color: var(--border);
}

.bg-accent {
  background-color: var(--accent);
}

.bg-border-color {
  background-color: var(--border);
}

.object-cover {
  -o-object-fit: cover;
     object-fit: cover;
}

.px-1 {
  padding-left: 0.25rem;
  padding-right: 0.25rem;
}

.px-2 {
  padding-left: 0.5rem;
  padding-right: 0.5rem;
}

.px-3 {
  padding-left: 0.75rem;
  padding-right: 0.75rem;
}

.px-3\.5 {
  padding-left: 0.875rem;
  padding-right: 0.875rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.px-6 {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.py-0\.5 {
  padding-top: 0.125rem;
  padding-bottom: 0.125rem;
}

.py-1\.5 {
  padding-top: 0.375rem;
  padding-bottom: 0.375rem;
}

.py-10 {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}

.py-12 {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.py-2 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.py-2\.5 {
  padding-top: 0.625rem;
  padding-bottom: 0.625rem;
}

.py-3 {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.py-4 {
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.py-5 {
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}

.py-6 {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.py-8 {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.pb-28 {
  padding-bottom: 7rem;
}

.pb-4 {
  padding-bottom: 1rem;
}

.pl-11 {
  padding-left: 2.75rem;
}

.pr-8 {
  padding-right: 2rem;
}

.pt-0\.5 {
  padding-top: 0.125rem;
}

.pt-1 {
  padding-top: 0.25rem;
}

.pt-2 {
  padding-top: 0.5rem;
}

.pt-3 {
  padding-top: 0.75rem;
}

.pt-4 {
  padding-top: 1rem;
}

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

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

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

.font-mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

.text-2xl {
  font-size: 1.5rem;
  line-height: 2rem;
}

.text-3xl {
  font-size: 1.875rem;
  line-height: 2.25rem;
}

.text-4xl {
  font-size: 2.25rem;
  line-height: 2.5rem;
}

.text-base {
  font-size: 1rem;
  line-height: 1.5rem;
}

.text-lg {
  font-size: 1.125rem;
  line-height: 1.75rem;
}

.text-sm {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
}

.text-xs {
  font-size: 0.75rem;
  line-height: 1rem;
}

.font-bold {
  font-weight: 700;
}

.font-medium {
  font-weight: 500;
}

.font-normal {
  font-weight: 400;
}

.font-semibold {
  font-weight: 600;
}

.uppercase {
  text-transform: uppercase;
}

.normal-case {
  text-transform: none;
}

.italic {
  font-style: italic;
}

.tabular-nums {
  --tw-numeric-spacing: tabular-nums;
  font-variant-numeric: var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction);
}

.leading-none {
  line-height: 1;
}

.leading-relaxed {
  line-height: 1.625;
}

.leading-snug {
  line-height: 1.375;
}

.leading-tight {
  line-height: 1.25;
}

.tracking-normal {
  letter-spacing: 0em;
}

.tracking-tight {
  letter-spacing: -0.025em;
}

.tracking-wider {
  letter-spacing: 0.05em;
}

.tracking-widest {
  letter-spacing: 0.1em;
}

.text-accent {
  color: var(--accent);
}

.text-blue-500 {
  --tw-text-opacity: 1;
  color: rgb(59 130 246 / var(--tw-text-opacity, 1));
}

.text-border-color {
  color: var(--border);
}

.text-danger {
  color: var(--danger);
}

.text-muted {
  color: var(--muted);
}

.text-red-500 {
  --tw-text-opacity: 1;
  color: rgb(239 68 68 / var(--tw-text-opacity, 1));
}

.text-red-600 {
  --tw-text-opacity: 1;
  color: rgb(220 38 38 / var(--tw-text-opacity, 1));
}

.text-text-color {
  color: var(--text);
}

.no-underline {
  text-decoration-line: none;
}

.transition-colors {
  transition-property: color, background-color, border-color, text-decoration-color, fill, stroke;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

.transition-transform {
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  transition-duration: 150ms;
}

/* ─── Design-system tokens ──────────────────────────────────────────── */

:root {
  --bg:          #FAF8F5;
  --surface:     #FFFFFF;
  --surface-2:   #F0EBE5;
  --border:      #E2DBD4;
  --text:        #1C1917;
  --muted:       #78716C;
  --accent:      #D97706;
  --accent-dark: #92400E;
  --danger:      #DC2626;
  --success:     #059669;
}

/* ─── Global resets ─────────────────────────────────────────────────── */

* {
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
}

body {
  font-family: 'DM Sans', sans-serif;
  background-color: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

/* Grain overlay */

body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  opacity: 0.035;
  pointer-events: none;
  z-index: 9999;
}

/* Scrollbar */

::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: var(--surface-2);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

/* HTMX loading indicator */

.htmx-indicator {
  opacity: 0;
  transition: opacity 0.2s;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  opacity: 1;
}

/* ─── Keyframes ─────────────────────────────────────────────────────── */

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to   {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes overdueFlash {
  0%, 100% {
    opacity: 1;
  }

  50% {
    opacity: 0.6;
  }
}

@keyframes refreshPulse {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.7);
  }
}

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

/* ─── Component layer ───────────────────────────────────────────────── */

.hover\:underline:hover {
  text-decoration-line: underline;
}

.active\:scale-95:active {
  --tw-scale-x: .95;
  --tw-scale-y: .95;
  transform: translate(var(--tw-translate-x), var(--tw-translate-y)) rotate(var(--tw-rotate)) skewX(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y));
}

@media (min-width: 640px) {
  .sm\:block {
    display: block;
  }
}
