/* ---------- Base ---------- */
html, body {
    font-family: 'Inter', 'Geist', system-ui, sans-serif;
    margin: 0;
    padding: 0;
    background: var(--uniq-bg);
    color: var(--uniq-text);
}

/* ---------- Appbar — flat with a hairline bottom border ---------- */
.mud-appbar { border-bottom: 1px solid var(--uniq-line) !important; }

/* ---------- Tables — UNIQ feel ---------- */
.mud-table-root { background: var(--uniq-surface) !important; border: 1px solid var(--uniq-line); border-radius: 6px; }
.mud-table-head .mud-table-cell { font-size: 10.5px !important; font-weight: 500 !important; letter-spacing: .3px; text-transform: uppercase; color: var(--uniq-text-dim) !important; background: var(--uniq-surface2) !important; border-bottom: 1px solid var(--uniq-line) !important; }
.mud-table-body .mud-table-cell { font-size: 12.5px !important; border-bottom: 1px solid var(--uniq-line) !important; }
.mud-table-body .mud-table-row:hover { background: var(--uniq-surface2) !important; }

/* ---------- Drawer / sidenav — compact, 12px, accent active ---------- */
.mud-drawer { background: var(--uniq-surface) !important; border-right: 1px solid var(--uniq-line) !important; }
.mud-nav-link {
    font-size: 12px !important;
    font-weight: 400 !important;
    color: var(--uniq-text-dim) !important;
    padding: 5px 12px !important;
    min-height: 0 !important;
    border-radius: 4px !important;
    margin: 2px 8px !important;
}
.mud-nav-link .mud-nav-link-icon,
.mud-nav-link .mud-nav-link-icon svg,
.mud-nav-link .mud-icon-root {
    font-size: 16px !important;
    width: 16px !important;
    height: 16px !important;
    min-width: 16px !important;
    margin-right: 8px !important;
    color: var(--uniq-text-mute) !important;
    opacity: 0.8;
    transition: color 0.15s ease, opacity 0.15s ease;
}
.mud-nav-link.active {
    background: var(--uniq-accent-soft) !important;
    color: var(--uniq-accent) !important;
    font-weight: 500 !important;
}
.mud-nav-link.active .mud-nav-link-icon,
.mud-nav-link.active .mud-icon-root { color: var(--uniq-accent) !important; opacity: 1; }
.mud-nav-link:hover { background: var(--uniq-surface2) !important; color: var(--uniq-text) !important; }
.mud-nav-link:hover .mud-nav-link-icon,
.mud-nav-link:hover .mud-icon-root { color: var(--uniq-accent) !important; opacity: 1; }
.mud-nav-group-title { font-size: 10px !important; font-weight: 600 !important; letter-spacing: .6px !important; text-transform: uppercase !important; color: var(--uniq-text-mute) !important; padding: 12px 20px 4px !important; }

/* ---------- Card surfaces ---------- */
.mud-paper { background: var(--uniq-surface) !important; border: 1px solid var(--uniq-line) !important; }

/* ---------- Inputs ---------- */
.mud-input-root { font-size: 13px !important; }
.mud-input-label { font-size: 11px !important; color: var(--uniq-text-dim) !important; }
/* Outlined notch <legend> reserves the floated-label width. The label is 11px x scale(.75)=8.25px,
   but MudBlazor's legend is a fixed .75rem(12px) -> the cut-out was wider than the label (empty gap).
   Match the legend to the shrunk label so the notch hugs the text. */
.mud-input.mud-input-outlined > .mud-input-outlined-border legend { font-size: 8.25px !important; }

/* ---------- Kanban board ---------- */
/* Static (not toggled during dragstart — that aborts the native drag in Chrome). Inherited by headers
   and cards, so sweeping the cursor while dragging no longer selects text. */
.kanban-board { align-items: flex-start; padding-bottom: 8px; user-select: none; -webkit-user-select: none; }
.kanban-column {
    width: 290px; min-width: 290px; display: flex; flex-direction: column;
    max-height: calc(100vh - 200px);
    background: var(--uniq-surface2); border: 1px solid var(--uniq-line);
    border-radius: 10px; overflow: hidden;
}
.kanban-column__header {
    display: flex; align-items: center; gap: 6px;
    padding: 6px 6px 6px 10px; border-bottom: 1px solid var(--uniq-line);
    background: var(--uniq-surface);
    cursor: grab; /* the header doubles as the column's drag handle */
}
.kanban-column__header:active { cursor: grabbing; }
.kanban-column__header .mud-icon-button { cursor: pointer; }
.kanban-column__dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.kanban-column__count {
    min-width: 22px; height: 20px; padding: 0 6px; border-radius: 10px;
    background: var(--uniq-surface3); color: var(--uniq-text-dim);
    font-size: 11px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center;
}
.kanban-dropzone {
    flex: 1 1 auto; min-height: 120px; overflow-y: auto;
    padding: 8px; transition: background .15s ease, box-shadow .15s ease;
}
.kanban-dropzone--can-drop { background: var(--uniq-accent-soft); box-shadow: inset 0 0 0 2px var(--uniq-accent-line); }
/* Source dims to a placeholder while the opaque custom drag image (kanban-drag.js) follows the cursor.
   (The dragged card itself is fully hidden by a ticket-id stylesheet rule injected from kanban-drag.js,
   which survives MudBlazor's re-renders; this .35 is only a fallback for any item still using the class.) */
.kanban-item--dragging { opacity: .35; }
/* A dragged column becomes an invisible travelling gap; the others slide aside to make room. */
.kanban-column--dragging { opacity: 0; }
.kanban-board--reordering .kanban-column { transition: transform .18s cubic-bezier(.2, .8, .2, 1); }
/* The card clone wraps the card in a .mud-drop-item box — keep that wrapper invisible so only the
   card shows (no stray strip from the card's bottom margin); put the lift shadow on the card itself. */
.kanban-drag-image { background: transparent !important; border: none !important; box-shadow: none !important; }
.mud-drop-item.kanban-drag-image .mud-card { box-shadow: 0 16px 34px rgba(0, 0, 0, .4) !important; }
/* The column clone keeps its surface and gets its own lift shadow (overrides the transparent rule above). */
.kanban-column.kanban-drag-image {
    background: var(--uniq-surface2) !important; border: 1px solid var(--uniq-line) !important;
    box-shadow: 0 18px 38px rgba(0, 0, 0, .45) !important; opacity: 1 !important;
}
.kanban-add-column {
    min-width: 200px; height: 44px; align-self: flex-start;
    border: 1px dashed var(--uniq-line-strong) !important; color: var(--uniq-text-dim) !important;
}

/* ---------- Screenshot paste zone (functional component) ---------- */
.paste-zone {
    position: relative;
    cursor: pointer;
    border: 2px dashed var(--uniq-line-strong);
    border-radius: 8px;
    padding: 20px 16px;
    text-align: center;
    transition: border-color .15s ease, background .15s ease;
    background: var(--uniq-surface2);
}

.paste-zone:focus-within,
.paste-zone:hover {
    outline: none;
    border-color: var(--uniq-accent);
    background: var(--uniq-surface);
}

/* Transparent file input covering the whole zone — catches click and native file drop. */
.paste-zone__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.paste-zone__icon {
    font-size: 2rem;
    color: var(--uniq-text-mute);
}

.attachment-thumb {
    position: relative;
    display: inline-block;
    margin: 4px;
}

/* ---------- Status filter chips (Requests inbox) ---------- */
.status-filter { display: flex; flex-wrap: wrap; gap: 6px; }

.status-filter__chip {
    --chip-color: var(--uniq-text-mute);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 30px;
    padding: 0 11px;
    background: var(--uniq-surface);
    border: 1px solid var(--uniq-line);
    border-radius: 7px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 12.5px;
    font-weight: 500;
    line-height: 1;
    color: var(--uniq-text-dim);
    cursor: pointer;
    transition: background .12s ease, border-color .12s ease, color .12s ease, box-shadow .12s ease;
}

.status-filter__chip--all { --chip-color: var(--uniq-accent); }

.status-filter__chip:hover {
    background: var(--uniq-surface2);
    border-color: var(--uniq-line-strong);
    color: var(--uniq-text);
}

.status-filter__chip:focus-visible {
    outline: none;
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--chip-color) 45%, transparent);
}

.status-filter__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--chip-color);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--chip-color) 20%, transparent);
    flex: 0 0 auto;
}

.status-filter__label { letter-spacing: .1px; }

.status-filter__count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    line-height: 1;
    color: var(--uniq-text-mute);
    font-variant-numeric: tabular-nums;
    background: var(--uniq-surface2);
    border-radius: 4px;
    padding: 2px 5px;
    min-width: 18px;
    text-align: center;
}

.status-filter__chip.is-active {
    color: var(--uniq-text);
    border-color: color-mix(in srgb, var(--chip-color) 50%, var(--uniq-line));
    background: color-mix(in srgb, var(--chip-color) 12%, var(--uniq-surface));
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--chip-color) 28%, transparent);
}

.status-filter__chip.is-active .status-filter__count {
    color: var(--chip-color);
    background: color-mix(in srgb, var(--chip-color) 16%, transparent);
}

.status-filter__chip.is-active .status-filter__dot {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--chip-color) 30%, transparent);
}
