/*
 * Orrumai theme — the Spheyas look and feel (brand blue, Nunito headings,
 * Open Sans body, white cards on a cool grey canvas), built on Bootstrap 5.3.
 *
 * Every colour is a token below; views use classes, never raw hex.
 */

/* ---------- Fonts (self-hosted, latin + latin-ext) ---------- */
@font-face {
    font-family: 'Nunito';
    font-style: normal;
    font-weight: 200 1000;
    font-display: swap;
    src: url('../assets/fonts/NunitoVariable.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Nunito';
    font-style: normal;
    font-weight: 200 1000;
    font-display: swap;
    src: url('../assets/fonts/NunitoVariable-Ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url('../assets/fonts/OpenSansVariable.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
    font-family: 'Open Sans';
    font-style: normal;
    font-weight: 300 800;
    font-display: swap;
    src: url('../assets/fonts/OpenSansVariable-Ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
    --brand: #2273d3;
    --brand-dark: #1d63b4;
    --brand-darker: #1f4d87;
    --brand-tint: #eaf3fc;
    --brand-tint-soft: #f4f8fd;
    --cyan: #38c6f2;
    --ink: #252525;
    --ink-muted: #5c6470;
    --ink-faint: #8b93a0;
    --surface: #ffffff;
    --surface-sunken: #f6f8fb;
    --border: #e4e8ee;
    --border-strong: #cfd6e0;
    --green: #2e9e6b;
    --green-tint: #e8f6ef;
    --green-ink: #1d6b48;
    --amber: #c9861a;
    --amber-tint: #fcf3e3;
    --amber-ink: #7a5310;
    --red: #c0392b;
    --red-tint: #fbeceb;
    --red-ink: #8e2a20;
    --grey-tint: #eef1f5;
    --radius-sm: 8px;
    --radius: 12px;
    --shadow-sm: 0 1px 2px rgba(31, 45, 66, .05);
    --shadow: 0 2px 4px rgba(31, 45, 66, .04), 0 6px 20px rgba(31, 45, 66, .06);
    --shadow-lg: 0 12px 40px rgba(31, 45, 66, .12);
    --font-head: 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --font-body: 'Open Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

    /* Bootstrap 5.3 hooks. Links read the -rgb triplet, so keep them in step. */
    --bs-primary: #2273d3;
    --bs-primary-rgb: 34, 115, 211;
    --bs-primary-text-emphasis: #1f4d87;
    --bs-primary-bg-subtle: #eaf3fc;
    --bs-primary-border-subtle: #b9d5f3;
    --bs-link-color: #1d63b4;
    --bs-link-color-rgb: 29, 99, 180;
    --bs-link-hover-color: #1f4d87;
    --bs-link-hover-color-rgb: 31, 77, 135;
    --bs-success: #2e9e6b;
    --bs-success-rgb: 46, 158, 107;
    --bs-danger: #c0392b;
    --bs-danger-rgb: 192, 57, 43;
    --bs-warning: #c9861a;
    --bs-warning-rgb: 201, 134, 26;
    --bs-body-bg: #ffffff; /* cards, inputs, dropdowns; the page canvas is set on body */
    --bs-tertiary-bg: #f6f8fb;
    --bs-body-color: #252525;
    --bs-secondary-color: #5c6470;
    --bs-body-font-family: var(--font-body);
    --bs-body-font-size: .9375rem;
    --bs-border-color: #e4e8ee;
    --bs-border-radius: 8px;
    --bs-border-radius-sm: 6px;
    --bs-border-radius-lg: 12px;
    --bs-focus-ring-color: rgba(34, 115, 211, .25);
}

body {
    background: var(--surface-sunken);
    color: var(--ink);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6, .btn, .navbar-brand, .nav-link, .badge, .stat-value {
    font-family: var(--font-head);
}
h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-weight: 700;
    color: var(--ink);
}

.text-muted, .text-secondary { color: var(--ink-muted) !important; }
.text-faint { color: var(--ink-faint); }
a { text-underline-offset: 2px; text-decoration: none; }
a:hover { text-decoration: underline; }
p a, .alert a, .form-text a { text-decoration: underline; }
.btn:hover, .nav-link:hover, .dropdown-item:hover, .brand:hover { text-decoration: none; }

/* ---------- Top bar ---------- */
.app-topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding-top: .5rem;
    padding-bottom: .5rem;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -.01em;
    color: var(--brand-darker);
    text-decoration: none;
}
.brand:hover { color: var(--brand-darker); }
.brand img { width: 28px; height: 28px; }
.share-org-logo { display: inline-flex; align-items: center; height: 40px; }
.share-org-logo img { max-height: 40px; max-width: 220px; object-fit: contain; }
.org-logo-preview { display: flex; align-items: center; justify-content: center; width: 220px; height: 96px; padding: .75rem; border: 1px dashed var(--border); border-radius: var(--radius, .5rem); background: var(--surface); }
.org-logo-preview img { max-width: 100%; max-height: 100%; object-fit: contain; }

.app-topbar .nav-link {
    color: var(--ink-muted);
    font-weight: 700;
    font-size: .9375rem;
    padding: .5rem .85rem !important;
    border-radius: var(--radius-sm);
}
/* Six menu items, the organization, the account and the bell share one line:
   on laptop widths the labels stay on one line and the icons step aside. */
.app-topbar .nav-link { white-space: nowrap; }
@media (min-width: 992px) and (max-width: 1399.98px) {
    .app-topbar .nav-link { padding: .5rem .6rem !important; }
    .app-topbar .nav-link .bi { display: none; }
}
.app-topbar .nav-link:hover,
.app-topbar .nav-link:focus-visible {
    color: var(--brand-dark);
    background: var(--brand-tint-soft);
}
.app-topbar .nav-link.active {
    color: var(--brand-dark);
    background: var(--brand-tint);
}
.app-topbar .nav-link .bi { margin-right: .35rem; }

.org-switch {
    font-family: var(--font-head);
    font-weight: 700;
    max-width: 240px;
    border-color: var(--border-strong);
    color: var(--ink);
    background: var(--surface);
}
.org-switch:hover, .org-switch:focus, .org-switch.show {
    border-color: var(--brand);
    color: var(--brand-dark);
    background: var(--brand-tint-soft);
}

.avatar {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand);
    color: #fff;
    font-family: var(--font-head);
    font-size: .8125rem;
    font-weight: 800;
    flex: none;
}
.avatar-sm { width: 26px; height: 26px; font-size: .6875rem; }

.dropdown-menu {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: .4rem;
    font-size: .9375rem;
}
.dropdown-item { border-radius: 6px; padding: .4rem .75rem; }
.dropdown-item:active, .dropdown-item.active { background: var(--brand-tint); color: var(--brand-darker); }
.dropdown-header { font-family: var(--font-head); font-weight: 700; text-transform: uppercase; font-size: .6875rem; letter-spacing: .06em; color: var(--ink-faint); }

/* ---------- Page ---------- */
.app-main { flex: 1 0 auto; padding-top: 1.75rem; padding-bottom: 3rem; }

.page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: .75rem 1rem;
    margin-bottom: 1.5rem;
}
.page-title {
    font-weight: 800;
    font-size: 1.625rem;
    letter-spacing: -.01em;
    margin: 0;
    display: flex;
    align-items: center;
    gap: .6rem;
}
.page-subtitle { color: var(--ink-muted); margin-top: .2rem; font-size: .9375rem; }
.page-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }

.breadcrumb { font-size: .875rem; margin-bottom: .5rem; }
.breadcrumb a { text-decoration: none; }

.app-footer {
    flex-shrink: 0;
    color: var(--ink-faint);
    font-size: .8125rem;
    padding: 1.25rem 0;
    border-top: 1px solid var(--border);
    background: var(--surface);
}

/* ---------- Cards ---------- */
.card {
    --bs-card-border-color: var(--border);
    --bs-card-border-radius: var(--radius);
    --bs-card-inner-border-radius: calc(var(--radius) - 1px);
    --bs-card-cap-bg: var(--surface);
    --bs-card-cap-padding-y: .9rem;
    --bs-card-cap-padding-x: 1.25rem;
    --bs-card-spacer-x: 1.25rem;
    --bs-card-spacer-y: 1.15rem;
    box-shadow: var(--shadow);
}
.card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    border-bottom: 1px solid var(--border);
}
.card-header .card-title,
.card-title {
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 1rem;
    color: var(--ink);
    margin: 0;
}
.card-subtitle-inline { font-family: var(--font-body); font-weight: 400; font-size: .8125rem; color: var(--ink-muted); margin-left: .35rem; }
.card-footer { background: var(--surface-sunken); border-top: 1px solid var(--border); }
.card-danger { border-color: #f0c9c4; }
.card-danger .card-header { background: var(--red-tint); border-bottom-color: #f0c9c4; }
.card-danger .card-title { color: var(--red-ink); }

/* Project tables (portfolio, customer page): a group per customer that folds. */
.table-filters { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .75rem 1.25rem; border-bottom: 1px solid var(--border); }
.table-filters .form-select { width: auto; max-width: 14rem; }
.filter-search { position: relative; flex: 1 1 12rem; max-width: 18rem; }
.filter-search .bi { position: absolute; left: .65rem; top: 50%; transform: translateY(-50%); color: var(--ink-faint); pointer-events: none; }
.filter-search .form-control { padding-left: 2rem; }
.sort-link { color: inherit; text-decoration: none; white-space: nowrap; }
.sort-link:hover, .sort-link.active { color: var(--brand-dark); }
.sort-link .bi { font-size: .65rem; opacity: .6; }
.sort-link.active .bi { opacity: 1; }
.project-table .col-progress { min-width: 9rem; }
.pf-head .pf-toggle { padding: 0 .3rem; margin-right: .15rem; line-height: 1.4; }
.pf-head .pf-toggle .bi { display: inline-block; transition: transform .15s ease; }
.pf-head a.phase-name { color: var(--brand-darker); text-decoration: none; }
.pf-head a.phase-name:hover { text-decoration: underline; }
.pf-group.is-collapsed .pf-toggle .bi { transform: rotate(-90deg); }
.pf-group.is-collapsed .pf-row { display: none; }
/* The project name's stretched link makes the whole row clickable; the colour bar marks the project. */
.pf-row { position: relative; }
.card > .table-responsive > .table > tbody > tr.pf-row > td:first-child { border-left: 4px solid var(--project-color, var(--brand)); padding-left: calc(1.25rem - 4px); }

/* Portfolio timeline: a bar per project from its first task date to its last. */
.pf-timeline-scroll { overflow-x: auto; }
.pf-timeline { --tl-name: 15rem; min-width: calc(var(--tl-name) + var(--tl-months) * 5rem); padding-bottom: .25rem; }
.tl-row { display: grid; grid-template-columns: var(--tl-name) 1fr; border-bottom: 1px solid var(--border); }
.tl-name { padding: .55rem .75rem .55rem 1.25rem; min-width: 0; }
.pf-row .tl-name > a, .pf-row .tl-name .small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-track { position: relative; margin-right: 3rem; }
.tl-axis { font-size: .75rem; color: var(--ink-muted); }
.tl-axis .tl-track { height: 2rem; }
.tl-month, .tl-today-label { position: absolute; top: 50%; transform: translateY(-50%); padding-left: .35rem; white-space: nowrap; }
.tl-today-label { color: var(--red); font-weight: 700; transform: translate(-50%, -50%); padding: 0 .25rem; background: var(--surface); z-index: 1; }
.tl-body { position: relative; }
.tl-grid { position: absolute; top: 0; bottom: 0; left: var(--tl-name); right: 3rem; pointer-events: none; }
.tl-line, .tl-today { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--border); }
.tl-line-year { border-left-color: var(--border-strong); }
.tl-today { border-left: 2px solid var(--red); opacity: .55; }
.tl-group-head { background: var(--brand-tint-soft); font-family: var(--font-head); font-size: .8125rem; }
.tl-group-head .phase-name { font-weight: 800; }
.tl-group-head .tl-name { padding-top: .4rem; padding-bottom: .4rem; padding-left: .75rem; white-space: nowrap; }
.pf-row .tl-name { border-left: 4px solid var(--project-color, var(--brand)); padding-left: calc(1.25rem - 4px); }
.tl-bar {
    position: absolute; top: 50%; transform: translateY(-50%); height: 1.15rem; min-width: 4px;
    border-radius: 4px; background: color-mix(in srgb, var(--project-color, var(--brand)) 28%, white);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--project-color, var(--brand)) 55%, white);
}
.tl-bar:hover, .tl-bar:focus-visible { box-shadow: inset 0 0 0 2px var(--project-color, var(--brand)); }
.tl-fill { position: absolute; inset: 0 auto 0 0; border-radius: 4px 0 0 4px; background: var(--project-color, var(--brand)); }
.tl-pct { position: absolute; left: calc(100% + .35rem); top: 50%; transform: translateY(-50%); font-size: .6875rem; font-weight: 700; color: var(--ink-muted); white-space: nowrap; }
.tl-bar.status-on_hold { background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--project-color, var(--brand)) 28%, white) 0 5px, white 5px 9px); }
.tl-bar.status-completed { opacity: .55; }
@media (max-width: 575.98px) {
    .pf-timeline { --tl-name: 10rem; }
}

/* Stat cards: label, big figure, optional hint. Left accent marks the meaning. */
.stat-card { border-left: 4px solid var(--brand); }
.stat-card.accent-green { border-left-color: var(--green); }
.stat-card.accent-amber { border-left-color: var(--amber); }
.stat-card.accent-red { border-left-color: var(--red); }
.stat-card.accent-cyan { border-left-color: var(--cyan); }
.stat-card .card-body { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.stat-label {
    font-family: var(--font-head);
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--brand-dark);
    margin-bottom: .2rem;
}
.accent-green .stat-label { color: var(--green-ink); }
.accent-amber .stat-label { color: var(--amber-ink); }
.accent-red .stat-label { color: var(--red-ink); }
.stat-value { font-size: 1.6rem; font-weight: 800; line-height: 1.15; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat-hint { font-size: .8125rem; color: var(--ink-muted); margin-top: .15rem; }
.stat-icon { font-size: 1.75rem; color: var(--border-strong); }

/* Key/value rows inside cards */
.kv { display: flex; justify-content: space-between; gap: 1rem; padding: .4rem 0; border-bottom: 1px dashed var(--border); }
.kv:last-child { border-bottom: 0; }
.kv > :first-child { color: var(--ink-muted); }
.kv.kv-total { font-weight: 700; border-bottom-style: solid; }

/* ---------- Tables ---------- */
.table {
    --bs-table-border-color: var(--border);
    --bs-table-hover-bg: var(--brand-tint-soft);
    --bs-table-bg: transparent;
    margin-bottom: 0;
    font-size: .875rem;
}
.table > :not(caption) > * > * { padding: .65rem .75rem; }
.table-sm > :not(caption) > * > * { padding: .45rem .6rem; }
.table thead th {
    color: var(--ink-faint);
    font-family: var(--font-head);
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    white-space: nowrap;
    background: var(--surface-sunken);
    border-bottom-color: var(--border);
}
.table tfoot td { background: var(--surface-sunken); font-weight: 700; }
.card > .table-responsive > .table > :not(caption) > * > :first-child,
.card > .table-responsive > .table > :not(caption) > * > :first-child { padding-left: 1.25rem; }
.card > .table-responsive > .table > :not(caption) > * > :last-child { padding-right: 1.25rem; }
.card > .table-responsive:last-child .table > :last-child > :last-child > * { border-bottom: 0; }
.card > .table-responsive:last-child { border-bottom-left-radius: var(--radius); border-bottom-right-radius: var(--radius); }
.phase-head > td {
    background: var(--brand-tint-soft) !important;
    font-family: var(--font-head);
    font-size: .8125rem;
}
.phase-head .phase-name { font-weight: 800; color: var(--brand-darker); }
.phase-hours { color: var(--ink-muted); }
.phase-hours .pill { font-size: .6875rem; }
/* Tasks sit indented under their phase, with a guide line down from the phase row. */
.card > .table-responsive > .table > tbody > tr.task-row > td:first-child { position: relative; padding-left: 2.5rem; }
.card > .table-responsive > .table > tbody > tr.task-row > td:first-child::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: 1.5rem;
    border-left: 2px solid var(--border-strong);
}
/* Drag handle sits in the indent, left of the guide line. */
.task-row .drag-handle { position: absolute; left: .2rem; top: 50%; transform: translateY(-50%); }
/* The "No tasks in this phase" line goes away once a task is dragged in. */
.phase-group:has(tr[data-id]) .empty-phase { display: none; }
/* Task form: "Depends on" dropdown of checkboxes. */
.dep-menu { max-height: 18rem; overflow-y: auto; }
.dep-menu .dropdown-item.form-check { display: flex; align-items: center; gap: .5rem; padding-left: 1rem; margin: 0; cursor: pointer; white-space: normal; }
.dep-menu .dropdown-item.form-check .form-check-input { float: none; margin: 0; flex-shrink: 0; }
.dep-menu .dropdown-item.disabled { cursor: not-allowed; }
.edit-row > td { background: var(--surface-sunken) !important; }
.empty-state {
    text-align: center;
    padding: 2.5rem 1rem;
    color: var(--ink-muted);
}
.empty-state .bi { font-size: 2rem; color: var(--border-strong); display: block; margin-bottom: .5rem; }

/* ---------- Tabs (underline style) ---------- */
.nav-underline {
    --bs-nav-underline-gap: 1.25rem;
    --bs-nav-underline-border-width: 3px;
    --bs-nav-underline-link-active-color: var(--brand-dark);
    border-bottom: 1px solid var(--border);
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
}
.nav-underline .nav-link {
    color: var(--ink-muted);
    font-weight: 700;
    padding-bottom: .65rem;
    white-space: nowrap;
}
.nav-underline .nav-link:hover { color: var(--brand-dark); border-bottom-color: var(--border-strong); }
.nav-underline .nav-link.active { font-weight: 800; }

/* ---------- Buttons ---------- */
.btn { font-weight: 700; --bs-btn-border-radius: var(--radius-sm); }
.btn-primary {
    --bs-btn-bg: var(--brand);
    --bs-btn-border-color: var(--brand);
    --bs-btn-hover-bg: var(--brand-dark);
    --bs-btn-hover-border-color: var(--brand-dark);
    --bs-btn-active-bg: var(--brand-darker);
    --bs-btn-active-border-color: var(--brand-darker);
    --bs-btn-disabled-bg: var(--brand);
    --bs-btn-disabled-border-color: var(--brand);
    --bs-btn-focus-shadow-rgb: 34, 115, 211;
}
.btn-outline-primary {
    --bs-btn-color: var(--brand-dark);
    --bs-btn-border-color: var(--brand);
    --bs-btn-hover-bg: var(--brand);
    --bs-btn-hover-border-color: var(--brand);
    --bs-btn-active-bg: var(--brand-dark);
    --bs-btn-active-border-color: var(--brand-dark);
    --bs-btn-focus-shadow-rgb: 34, 115, 211;
}
.btn-outline-secondary {
    --bs-btn-color: var(--ink-muted);
    --bs-btn-border-color: var(--border-strong);
    --bs-btn-hover-color: var(--brand-dark);
    --bs-btn-hover-bg: var(--brand-tint-soft);
    --bs-btn-hover-border-color: var(--brand);
    --bs-btn-active-color: var(--brand-darker);
    --bs-btn-active-bg: var(--brand-tint);
    --bs-btn-active-border-color: var(--brand);
}
.btn-outline-danger {
    --bs-btn-color: var(--red);
    --bs-btn-border-color: #e3b1ab;
    --bs-btn-hover-bg: var(--red);
    --bs-btn-hover-border-color: var(--red);
    --bs-btn-active-bg: var(--red-ink);
}
.btn-icon { padding: .25rem .5rem; line-height: 1; }
.btn-ghost { --bs-btn-color: var(--ink-muted); --bs-btn-hover-color: var(--brand-dark); --bs-btn-hover-bg: var(--brand-tint-soft); --bs-btn-active-bg: var(--brand-tint); border: 0; }
.btn-ghost-danger { --bs-btn-color: var(--ink-faint); --bs-btn-hover-color: var(--red); --bs-btn-hover-bg: var(--red-tint); --bs-btn-active-bg: var(--red-tint); border: 0; }

/* ---------- Forms ---------- */
.form-control, .form-select {
    border-color: var(--border-strong);
}
.form-control:focus, .form-select:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 .2rem rgba(34, 115, 211, .18);
}
.form-label { font-weight: 600; font-size: .8125rem; color: var(--ink-muted); margin-bottom: .3rem; }
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
.form-text { color: var(--ink-faint); }
.input-group-text { background: var(--surface-sunken); border-color: var(--border-strong); color: var(--ink-muted); }

/* ---------- Badges / pills ---------- */
.pill {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: .75rem;
    line-height: 1;
    padding: .35rem .6rem;
    border-radius: 999px;
    white-space: nowrap;
    background: var(--grey-tint);
    color: var(--ink-muted);
}
.pill::before { content: ''; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; opacity: .85; }
.pill-plain::before { display: none; }
.pill-blue { background: var(--brand-tint); color: var(--brand-darker); }
.pill-green { background: var(--green-tint); color: var(--green-ink); }
.pill-amber { background: var(--amber-tint); color: var(--amber-ink); }
.pill-red { background: var(--red-tint); color: var(--red-ink); }
.role-pill { text-transform: capitalize; }

.dot { display: inline-block; width: .65rem; height: .65rem; border-radius: 50%; flex: none; background: var(--dot-color, var(--brand)); }
.dot-lg { width: .85rem; height: .85rem; }

/* ---------- Progress ---------- */
.progress { --bs-progress-bg: var(--grey-tint); --bs-progress-bar-bg: var(--brand); --bs-progress-border-radius: 999px; }
.progress-thin { height: 6px; }
.progress-md { height: 10px; }

/* ---------- Alerts ---------- */
.alert { border-radius: var(--radius); border-width: 1px; display: flex; gap: .6rem; align-items: flex-start; }
.alert > .bi { font-size: 1.1rem; line-height: 1.3; }
.alert-success { --bs-alert-bg: var(--green-tint); --bs-alert-color: var(--green-ink); --bs-alert-border-color: #bfe3d1; }
.alert-danger { --bs-alert-bg: var(--red-tint); --bs-alert-color: var(--red-ink); --bs-alert-border-color: #f0c9c4; }
.alert-warning { --bs-alert-bg: var(--amber-tint); --bs-alert-color: var(--amber-ink); --bs-alert-border-color: #efd8ac; }
.alert-info { --bs-alert-bg: var(--brand-tint); --bs-alert-color: var(--brand-darker); --bs-alert-border-color: #b9d5f3; }

/* ---------- Numbers ---------- */
.mono { font-variant-numeric: tabular-nums; }
.over { color: var(--red) !important; }
.good { color: var(--green) !important; }

/* ---------- Timesheet ---------- */
.hr-input { width: 4.25rem; text-align: right; margin-left: auto; }
.timesheet th.day, .timesheet td.day { text-align: right; }
.timesheet th.today, .timesheet td.today { background: var(--brand-tint-soft); }
.timesheet th.weekend, .timesheet td.weekend { color: var(--ink-faint); }

/* ---------- Gantt (Frappe) ---------- */
.gantt .bar { fill: #b9d5f3; }
.gantt .bar-progress { fill: var(--brand); }
.gantt .bar-label { font-family: var(--font-body); font-weight: 600; fill: var(--ink); }
.gantt .bar-wrapper.bar-flagged .bar { fill: #efd8ac; }
.gantt .bar-wrapper.bar-flagged .bar-progress { fill: var(--amber); }
.gantt .bar-wrapper.bar-critical .bar { stroke: var(--red); stroke-width: 2.5; }
.gantt .bar-wrapper.bar-critical:not(.bar-flagged) .bar { fill: #f0c9c4; }
.gantt .bar-wrapper.bar-critical:not(.bar-flagged) .bar-progress { fill: var(--red); }
.gantt .today-highlight { fill: var(--brand-tint); }
/* Milestones: a diamond instead of a bar (drawn by show.php's milestones()). */
.gantt .bar-wrapper.bar-milestone .bar,
.gantt .bar-wrapper.bar-milestone .bar-progress { display: none; }
.gantt .milestone { fill: var(--brand-darker); stroke: #fff; stroke-width: 1.5; }
.gantt .bar-wrapper.bar-milestone.bar-flagged .milestone { fill: var(--amber); }
.gantt .bar-wrapper.bar-milestone.bar-critical .milestone { fill: var(--red); }
.milestone-icon { color: var(--brand-darker); font-size: .75em; }
/* Managers drag bars (project-gantt.js); progress is set on the task, so its handle is hidden,
   and a milestone is one date, so it has no end handles. Read-only charts show no handles. */
.gantt .handle.progress,
.gantt .bar-milestone .handle,
#ganttWrap:not([data-editable]) .gantt .handle { display: none; }
#ganttWrap:not([data-editable]) .gantt .bar-wrapper { cursor: default; }
/* Baseline: thin grey bars (grey diamonds for milestones) under the live plan. */
.gantt .baseline-layer { pointer-events: none; }
.gantt .baseline-bar { fill: var(--ink-faint); opacity: .55; }
.gantt .baseline-milestone { fill: var(--ink-faint); opacity: .45; }
.baseline-key { display: inline-block; width: 1.5rem; height: 5px; border-radius: 2px; background: var(--ink-faint); opacity: .55; vertical-align: middle; margin: 0 .2rem 0 .4rem; }
.gantt-header { flex-wrap: wrap; gap: .5rem; }

/* ---------- Auth / guest pages ---------- */
.auth-body { background: linear-gradient(160deg, var(--brand-tint-soft) 0%, var(--surface-sunken) 55%); }
.auth-shell { flex: 1 0 auto; display: flex; align-items: center; justify-content: center; padding: 2.5rem 1rem; }
.auth-card { width: 100%; max-width: 940px; overflow: hidden; box-shadow: var(--shadow-lg); border: 0; }
.auth-card.auth-card-narrow { max-width: 480px; }
.auth-aside {
    background: linear-gradient(155deg, var(--brand) 0%, var(--brand-darker) 100%);
    color: #fff;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    position: relative;
    overflow: hidden;
}
.auth-aside::after {
    content: '';
    position: absolute;
    right: -80px;
    bottom: -80px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    border: 2px solid rgba(56, 198, 242, .35);
    box-shadow: 0 0 0 28px rgba(56, 198, 242, .06);
    pointer-events: none;
}
.auth-aside .brand { color: #fff; }
.auth-aside h2 { color: #fff; font-weight: 800; font-size: 1.6rem; line-height: 1.25; }
.auth-aside ul { list-style: none; padding: 0; margin: 0; }
.auth-aside li { display: flex; gap: .6rem; margin-bottom: .6rem; color: rgba(255, 255, 255, .9); }
.auth-aside li .bi { color: var(--cyan); }
.auth-form { padding: 2.5rem; }
.auth-form h1 { font-size: 1.5rem; font-weight: 800; margin-bottom: .25rem; }
.auth-footer { text-align: center; color: var(--ink-faint); font-size: .8125rem; padding: 1rem 0 1.5rem; }

@media (max-width: 767.98px) {
    .auth-form, .auth-aside { padding: 1.75rem; }
    .page-title { font-size: 1.375rem; }
    .stat-value { font-size: 1.35rem; }
}

@media print {
    .app-topbar, .app-footer, .page-actions, .nav-underline { display: none !important; }
    .card { box-shadow: none; }
}

/* Round icon above a centred heading (create org, invite) */
.icon-badge { width: 56px; height: 56px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--brand-tint); }
.icon-badge-danger { background: var(--red-tint); }

/* Logo sits in a white tile on the blue panel so the mark keeps its colours. */
.auth-aside .brand img { background: #fff; border-radius: 8px; padding: 2px; width: 32px; height: 32px; }
/* Redirects land on #tasks etc.; keep the tab bar clear of the sticky top bar. */
.tab-pane { scroll-margin-top: 8rem; }
@media (max-width: 575.98px) {
    .stat-icon { display: none; }
    .stat-card .card-body { padding: .85rem 1rem; }
    .stat-label { font-size: .6875rem; }
}

/* ---------- Sortable lists (categories, phases) ---------- */
.sortable-list { list-style: none; margin: 0; padding: 0; }
.sortable-list > li {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .7rem 1.25rem;
    border-bottom: 1px solid var(--border);
    background: var(--surface);
}
.sortable-list > li:last-child { border-bottom: 0; border-bottom-left-radius: var(--radius); border-bottom-right-radius: var(--radius); }
.drag-handle { cursor: grab; color: var(--ink-faint); font-size: 1.1rem; line-height: 1; padding: .25rem; touch-action: none; }
.drag-handle:hover { color: var(--brand); }
.sortable-ghost { background: var(--brand-tint) !important; opacity: .7; }
.sortable-list .move-btns { display: inline-flex; gap: .15rem; }
.sortable-list > li:first-child .move-up,
.sortable-list > li:last-child .move-down { visibility: hidden; }
.list-row-main { flex: 1 1 auto; min-width: 0; }
.list-row-meta { color: var(--ink-muted); font-size: .8125rem; }

/* Form pages: one card, centred, with a back link above */
.form-page { max-width: 760px; margin-inline: auto; }
.back-link { display: inline-flex; align-items: center; gap: .35rem; font-weight: 600; font-size: .875rem; margin-bottom: .75rem; }
.danger-zone { border-top: 1px solid var(--border); margin-top: 1.5rem; padding-top: 1.25rem; }
.sortable-fallback { box-shadow: var(--shadow-lg); border-radius: var(--radius-sm); }

/* Small icon button beside a page title (e.g. the project's Edit cog). */
.page-title .title-action { font-size: .875rem; margin-left: .25rem; }

/* ---------- Public site: landing, contact, privacy, terms (layouts/site) ---------- */
.landing { background: var(--surface); }
.site-skip { position: absolute; left: 1rem; top: .5rem; z-index: 20; background: var(--surface); padding: .5rem 1rem; border-radius: var(--radius-sm); }
.landing-nav { position: sticky; top: 0; z-index: 10; }
.landing-nav .nav-link { color: var(--ink-muted); font-weight: 600; padding: .4rem .6rem; }
.landing-nav .nav-link:hover, .landing-nav .nav-link.active { color: var(--brand); }

/* Hero: copy on the left, the product in a browser frame on the right with chips floating over it. */
.hero { position: relative; overflow: hidden; padding: 4.5rem 0 5rem; background: linear-gradient(165deg, var(--brand-tint) 0%, var(--brand-tint-soft) 45%, var(--surface) 100%); }
.hero-decor { position: absolute; inset: 0; pointer-events: none;
    background: radial-gradient(38rem 26rem at 88% 8%, color-mix(in srgb, var(--cyan) 22%, transparent), transparent 70%),
                radial-gradient(30rem 22rem at 6% 96%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 70%); }
.hero-split { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 3.5rem; align-items: center; }
.landing-title { font-size: clamp(2.2rem, 4.4vw, 3.4rem); font-weight: 900; line-height: 1.08; letter-spacing: -.02em; }
.text-gradient { background: linear-gradient(100deg, var(--brand) 10%, var(--cyan) 95%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-rule { width: 4rem; height: 4px; border-radius: 2px; margin-top: 1.5rem; background: linear-gradient(90deg, var(--brand), var(--cyan)); }
.landing-lead { font-size: 1.125rem; color: var(--ink-muted); max-width: 36rem; margin-top: 1.25rem; }
.hero-note { display: flex; align-items: center; gap: .45rem; margin: 1rem 0 0; font-size: .875rem; color: var(--ink-muted); }
.hero-note .bi { color: var(--green); font-size: 1rem; }
.hero-visual { position: relative; padding: 1.5rem 0 2.5rem 1.5rem; }
.browser { position: relative; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--border); box-shadow: 0 30px 70px rgba(31, 77, 135, .22), var(--shadow); }
.browser-bar { display: flex; align-items: center; gap: .4rem; padding: .55rem .8rem; background: var(--surface-sunken); border-bottom: 1px solid var(--border); }
.browser-bar i { width: .6rem; height: .6rem; border-radius: 50%; background: var(--border-strong); }
.browser-bar span { margin-left: .75rem; flex: 1; max-width: 18rem; padding: .15rem .75rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: .75rem; color: var(--ink-faint); }
.shot { display: block; width: 100%; height: auto; }
.hero-chip { position: absolute; display: flex; align-items: center; gap: .7rem; padding: .7rem .95rem; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-lg); font-size: .8125rem; white-space: nowrap; }
.hero-chip-icon { width: 2.1rem; height: 2.1rem; border-radius: 50%; display: grid; place-items: center; background: var(--brand-tint); color: var(--brand); font-size: 1rem; flex-shrink: 0; }
.hero-chip-icon.is-green { background: var(--green-tint); color: var(--green); }
.hero-chip-label { display: block; color: var(--ink-muted); font-size: .75rem; }
.hero-chip-value { display: block; font-family: var(--font-head); font-weight: 800; font-size: 1rem; color: var(--ink); }
.hero-chip-value small { font-weight: 600; color: var(--ink-faint); font-size: .75rem; }
.hero-chip-forecast { left: -.5rem; bottom: 0; }
.hero-chip-week { right: -1rem; top: 0; }
.hero-chip-tag { right: 2rem; bottom: .5rem; color: var(--brand-darker); font-weight: 700; background: var(--brand-tint); border-color: color-mix(in srgb, var(--brand) 25%, transparent); }

.landing-section { padding: 5rem 0; }
.landing-section-alt { background: var(--surface-sunken); }
.landing-section-head { max-width: 42rem; margin: 0 auto 2.75rem; text-align: center; }
.landing-section-head h2, .landing-h2, .landing-cta h2 { font-weight: 900; font-size: clamp(1.65rem, 3vw, 2.25rem); letter-spacing: -.01em; line-height: 1.15; }
.landing-section-head p { color: var(--ink-muted); font-size: 1.0625rem; margin: .75rem 0 0; }
.eyebrow { display: inline-block; margin-bottom: .6rem; font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); }
.feature-card { transition: transform .15s ease, box-shadow .15s ease; }
.feature-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.feature-card h3, .mini-feature h3 { font-size: 1.125rem; font-weight: 800; margin: 1rem 0 .5rem; }
.feature-card p, .mini-feature p { color: var(--ink-muted); }
.feature-icon { width: 44px; height: 44px; border-radius: 10px; display: inline-grid; place-items: center; background: var(--brand-tint); color: var(--brand); font-size: 1.3rem; flex-shrink: 0; }
.shot-frame { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--surface); box-shadow: 0 24px 60px rgba(31, 77, 135, .14), var(--shadow); }
.check-list { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .65rem; }
.check-list li { display: flex; gap: .6rem; align-items: flex-start; font-weight: 600; }
.check-list .bi { flex-shrink: 0; width: 1.4rem; height: 1.4rem; border-radius: 50%; display: grid; place-items: center; background: var(--brand-tint); color: var(--brand); font-size: .9rem; margin-top: .05rem; }
.mini-feature { display: flex; gap: 1rem; height: 100%; }
.mini-feature h3 { font-size: 1.0625rem; margin-top: .15rem; }
.trust-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.trust-list li { display: flex; gap: .85rem; padding: 1.1rem 1.25rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
.trust-list .bi { color: var(--brand); font-size: 1.3rem; line-height: 1.2; }
.landing-cta { position: relative; overflow: hidden; color: #fff; padding: 4.5rem 0;
    background: radial-gradient(30rem 20rem at 85% 0%, color-mix(in srgb, var(--cyan) 45%, transparent), transparent 70%), linear-gradient(155deg, var(--brand) 0%, var(--brand-darker) 100%); }
.landing-cta h2 { color: #fff; }
.landing-cta p { color: rgba(255, 255, 255, .88); font-size: 1.0625rem; margin: .75rem auto 1.75rem; max-width: 36rem; }

.site-footer { padding: 3rem 0 1.5rem; background: var(--surface-sunken); border-top: 1px solid var(--border); font-size: .9rem; }
.site-footer-tag { color: var(--ink-muted); margin: .75rem 0 0; max-width: 22rem; }
.site-footer-head { font-size: .75rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: .75rem; }
.site-footer nav a { display: block; color: var(--ink-muted); text-decoration: none; padding: .2rem 0; }
.site-footer nav a:hover { color: var(--brand); }
.site-footer-base { margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border); color: var(--ink-faint); font-size: .8125rem; }
.site-footer-base .parent-brand { color: var(--ink-muted); font-weight: 600; text-decoration: none; }
.site-footer-base .parent-brand:hover, .site-footer-base .parent-brand:focus { color: var(--brand); }

/* Contact, privacy and terms: one readable card on a tinted page. */
.document-page { padding: 3.5rem 0 4.5rem; background: linear-gradient(180deg, var(--brand-tint-soft) 0, var(--surface-sunken) 22rem); }
.document-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: clamp(1.5rem, 4vw, 3.25rem); }
.document-title { font-weight: 900; font-size: clamp(1.9rem, 4vw, 2.6rem); letter-spacing: -.02em; margin: 0; }
.document-lead { font-size: 1.125rem; color: var(--ink-muted); margin: .75rem 0 2rem; padding-bottom: 1.75rem; border-bottom: 1px solid var(--border); }
.document-body { line-height: 1.7; }
.document-body h2 { font-size: 1.3rem; font-weight: 800; margin: 2.25rem 0 .75rem; }
.document-body h3 { font-size: 1.05rem; font-weight: 800; margin: 1.5rem 0 .5rem; }
.document-body li { margin-bottom: .4rem; }
.document-body a { overflow-wrap: anywhere; }
.document-section + .document-section { margin-top: 2.5rem; }
.document-section h2:first-child { margin-top: 0; }
.contact-card { height: 100%; padding: 1.5rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--brand-tint-soft); }
.contact-card-title { font-size: 1.15rem; font-weight: 800; margin: 1rem 0 .5rem; }

@media (max-width: 991.98px) {
    .hero-split { grid-template-columns: 1fr; gap: 2.5rem; }
    .hero-visual { padding: 1.25rem .5rem 2.5rem; }
    .hero-chip-week { right: 0; }
    .hero-chip-forecast { left: 0; }
}
@media (max-width: 575.98px) {
    .hero { padding: 3rem 0 3.5rem; }
    .hero-chip-tag { display: none; }
    .hero-chip { padding: .5rem .7rem; }
    .hero-chip-icon { width: 1.75rem; height: 1.75rem; font-size: .85rem; }
    .hero-chip-value { font-size: .875rem; }
    .landing-section { padding: 3.5rem 0; }
    .landing-nav .brand { font-size: 1.1rem; }
}
/* Contact / Book a demo */
.contact-hero { padding-bottom: 4.5rem; }
.contact-promises { list-style: none; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; font-size: .875rem; color: var(--ink-muted); font-weight: 600; }
.contact-promises li { display: flex; align-items: center; gap: .4rem; }
.contact-promises .bi { color: var(--brand); }
.demo-card { position: relative; max-width: 30rem; margin-left: auto; padding: 1.75rem; border-radius: calc(var(--radius) + 4px); background: var(--surface); border: 1px solid var(--border); box-shadow: 0 30px 70px rgba(31, 77, 135, .2), var(--shadow); }
.demo-card::before { content: ""; position: absolute; inset: 0 0 auto; height: 5px; border-radius: inherit; border-bottom-left-radius: 0; border-bottom-right-radius: 0; background: linear-gradient(90deg, var(--brand), var(--cyan)); }
.demo-card-head { display: flex; align-items: center; gap: .85rem; padding-bottom: 1.1rem; margin-bottom: 1.1rem; border-bottom: 1px solid var(--border); }
.demo-card-title { font-family: var(--font-head); font-weight: 900; font-size: 1.2rem; }
.demo-card-sub { font-size: .8125rem; color: var(--ink-muted); }
.demo-card-list { list-style: none; padding: 0; margin: 0 0 1.5rem; display: grid; gap: .9rem; }
.demo-card-list li { display: flex; gap: .75rem; align-items: flex-start; font-size: .9375rem; color: var(--ink-muted); }
.demo-card-list strong { color: var(--ink); }
.demo-card-list .bi { flex-shrink: 0; width: 2rem; height: 2rem; border-radius: 8px; display: grid; place-items: center; background: var(--brand-tint); color: var(--brand); }
.contact-hero .hero-chip-week { top: -1rem; right: auto; left: 0; }
.contact-option { position: relative; height: 100%; padding: 2rem; border-radius: calc(var(--radius) + 4px); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease; }
.contact-option:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.contact-option h3 { font-size: 1.3rem; font-weight: 900; margin: 1.1rem 0 .4rem; }
.contact-option p { color: var(--ink-muted); margin-bottom: 1.5rem; }
.contact-option-icon { width: 3rem; height: 3rem; border-radius: 12px; display: grid; place-items: center; font-size: 1.4rem; background: var(--brand-tint); color: var(--brand); }
.contact-option-primary { color: #fff; border: 0; background: radial-gradient(22rem 14rem at 100% 0%, color-mix(in srgb, var(--cyan) 45%, transparent), transparent 70%), linear-gradient(150deg, var(--brand) 0%, var(--brand-darker) 100%); box-shadow: 0 24px 50px rgba(31, 77, 135, .3); }
.contact-option-primary h3, .contact-option-primary p { color: #fff; }
.contact-option-primary p { opacity: .88; }
.contact-option-primary .contact-option-icon { background: rgba(255, 255, 255, .16); color: #fff; }
.contact-address { display: flex; align-items: center; justify-content: space-between; gap: .75rem; padding: .6rem .6rem .6rem 1rem; border-radius: 999px; background: var(--surface-sunken); border: 1px solid var(--border); }
.contact-address a { font-weight: 700; text-decoration: none; overflow-wrap: anywhere; }
.contact-option-primary .contact-address { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .25); }
.contact-option-primary .contact-address a { color: #fff; }
.copy-btn { flex-shrink: 0; display: inline-flex; align-items: center; gap: .35rem; padding: .3rem .75rem; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink-muted); font-size: .8125rem; font-weight: 700; }
.copy-btn:hover { color: var(--brand); border-color: var(--brand); }
.copy-btn.copied { color: var(--green); border-color: var(--green); }
.contact-option-primary .copy-btn { background: #fff; border-color: #fff; color: var(--brand-darker); }
.demo-steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; counter-reset: none; }
.demo-steps li { position: relative; padding: 1.75rem; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.demo-steps li:not(:last-child)::after { content: "\F138"; font-family: bootstrap-icons; position: absolute; right: -1.2rem; top: 2.1rem; z-index: 1; width: 1.6rem; height: 1.6rem; display: grid; place-items: center; border-radius: 50%; background: var(--surface); color: var(--brand); box-shadow: var(--shadow-sm); font-size: .9rem; }
.demo-steps h3 { font-size: 1.125rem; font-weight: 800; margin: 1rem 0 .5rem; }
.demo-steps p { color: var(--ink-muted); margin: 0; }
.step-number { width: 2.4rem; height: 2.4rem; border-radius: 50%; display: inline-grid; place-items: center; background: linear-gradient(135deg, var(--brand), var(--cyan)); color: #fff; font-family: var(--font-head); font-weight: 900; }
.contact-warning { display: flex; gap: .5rem; align-items: center; padding: .75rem 1rem; border-radius: var(--radius-sm); background: var(--amber-tint); color: var(--amber-ink); font-weight: 600; font-size: .9rem; }
.faq { display: grid; gap: .75rem; }
.faq details { border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); transition: box-shadow .15s ease; }
.faq details[open] { box-shadow: var(--shadow); border-color: color-mix(in srgb, var(--brand) 30%, var(--border)); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.1rem 1.35rem; font-family: var(--font-head); font-weight: 800; font-size: 1.0625rem; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .bi { flex-shrink: 0; color: var(--brand); transition: transform .2s ease; }
.faq details[open] summary .bi { transform: rotate(45deg); }
.faq details p { padding: 0 1.35rem 1.25rem; margin: 0; color: var(--ink-muted); }
@media (max-width: 991.98px) {
    .demo-card { margin: 0 auto; }
    .demo-steps { grid-template-columns: 1fr; }
    .demo-steps li:not(:last-child)::after { content: "\F128"; right: auto; left: 2.25rem; top: auto; bottom: -1.2rem; }
}
@media (max-width: 575.98px) {
    .contact-hero .hero-chip-week { display: none; }
    .contact-option { padding: 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
    .feature-card, .feature-card:hover, .contact-option, .contact-option:hover { transition: none; transform: none; }
}

/* Task statuses: a colour swatch, used on the settings list, task pills and board columns. */
.status-swatch { display: inline-block; width: .75rem; height: .75rem; border-radius: 3px; background: var(--status-color); flex-shrink: 0; }
.status-pill { display: inline-flex; align-items: center; gap: .35rem; font-size: .75rem; font-weight: 600; padding: .15rem .5rem; border-radius: 999px;
    background: color-mix(in srgb, var(--status-color) 14%, transparent); color: color-mix(in srgb, var(--status-color) 75%, var(--ink)); white-space: nowrap; }
.status-pill::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: var(--status-color); }

/* Kanban board (Tasks tab → Board). Columns scroll sideways on narrow screens. */
.board-toolbar { display: flex; align-items: center; gap: .5rem; padding: .75rem 1.25rem; border-bottom: 1px solid var(--border); }
.kanban { display: flex; align-items: flex-start; gap: .875rem; padding: 1rem 1.25rem 1.25rem; overflow-x: auto; }
.kanban-col { flex: 1 0 13.5rem; max-width: 22rem; background: var(--surface-sunken); border: 1px solid var(--border); border-top: 3px solid var(--status-color); border-radius: var(--radius-sm); }
.kanban-col-head { display: flex; align-items: center; gap: .45rem; padding: .6rem .75rem; font-family: var(--font-head); font-weight: 800; font-size: .875rem; }
.kanban-col-count { font-size: .75rem; font-weight: 700; color: var(--ink-muted); background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 0 .45rem; }
.kanban-cards { display: flex; flex-direction: column; gap: .5rem; min-height: 4.5rem; padding: 0 .5rem .6rem; }
.kanban-card { user-select: none; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); box-shadow: var(--shadow-sm); padding: .6rem .7rem; font-size: .8125rem; }
.kanban-card.can-move { cursor: grab; }
.kanban-card.can-move:hover { border-color: var(--border-strong); }
.kanban-card-title { font-weight: 700; margin-bottom: .3rem; line-height: 1.3; }
.kanban-card-title a { color: var(--ink); }
.kanban-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .6rem; color: var(--ink-muted); font-size: .75rem; margin-bottom: .3rem; }
.kanban-card-meta .pill { font-size: .6875rem; }
.kanban-phase { font-weight: 600; color: var(--brand-darker); }
.kanban-waiting { font-size: .75rem; color: var(--amber-ink); background: var(--amber-tint); border-radius: 6px; padding: .2rem .45rem; margin-bottom: .35rem; }
.kanban-card-foot { display: flex; align-items: center; gap: .5rem; margin-top: .35rem; }
.kanban-card-foot .progress { max-width: 5rem; }

/* ---- Client share page (/share/{token}) ---- */
.share-narrow { max-width: 26rem; margin: 3rem auto; }
.share-footer { display: flex; justify-content: center; align-items: center; gap: .35rem; color: var(--ink-faint); font-size: .8125rem; padding: 1.25rem 0 1.75rem; }
.share-footer a { display: inline-flex; align-items: center; gap: .3rem; color: var(--ink-muted); font-weight: 700; text-decoration: none; }
.share-footer a:hover { color: var(--brand); }
.share-footer img { width: 18px; height: 18px; }
.share-attention { border-left: 3px solid var(--brand); }
.share-milestones { display: flex; flex-wrap: wrap; gap: .75rem 1.5rem; }
.share-milestone { display: flex; align-items: center; gap: .4rem; }
.share-milestone.is-done .bi { color: var(--green-ink); }

/* ---------- Resources: people × weeks ---------- */
.res-scroll { border: 1px solid var(--border); border-radius: var(--radius-sm); }
.res-table { border-collapse: separate; border-spacing: 0; min-width: 760px; }
.res-table th, .res-table td { border-bottom: 1px solid var(--border); vertical-align: middle; }
.res-table tbody tr:last-child > * { border-bottom: 0; }
.res-table thead th { font-size: .8125rem; color: var(--ink-muted); background: var(--surface-sunken); white-space: nowrap; }
.res-person { position: sticky; left: 0; z-index: 1; background: var(--surface); min-width: 11rem; max-width: 14rem; font-weight: 700; }
thead .res-person { background: var(--surface-sunken); }
.res-week { text-align: center; min-width: 5.5rem; }
.res-week.res-now { color: var(--brand-darker); }
.res-td { padding: .3rem !important; }
.res-cell {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .05rem;
    width: 100%; min-height: 3.25rem; padding: .35rem .25rem;
    border: 1px solid transparent; border-radius: var(--radius-sm);
    background: var(--surface-sunken); color: var(--ink-muted); cursor: pointer;
}
.res-cell:hover { border-color: var(--border-strong); }
.res-cell:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.res-hours { font-family: var(--font-head); font-weight: 800; font-size: 1rem; line-height: 1.1; }
.res-meta { font-size: .75rem; }
.res-room { background: var(--grey-tint); color: var(--ink-muted); }
.res-full { background: var(--brand-tint); color: var(--brand-darker); }
.res-over { background: var(--red-tint); color: var(--red-ink); border-color: #f0c4bf; }
.res-empty .res-hours { font-weight: 600; color: var(--ink-faint); }
.res-loose { background: var(--amber-tint); color: var(--amber-ink); }
.res-loose-row .res-person { color: var(--amber-ink); }
.res-swatch { display: inline-block; width: .85rem; height: .85rem; border-radius: 3px; margin-right: .35rem; vertical-align: -1px; }
.res-swatch.res-room { background: var(--grey-tint); border: 1px solid var(--border-strong); }
.res-swatch.res-full { background: var(--brand-tint); border: 1px solid #b9d5f3; }
.res-swatch.res-over { background: var(--red-tint); border: 1px solid #f0c4bf; }
.res-panel { --bs-offcanvas-width: 440px; }
.res-task { padding: .75rem; border: 1px solid var(--border); border-radius: var(--radius-sm); }
.res-actions summary { color: var(--bs-link-color); cursor: pointer; }
.res-hours-input { max-width: 6.5rem; }

/* ---------- Notifications (the bell) ---------- */
.bell .btn-icon { font-size: 1.15rem; }
.bell-badge {
    position: absolute; top: -2px; right: -4px; min-width: 1.15rem; height: 1.15rem; padding: 0 .3rem;
    border-radius: 999px; background: var(--red); color: #fff; font-size: .7rem; font-weight: 700; line-height: 1.15rem; text-align: center;
}
.bell-menu { width: min(380px, calc(100vw - 2rem)); }
.bell-head { display: flex; justify-content: space-between; align-items: center; padding: .65rem .9rem; border-bottom: 1px solid var(--border); }
.bell-list { max-height: 420px; overflow-y: auto; }
.bell-item { display: flex; align-items: flex-start; gap: .25rem; padding: .25rem .4rem .25rem 0; border-bottom: 1px solid var(--border); }
.bell-item:last-child { border-bottom: 0; }
.bell-link { flex: 1; display: flex; gap: .6rem; padding: .45rem .9rem; color: var(--ink); font-size: .875rem; text-decoration: none; }
.bell-link:hover { background: var(--surface-sunken); }
.bell-icon { color: var(--brand); margin-top: .15rem; }
.bell-tick { margin-top: .35rem; color: var(--ink-muted); }
.bell-tick:hover { color: var(--green); }
.bell-empty { margin: 0; padding: 1.25rem .9rem; color: var(--ink-muted); font-size: .875rem; text-align: center; }
.report-chip { text-decoration: none; }
.report-total > * { background: var(--surface-sunken) !important; }

/* Portfolio table + timeline: table columns, then each project's bar over a shared
   month grid. Only the project name stays pinned, so the bars stay visible when
   the columns scroll away on narrower screens. */
.pf-combined-scroll { overflow-x: auto; }
.pf-combined {
    --col-name: 15rem;
    --col-status: 7.5rem;
    --col-progress: 9.5rem;
    --col-num: 6.5rem;
    --cols: var(--col-name) var(--col-status) var(--col-progress) var(--col-num) var(--col-num) var(--col-num);
    --left: calc(var(--col-name) + var(--col-status) + var(--col-progress) + var(--col-num) * 3);
    min-width: calc(var(--left) + var(--tl-months) * 5rem + 4rem);
    padding-bottom: .25rem;
}
.pf-combined.no-money {
    --cols: var(--col-name) var(--col-status) var(--col-progress) var(--col-num);
    --left: calc(var(--col-name) + var(--col-status) + var(--col-progress) + var(--col-num));
}
.c-row { display: grid; grid-template-columns: var(--cols) minmax(0, 1fr); align-items: center; border-bottom: 1px solid var(--border); }
.c-row > * { padding: .5rem .6rem; min-width: 0; }
.c-row > .c-track { position: relative; align-self: stretch; padding: 0; margin-right: 4rem; min-height: 2rem; }
.c-name { position: sticky; left: 0; z-index: 2; background: var(--surface); box-shadow: 1px 0 0 var(--border); padding-left: 1.25rem; }
.c-name a, .c-name .small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-row .c-name { border-left: 4px solid var(--project-color, var(--brand)); padding-left: calc(1.25rem - 4px); }
.c-num { text-align: right; }
.c-axis { font-size: .72rem; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-faint); font-weight: 600; }
.c-axis .tl-month { text-transform: none; letter-spacing: 0; }
.c-sort-dates { position: absolute; top: 50%; right: -4rem; width: 4rem; transform: translateY(-50%); text-align: center; }
.c-body { position: relative; }
.c-grid { position: absolute; top: 0; bottom: 0; left: var(--left); right: 4rem; pointer-events: none; }
.c-group-head { background: var(--brand-tint-soft); font-family: var(--font-head); font-size: .8125rem; }
.c-group-head .c-group-cell { grid-column: 1 / -1; padding: .4rem .75rem; }
.c-sticky { position: sticky; left: 0; z-index: 2; display: inline-flex; align-items: center; gap: .35rem; white-space: nowrap; background: var(--brand-tint-soft); padding-right: .5rem; }
.c-group-head .phase-name { font-weight: 800; }
.tl-none { position: absolute; top: 50%; left: .6rem; transform: translateY(-50%); font-size: .75rem; color: var(--ink-faint); white-space: nowrap; }
/* Narrower screens drop Budget and Actual; Forecast stays. */
@media (max-width: 1199.98px) {
    .pf-combined:not(.no-money) {
        --cols: var(--col-name) var(--col-status) var(--col-progress) var(--col-num);
        --left: calc(var(--col-name) + var(--col-status) + var(--col-progress) + var(--col-num));
    }
    .pf-combined .c-wide { display: none; }
}
@media (max-width: 575.98px) {
    .pf-combined { --col-name: 10rem; }
}
