/* Design tokens now live in css/tokens.css (loaded before this file). */

html, body {
    font-family: var(--font-ui);
    background-color: var(--bg);
    color: var(--text);
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    overflow-x: hidden;
    transition: background-color .45s ease, color .45s ease;
}
::selection { background: var(--accent-soft); }

/* ---------- ambient background layer ---------- */
.ambient { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .9; transition: background .45s ease; }
.blob.b1 { width: 640px; height: 640px; top: -260px; left: 32%; background: var(--blob-1); animation: drift1 26s ease-in-out infinite alternate; }
.blob.b2 { width: 520px; height: 520px; top: -160px; right: -140px; background: var(--blob-2); animation: drift2 34s ease-in-out infinite alternate; }
.blob.b3 { width: 460px; height: 460px; bottom: -220px; left: 8%; background: var(--blob-3); animation: drift3 30s ease-in-out infinite alternate; }
@keyframes drift1 { to { transform: translate(70px, 50px) scale(1.12); } }
@keyframes drift2 { to { transform: translate(-60px, 80px) scale(.92); } }
@keyframes drift3 { to { transform: translate(90px, -40px) scale(1.08); } }
.grid-tex {
    position: absolute; inset: 0;
    background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 44px 44px; opacity: .28;
    -webkit-mask-image: radial-gradient(900px 480px at 55% 0%, #000 0%, transparent 75%);
    mask-image: radial-gradient(900px 480px at 55% 0%, #000 0%, transparent 75%);
}

/* Glass surface utility — used as pages adopt the v2 look */
.glass {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-1);
    backdrop-filter: blur(16px) saturate(150%);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .glass { background: var(--panel-solid); }
}

/* Kill-switches: one class turns the fashion off; respect user prefs */
html.fx-off .ambient { display: none; }
html.fx-off .glass { background: var(--panel-solid); backdrop-filter: none; -webkit-backdrop-filter: none; }
@media (prefers-reduced-transparency: reduce) {
    .glass { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--panel-solid); }
}

/* Theme toggle button (light shows moon, dark shows sun) */
.theme-toggle {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    border: 1px solid var(--border);
    background: var(--panel-2);
    color: var(--text-2);
    cursor: pointer;
    flex-shrink: 0;
    transition: color .15s, border-color .15s, background .15s;
}
.theme-toggle:hover { color: var(--accent); border-color: var(--accent-ring); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .ico-sun { display: none; }
[data-theme="dark"] .theme-toggle .ico-moon { display: none; }
[data-theme="dark"] .theme-toggle .ico-sun { display: inline; }

/* Thin custom scrollbars (replaces the default gray that broke the look) */
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* Global reduced-motion: kill every animation + transition (JS count-ups jump to final separately) */
@media (prefers-reduced-motion: reduce) {
    .ambient, .blob { animation: none !important; }
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

h1, h2, h3, h4, h5 {
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text);
}

h1 { font-size: 1.6rem; margin-bottom: 1.25rem; }
h3 { font-size: 1.15rem; }
h4 { font-size: 1.05rem; }
h5 { font-size: .95rem; margin-top: 1.25rem; }

a, .btn-link {
    color: var(--brand);
    text-decoration: none;
}

a:hover { color: var(--brand-hover); text-decoration: underline; }

h1:focus { outline: none; }

/* Cards */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Surfaces used across pages */
.bg-light { background-color: var(--surface-2) !important; }

/* Tables */
.table {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    border-collapse: separate;
    border-spacing: 0;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.table > thead > tr > th {
    background: var(--surface-2);
    color: var(--muted);
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 1px solid var(--border);
    padding: .7rem 1rem;
}

.table > tbody > tr > td {
    padding: .7rem 1rem;
    border-top: 1px solid var(--border);
    vertical-align: middle;
}

.table.table-hover > tbody > tr:hover > td { background: var(--surface-2); }

/* List groups */
.list-group-item {
    border-color: var(--border);
}

/* Badges — soft, pill-shaped */
.badge {
    font-weight: 500;
    font-size: .74rem;
    padding: .32em .7em;
    border-radius: 999px;
    letter-spacing: .01em;
}

.badge.bg-secondary { background: #e2e8f0 !important; color: #475569 !important; }
.badge.bg-primary { background: #e0e7ff !important; color: #4338ca !important; }
.badge.bg-info { background: #cffafe !important; color: #0e7490 !important; }
.badge.bg-success { background: #dcfce7 !important; color: #15803d !important; }
.badge.bg-warning { background: #fef9c3 !important; color: #a16207 !important; }
.badge.bg-danger { background: #fee2e2 !important; color: #b91c1c !important; }
.badge.bg-dark { background: #1e293b !important; color: #fff !important; }

/* Buttons */
.btn {
    border-radius: var(--radius-sm);
    font-weight: 500;
    padding: .45rem .9rem;
}

.btn-sm { padding: .28rem .6rem; }

.btn-primary {
    color: #fff;
    background-color: var(--brand);
    border-color: var(--brand);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--brand-hover);
    border-color: var(--brand-hover);
}

.btn:focus, .btn:active:focus, .form-control:focus, .form-select:focus, .form-check-input:focus {
    box-shadow: 0 0 0 .2rem rgba(79, 70, 229, .2);
}

/* Forms */
.form-control, .form-select {
    border-radius: var(--radius-sm);
    border-color: var(--border);
    padding: .5rem .75rem;
}

.form-control:focus, .form-select:focus { border-color: var(--brand); }

.form-label { font-weight: 500; font-size: .88rem; color: #334155; }

.alert { border-radius: var(--radius-sm); border: 1px solid transparent; }

/* Top bar: user chip + language switcher */
.user-chip {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    color: var(--text);
}

.user-chip:hover { text-decoration: none; color: var(--text); }
.user-chip:hover .avatar-name { color: var(--brand-hover); }

.user-avatar {
    display: grid;
    place-items: center;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-hover);
    font-weight: 700;
    font-size: .8rem;
}

.user-name { font-weight: 600; color: var(--text); font-size: .9rem; }

/* Per-person avatars (emoji or initial on a stable color) */
.avatar {
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: #fff;
    font-weight: 700;
    line-height: 1;
    flex: 0 0 auto;
    user-select: none;
}

.avatar-chip {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    max-width: 100%;
}

.avatar-name {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Overlapping cluster for multiple assignees */
.avatar-stack { display: inline-flex; align-items: center; }
.avatar-stack .avatar { box-shadow: 0 0 0 2px var(--panel-solid); margin-left: -7px; transition: transform .2s var(--spring); }
.avatar-stack .avatar:first-child { margin-left: 0; }
.avatar-stack .avatar:hover { transform: translateY(-3px) scale(1.08); z-index: 2; }

/* Unified avatar (UserAvatar.razor): initials on palette gradient / sigil on slate / photo */
.uav { position: relative; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; overflow: hidden; flex: none; color: #fff; font-weight: 700; user-select: none; }
.uav .uav-init { line-height: 1; letter-spacing: -.01em; }
.uav img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.uav svg.sig { width: 58%; height: 58%; filter: drop-shadow(0 0 5px color-mix(in srgb, var(--sg, #818cf8) 60%, transparent)) drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }

/* ============================================================
   Profile redesign (spec-profile-redesign, mockup_3): identity
   stage + sigil grid + color orbs + preview rail + save bar
   ============================================================ */
.pf-wrap { max-width: 1060px; margin: 0 auto; padding-bottom: 120px; }
.pf-head { margin-bottom: 30px; animation: rise .6s var(--smooth) both; }
.pf-eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.pf-h1 { font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin: 0; }
.pf-sub { color: var(--text-2); font-size: 14px; margin-top: 7px; }
.pf-card { position: relative; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 20px; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); overflow: hidden; }
.pf-card::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, -40%), var(--accent-soft), transparent 60%); transition: opacity .3s; opacity: 0; }
.pf-card:hover::before { opacity: 1; }
.pf-cols { display: grid; grid-template-columns: 1fr 360px; gap: 22px; align-items: start; }
@media (max-width: 900px) { .pf-cols { grid-template-columns: 1fr; } }

/* identity stage */
.pf-stage { display: flex; align-items: center; gap: 28px; padding: 30px 32px; margin-bottom: 22px; animation: rise .6s var(--smooth) .06s both; overflow: visible; }
.pf-orb-wrap { position: relative; width: 112px; height: 112px; flex: none; }
.pf-orb-ring { position: absolute; inset: -7px; border-radius: 50%; background: conic-gradient(from 0deg, var(--glow, #6366f1), transparent 30%, transparent 65%, var(--glow, #6366f1)); animation: pfSpin 7s linear infinite; -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px)); mask: radial-gradient(farthest-side, transparent calc(100% - 2.5px), #000 calc(100% - 2px)); opacity: .85; }
@keyframes pfSpin { to { transform: rotate(360deg); } }
.pf-orb { width: 112px; height: 112px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; letter-spacing: -.02em; overflow: hidden; box-shadow: 0 0 46px -6px var(--glow, #6366f1), 0 8px 24px rgba(0, 0, 0, .45); transition: box-shadow .45s var(--smooth), background .3s; user-select: none; }
.pf-orb.pop { animation: pfPop .5s var(--spring); }
@keyframes pfPop { 0% { transform: scale(.82); } 60% { transform: scale(1.08); } 100% { transform: scale(1); } }
.pf-orb.heehaw { animation: pfHeehaw .8s var(--smooth); }
@keyframes pfHeehaw { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(-12deg); } 30% { transform: rotate(10deg); } 45% { transform: rotate(-8deg); } 60% { transform: rotate(6deg); } 75% { transform: rotate(-3deg); } }
.pf-orb-init { color: #fff; font-size: 40px; }
.pf-orb svg.sig { width: 62px; height: 62px; }
.pf-orb img { width: 100%; height: 100%; object-fit: cover; }
.pf-stage-info { min-width: 0; }
.pf-stage-name { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.pf-stage-mail { font-family: var(--font-mono); font-size: 13px; color: var(--text-2); margin-top: 5px; }
.pf-stage-meta { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.pf-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; padding: 5px 11px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--border); color: var(--text-2); }
.pf-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--done); display: inline-block; }
.pf-chip.role i { background: var(--accent); }

/* editor */
.pf-editor { padding: 26px 28px; display: flex; flex-direction: column; gap: 26px; animation: rise .6s var(--smooth) .12s both; }
.pf-label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.pf-hint { font-size: 12px; color: var(--text-3); margin-top: 10px; }
.pf-error { font-size: 12px; color: var(--crit); margin-top: 8px; }
.pf-input { width: 100%; padding: 12px 15px; font: inherit; font-size: 15px; color: var(--text); background: var(--input-bg); border: 1px solid var(--border); border-radius: 12px; outline: none; transition: border-color .2s, box-shadow .2s; }
.pf-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pf-grid { display: flex; flex-wrap: wrap; gap: 9px; }
.pf-tile { position: relative; width: 52px; height: 52px; border-radius: 14px; display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; padding: 0; background: radial-gradient(130% 130% at 30% 18%, hsla(var(--h, 240), 70%, 58%, .20), hsla(var(--h, 240), 60%, 30%, .05) 74%), linear-gradient(150deg, #161927, #0e1019); border: 1px solid hsla(var(--h, 240), 70%, 70%, .18); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08); transition: transform .25s var(--spring), border-color .2s, box-shadow .25s; }
.pf-tile::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(155deg, rgba(255, 255, 255, .10), transparent 45%); pointer-events: none; }
.pf-tile:hover { transform: scale(1.15) rotate(-4deg); border-color: hsla(var(--h, 240), 80%, 72%, .5); }
.pf-tile:focus-visible, .pf-photo-tile:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pf-tile.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), 0 0 20px -4px var(--accent), inset 0 1px 0 rgba(255, 255, 255, .08); }
.pf-tile svg.sig { width: 31px; height: 31px; }
.pf-init-tile { font-family: var(--font-mono); font-size: 19px; font-weight: 600; color: #f2f2f7; }
.pf-photo-tile { border-style: dashed; border-color: var(--border-strong); margin-bottom: 0; }
.pf-photo-tile:hover { border-color: var(--accent); border-style: dashed; }
.pf-photo-tile.has-photo { border-style: solid; }
.pf-photo-tile img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.pf-photo-tile .cam { width: 22px; height: 22px; stroke: var(--text-2); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: stroke .2s; }
.pf-photo-tile:hover .cam { stroke: var(--accent); }
.pf-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.pf-grid-split { width: 1px; height: 40px; background: var(--border-strong); margin: 6px 5px; flex: none; align-self: center; }
.pf-orbs { display: flex; gap: 12px; flex-wrap: wrap; }
.pf-corb { position: relative; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; border: none; transition: transform .25s var(--spring); }
.pf-corb:hover { transform: scale(1.15); }
.pf-corb:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.pf-corb::after { content: ""; position: absolute; inset: -5px; border-radius: 50%; border: 2px solid transparent; transition: border-color .2s; }
.pf-corb.sel::after { border-color: var(--text); }
.pf-corb .ck { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff; opacity: 0; transform: scale(.4); transition: all .25s var(--spring); }
.pf-corb.sel .ck { opacity: 1; transform: scale(1); }

/* live preview rail */
.pf-preview { padding: 22px; position: sticky; top: 24px; animation: rise .6s var(--smooth) .18s both; }
.pf-pv-title { font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.pf-pv-sub { font-size: 12px; color: var(--text-3); margin-bottom: 18px; }
.pf-pv-item { margin-bottom: 16px; }
.pf-pv-tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--text-3); margin-bottom: 8px; }
.pf-pv-box { background: var(--panel-2); border: 1px solid var(--border); border-radius: 12px; padding: 13px 14px; }
.pf-av { width: 32px; height: 32px; border-radius: 50%; flex: none; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; transition: background .3s; }
.pf-av-init { color: #fff; font-size: 12.5px; font-weight: 700; }
.pf-av svg.sig { width: 19px; height: 19px; }
.pf-av img { width: 100%; height: 100%; object-fit: cover; }
.pf-av.sm { width: 22px; height: 22px; }
.pf-av-init.sm { font-size: 9px; }
.pf-av.sm svg.sig { width: 13px; height: 13px; }
.pf-pv-comment { display: flex; gap: 11px; }
.pf-pv-cbody { min-width: 0; }
.pf-pv-cline { font-size: 12.5px; color: var(--text-2); }
.pf-pv-cline b { color: var(--text); font-weight: 600; }
.pf-pv-cline .tk { font-family: var(--font-mono); font-size: 11px; color: var(--accent); }
.pf-pv-ctext { font-size: 13px; margin-top: 5px; line-height: 1.45; }
.pf-pv-assign { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pf-pv-tt { font-size: 13px; font-weight: 600; }
.pf-pv-pill { display: inline-flex; align-items: center; gap: 7px; background: var(--panel-2); border: 1px solid var(--border); padding: 4px 10px 4px 4px; border-radius: 999px; font-size: 12px; font-weight: 500; }
.pf-pv-notif { display: flex; gap: 11px; align-items: flex-start; }
.pf-pv-ntext { font-size: 12.5px; color: var(--text-2); line-height: 1.4; }
.pf-pv-ntext b { color: var(--text); }
.pf-pv-ntime { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3); margin-top: 4px; }

/* save bar + toast */
.pf-savebar { position: fixed; left: 50%; bottom: 26px; z-index: 80; transform: translate(-50%, 96px); display: flex; align-items: center; gap: 16px; background: var(--panel-solid); border: 1px solid var(--border-strong); border-radius: 999px; padding: 10px 10px 10px 20px; box-shadow: var(--shadow-2); transition: transform .45s var(--spring); }
.pf-savebar.show { transform: translate(-50%, 0); }
.pf-sb-txt { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.pf-sb-txt::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--uat); margin-right: 9px; vertical-align: 1px; }
.pf-btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 14px; font-weight: 600; color: #fff; background: linear-gradient(135deg, #6366f1, #7c5cf6); border: none; border-radius: 999px; padding: 11px 22px; cursor: pointer; transition: transform .2s var(--spring), box-shadow .25s; box-shadow: 0 4px 18px -4px rgba(99, 102, 241, .55); min-width: 168px; }
.pf-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 26px -4px rgba(99, 102, 241, .7); }
.pf-btn:active { transform: translateY(0) scale(.98); }
.pf-btn:disabled { opacity: .75; cursor: default; }
.pf-btn .spin { width: 15px; height: 15px; border: 2px solid rgba(255, 255, 255, .35); border-top-color: #fff; border-radius: 50%; animation: pfSpin .7s linear infinite; display: none; }
.pf-btn.saving .spin { display: block; }
.pf-btn.saving .lbl-idle { display: none; }
.pf-btn .lbl-saving, .pf-btn .lbl-done { display: none; }
.pf-btn.saving .lbl-saving { display: inline; }
.pf-btn.done { background: linear-gradient(135deg, #10b981, #0ea371); }
.pf-btn.done .lbl-idle, .pf-btn.done .lbl-saving, .pf-btn.done .spin { display: none; }
.pf-btn.done .lbl-done { display: inline-flex; align-items: center; gap: 8px; }
.pf-toast { position: fixed; top: 24px; left: 50%; transform: translate(-50%, -70px); z-index: 140; font-family: var(--font-mono); font-size: 12.5px; color: var(--text); background: var(--panel-solid); border: 1px solid var(--border-strong); border-radius: 999px; padding: 9px 18px; box-shadow: var(--shadow-2); transition: transform .45s var(--spring), opacity .3s; opacity: 0; pointer-events: none; }
.pf-toast.show { transform: translate(-50%, 0); opacity: 1; }
@media (prefers-reduced-motion: reduce) {
    .pf-orb-ring, .pf-orb.pop, .pf-orb.heehaw, .pf-btn .spin { animation: none; }
}

.language-selector {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-size: .8rem;
}

    .language-selector .lang-label { color: var(--text-3); font-size: .78rem; }

    .language-selector .lang-link {
        padding: 3px 9px;
        border-radius: 7px;
        color: var(--text-2);
        font-weight: 500;
        transition: background .15s, color .15s;
    }

    .language-selector .lang-link.active {
        background: var(--accent-soft);
        color: var(--accent);
    }

.content { padding-top: 0; }

.valid.modified:not([type=checkbox]) { outline: 1px solid #26b050; }
.invalid { outline: 1px solid #e50000; }
.validation-message { color: #e50000; }

.blazor-error-boundary {
    background: #b32121;
    padding: 1rem 1rem 1rem 1rem;
    color: white;
    border-radius: var(--radius-sm);
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

/* Home dashboard */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 1rem;
    margin-bottom: 2.25rem;
}

.stat-card {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 1.25rem 1.4rem;
    color: var(--text);
    text-decoration: none;
    transition: box-shadow .12s, transform .12s;
}

.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); text-decoration: none; color: var(--text); }
.stat-card.accent { border-left: 3px solid var(--brand); }
.stat-value { font-size: 2rem; font-weight: 700; line-height: 1; font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.num-cell { font-family: var(--font-mono); font-variant-numeric: tabular-nums; text-align: right; }
.avg-warn { color: var(--uat); font-weight: 600; }
.stat-label { color: var(--muted); font-size: .85rem; margin-top: .4rem; }

.quick-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 1rem;
    margin-top: .75rem;
}

.quick-card {
    display: flex;
    align-items: center;
    gap: .8rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: .9rem 1.1rem;
    color: var(--text);
    text-decoration: none;
    font-weight: 600;
    transition: box-shadow .12s, transform .12s;
}

.quick-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); text-decoration: none; color: var(--text); }

.quick-icon {
    display: grid;
    place-items: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 8px;
    background: var(--brand-soft);
    color: var(--brand-hover);
    flex-shrink: 0;
}

/* Bar list (simple charts) */
.barlist { display: flex; flex-direction: column; gap: 10px; margin-bottom: 1.5rem; }
.barlist-row { display: grid; grid-template-columns: minmax(90px, 150px) 1fr auto; align-items: center; gap: 12px; font-size: 12.5px; }
.barlist-label { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.barlist-track { background: var(--panel-2); border-radius: 6px; height: 6px; overflow: hidden; }
.barlist-fill { background: var(--accent); height: 100%; border-radius: 6px; transform: scaleX(0); transform-origin: left; animation: grow .7s var(--smooth) forwards; }
.barlist-value { font-family: var(--font-mono); font-variant-numeric: tabular-nums; color: var(--text-2); white-space: nowrap; }
.barlist-pct { color: var(--text-3); }

/* Board filter bar */
.board-filters { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: 1rem; }
.board-filters .form-select, .board-filters .form-control { font-size: .88rem; }
.board-search { max-width: 240px; }

/* Compact ticket cards + daily standup */
.count-pill {
    display: inline-block;
    background: var(--surface-2);
    border: 1px solid var(--border);
    color: var(--muted);
    font-size: .72rem;
    font-weight: 700;
    padding: .05rem .55rem;
    border-radius: 999px;
    vertical-align: middle;
    margin-left: .45rem;
}

/* Kept for Home.razor's recent-activity list */
.tcard-num { color: var(--muted); font-size: .76rem; font-weight: 600; }
.digest-title { font-weight: 600; color: var(--text); text-decoration: none; }
.digest-title:hover { color: var(--brand-hover); }

/* ============================================================
   Daily standup — KPI strip + 2x2 quadrant of panels, every
   section rendered from ONE subgrid "row" so the eye learns the
   anatomy once. Title is always the hero; color is only ever
   functional (status / heat / priority rail).
   ============================================================ */

/* KPI strip */
.d-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.d-kpi { background: var(--glass); backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: .7rem .9rem; }
.d-kpi-num { font-size: 1.7rem; font-weight: 700; line-height: 1.1; color: var(--text); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.d-kpi-label { font-size: .7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-top: .15rem; }
.d-kpi-sub { font-size: .75rem; color: var(--muted); }
.d-kpi.is-alert { border-color: #fca5a5; }
.d-kpi.is-alert .d-kpi-num { color: #dc2626; }
.heat-num-warn { color: #f59e0b; }
.heat-num-hot { color: #f97316; }
.heat-num-crit { color: #dc2626; }

/* Quadrant grid + panels */
.d-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; align-items: start; }
.d-panel { background: var(--glass); backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; min-height: 0; }
.d-panel-head { display: flex; align-items: center; gap: .5rem; padding: .6rem .9rem; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); border-radius: var(--radius) var(--radius) 0 0; }
.d-panel-since { margin-left: auto; font-weight: 500; text-transform: none; letter-spacing: 0; }
.d-panel-body { overflow-y: auto; max-height: 46vh; padding: .1rem 0 .2rem; }
.d-empty { color: var(--muted); padding: .8rem .9rem; margin: 0; }

/* Per-person groups (Yesterday / Today) */
.d-group + .d-group { border-top: 1px solid var(--border); }
.d-group-head { position: sticky; top: 0; display: flex; align-items: center; gap: .5rem; padding: .4rem .9rem; background: var(--surface); z-index: 1; }
.d-group-count { font-size: .72rem; font-weight: 700; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: .02rem .45rem; }

/* THE row — one subgrid anatomy reused everywhere */
.d-rows { display: grid; grid-template-columns: 1.1rem minmax(0, 1fr) 4.5rem minmax(0, auto) 2.6rem; column-gap: .55rem; }
.d-row { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; min-height: 36px; padding: .12rem .85rem .12rem .55rem; border-left: 3px solid transparent; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; }
.d-row:last-child { border-bottom: 0; }
.d-row:hover { background: var(--surface-2); }
.d-glyph { display: inline-grid; place-items: center; font-size: .8rem; color: var(--muted); }
.d-title { font-size: .9rem; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
a.d-title:hover, a.d-row:hover .d-title { color: var(--brand-hover); }
.d-tkt { font-size: .75rem; font-weight: 600; color: var(--muted); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.d-meta { display: flex; align-items: center; gap: .4rem; min-width: 0; font-size: .8rem; color: var(--muted); }
.d-snippet { max-width: 15rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-trail { display: flex; justify-content: flex-end; align-items: center; }
.d-time { font-size: .75rem; color: var(--muted); font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.d-due.is-overdue { color: #dc2626; font-weight: 600; }
.d-rem { display: inline-flex; align-items: center; gap: .2rem; font-weight: 600; font-family: var(--font-mono); } .d-rem svg { width: 12px; height: 12px; }

/* Discussed-in-daily rows read as "handled" */
.d-row.is-did { background: var(--surface-2); }
.d-row.is-did .d-title { color: var(--muted); font-weight: 500; }

/* Rails — the only hue on a row */
.rail-new, .rail-comment { border-left-color: var(--muted); }
.rail-developing { border-left-color: var(--brand); }
.rail-uat { border-left-color: #0ea5e9; }
.rail-done { border-left-color: #16a34a; }
.rail-paused { border-left-color: #f59e0b; }
.heat-ok { border-left-color: #16a34a; }
.heat-warn { border-left-color: #f59e0b; }
.heat-hot { border-left-color: #f97316; }
.heat-crit { border-left-color: #dc2626; }
.prio-Low { border-left-color: var(--muted); }
.prio-Medium { border-left-color: var(--brand); }
.prio-High, .prio-Critical { border-left-color: #dc2626; }

/* UAT age meter */
.d-age { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; font-family: var(--font-mono); }
.d-age-bar { width: 48px; height: 5px; border-radius: 999px; background: var(--border); overflow: hidden; }
.d-age-fill { display: block; height: 100%; background: #16a34a; }
.heat-warn .d-age-fill { background: #f59e0b; }
.heat-hot .d-age-fill { background: #f97316; }
.heat-crit .d-age-fill { background: #dc2626; }

/* Circular corner "discussed" check, accessible native input hidden */
.d-did { cursor: pointer; margin: 0; }
.d-did input { position: absolute; opacity: 0; width: 0; height: 0; }
.d-did-box { display: grid; place-items: center; width: 1.25rem; height: 1.25rem; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: transparent; font-size: .75rem; }
.d-did input:checked + .d-did-box { background: var(--brand); border-color: var(--brand); color: #fff; }
.d-did input:focus-visible + .d-did-box { box-shadow: 0 0 0 .18rem rgba(79, 70, 229, .25); }

@media (max-width: 992px) {
    .d-grid { grid-template-columns: 1fr; }
    .d-panel-body { max-height: none; }
}

/* ============================================================
   Activity feed — a chronological timeline grouped by day,
   reusing the Daily design language (avatars, colored rails,
   ticket title as the hero).
   ============================================================ */
.act-feed { position: relative; background: var(--glass); backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.act-day { position: sticky; top: 0; padding: .5rem .95rem; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); border-bottom: 1px solid var(--border); border-top: 1px solid var(--border); z-index: 1; }
.act-feed > .act-day:first-child { border-top: 0; }
.act-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: .7rem; align-items: start; padding: .7rem .95rem; border-bottom: 1px solid var(--border); border-left: 3px solid transparent; }
.act-row:last-child { border-bottom: 0; }
.act-row:hover { background: var(--surface-2); }
.act-body { min-width: 0; }
.act-main { display: flex; align-items: center; flex-wrap: wrap; gap: .3rem; font-size: .9rem; line-height: 1.5; }
.act-row { position: relative; }
.act-row::after { content: ""; position: absolute; left: 1.9rem; top: 50%; bottom: -1px; width: 2px; background: var(--border); z-index: 0; }
.act-row:last-child::after { display: none; }
.act-row .avatar-chip, .act-row > .avatar { position: relative; z-index: 1; }
.act-actor { font-weight: 700; color: var(--text); }
.act-verb { color: var(--muted); }
.act-ticket-line { display: flex; align-items: baseline; gap: .5rem; margin-top: .1rem; min-width: 0; }
.act-ticket { font-weight: 600; color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.act-ticket:hover { color: var(--brand-hover); }
.act-snippet { margin-top: .3rem; padding: .4rem .6rem; background: var(--surface-2); border-radius: var(--radius-sm); color: var(--text); font-size: .85rem; white-space: pre-wrap; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.act-time { color: var(--muted); font-size: .78rem; font-variant-numeric: tabular-nums; white-space: nowrap; padding-top: .15rem; }

/* Scrollable checklist (database picker) */
.db-list {
    max-height: 240px;
    overflow-y: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: .25rem;
    background: var(--surface);
}

.db-item {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: .35rem .6rem;
    border-radius: 6px;
    cursor: pointer;
    margin: 0;
}

.db-item:hover { background: var(--surface-2); }

.hero { text-align: center; padding: 3.5rem 1rem; max-width: 560px; margin: 2rem auto; }
.hero-mark { display: grid; place-items: center; width: 3.5rem; height: 3.5rem; margin: 0 auto 1rem; border-radius: 14px; background: var(--brand); color: #fff; font-weight: 800; font-size: 1.6rem; }
.hero-lead { color: var(--muted); font-size: 1.05rem; margin-bottom: 1.5rem; }
.hero-actions { display: flex; gap: .75rem; justify-content: center; }

/* ============================================================
   Timli sign-in — split screen (brand panel + conic-border card)
   ============================================================ */
.auth-page { min-height: 100vh; position: relative; }
.auth-top { position: fixed; top: 0; right: 0; z-index: 60; display: flex; align-items: center; gap: 10px; padding: 14px 20px; }

/* auth ambient blobs (larger than the app's) */
.auth-page .blob.ab1 { width: 720px; height: 720px; top: -280px; left: 12%; background: var(--blob-1); animation: drift1 24s ease-in-out infinite alternate; }
.auth-page .blob.ab2 { width: 560px; height: 560px; bottom: -220px; right: -120px; background: var(--blob-2); animation: drift2 32s ease-in-out infinite alternate; }
.auth-page .blob.ab3 { width: 480px; height: 480px; bottom: -180px; left: -140px; background: var(--blob-3); animation: drift3 28s ease-in-out infinite alternate; }

.stage { position: relative; z-index: 1; min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; align-items: stretch; }

/* left brand panel */
.auth-left { position: relative; display: flex; flex-direction: column; justify-content: center; padding: 64px 72px; overflow: hidden; }
.wordmark { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; animation: rise .6s var(--smooth) both; }
.wordmark .mark { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: linear-gradient(135deg, #7a7af5, #4a4ac4); color: #fff; font-weight: 700; font-size: 19px; box-shadow: 0 6px 24px rgba(91, 91, 214, .55), inset 0 1px 0 rgba(255, 255, 255, .3); animation: markGlow 4s ease infinite; }
@keyframes markGlow { 0%, 100% { box-shadow: 0 6px 24px rgba(91, 91, 214, .55), inset 0 1px 0 rgba(255, 255, 255, .3); } 50% { box-shadow: 0 6px 38px rgba(91, 91, 214, .85), inset 0 1px 0 rgba(255, 255, 255, .3); } }
.wordmark span { font-size: 26px; font-weight: 700; letter-spacing: -.02em; }
.headline { font-size: clamp(30px, 3.4vw, 44px); font-weight: 700; letter-spacing: -.035em; line-height: 1.12; margin-bottom: 18px; animation: rise .6s .08s var(--smooth) both; }
.headline em { font-style: normal; background: linear-gradient(100deg, var(--accent) 10%, #38a2ff 55%, #c46bf0 95%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-tag { font-size: 14.5px; color: var(--text-2); line-height: 1.6; max-width: 430px; margin-bottom: 30px; animation: rise .6s .14s var(--smooth) both; }
.feats { display: flex; gap: 10px; flex-wrap: wrap; animation: rise .6s .2s var(--smooth) both; }
.feat { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 20px; background: var(--panel-2); border: 1px solid var(--border); font-size: 12.5px; font-weight: 500; color: var(--text-2); backdrop-filter: blur(8px); }
.feat svg { width: 14px; height: 14px; stroke-width: 1.9; color: var(--accent); }

/* floating ghost cards — generic, non-confidential content only */
.ghost { position: absolute; background: var(--glass); border: 1px solid var(--glass-border); border-radius: 12px; padding: 11px 14px; box-shadow: var(--shadow-2); backdrop-filter: blur(14px) saturate(150%); -webkit-backdrop-filter: blur(14px) saturate(150%); display: flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 500; will-change: transform; animation: float 7s ease-in-out infinite; transition: transform .2s ease-out; }
.ghost.g1 { top: 12%; right: 6%; animation-delay: 0s; }
.ghost.g2 { top: 64%; right: 14%; animation-delay: 2.3s; animation-duration: 8.5s; }
.ghost.g3 { bottom: 9%; left: 4%; animation-delay: 1.1s; animation-duration: 9.5s; }
@keyframes float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -12px; } }

/* right form panel */
.auth-right { display: flex; align-items: center; justify-content: center; padding: 56px 36px; }
.cardwrap { position: relative; width: min(400px, 100%); border-radius: 19px; padding: 1.5px; background: conic-gradient(from var(--angle), transparent 0%, transparent 55%, var(--accent) 72%, #38a2ff 82%, #c46bf0 90%, transparent 100%); animation: spin 6s linear infinite, rise .6s .1s var(--smooth) both; }
@keyframes spin { to { --angle: 360deg; } }
@supports not (background: conic-gradient(from 0deg, red, blue)) { .cardwrap { background: var(--glass-border); } }
.card-auth { background: var(--glass); backdrop-filter: blur(22px) saturate(160%); -webkit-backdrop-filter: blur(22px) saturate(160%); border-radius: 18px; padding: 34px 32px 28px; }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { .card-auth { background: var(--panel-solid); } }
.card-auth .logo { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(135deg, #7a7af5, #4a4ac4); color: #fff; font-weight: 700; font-size: 17px; margin: 0 auto 16px; box-shadow: 0 4px 18px rgba(91, 91, 214, .5); }
.card-auth h1 { font-size: 19px; font-weight: 600; text-align: center; letter-spacing: -.02em; margin: 0; }
.card-auth .auth-sub { font-size: 12.5px; color: var(--text-3); text-align: center; margin: 6px 0 24px; }

/* fields */
.auth-field { margin-bottom: 15px; }
.auth-field label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin-bottom: 7px; }
.inwrap { position: relative; display: flex; align-items: center; }
.inwrap svg.lead { position: absolute; left: 13px; width: 15px; height: 15px; stroke-width: 1.8; color: var(--text-3); pointer-events: none; transition: color .2s; z-index: 1; }
.inwrap:focus-within svg.lead { color: var(--accent); }
.cardwrap .inwrap input { width: 100%; height: 44px; min-height: 44px; padding: 0 42px 0 40px; background: var(--input-bg); border: 1px solid var(--border); border-radius: 11px; font: inherit; font-size: 13.5px; color: var(--text); transition: border-color .2s, box-shadow .2s, background .2s; }
.cardwrap .inwrap input::placeholder { color: var(--text-3); }
.cardwrap .inwrap input:hover { border-color: var(--border-strong); }
.cardwrap .inwrap input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3.5px var(--accent-soft); }
.cardwrap input:-webkit-autofill, .cardwrap input:-webkit-autofill:hover, .cardwrap input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 40px var(--bg) inset !important; -webkit-text-fill-color: var(--text) !important; caret-color: var(--text); transition: background-color 9999s ease-in-out 0s; }
.eye { position: absolute; right: 9px; width: 28px; height: 28px; border: 0; background: transparent; border-radius: 8px; color: var(--text-3); display: grid; place-items: center; cursor: pointer; transition: all .15s; z-index: 1; }
.eye:hover { color: var(--text-2); background: var(--panel-2); }
.eye svg { width: 15px; height: 15px; stroke-width: 1.8; }
.eye .ico-off { display: none; }
.eye.revealed .ico-on { display: none; }
.eye.revealed .ico-off { display: block; }
.caps { display: none; align-items: center; gap: 6px; font-size: 11px; color: var(--uat); margin-top: 7px; font-weight: 500; }
.caps.on { display: flex; animation: rise .25s var(--smooth) both; }
.caps svg { width: 12px; height: 12px; stroke-width: 2; }

/* submit button */
.btn-auth { position: relative; width: 100%; height: 44px; margin-top: 6px; border: 0; border-radius: 11px; background: linear-gradient(135deg, #7a7af5, #5b5bd6 55%, #4a4ac4); color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; overflow: hidden; transition: transform .2s var(--spring), box-shadow .2s; }
.btn-auth:hover { transform: translateY(-1.5px); box-shadow: 0 8px 26px var(--accent-ring); color: #fff; }
.btn-auth:active { transform: translateY(0); }
.btn-auth .shine { position: absolute; top: 0; bottom: 0; width: 56px; background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-20deg); left: -80px; animation: sweep 3.6s ease infinite; }
@keyframes sweep { 0%, 55% { left: -80px; } 85%, 100% { left: 130%; } }
.btn-auth .txt, .btn-auth .dots { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity .2s; }
.btn-auth .dots { opacity: 0; pointer-events: none; }
.btn-auth .dots span { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: #fff; margin: 0 3px; animation: dot 1s infinite; }
.btn-auth .dots span:nth-child(2) { animation-delay: .15s; } .btn-auth .dots span:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-5px); opacity: 1; } }
.btn-auth.loading .txt { opacity: 0; } .btn-auth.loading .dots { opacity: 1; }

/* error strip + card shake */
.auth-error { display: flex; align-items: flex-start; gap: 8px; background: rgba(239, 68, 68, .1); border: 1px solid rgba(239, 68, 68, .25); color: var(--crit); border-radius: 10px; padding: 9px 12px; font-size: 12.5px; margin-bottom: 16px; }
.auth-error svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; }
.auth-error ul { margin: 0; padding-left: 1rem; }
.card-auth:has(.auth-error) { animation: authShake .3s var(--smooth); }
@keyframes authShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }

/* success block (register-confirmation / reset done) */
.auth-ok { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; padding: 6px 0 4px; }
.auth-ok-icon { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--done-soft); color: var(--done); }
.auth-ok-icon svg { width: 22px; height: 22px; }
.auth-info { background: var(--accent-soft); color: var(--accent); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; margin-bottom: 14px; }

/* links + footer */
.auth-links { display: flex; justify-content: space-between; gap: 12px; margin-top: 18px; }
.auth-links a { font-size: 12.5px; color: var(--text-3); text-decoration: none; transition: color .15s; font-weight: 500; }
.auth-links a:hover { color: var(--accent); }

/* "Forgot password?" tucked right under the password field where it's looked for */
.auth-forgot { text-align: right; margin: -4px 0 2px; }
.auth-forgot a { font-size: 12px; font-weight: 600; color: var(--accent); text-decoration: none; transition: opacity .15s; }
.auth-forgot a:hover { text-decoration: underline; opacity: .85; }

/* Prominent alt-action prompt (create account / back to sign in) below a divider */
.auth-alt { text-align: center; font-size: 13px; color: var(--text-2); margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.auth-alt a { color: var(--accent); font-weight: 600; text-decoration: none; margin-left: 4px; transition: opacity .15s; }
.auth-alt a:hover { text-decoration: underline; opacity: .85; }
.auth-foot { position: fixed; bottom: 16px; left: 0; right: 0; text-align: center; font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }

@media (max-width: 900px) {
    .stage { grid-template-columns: 1fr; }
    .auth-left { display: none; }
    .auth-right { padding: 40px 20px 80px; }
}
@media (prefers-reduced-motion: reduce) {
    .cardwrap { background: var(--glass-border); animation: none; }
    .ghost, .wordmark .mark, .btn-auth .shine, .auth-page .blob { animation: none; }
}

/* ============================================================
   v2 shared components (M2) — badges, inputs, switch, buttons,
   empty state. Reused as pages migrate to the refresh.
   ============================================================ */

@keyframes blink { 0%, 100% { box-shadow: 0 0 0 0 currentColor; } 50% { box-shadow: 0 0 0 4px transparent; } }

/* ---- canonical status pills (§2.1) ---- */
.pill {
    font-size: 10.5px; font-weight: 600; padding: 3px 9px; border-radius: 20px;
    display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0;
    font-family: var(--font-ui); line-height: 1.5; white-space: nowrap;
}
.pill i { width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0; }
.pill-new { background: var(--new-soft); color: var(--new); } .pill-new i { background: var(--new); }
.pill-dev { background: var(--dev-soft); color: var(--dev); } .pill-dev i { background: var(--dev); animation: blink 2s infinite; }
.pill-uat { background: var(--uat-soft); color: var(--uat); } .pill-uat i { background: var(--uat); }
.pill-done { background: var(--done-soft); color: var(--done); } .pill-done i { background: var(--done); }
.pill-paused { background: var(--paused-soft); color: var(--paused); } .pill-paused i { background: var(--paused); }
.pill-neutral { background: var(--panel-2); color: var(--text-2); border: 1px solid var(--border); } .pill-neutral i { background: var(--text-3); }
.pill-accent { background: var(--accent-soft); color: var(--accent); } .pill-accent i { background: var(--accent); }
.pill-warn { background: var(--uat-soft); color: var(--uat); } .pill-warn i { background: var(--uat); }

/* Users table extras + row action menu (M8) */
.user-email { font-family: var(--font-mono); font-size: 12px; }
.user-status { display: inline-flex; align-items: center; gap: .4rem; font-size: 12.5px; color: var(--text-2); }
.user-status .dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dot-ok { background: var(--done); } .dot-off { background: var(--text-3); }
.staff-orgs { background: var(--panel-2); font-size: 12.5px; padding: 10px 16px !important; }
.staff-orgs label { display: inline-flex; align-items: center; gap: .35rem; }
.tbl td .pill { margin-right: 4px; }

.row-menu-wrap { position: relative; display: inline-block; }
.row-menu { position: absolute; right: 0; top: calc(100% + 4px); min-width: 190px; background: var(--panel-solid); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: var(--shadow-2); padding: 5px; z-index: 50; animation: menuIn .15s var(--spring); }
@keyframes menuIn { from { opacity: 0; transform: scale(.96) translateY(-4px); } }
.row-menu button { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: none; border: none; color: var(--text); font-size: 13px; font-weight: 500; padding: 8px 10px; border-radius: 7px; cursor: pointer; white-space: nowrap; }
.row-menu button:hover { background: var(--panel-2); }
.row-menu button.danger { color: var(--crit); }
.row-menu button.danger:hover { background: rgba(239, 68, 68, .1); }
.menu-sep { height: 1px; background: var(--border); margin: 5px 4px; }
.menu-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); padding: 5px 10px 2px; }
.row-menu .menu-check { display: flex; align-items: center; gap: 8px; padding: 6px 10px; font-size: 13px; font-weight: 500; cursor: pointer; white-space: nowrap; border-radius: 7px; }
.row-menu .menu-check:hover { background: var(--panel-2); }
.row-menu .menu-check input { accent-color: var(--accent); margin: 0; }
.menu-backdrop { position: fixed; inset: 0; z-index: 40; }

/* Multi-tick filter dropdown (board). */
.msf { position: relative; display: inline-block; }
.msf-btn { text-align: left; cursor: pointer; }
.msf-pop { position: absolute; z-index: 50; top: calc(100% + 4px); left: 0; min-width: 200px; max-height: 300px; overflow-y: auto; background: var(--panel-solid); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: var(--shadow-2); padding: 6px; }
.msf-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; white-space: nowrap; }
.msf-item:hover { background: var(--accent-soft); }

/* Users table lives in a glass panel WITHOUT overflow clipping, so the ⋯ menu
   popover is never cut off (it previously sat inside an overflow:auto wrap). */
.users-panel { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius); box-shadow: var(--shadow-1); backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%); margin-bottom: 22px; }
.users-panel .tbl th { position: static; }

/* Notifications settings — event toggle rows (M9) */
.notif-events { border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
.notif-event { display: flex; flex-direction: column; gap: 7px; padding: 11px 14px; font-size: 13.5px; }
.notif-event + .notif-event { border-top: 1px solid var(--border); }
.notif-event-head { display: flex; align-items: center; gap: 10px; }
.notif-event-name { font-weight: 500; margin-right: auto; }
.notif-tpl-btn { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--border); background: transparent; color: var(--text-3); font-size: 11.5px; font-weight: 500; padding: 3px 9px; border-radius: 7px; cursor: pointer; transition: all .15s; }
.notif-tpl-btn:hover, .notif-tpl-btn.on { color: var(--accent); border-color: var(--accent-ring); background: var(--accent-soft); }
.notif-tpl-btn svg { width: 12px; height: 12px; }
.notif-recips { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.notif-to { font-size: 11.5px; color: var(--text-3); font-weight: 500; }
.notif-dynamic { font-size: 11.5px; color: var(--text-3); line-height: 1.45; }
.notif-chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 14px; border: 1px solid var(--border); background: var(--panel-2); font-size: 11.5px; font-weight: 500; color: var(--text-3); cursor: pointer; margin: 0; transition: all .15s; }
.notif-chip.on { color: var(--accent); border-color: var(--accent-ring); background: var(--accent-soft); }
.notif-chip input { accent-color: var(--accent); margin: 0; width: 12px; height: 12px; }
.notif-template { background: var(--panel-2); border: 1px solid var(--border); border-radius: 9px; padding: 10px 13px; }
.notif-tpl-subject { font-family: var(--font-mono); font-size: 12px; font-weight: 600; padding-bottom: 7px; margin-bottom: 7px; border-bottom: 1px dashed var(--border); }
.notif-tpl-body p { margin: 0 0 6px; font-size: 12.5px; color: var(--text-2); }
.notif-tpl-body p:last-child { margin-bottom: 0; }
.notif-note { font-size: 11px; color: var(--text-3); font-style: italic; }
.notif-cc { display: flex; align-items: center; gap: 6px; }
.notif-cc-input { flex: 1; max-width: 340px; height: 26px; padding: 0 9px; font-size: 12px; font-family: var(--font-mono); color: var(--text); background: var(--panel-2); border: 1px solid var(--border); border-radius: 7px; }
.notif-cc-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.notif-cc-input::placeholder { color: var(--text-3); font-family: var(--font-ui); }

/* ---- Desktop notifications (bell toggle + toast stack + settings card) ---- */
.bell { position: relative; }
.bell-off { opacity: .55; }
.bell-slash { position: absolute; left: 6px; top: 50%; width: 16px; height: 2px; background: currentColor; border-radius: 2px; transform: rotate(-45deg); pointer-events: none; }
.toast-stack { position: fixed; right: 18px; bottom: 18px; z-index: 130; display: flex; flex-direction: column; gap: 10px; max-width: 340px; }
.app-toast { background: var(--panel-solid); border: 1px solid var(--border-strong); border-left: 3px solid var(--accent); border-radius: 12px; box-shadow: var(--shadow-2); padding: 11px 14px; cursor: pointer; animation: rise .3s var(--smooth) both; }
.app-toast:hover { border-color: var(--accent-ring); }
.app-toast-title { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.app-toast-body { font-size: 12.5px; color: var(--text-2); line-height: 1.45; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.desktop-card { border: 1px solid var(--border); border-radius: 10px; padding: 12px 14px; }
.desktop-card .notif-event-head { justify-content: space-between; }

/* ---- Sablon editor modal ---- */
.tpl-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(8, 10, 16, .55); backdrop-filter: blur(3px); }
.tpl-modal { position: fixed; z-index: 95; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(1060px, calc(100vw - 32px)); max-height: calc(100vh - 48px); display: flex; flex-direction: column; background: var(--panel-solid); border: 1px solid var(--border-strong); border-radius: 16px; box-shadow: var(--shadow-2); }
.tpl-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 22px 14px; border-bottom: 1px solid var(--border); }
.tpl-head h2 { font-size: 16px; font-weight: 600; margin: 0; }
.tpl-head p { font-size: 12px; color: var(--text-3); margin: 3px 0 0; }
.tpl-head .icon-btn { margin-left: auto; }
.tpl-body { display: grid; grid-template-columns: 1fr 1.1fr; gap: 20px; padding: 18px 22px; overflow: auto; }
.tpl-editor label, .tpl-vars-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-3); margin: 0 0 6px; }
.tpl-editor label { margin-top: 14px; }
.tpl-editor label:first-child { margin-top: 0; }
.tpl-mono { width: 100%; font-family: var(--font-mono); font-size: 12.5px; color: var(--text); background: var(--panel-2); border: 1px solid var(--border); border-radius: 9px; padding: 8px 10px; resize: vertical; }
.tpl-mono:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tpl-vars-label { margin-top: 16px; }
.tpl-vars { display: flex; flex-wrap: wrap; gap: 6px; }
.tpl-var { font-family: var(--font-mono); font-size: 11.5px; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-ring); border-radius: 7px; padding: 3px 8px; cursor: pointer; transition: all .15s; }
.tpl-var:hover { background: var(--accent); color: #fff; }
.tpl-locked { display: flex; align-items: flex-start; gap: 8px; margin-top: 16px; font-size: 11.5px; color: var(--text-3); line-height: 1.5; background: var(--panel-2); border: 1px dashed var(--border-strong); border-radius: 9px; padding: 9px 11px; }
.tpl-locked svg { width: 14px; height: 14px; flex-shrink: 0; margin-top: 1px; }
.tpl-preview-pane { display: flex; flex-direction: column; min-height: 0; }
.tpl-preview { width: 100%; flex: 1; min-height: 440px; border: 1px solid var(--border); border-radius: 10px; background: #0a0a14; }
.tpl-subject-preview { margin-top: 8px; font-family: var(--font-mono); font-size: 11.5px; color: var(--text-2); background: var(--panel-2); border: 1px solid var(--border); border-radius: 7px; padding: 6px 10px; overflow-wrap: anywhere; }
.tpl-foot { display: flex; align-items: center; gap: 10px; padding: 14px 22px 18px; border-top: 1px solid var(--border); }
@media (max-width: 900px) {
    .tpl-body { grid-template-columns: 1fr; }
    .tpl-preview { min-height: 320px; }
}

/* ============================================================
   Ticket detail (M11)
   ============================================================ */
.crumbs { display: flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-3); margin-bottom: 12px; }
.crumbs a { color: var(--text-2); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumb-id { font-family: var(--font-mono); color: var(--text-2); }

.td-head { position: relative; padding-left: 14px; margin-bottom: 20px; }
.td-head.rail-crit::before, .td-head.rail-high::before { content: ''; position: absolute; left: 0; top: 3px; bottom: 3px; width: 3px; border-radius: 3px; }
.td-head.rail-crit::before { background: var(--crit); }
.td-head.rail-high::before { background: var(--high); }
.td-head-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.td-num { font-family: var(--font-mono); font-size: 13px; color: var(--text-3); font-weight: 500; }
.td-title { font-size: 24px; font-weight: 600; letter-spacing: -.02em; margin: 0; }

.stepper { display: flex; align-items: center; margin-bottom: 18px; flex-wrap: wrap; gap: 4px 0; }
.step { display: flex; align-items: center; gap: 9px; }
.step-node { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--border-strong); color: #fff; flex-shrink: 0; }
.step-node svg { width: 12px; height: 12px; }
.step.done .step-node { background: var(--done); border-color: var(--done); }
.step.current .step-node { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.step-info { display: flex; flex-direction: column; }
.step-name { font-size: 12.5px; font-weight: 600; }
.step.future .step-name { color: var(--text-3); }
.step-time { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3); }
.step-line { flex: 1; min-width: 20px; height: 2px; background: var(--border); margin: 0 10px; }
.step-line.done { background: var(--done); }
.paused-strip { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--paused-soft); border-radius: 10px; font-size: 13px; color: var(--text-2); margin-bottom: 18px; }

.td-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.td-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.td-rail { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 4.5rem; }
.td-card { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius); box-shadow: var(--shadow-1); backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%); padding: 16px 18px; }
.td-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.td-card-title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin: 0 0 12px; }
.td-card-head .td-card-title { margin-bottom: 0; }
.td-desc { font-size: 13.5px; line-height: 1.65; white-space: pre-line; margin: 0; }
.td-empty-line { color: var(--text-3); font-size: 13px; margin: 0; }
.mono-pill { font-family: var(--font-mono); font-size: 11px; color: var(--text-2); background: var(--panel-2); border: 1px solid var(--border); border-radius: 20px; padding: 1px 8px; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

.subprogress { height: 4px; background: var(--panel-2); border-radius: 4px; overflow: hidden; margin-bottom: 12px; }
.subprogress span { display: block; height: 100%; background: var(--done); border-radius: 4px; transform-origin: left; animation: grow .6s var(--smooth); }
.subtasks { list-style: none; margin: 0 0 12px; padding: 0; }
.subtask { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.subtask:last-child { border-bottom: 0; }
.sub-dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; border: 2px solid var(--border-strong); }
.sub-dot-done { background: var(--done); border-color: var(--done); }
.sub-dot-dev { border-color: var(--dev); box-shadow: inset 0 0 0 2px var(--dev); }
.sub-title { flex: 1; font-size: 13px; min-width: 0; }
.subtask.is-done .sub-title { text-decoration: line-through; color: var(--text-3); }
.sub-add { display: flex; gap: 8px; }

.attachments { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.attach-chip { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 8px; text-decoration: none; color: var(--text-2); font-size: 12.5px; }
.attach-chip:hover { border-color: var(--accent-ring); color: var(--accent); }
.attach-chip svg { width: 14px; height: 14px; }
.attach-size { font-family: var(--font-mono); color: var(--text-3); font-size: 11px; }
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 20px; border: 1.5px dashed var(--border-strong); border-radius: 10px; color: var(--text-3); font-size: 12.5px; cursor: pointer; transition: border-color .15s, color .15s; text-align: center; position: relative; }
.dropzone:hover { border-color: var(--accent); color: var(--accent); }
.dropzone svg { width: 22px; height: 22px; }
.dropzone input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }

.comments { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.comment { display: flex; gap: 10px; }
.comment-body { flex: 1; min-width: 0; }
.comment-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 3px; }
.comment-author { font-weight: 600; font-size: 13px; }
.comment-time { margin-left: auto; font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }
.comment-text { font-size: 13px; line-height: 1.6; white-space: pre-wrap; color: var(--text); }
.comment-text .mention { display: inline-block; padding: 0 5px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-weight: 600; }
/* overflow must stay visible so the @mention picker can hang below the textarea */
.composer { border: 1px solid var(--border); border-radius: 10px; }
.composer textarea { border: 0; border-radius: 10px 10px 0 0; min-height: 64px; resize: vertical; background: transparent; }
.composer-wrap { position: relative; }
.mention-pop { position: absolute; top: calc(100% + 4px); left: 10px; z-index: 70; min-width: 250px; max-width: 90%; background: var(--panel-solid); border: 1px solid var(--border-strong); border-radius: 10px; box-shadow: var(--shadow-2); padding: 5px; animation: menuIn .15s var(--spring); }
.mention-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: none; border: 0; color: var(--text); font-size: 13px; font-weight: 500; padding: 6px 9px; border-radius: 7px; cursor: pointer; }
.mention-item:hover, .mention-item.on { background: var(--accent-soft); color: var(--accent); }
.composer textarea:focus { box-shadow: none; }
.composer-foot { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-top: 1px solid var(--border); background: var(--panel-2); border-radius: 0 0 10px 10px; }
.composer-hint { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }
.pill-crit { background: rgba(239, 68, 68, .12); color: var(--crit); } .pill-crit i { background: var(--crit); }
.pill-high { background: rgba(249, 115, 22, .13); color: var(--high); } .pill-high i { background: var(--high); }

.rail-dl { margin: 0; }
.rail-dl dt { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin: 12px 0 4px; }
.rail-dl dt:first-child { margin-top: 0; }
.rail-dl dd { margin: 0; font-size: 13px; }
.db-combo { position: relative; }
.db-pop { position: absolute; z-index: 60; left: 0; right: 0; margin-top: 4px; max-height: 240px; overflow-y: auto; background: var(--panel-solid); border: 1px solid var(--border-strong); border-radius: 9px; box-shadow: var(--shadow-2); padding: 4px; }
.db-pop-item { display: block; width: 100%; text-align: left; border: 0; background: transparent; border-radius: 6px; padding: 7px 10px; color: var(--text); cursor: pointer; font-size: 13px; }
.db-pop-item:hover { background: var(--accent-soft); }
.db-pop-empty { padding: 9px 10px; color: var(--text-3); font-size: 12.5px; }
.db-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.db-chip { display: inline-flex; align-items: center; gap: 4px; font-family: var(--font-mono); font-size: 11px; background: var(--panel-2); border: 1px solid var(--border); border-radius: 6px; padding: 2px 7px; color: var(--text-2); }
.db-chip-x { display: inline-flex; border: 0; background: transparent; color: inherit; padding: 0; cursor: pointer; opacity: .6; }
.db-chip-x:hover { opacity: 1; }
.db-chip-x svg { width: 12px; height: 12px; }
.rail-actions { display: flex; flex-direction: column; gap: 8px; }
.rail-actions .btn { width: 100%; }
.rail-wait { font-size: 12.5px; color: var(--text-3); margin: 0; }
.rail-note { font-size: 11px; color: var(--text-3); margin: 4px 0 0; }

.modal-panel { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(440px, 92vw); background: var(--panel-solid); border: 1px solid var(--glass-border); border-radius: var(--radius); box-shadow: var(--shadow-2); padding: 18px; z-index: 60; }

@media (max-width: 900px) {
    .td-grid { grid-template-columns: 1fr; }
    .td-rail { position: static; order: -1; }
}

/* New ticket form + Databases (M10) */
.form-narrow { max-width: 720px; }
.form-narrow textarea { min-height: 160px; }
.form-narrow .form-label { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.db-name { font-family: var(--font-mono); font-size: 12.5px; }

/* ---- inputs & selects (§2.4 — fixes cropped filters) ---- */
.form-control, .form-select, select,
input[type="text"], input[type="email"], input[type="password"],
input[type="search"], input[type="number"], input[type="date"], textarea {
    font-family: var(--font-ui); font-size: 13.5px; color: var(--text);
    background: var(--glass); border: 1px solid var(--glass-border); border-radius: 10px;
    min-height: 36px; padding: 8px 12px; transition: border-color .15s, box-shadow .15s;
}
textarea { min-height: 96px; }
.form-control:focus, .form-select:focus, select:focus, input:focus, textarea:focus {
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft);
}
select, .form-select {
    appearance: none; -webkit-appearance: none; -moz-appearance: none;
    padding: 8px 34px 8px 12px; min-width: max-content; cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a92a2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 10px center;
}
.form-check-input { accent-color: var(--accent); }
.form-check-input:focus { box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--accent); }

/* A filter whose value differs from its default reads as active */
select.filter-active, .form-select.filter-active, .filter-active {
    border-color: var(--accent); color: var(--accent); font-weight: 500;
}

/* Search input with a leading magnifier icon */
.search-input { position: relative; display: inline-flex; align-items: center; }
.search-input > svg { position: absolute; left: 11px; width: 15px; height: 15px; color: var(--text-3); pointer-events: none; }
.search-input input { padding-left: 32px; }

/* Top-bar live ticket search (replaces the old static search pill). */
.tsearch { position: relative; flex: 1; max-width: 340px; display: flex; align-items: center; gap: .55rem; background: var(--panel-2); border: 1px solid var(--glass-border); border-radius: 11px; padding: 7px 12px; transition: border-color .2s, box-shadow .2s; }
.tsearch:focus-within { border-color: var(--accent-ring); box-shadow: 0 0 0 3px var(--accent-soft); }
.tsearch-ico { display: inline-flex; flex-shrink: 0; color: var(--text-3); }
.tsearch-ico svg { width: 14px; height: 14px; }
.tsearch-input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; color: var(--text); font-size: .8rem; padding: 0; }
.tsearch-input::placeholder { color: var(--text-3); }
.tsearch > kbd { margin-left: auto; flex-shrink: 0; font-family: var(--font-mono); font-size: 10px; color: var(--text-3); border: 1px solid var(--border); border-radius: 5px; padding: 1px 6px; background: var(--panel-2); }
.tsearch-pop { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0; right: 0; min-width: 320px; max-height: 60vh; overflow-y: auto; background: var(--panel-solid); border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: var(--shadow-2); padding: 5px; }
.tsearch-item { display: flex; gap: 10px; align-items: flex-start; width: 100%; text-align: left; border: 0; background: transparent; border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.tsearch-item:hover, .tsearch-item.on { background: var(--accent-soft); }
.tsearch-num { flex-shrink: 0; font-family: var(--font-mono); font-size: 11px; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-ring); border-radius: 6px; padding: 1px 6px; margin-top: 1px; }
.tsearch-main { display: flex; flex-direction: column; gap: 1px; min-width: 0; flex: 1; }
.tsearch-title { font-size: 13px; color: var(--text); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tsearch-db { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tsearch-snip { font-size: 11.5px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tsearch-empty { padding: 12px; color: var(--text-3); font-size: 12.5px; text-align: center; }

/* ---- toggle switch (§2.5) ---- */
.switch { position: relative; display: inline-block; width: 34px; height: 18px; flex-shrink: 0; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch .track { position: absolute; inset: 0; background: var(--border-strong); border-radius: 20px; transition: background .15s; cursor: pointer; }
.switch .track::before { content: ''; position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; transition: transform .15s var(--spring); box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::before { transform: translateX(16px); }
.switch input:focus-visible + .track { box-shadow: 0 0 0 3px var(--accent-soft); }

/* ---- buttons (§2.7) ---- */
.btn-primary, .btn.btn-primary {
    background: var(--accent); border: 1px solid var(--accent); color: #fff;
    border-radius: 10px; padding: 9px 16px; font-weight: 500; font-size: 13.5px;
    transition: transform .15s var(--spring), background .15s, box-shadow .15s;
}
.btn-primary:hover, .btn.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); transform: translateY(-1px); box-shadow: 0 4px 14px var(--accent-ring); color: #fff; }
.btn-primary:active, .btn.btn-primary:active { transform: translateY(0); }
.btn-secondary, .btn-outline-secondary, .btn-outline-primary {
    background: var(--glass); border: 1px solid var(--glass-border); color: var(--text);
    border-radius: 10px; padding: 9px 16px; font-weight: 500; font-size: 13.5px; transition: all .15s;
}
.btn-secondary:hover, .btn-outline-secondary:hover, .btn-outline-primary:hover { border-color: var(--accent-ring); color: var(--accent); background: var(--accent-soft); }
.btn-danger, .btn-outline-danger { color: var(--crit); border: 1px solid var(--crit); border-radius: 10px; background: transparent; }
.btn-danger:hover, .btn-outline-danger:hover { background: var(--crit); color: #fff; }
.icon-btn { width: 28px; height: 28px; border-radius: 8px; border: 1px solid var(--border); background: var(--glass); color: var(--text-2); display: inline-grid; place-items: center; cursor: pointer; transition: all .15s; }
.icon-btn:hover { color: var(--accent); border-color: var(--accent-ring); transform: translateY(-1px); }
.icon-btn svg { width: 14px; height: 14px; }

/* ---- overdue date (§2.3) ---- */
.due-over { color: var(--crit); font-weight: 500; font-family: var(--font-mono); }

/* ---- empty state (§2.6) ---- */
.empty-state { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 40px 20px; gap: 3px; }
.empty-icon { color: var(--text-3); margin-bottom: 6px; }
.empty-icon svg { width: 34px; height: 34px; }
.empty-title { font-weight: 600; font-size: 14.5px; color: var(--text); margin: 0; }
.empty-sub { font-size: 12.5px; color: var(--text-3); margin: 0; max-width: 340px; }
.empty-action { margin-top: 12px; }

/* Bottom fade for internally-scrolling lists (§2.8) */
.scroll-fade {
    -webkit-mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent);
    mask-image: linear-gradient(to bottom, #000 calc(100% - 22px), transparent);
}

/* ============================================================
   Home — bento dashboard (M4, from the mockup)
   ============================================================ */
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fadeIn { to { opacity: 1; } }
@keyframes grow { to { transform: scaleX(1); } }
@keyframes ringGrow { from { stroke-dashoffset: 163; } }
@keyframes flashG { 30% { color: var(--done); transform: scale(1.12); } }

.hello { margin-bottom: 22px; animation: rise .5s var(--smooth) both; }
.hello h1 { font-size: 25px; font-weight: 600; letter-spacing: -.025em; }
.hello h1 em {
    font-style: normal;
    background: linear-gradient(100deg, var(--accent), #38a2ff 60%, #c46bf0);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.chips { display: flex; gap: 8px; margin-top: 11px; flex-wrap: wrap; }
.chip-s { font-size: 11.5px; font-weight: 500; padding: 4px 11px; border-radius: 20px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; animation: rise .5s var(--smooth) both; }
.chip-s i { width: 6px; height: 6px; border-radius: 50%; }
.chip-s.warn { background: var(--uat-soft); color: var(--uat); border-color: rgba(245, 158, 11, .2); } .chip-s.warn i { background: var(--uat); animation: blink 2s infinite; }
.chip-s.ok { background: var(--done-soft); color: var(--done); } .chip-s.ok i { background: var(--done); }
.chip-s.dev { background: var(--dev-soft); color: var(--dev); } .chip-s.dev i { background: var(--dev); animation: blink 2s infinite; }
.chip-s.crit { background: rgba(239, 68, 68, .12); color: var(--crit); border-color: rgba(239, 68, 68, .2); } .chip-s.crit i { background: var(--crit); }

.bento { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.bento .card {
    position: relative; background: var(--glass); border: 1px solid var(--glass-border);
    border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow-1);
    backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%);
    transition: transform .22s var(--spring), box-shadow .22s ease, border-color .22s ease;
    animation: rise .55s var(--smooth) both; overflow: hidden;
}
.bento .card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--border-strong); }
.bento .card.hero { grid-column: span 2; }
.card .glow { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .3s; background: radial-gradient(240px circle at var(--mx, 50%) var(--my, 50%), var(--accent-soft), transparent 70%); }
.card:hover .glow { opacity: 1; }
.chead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.chip-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--chip-bg); color: var(--chip-fg); }
.chip-ic svg { width: 16px; height: 16px; stroke-width: 1.9; }
.delta { font-family: var(--font-mono); font-size: 11px; font-weight: 500; padding: 3px 8px; border-radius: 20px; }
.delta.up { background: var(--done-soft); color: var(--done); }
.num { font-family: var(--font-mono); font-size: 32px; font-weight: 600; letter-spacing: -.02em; line-height: 1; display: inline-block; }
.lab { font-size: 12.5px; color: var(--text-2); margin-top: 7px; font-weight: 500; }
.sub { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.sub.warn { color: var(--uat); font-weight: 500; }

.spark { position: absolute; right: 16px; bottom: 46px; width: 46%; height: 52px; opacity: .95; }
.spark polyline { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 100; stroke-dashoffset: 100; animation: draw 1.4s .4s var(--smooth) forwards; }
.spark polygon { fill: var(--accent-soft); opacity: 0; animation: fadeIn .8s 1.2s ease forwards; }
.dist { display: flex; height: 8px; border-radius: 6px; overflow: hidden; margin-top: 16px; background: var(--panel-2); }
.dist span { transform: scaleX(0); transform-origin: left; animation: grow .7s var(--smooth) forwards; }
.dist .s-new { background: var(--new); animation-delay: .5s; } .dist .s-dev { background: var(--dev); animation-delay: .62s; }
.dist .s-uat { background: var(--uat); animation-delay: .74s; } .dist .s-pau { background: var(--paused); animation-delay: .86s; }
.legend { display: flex; gap: 14px; margin-top: 10px; font-size: 11px; color: var(--text-3); flex-wrap: wrap; }
.legend b { font-family: var(--font-mono); color: var(--text-2); font-weight: 500; margin-left: 4px; }
.legend i { width: 7px; height: 7px; border-radius: 2px; display: inline-block; margin-right: 5px; }

.ringwrap { display: flex; align-items: center; gap: 14px; }
.ringbox { position: relative; width: 60px; height: 60px; flex-shrink: 0; }
.ring { transform: rotate(-90deg); }
.ring .track { fill: none; stroke: var(--panel-2); stroke-width: 5; }
.ring .val { fill: none; stroke: var(--uat); stroke-width: 5; stroke-linecap: round; stroke-dasharray: 163; stroke-dashoffset: var(--ring-off, 163); animation: ringGrow 1.3s .5s var(--smooth) both; }
.ring .val.ring-red { stroke: var(--crit); }
.ring-num { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--uat); }
.ring-num.ring-red { color: var(--crit); }

/* Panel + recent-activity rows (shared with other pages) */
.panel { background: var(--glass); border: 1px solid var(--glass-border); border-radius: var(--radius); box-shadow: var(--shadow-1); overflow: hidden; backdrop-filter: blur(16px) saturate(150%); -webkit-backdrop-filter: blur(16px) saturate(150%); animation: rise .55s var(--smooth) both; margin-bottom: 22px; }
.phead { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.phead h2 { font-size: 13.5px; font-weight: 600; letter-spacing: -.01em; }
.phead a { margin-left: auto; font-size: 12px; color: var(--accent); text-decoration: none; font-weight: 500; }
.arow { display: flex; align-items: center; gap: 12px; padding: 11px 18px; border-bottom: 1px solid var(--border); position: relative; transition: background .18s; text-decoration: none; color: inherit; }
.arow:last-child { border-bottom: 0; }
.arow:hover { background: var(--panel-2); }
.arow::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--rail, transparent); }
.arow-title { font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arow .tkt { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); flex-shrink: 0; }
.arow-meta { margin-left: auto; display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.arow-meta .d { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }

@media (max-width: 900px) {
    .bento { grid-template-columns: 1fr 1fr; }
    .bento .card.hero { grid-column: span 2; }
}
@media (max-width: 560px) {
    .bento { grid-template-columns: 1fr; }
    .bento .card.hero { grid-column: span 1; }
    .spark { display: none; }
}

/* ============================================================
   Ticket table — Board + My tickets (M5)
   ============================================================ */
.tbl-panel { margin-bottom: 22px; }
.tbl-wrap { overflow: auto; max-height: 74vh; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-size: 10.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--text-3); padding: 11px 16px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--glass); backdrop-filter: blur(12px) saturate(150%); -webkit-backdrop-filter: blur(12px) saturate(150%); z-index: 1; white-space: nowrap; }
.tbl td { padding: 11px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: 0; }
/* fill-mode backwards, NOT both: a retained transform would give every row its own
   stacking context, painting later rows over an open .row-menu and eating its clicks */
.tbl tbody tr { transition: background .18s; animation: rise .45s var(--smooth) backwards; }
.tbl tbody tr:has(.row-menu) { position: relative; z-index: 60; }
.tbl tbody tr:hover { background: var(--panel-2); }
.tbl tbody tr td:first-child { border-left: 3px solid var(--rail, transparent); }
.tbl .id { font-family: var(--font-mono); font-size: 12px; color: var(--accent); font-weight: 500; text-decoration: none; }
.tbl .id:hover { text-decoration: underline; }
.tbl .ti { font-weight: 500; max-width: 300px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tbl .due { font-family: var(--font-mono); font-size: 12px; color: var(--text-2); white-space: nowrap; }
.tbl .due-over { color: var(--crit); font-weight: 600; }
.pri { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 500; white-space: nowrap; }
.pri i { width: 7px; height: 7px; border-radius: 2px; flex-shrink: 0; }
.p-crit { color: var(--crit); } .p-crit i { background: var(--crit); }
.p-high i { background: var(--high); } .p-med i { background: var(--med); } .p-low i { background: var(--paused); }
.req { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--text-2); white-space: nowrap; }
.acts { display: flex; gap: 4px; opacity: 0; transform: translateX(6px); transition: all .2s var(--smooth); }
.tbl tbody tr:hover .acts { opacity: 1; transform: translateX(0); }
.acts a { width: 26px; height: 26px; border-radius: 7px; border: 1px solid var(--border); background: var(--glass); color: var(--text-2); display: grid; place-items: center; transition: all .15s; text-decoration: none; }
.acts a:hover { color: var(--accent); border-color: var(--accent-ring); transform: translateY(-1px); }
.acts svg { width: 13px; height: 13px; stroke-width: 2; }

/* Board filter row */
.board-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; }
.board-filters .form-check { display: inline-flex; align-items: center; gap: .35rem; margin: 0; }
.board-results { font-family: var(--font-mono); font-size: 12px; color: var(--text-3); margin-bottom: 10px; }
