:root {
    --bg: #eef6f8;
    --bg-2: #fbffff;
    --surface: rgba(255, 255, 255, 0.58);
    --surface-strong: rgba(255, 255, 255, 0.78);
    --surface-muted: rgba(246, 249, 251, 0.66);
    --surface-dark: rgba(3, 24, 51, 0.82);
    --text: #06264a;
    --text-soft: #526779;
    --text-muted: #8393a3;
    --text-on-dark: #f8fafc;
    --primary: #22d3a6;
    --primary-strong: #0fb88d;
    --primary-soft: rgba(34, 211, 166, 0.14);
    --accent: #06264a;
    --accent-strong: #031833;
    --accent-soft: rgba(6, 38, 74, 0.09);
    --info: #256b9d;
    --success: #0f9f7c;
    --warning: #b98524;
    --danger: #b64f5d;
    --border: rgba(113, 128, 150, 0.22);
    --border-strong: rgba(255, 255, 255, 0.72);
    --shadow: 0 18px 50px rgba(20, 31, 44, 0.08);
    --shadow-soft: 0 10px 26px rgba(20, 31, 44, 0.06);
    --radius: 8px;
    --radius-sm: 6px;
    --radius-lg: 14px;
    --header-height: 84px;
    --sidebar-width: 248px;
    --sidebar-compact-width: 82px;
    --mobile-header-height: 74px;
    --mobile-nav-height: 86px;
    --interface-scale: 0.85;
    --font-ui: Inter, "Avenir Next", Avenir, "Segoe UI", Arial, sans-serif;
    --font-display: Inter, "Avenir Next", Avenir, "Segoe UI", Arial, sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

@media screen {
    html {
        zoom: var(--interface-scale);
    }
}

@media screen {
    @supports not (zoom: 1) {
        body {
            width: calc(100% / var(--interface-scale));
            min-height: calc(100vh / var(--interface-scale));
            transform: scale(var(--interface-scale));
            transform-origin: 0 0;
        }
    }
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: var(--font-ui);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0) 34%),
        linear-gradient(180deg, var(--bg-2), var(--bg));
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(23, 32, 43, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(23, 32, 43, 0.035) 1px, transparent 1px);
    background-size: 32px 32px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.8), transparent 88%);
}

body.app-page {
    padding-top: var(--header-height);
}

body.sidebar-open {
    overflow: hidden;
}

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

img,
svg,
canvas {
    max-width: 100%;
}

img {
    display: block;
}

h1,
h2,
h3,
h4 {
    margin: 0 0 0.65rem;
    color: var(--text);
    font-family: var(--font-display);
    font-weight: 760;
    line-height: 1.12;
    letter-spacing: 0;
}

p {
    margin: 0 0 0.75rem;
    color: var(--text-soft);
    line-height: 1.58;
}

code {
    display: inline-block;
    padding: 0.08rem 0.35rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--surface-muted);
    color: var(--primary-strong);
}

input,
select,
textarea,
button {
    font: inherit;
}

button,
.btn {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.65rem 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: var(--radius);
    color: #ffffff;
    background: rgba(157, 79, 30, 0.9);
    box-shadow: var(--shadow-soft);
    cursor: pointer;
    font-weight: 720;
    line-height: 1;
    transition: transform 0.16s ease, background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

button:hover,
.btn:hover {
    transform: translateY(-1px);
    background: var(--primary-strong);
}

button:active,
.btn:active {
    transform: translateY(0);
}

.icon {
    width: 1rem;
    height: 1rem;
    flex: 0 0 auto;
}

.icon-btn {
    width: 32px;
    min-width: 32px;
    min-height: 32px;
    padding: 0;
}

.btn-light {
    color: var(--text);
    background: rgba(255, 255, 255, 0.68);
    border-color: rgba(255, 255, 255, 0.72);
    box-shadow: none;
}

.btn-light:hover {
    background: rgba(255, 255, 255, 0.9);
}

.btn-secondary {
    background: rgba(38, 48, 61, 0.88);
}

.btn-danger {
    background: rgba(182, 79, 93, 0.9);
}

.actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.38rem;
}

form.inline {
    display: inline;
}

label,
.field {
    display: block;
}

label {
    margin-bottom: 0.42rem;
    color: var(--text);
    font-size: 0.84rem;
    font-weight: 720;
}

input,
select,
textarea {
    width: 100%;
    padding: 0.72rem 0.78rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text);
    background: rgba(255, 255, 255, 0.68);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.78);
    transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: 0;
    border-color: rgba(75, 123, 120, 0.58);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 3px rgba(75, 123, 120, 0.12);
}

.app-shell {
    min-height: calc(100vh - var(--header-height));
    min-width: 0;
}

.content-area {
    margin-left: var(--sidebar-width);
    min-width: 0;
    transition: margin-left 0.18s ease;
}

body.sidebar-compact .content-area {
    margin-left: var(--sidebar-compact-width);
}

.technician-portal-page .sidebar,
.technician-portal-page .sidebar-backdrop,
.technician-portal-page .menu-toggle {
    display: none;
}

.technician-portal-page .content-area,
body.sidebar-compact.technician-portal-page .content-area {
    margin-left: 0;
}

.main-content {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 1rem;
    padding: 1rem 1rem 1.4rem;
}

.topbar {
    position: fixed;
    inset: 0 0 auto;
    min-height: var(--header-height);
    z-index: 20;
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: transparent;
}

.topbar-panel,
.glass-panel {
    border: 1px solid var(--border-strong);
    background: linear-gradient(180deg, var(--surface-strong), var(--surface));
    box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.84);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.topbar-panel {
    width: 100%;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.9rem;
    padding: 0.5rem 0.65rem;
    border-radius: var(--radius);
}

.topbar-left,
.topbar-branding,
.topbar-right,
.user-badge {
    display: flex;
    align-items: center;
    min-width: 0;
}

.topbar-left,
.topbar-branding {
    gap: 0.72rem;
}

.topbar-right {
    gap: 0.45rem;
}

.topbar-brand {
    display: inline-flex;
    align-items: center;
    height: 52px;
    flex: none;
}

.topbar-wordmark {
    width: auto;
    height: 52px;
    object-fit: contain;
}

.topbar-wordmark-text {
    color: var(--text);
    font-size: 1.32rem;
    font-weight: 900;
    letter-spacing: 0;
    text-decoration: none;
}

.topbar-copy {
    display: grid;
    min-width: 0;
}

.topbar-kicker,
.sidebar-kicker,
.panel-kicker,
.auth-kicker {
    color: var(--text-muted);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.topbar-copy strong {
    overflow: hidden;
    color: var(--text);
    font-size: 0.96rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-toggle {
    display: none;
    width: 40px;
    min-width: 40px;
    height: 40px;
    padding: 0;
    flex-direction: column;
    gap: 4px;
    color: var(--text);
    background: rgba(255, 255, 255, 0.7);
}

.menu-toggle span {
    width: 17px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.user-badge {
    gap: 0.62rem;
    padding: 0 0.25rem;
}

.user-avatar {
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    flex: none;
    border-radius: var(--radius);
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    font-size: 0.82rem;
    font-weight: 800;
}

.color-swatch {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 999px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 0 1px var(--border);
    vertical-align: middle;
}

.user-meta strong,
.user-meta span {
    display: block;
}

.user-meta strong {
    font-size: 0.88rem;
}

.user-meta span {
    color: var(--text-muted);
    font-size: 0.76rem;
}

.search-toggle {
    width: 40px;
    min-width: 40px;
    padding: 0;
}

.search-toggle svg,
.nav-icon svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.search-toggle svg {
    width: 18px;
    height: 18px;
}

.search-panel {
    position: fixed;
    top: var(--header-height);
    right: 1rem;
    z-index: 19;
    width: min(620px, calc(100vw - 2rem));
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: opacity 0.16s ease, transform 0.16s ease;
}

.search-panel.is-open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.search-panel-inner {
    padding: 0.65rem;
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--surface-strong), var(--surface));
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
}

.quick-search {
    display: flex;
    gap: 0.45rem;
    align-items: center;
}

.quick-search input {
    min-width: 0;
}

.quick-search button {
    flex: none;
}

.sidebar-backdrop {
    position: fixed;
    inset: var(--header-height) 0 0;
    z-index: 11;
    background: rgba(17, 24, 33, 0.28);
    backdrop-filter: blur(8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s ease;
}

body.sidebar-open .sidebar-backdrop {
    opacity: 1;
    pointer-events: auto;
}

.sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    z-index: 12;
    width: var(--sidebar-width);
    height: calc(100vh - var(--header-height));
    padding: 1rem 0.75rem 1rem 1rem;
    transition: width 0.18s ease, padding 0.18s ease;
}

body.sidebar-compact .sidebar {
    width: var(--sidebar-compact-width);
    padding: 1rem 0.5rem 1rem;
}

.sidebar-panel {
    min-height: 0;
    height: auto;
    max-height: calc(100vh - var(--header-height) - 2rem);
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    gap: 1rem;
    padding: 0.85rem;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: var(--radius);
    color: var(--text-on-dark);
    background: linear-gradient(180deg, rgba(27, 35, 45, 0.78), rgba(27, 35, 45, 0.62));
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px) saturate(135%);
    -webkit-backdrop-filter: blur(18px) saturate(135%);
}

.sidebar-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
    min-width: 0;
}

.sidebar-header strong {
    display: block;
    margin-top: 0.34rem;
    color: #ffffff;
    font-size: 1rem;
}

.sidebar-collapse-toggle {
    width: 34px;
    min-width: 34px;
    height: 34px;
    padding: 0;
    flex: none;
    color: rgba(248, 250, 252, 0.86);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
    box-shadow: none;
}

.sidebar-collapse-toggle svg {
    width: 18px;
    height: 18px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 0.18s ease;
}

body.sidebar-compact .sidebar-collapse-toggle svg {
    transform: rotate(180deg);
}

.sidebar-header p,
.sidebar-note p {
    margin: 0.45rem 0 0;
    color: rgba(248, 250, 252, 0.7);
    font-size: 0.82rem;
    line-height: 1.5;
}

.main-nav {
    display: grid;
    align-content: start;
    gap: 0.42rem;
    min-height: 0;
    overflow-y: auto;
    scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
    display: none;
}

.main-nav a {
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.55rem 0.6rem;
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: rgba(248, 250, 252, 0.84);
    font-size: 0.88rem;
    font-weight: 720;
    transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease;
}

.nav-label,
.sidebar-header > div,
.sidebar-note {
    transition: opacity 0.12s ease;
}

.main-nav a:hover,
.main-nav a.is-active {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.1);
}

.nav-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: none;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.08);
}

.nav-icon svg {
    width: 18px;
    height: 18px;
}

.sidebar-note {
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.07);
}

.sidebar-note span {
    color: rgba(248, 250, 252, 0.54);
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

body.sidebar-compact .sidebar-panel {
    grid-template-rows: auto minmax(0, 1fr);
    gap: 0.7rem;
    padding: 0.65rem 0.45rem;
}

body.sidebar-compact .sidebar-header {
    justify-content: center;
}

body.sidebar-compact .sidebar-header > div,
body.sidebar-compact .sidebar-note,
body.sidebar-compact .nav-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    opacity: 0;
    white-space: nowrap;
}

body.sidebar-compact .main-nav {
    gap: 0.48rem;
}

body.sidebar-compact .main-nav a {
    min-height: 44px;
    justify-content: center;
    padding: 0.32rem;
}

body.sidebar-compact .nav-icon {
    width: 38px;
    height: 38px;
}

.page-header,
.card,
.kpi,
.filters,
.table-wrap,
.flash,
.empty-state,
.auth-card,
.calendar-shell,
.notice,
.liquid-panel,
.hero-card,
.panel,
.project-card,
.kanban-column,
.activity-item,
.doc-row,
.load-row,
.trend-card {
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--surface-strong), var(--surface));
    box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(255, 255, 255, 0.78);
    backdrop-filter: blur(18px) saturate(135%);
    -webkit-backdrop-filter: blur(18px) saturate(135%);
}

.page-header,
.card,
.kpi,
.filters,
.table-wrap,
.calendar-shell,
.notice,
.liquid-panel,
.hero-card,
.panel,
.project-card,
.kanban-column,
.activity-item,
.doc-row,
.load-row,
.trend-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.page-header,
.card,
.kpi,
.filters,
.liquid-panel,
.hero-card,
.panel {
    padding: 1rem;
}

.filters {
    padding: 0.48rem 0.7rem;
}

.filters-toggle {
    width: 100%;
    min-height: 30px;
    justify-content: space-between;
    padding: 0.28rem 0.45rem;
    border-color: transparent;
    color: var(--text);
    background: transparent;
    box-shadow: none;
    font-size: 0.82rem;
    font-weight: 800;
}

.filters-toggle:hover,
.filters-toggle:active {
    color: var(--primary-strong);
    background: rgba(255, 255, 255, 0.38);
    transform: none;
}

.filters-toggle::after {
    content: "";
    width: 0.48rem;
    height: 0.48rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform 0.16s ease;
}

.filters.is-expanded .filters-toggle::after {
    transform: rotate(225deg) translateY(-2px);
}

.filters form {
    margin: 0;
}

.filters.is-collapsed form {
    display: none;
}

.filters.is-expanded form {
    margin-top: 0.42rem;
}

.filters .form-grid,
.filters .form-grid-3,
.filters .grid-3 {
    gap: 0.38rem 0.6rem;
    align-items: end;
}

.filters label {
    margin-bottom: 0.16rem;
    font-size: 0.76rem;
    line-height: 1.2;
}

.filters input,
.filters select {
    min-height: 28px;
    padding: 0.26rem 0.5rem;
    font-size: 0.84rem;
}

.filters .actions {
    gap: 0.32rem;
    align-self: end;
}

.filters .actions .btn,
.filters .actions button {
    min-height: 28px;
    padding: 0.34rem 0.52rem;
    font-size: 0.82rem;
}

.filters .keyword-search-form {
    gap: 0.5rem;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.page-header h1 {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.25rem;
    font-size: clamp(1.45rem, 2.4vw, 2.1rem);
}

body.has-company-title-logo .page-header h1::before {
    content: "";
    flex: 0 0 auto;
    width: clamp(38px, 4.2vw, 54px);
    height: clamp(38px, 4.2vw, 54px);
    border: 1px solid rgba(220, 233, 236, 0.95);
    border-radius: 8px;
    background-color: #ffffff;
    background-image: var(--company-title-logo);
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    box-shadow: 0 8px 18px rgba(6, 38, 74, 0.08);
}

.page-header p {
    max-width: 68ch;
    margin-bottom: 0;
}

.card + .card {
    margin-top: 1rem;
}

.project-tabs {
    display: grid;
    gap: 1rem;
}

.project-hero {
    display: grid;
    gap: 0.8rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.58);
    box-shadow: var(--shadow-soft);
}

.project-hero-main {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 1rem;
}

.project-hero-copy {
    min-width: 0;
}

.project-eyebrow {
    display: block;
    margin-bottom: 0.28rem;
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 820;
    text-transform: uppercase;
}

.project-hero h1 {
    margin: 0;
    font-size: clamp(1.45rem, 2.4vw, 2.15rem);
    line-height: 1.05;
}

.project-hero-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.42rem;
    margin-top: 0.58rem;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.project-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.42rem;
}

.project-hero-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
}

.project-hero-kpis div {
    min-width: 0;
    padding: 0.72rem 0.78rem;
    border: 1px solid rgba(113, 128, 150, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.55);
}

.project-hero-kpis span {
    display: block;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 780;
}

.project-hero-kpis strong {
    display: block;
    margin-top: 0.18rem;
    overflow: hidden;
    color: var(--text);
    font-size: 0.98rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tab-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0.25rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.46);
}

.tab-button {
    min-height: 38px;
    flex: 0 0 auto;
    padding: 0.58rem 0.8rem;
    color: var(--text-soft);
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.tab-button:hover,
.tab-button.is-active {
    color: var(--text);
    background: rgba(255, 255, 255, 0.86);
    border-color: rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow-soft);
}

.tab-panel {
    min-width: 0;
}

.tab-panel[hidden] {
    display: none;
}

.assistant-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, 0.75fr);
    gap: 1rem;
}

.assistant-summary {
    display: grid;
    gap: 0.8rem;
}

.assistant-summary p {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.45;
}

.assistant-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
}

.assistant-metrics div {
    min-width: 0;
    padding: 0.68rem 0.72rem;
    border: 1px solid rgba(113, 128, 150, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.58);
}

.assistant-metrics span {
    display: block;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 780;
}

.assistant-metrics strong {
    display: block;
    margin-top: 0.18rem;
    font-size: 1.08rem;
}

.assistant-list {
    display: grid;
    gap: 0.45rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.assistant-list li {
    padding: 0.58rem 0.68rem;
    border: 1px solid rgba(113, 128, 150, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.56);
    color: var(--text-soft);
    line-height: 1.35;
}

.project-summary-board {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(240px, 0.82fr) minmax(240px, 0.82fr);
    gap: 1rem;
}

.project-summary-primary {
    display: grid;
    align-content: start;
    gap: 0.8rem;
}

.project-summary-description {
    margin: 0;
    color: var(--text-soft);
    line-height: 1.45;
}

.project-address-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.project-address-strip div {
    min-width: 0;
    padding: 0.75rem;
    border: 1px solid rgba(113, 128, 150, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.54);
}

.project-address-strip span {
    display: block;
    margin-bottom: 0.22rem;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 800;
}

.project-address-strip strong {
    display: block;
    overflow-wrap: anywhere;
}

.project-address-strip p {
    margin: 0.28rem 0 0;
    color: var(--text-soft);
    font-size: 0.8rem;
    line-height: 1.35;
}

.project-address-strip .project-address-full {
    grid-column: 1 / -1;
}

.info-panel {
    min-width: 0;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.46);
}

.info-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.info-panel-header h2 {
    margin: 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 0.75rem;
}

.detail-grid.is-compact {
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.detail-grid div {
    min-width: 0;
    padding: 0.72rem;
    border: 1px solid rgba(113, 128, 150, 0.16);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.52);
}

.detail-grid span {
    display: block;
    margin-bottom: 0.25rem;
    color: var(--text-muted);
    font-size: 0.76rem;
    font-weight: 720;
}

.detail-grid strong {
    display: block;
    overflow-wrap: anywhere;
    color: var(--text);
    font-size: 0.93rem;
    line-height: 1.35;
}

.project-activity-summary,
.project-planning-metrics,
.project-planning-events {
    margin-top: 1rem;
}

.grid-2.project-activity-summary {
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
    align-items: stretch;
}

.project-activity-summary > .info-panel {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-activity-summary .project-compact-list,
.project-activity-summary .empty-state {
    flex: 1;
}

.project-compact-list {
    display: grid;
    gap: 0.48rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.project-compact-list li {
    min-width: 0;
    padding: 0.52rem 0.62rem;
    border: 1px solid rgba(113, 128, 150, 0.16);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.52);
}

.project-compact-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.project-compact-row .actions {
    flex: 0 0 auto;
    gap: 0.22rem;
}

.project-compact-row .icon-btn {
    width: 28px;
    min-width: 28px;
    min-height: 28px;
}

.project-compact-list strong,
.project-compact-list a {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: var(--text);
    font-size: 0.86rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-compact-list small {
    display: block;
    margin-top: 0.18rem;
    color: var(--text-soft);
    font-size: 0.72rem;
}

.project-compact-list p {
    margin: 0.32rem 0 0;
    color: var(--text-soft);
    font-size: 0.76rem;
    line-height: 1.35;
}

.project-toolbox-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 0.15rem 0 0.05rem;
}

.project-toolbox-item {
    min-height: 92px;
    display: grid;
    justify-items: center;
    align-content: start;
    gap: 0.48rem;
    padding: 0.28rem 0.28rem 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--text);
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.12;
    text-align: center;
    text-decoration: none;
}

.project-toolbox-icon {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(145deg, #0ea5e9, #2563eb);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.28);
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.project-toolbox-upload .project-toolbox-icon {
    background: linear-gradient(145deg, #38bdf8, #2563eb);
}

.project-toolbox-measure .project-toolbox-icon {
    background: linear-gradient(145deg, #34d399, #0f766e);
}

.project-toolbox-camera .project-toolbox-icon {
    background: linear-gradient(145deg, #f97316, #dc2626);
}

.project-toolbox-task .project-toolbox-icon {
    background: linear-gradient(145deg, #a78bfa, #6d28d9);
}

.project-toolbox-item > span:last-child {
    max-width: 78px;
    min-height: 2.3em;
    display: block;
}

.project-toolbox-icon .icon {
    width: 27px;
    height: 27px;
    color: currentColor;
}

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

.project-toolbox-item:hover .project-toolbox-icon {
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 14px 26px rgba(15, 23, 42, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.32);
    filter: saturate(1.08);
}

.project-measurements-panel {
    display: grid;
    gap: 0.8rem;
}

.project-measurements-history {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 0.75rem;
}

.project-measurement-card {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 0.75rem;
    min-width: 0;
    padding: 0.7rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.62);
}

.project-measurement-thumb {
    width: 104px;
    aspect-ratio: 1;
    overflow: hidden;
    border: 1px solid rgba(113, 128, 150, 0.18);
    border-radius: 8px;
    background: #eef2f5;
    padding: 0;
    cursor: pointer;
}

.project-measurement-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.project-measurement-body {
    min-width: 0;
    display: grid;
    align-content: start;
    gap: 0.45rem;
}

.project-measurement-head {
    display: grid;
    gap: 0.12rem;
}

.project-measurement-head strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-measurement-head span,
.project-measurement-meta,
.project-measurement-body p {
    color: var(--text-soft);
    font-size: 0.76rem;
}

.project-measurement-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.project-measurement-meta span {
    padding: 0.16rem 0.42rem;
    border: 1px solid rgba(113, 128, 150, 0.16);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.62);
}

.project-measurement-body p {
    margin: 0;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.project-measurements-frame {
    width: 100%;
    height: min(780px, calc(100vh - 180px));
    min-height: 560px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #eef2f5;
}

.task-form-card {
    display: grid;
    gap: 1rem;
}

.task-checklist-editor {
    margin-top: 0.9rem;
    padding: 0.85rem;
    border: 1px solid rgba(113, 128, 150, 0.18);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.5);
}

.task-checklist-editor-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.7rem;
}

.task-checklist-editor-head label {
    margin: 0;
}

.task-checklist-editor-head small {
    display: block;
    margin-top: 0.18rem;
    color: var(--text-soft);
    font-size: 0.76rem;
}

.task-manager-validation-card {
    margin-top: 0.8rem;
}

.task-checklist-rows {
    display: grid;
    gap: 0.45rem;
}

.task-checklist-labels {
    display: grid;
    grid-template-columns: 30px 30px minmax(0, 1fr) 32px;
    gap: 0.42rem;
    margin-bottom: 0.28rem;
    color: var(--text-soft);
    font-size: 0.68rem;
    font-weight: 800;
}

.task-checklist-labels span:nth-child(3) {
    grid-column: 3;
}

.task-checklist-editor:not(.is-manager-validation-enabled) .task-manager-column {
    display: none;
}

.task-checklist-editor:not(.is-manager-validation-enabled) .task-checklist-labels {
    grid-template-columns: 30px minmax(0, 1fr) 32px;
}

.task-checklist-editor:not(.is-manager-validation-enabled) .task-checklist-labels span:nth-child(3) {
    grid-column: 2;
}

.task-checklist-row {
    display: grid;
    grid-template-columns: 30px 30px minmax(0, 1fr) 32px;
    align-items: start;
    gap: 0.42rem;
}

.task-checklist-editor:not(.is-manager-validation-enabled) .task-checklist-row {
    grid-template-columns: 30px minmax(0, 1fr) 32px;
}

.task-check {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    margin: 0;
}

.task-check input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.task-check input:disabled + span {
    opacity: 0.48;
}

.task-check span,
.task-check-dot,
.task-manager-dot {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1.5px solid rgba(75, 123, 120, 0.42);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.72);
}

.task-check input:checked + span,
.task-subtask-list li.is-done .task-check-dot {
    border-color: rgba(47, 128, 98, 0.72);
    background: #2f8062;
}

.task-check.is-manager span,
.task-manager-dot {
    border-color: rgba(163, 107, 33, 0.48);
}

.task-check.is-manager input:checked + span,
.task-subtask-list li.is-manager-done .task-manager-dot {
    border-color: rgba(163, 107, 33, 0.78);
    background: #a36b21;
}

.task-check input:checked + span::after,
.task-subtask-list li.is-done .task-check-dot::after,
.task-check.is-manager input:checked + span::after,
.task-subtask-list li.is-manager-done .task-manager-dot::after {
    content: "";
    width: 8px;
    height: 5px;
    border: solid #ffffff;
    border-width: 0 0 2px 2px;
    transform: rotate(-45deg) translateY(-1px);
}

.task-checklist-row input[type="text"] {
    min-height: 36px;
}

.task-checklist-content {
    display: grid;
    gap: 0.35rem;
}

.task-checklist-content textarea {
    min-height: 58px;
    resize: vertical;
    font-size: 0.82rem;
}

.task-progress-mini {
    display: grid;
    gap: 0.24rem;
    margin-top: 0.42rem;
}

.task-progress-mini strong {
    color: var(--text-soft);
    font-size: 0.72rem;
    font-weight: 800;
}

.task-progress-mini .progress {
    height: 5px;
}

.task-subtask-list {
    display: grid;
    gap: 0.24rem;
    margin: 0.42rem 0 0;
    padding: 0;
    list-style: none;
}

.task-subtask-list li {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 0.34rem;
    color: var(--text);
    font-size: 0.76rem;
    line-height: 1.25;
}

.task-subtask-list li.has-manager-validation {
    grid-template-columns: 18px 18px minmax(0, 1fr);
}

.task-subtask-list li.is-done {
    color: var(--text-soft);
}

.task-subtask-list li.is-manager-done .task-subtask-text {
    font-weight: 800;
}

.task-subtask-list li.is-done.is-manager-done .task-subtask-text {
    text-decoration: line-through;
}

.task-subtask-note {
    grid-column: 2;
    color: var(--text-soft);
    font-size: 0.7rem;
    line-height: 1.25;
}

.task-subtask-list li.has-manager-validation .task-subtask-note {
    grid-column: 3;
}

.project-gantt-shell {
    margin-top: 1rem;
    overflow: visible;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.46);
}

.card h2,
.panel h3,
.cluster-head h2,
.focus-lens-head h2 {
    font-size: 1rem;
}

.kpi {
    min-height: 118px;
    display: grid;
    align-content: end;
}

.kpi h3 {
    margin: 0;
    font-size: clamp(1.55rem, 2vw, 2.1rem);
}

.kpi p {
    margin: 0.35rem 0 0;
}

.kpi-grid,
.grid-2,
.grid-3,
.grid-4,
.form-grid,
.form-grid-3 {
    display: grid;
    gap: 1rem;
    min-width: 0;
}

.kpi-grid > *,
.grid-2 > *,
.grid-3 > *,
.grid-4 > *,
.form-grid > *,
.form-grid-3 > *,
.dashboard-mosaic > *,
.liquid-board > *,
.kanban-grid > *,
.knowledge-grid > *,
.portfolio-grid > *,
.metric-ribbon > *,
.hero-metrics > *,
.trend-strip > *,
.stat-cloud > * {
    min-width: 0;
}

.kpi-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

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

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

.keyword-search-form {
    display: flex;
    align-items: end;
    gap: 0.75rem;
}

.keyword-search-field {
    flex: 1 1 auto;
    min-width: 0;
}

.keyword-search-form .actions {
    flex: none;
}

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

.table-wrap {
    overflow: auto;
}

table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    background: transparent;
}

.card-muted {
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface-muted);
    padding: 0.9rem 1rem;
}

.checkbox-line {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    margin: 0;
    font-weight: 700;
}

.checkbox-line input {
    width: auto;
    margin: 0;
}

th,
td {
    padding: 0.42rem 0.58rem;
    border-bottom: 1px solid rgba(113, 128, 150, 0.18);
    font-size: 0.82rem;
    line-height: 1.22;
    text-align: left;
    vertical-align: top;
}

thead th {
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.38);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

thead th .sort-link {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    color: inherit;
    text-decoration: none;
}

thead th .sort-link:hover,
thead th .sort-link.is-active {
    color: var(--primary-strong);
}

.sort-indicator {
    min-width: 0.8em;
    font-size: 0.72rem;
    line-height: 1;
}

td .actions {
    gap: 0.26rem;
}

td .btn,
td button {
    min-height: 30px;
}

td .icon-btn {
    width: 30px;
    min-width: 30px;
    min-height: 30px;
}

tbody tr:last-child td {
    border-bottom: 0;
}

tbody tr:hover td {
    background: rgba(255, 255, 255, 0.32);
}

.projects-filters {
    padding: 0.38rem 0.7rem;
}

.projects-filters .form-grid-3 {
    gap: 0.38rem 0.6rem;
}

.projects-filters label {
    margin-bottom: 0.16rem;
    font-size: 0.76rem;
}

.projects-filters input,
.projects-filters select {
    padding: 0.26rem 0.5rem;
    min-height: 28px;
    font-size: 0.84rem;
}

.projects-filters .actions {
    gap: 0.32rem;
}

.projects-filters .actions .btn,
.projects-filters .actions button {
    min-height: 28px;
    padding: 0.34rem 0.52rem;
    font-size: 0.82rem;
}

.projects-table th,
.projects-table td {
    padding: 0.24rem 0.44rem;
    line-height: 1.2;
    font-size: 0.8rem;
}

.projects-table {
    min-width: 860px;
}

.projects-table small {
    line-height: 1.15;
    font-size: 0.76rem;
}

.projects-table strong {
    font-size: 0.82rem;
}

.projects-table .project-subject {
    display: -webkit-box;
    max-width: 260px;
    margin-top: 0.18rem;
    overflow: hidden;
    color: var(--text);
    font-size: 0.8rem;
    font-weight: 720;
    line-height: 1.2;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.projects-table .project-subject.is-empty {
    color: var(--text-soft);
    font-weight: 600;
}

.projects-table .project-subject-cell {
    min-width: 180px;
    max-width: 280px;
}

.projects-table .badge {
    padding: 0.14rem 0.4rem;
    font-size: 0.7rem;
}

.projects-table .actions {
    gap: 0.24rem;
}

.projects-table .actions .btn,
.projects-table .actions button {
    min-height: 24px;
    padding: 0.28rem 0.44rem;
    font-size: 0.76rem;
}

.projects-table .progress {
    height: 6px;
}

.projects-table .project-date-stack,
.projects-table .project-progress-value {
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 720;
    line-height: 1.2;
}

table a {
    color: var(--text);
    font-weight: 720;
}

table a:hover {
    color: var(--primary-strong);
}

.badge,
.event-chip,
.cluster-counter,
.project-status,
.liquid-project-state,
.doc-tag,
.doc-link {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    min-height: 26px;
    padding: 0.28rem 0.58rem;
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.48);
    color: var(--text-soft);
    font-size: 0.76rem;
    font-weight: 760;
    line-height: 1;
}

.badge.success,
.project-status.is-live,
.liquid-project-state.is-live {
    color: var(--success);
    background: rgba(47, 128, 98, 0.12);
}

.badge.warning {
    color: var(--warning);
    background: rgba(163, 107, 33, 0.12);
}

.badge.danger,
.project-status.is-risk,
.liquid-project-state.is-risk {
    color: var(--danger);
    background: rgba(182, 79, 93, 0.12);
}

.badge.info,
.project-status.is-review,
.liquid-project-state.is-review {
    color: var(--info);
    background: rgba(81, 111, 157, 0.12);
}

.badge.neutral {
    color: var(--text-soft);
}

.flash {
    padding: 0.85rem 0.95rem;
    font-weight: 700;
}

.flash.success {
    color: var(--success);
    background: rgba(47, 128, 98, 0.1);
}

.flash.error {
    color: var(--danger);
    background: rgba(182, 79, 93, 0.1);
}

.flash.warning {
    color: var(--warning);
    background: rgba(163, 107, 33, 0.1);
}

.flash.info {
    color: var(--info);
    background: rgba(81, 111, 157, 0.1);
}

.empty-state {
    padding: 1rem;
    color: var(--text-soft);
    text-align: center;
}

.notice {
    padding: 0.85rem 0.95rem;
    color: var(--text-soft);
}

.readonly-field {
    min-height: 42px;
    display: flex;
    align-items: center;
    padding: 0.65rem 0.72rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.52);
    color: var(--text);
    font-weight: 720;
}

.daily-hours-form {
    display: grid;
    gap: 1rem;
}

.daily-hours-toolbar {
    display: grid;
    grid-template-columns: minmax(180px, 0.7fr) minmax(220px, 1fr) minmax(150px, 0.5fr);
    gap: 0.85rem;
    align-items: end;
}

.daily-hours-total {
    min-height: 42px;
    display: grid;
    align-content: center;
    gap: 0.18rem;
    padding: 0.58rem 0.72rem;
    border: 1px solid rgba(240, 127, 28, 0.22);
    border-radius: var(--radius-sm);
    background: rgba(240, 127, 28, 0.09);
}

.daily-hours-total span {
    color: var(--text-soft);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.daily-hours-total strong {
    color: var(--primary-strong);
    font-size: 1.2rem;
    line-height: 1;
}

.daily-hours-lines {
    display: grid;
    gap: 0.7rem;
}

.daily-hour-row {
    display: grid;
    grid-template-columns: minmax(220px, 1.45fr) minmax(130px, 0.55fr) minmax(94px, 0.35fr) minmax(170px, 0.9fr) minmax(170px, 1fr) auto;
    gap: 0.65rem;
    align-items: end;
    padding: 0.72rem;
    border: 1px solid rgba(113, 128, 150, 0.18);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.38);
}

.daily-hour-row textarea {
    min-height: 42px;
    resize: vertical;
}

.daily-hour-remove {
    min-height: 42px;
    align-self: end;
}

.daily-hour-add {
    justify-self: start;
}

.daily-company-work {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.62rem 0.7rem;
    border: 1px solid rgba(15, 143, 123, 0.2);
    border-radius: var(--radius-sm);
    color: #0f766e;
    font-weight: 800;
    background: rgba(240, 253, 250, 0.74);
}

.daily-company-work input[type="checkbox"] {
    width: 18px;
    min-height: 18px;
}

.daily-hour-row.is-company-work .daily-hour-project select {
    color: var(--text-soft);
    background: #f8fafc;
}

.daily-note-field,
.tech-day-note {
    display: grid;
    gap: 0.4rem;
    padding: 0.85rem;
    border: 1px solid rgba(34, 211, 166, 0.24);
    border-radius: var(--radius-sm);
    background: rgba(34, 211, 166, 0.08);
}

.daily-note-field textarea,
.tech-day-note textarea {
    min-height: 96px;
}

.tech-day-note input[type="file"] {
    width: 100%;
    padding: 0.75rem;
    border: 1px dashed rgba(15, 143, 123, 0.42);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.74);
}

.daily-hours-options {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.2rem;
    padding: 0.72rem;
    border: 1px solid rgba(113, 128, 150, 0.14);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.34);
}

.daily-hours-options label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    color: var(--text);
    font-weight: 680;
}

.tech-mobile-page {
    width: min(100%, 760px);
    display: grid;
    gap: 0.9rem;
    margin-inline: auto;
}

.tech-today-hero,
.tech-home-hero,
.tech-mobile-section {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.tech-today-hero {
    display: grid;
    gap: 0.6rem;
    padding: 1.15rem;
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(6, 38, 74, 0.96), rgba(15, 159, 124, 0.86)),
        #06264a;
}

.tech-home-hero {
    display: grid;
    gap: 0.75rem;
    padding: 1.15rem;
    color: #ffffff;
    background:
        linear-gradient(135deg, rgba(6, 38, 74, 0.98), rgba(15, 159, 124, 0.86)),
        #06264a;
}

.tech-today-hero h1 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(1.85rem, 7vw, 3.2rem);
}

.tech-home-hero h1 {
    margin: 0.55rem 0 0.35rem;
    color: #ffffff;
    font-size: clamp(1.75rem, 7vw, 3rem);
}

.tech-home-hero p {
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-weight: 700;
}

.tech-today-hero p,
.tech-today-hero p span {
    display: grid;
    gap: 0.25rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.86);
    font-weight: 720;
}

.tech-today-date,
.tech-hours-done {
    width: fit-content;
    padding: 0.34rem 0.55rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.78rem;
    font-weight: 820;
}

.tech-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.tech-action-card {
    min-height: 132px;
    display: grid;
    align-content: center;
    gap: 0.5rem;
    padding: 1rem;
    border: 1px solid #dce9ec;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.tech-action-card span {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 10px;
    color: #ffffff;
}

.tech-action-card .icon {
    width: 1.25rem;
    height: 1.25rem;
}

.tech-action-card strong {
    color: var(--text);
    font-size: 1.02rem;
    line-height: 1.15;
}

.tech-action-card small {
    color: var(--text-soft);
    font-weight: 700;
    line-height: 1.25;
}

.tech-action-hours span {
    background: #0f9f7c;
}

.tech-action-leave span {
    background: #256b9d;
}

.tech-mobile-section {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
}

.tech-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.tech-section-title h2 {
    margin: 0;
    font-size: 1.1rem;
}

.tech-section-title span {
    flex: 0 0 auto;
    padding: 0.42rem 0.62rem;
    border-radius: 999px;
    background: var(--primary-soft);
    color: var(--primary-strong);
    font-weight: 850;
}

.tech-destination-list {
    display: grid;
    gap: 0.6rem;
}

.tech-destination-card {
    display: grid;
    gap: 0.18rem;
    padding: 0.8rem;
    border: 1px solid #dce9ec;
    border-radius: 10px;
    background: #f8fcfc;
}

.tech-destination-card time,
.tech-destination-card span {
    color: var(--text-soft);
    font-size: 0.82rem;
    font-weight: 760;
}

.tech-destination-card strong {
    font-size: 1.05rem;
}

.tech-destination-card p {
    margin: 0.25rem 0 0;
    color: var(--text);
}

.tech-project-list {
    display: grid;
    gap: 0.6rem;
}

.tech-project-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.85rem;
    border: 1px solid #dce9ec;
    border-radius: 10px;
    background: #f8fcfc;
}

.tech-project-card div {
    min-width: 0;
    display: grid;
    gap: 0.22rem;
}

.tech-project-card strong {
    color: var(--primary-strong);
    font-size: 0.86rem;
}

.tech-project-card span {
    color: var(--text);
    font-weight: 820;
}

.tech-project-card p {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.86rem;
    line-height: 1.35;
}

.tech-project-card small {
    flex: 0 0 auto;
    padding: 0.24rem 0.44rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--text-soft);
    font-weight: 800;
}

.tech-week-section {
    gap: 0.85rem;
}

.tech-week-title span {
    white-space: nowrap;
}

.tech-week-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
}

.tech-week-nav .btn {
    min-width: 0;
    min-height: 42px;
    padding-inline: 0.45rem;
    box-shadow: none;
    font-size: 0.78rem;
    line-height: 1.15;
    text-align: center;
}

.tech-month-section {
    gap: 0.85rem;
}

.tech-month-title span {
    max-width: 52%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tech-month-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.tech-month-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 820;
}

.tech-month-legend i {
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 999px;
}

.tech-month-legend i.is-project {
    background: #0f766e;
}

.tech-month-legend i.is-leave {
    background: #64748b;
}

.tech-month-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid #dce9ec;
    border-radius: 10px;
    background: #eef5f6;
}

.tech-month-weekday {
    min-height: 28px;
    display: grid;
    place-items: center;
    background: #f8fcfc;
    color: var(--text-soft);
    font-size: 0.72rem;
    font-weight: 900;
}

.tech-month-day {
    min-height: 92px;
    display: grid;
    align-content: start;
    gap: 0.28rem;
    padding: 0.32rem;
    border-top: 1px solid #dce9ec;
    border-left: 1px solid #dce9ec;
    background: #ffffff;
    cursor: pointer;
}

.tech-month-day:focus-visible {
    outline: 3px solid rgba(15, 118, 110, 0.24);
    outline-offset: -3px;
}

.tech-month-day:nth-child(7n + 1) {
    border-left: 0;
}

.tech-month-day.is-weekend {
    background: #f3f6f8;
}

.tech-month-day.is-outside {
    background: #f8fafc;
    color: #94a3b8;
}

.tech-month-day header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.tech-month-day header strong {
    width: 1.55rem;
    height: 1.55rem;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 900;
}

.tech-month-day.is-today header strong {
    background: #be123c;
    color: #ffffff;
}

.tech-month-items {
    min-width: 0;
    display: grid;
    gap: 0.22rem;
}

.tech-month-item {
    min-width: 0;
    display: grid;
    gap: 0.05rem;
    margin-inline: 0;
    padding: 0.24rem 0.3rem;
    overflow: hidden;
    border-radius: 6px;
    color: #ffffff;
    text-decoration: none;
}

.tech-month-item.is-project {
    background: linear-gradient(135deg, #0f766e, #0f9f7c);
}

.tech-month-item.is-leave {
    background: repeating-linear-gradient(135deg, #64748b 0, #64748b 7px, #475569 7px, #475569 13px);
}

.tech-month-item.is-continuing-before {
    margin-left: -0.34rem;
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

.tech-month-item.is-continuing-after {
    margin-right: -0.34rem;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.tech-month-item.is-continuing-before.is-continuing-after {
    border-radius: 0;
}

.tech-month-item span,
.tech-month-item strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tech-month-item span {
    opacity: 0.86;
    font-size: 0.58rem;
    font-weight: 850;
}

.tech-month-item strong {
    font-size: 0.64rem;
    font-weight: 900;
    line-height: 1.1;
}

.tech-month-more {
    color: var(--text-soft);
    font-size: 0.64rem;
    font-weight: 850;
}

.tech-month-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    display: grid;
    place-items: end center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.42);
}

.tech-month-modal[hidden] {
    display: none;
}

.tech-month-modal-card {
    width: min(100%, 520px);
    max-height: min(78vh, 620px);
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    overflow: auto;
    border-radius: 14px 14px 10px 10px;
    background: #ffffff;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.tech-month-modal-card h2 {
    margin: 0;
    padding-right: 2.2rem;
    font-size: 1.2rem;
}

.tech-month-modal-close {
    position: absolute;
    justify-self: end;
    width: 32px;
    min-width: 32px;
    height: 32px;
    min-height: 32px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid #dce9ec;
    border-radius: 999px;
    background: #ffffff;
    color: var(--text);
    font-size: 1.2rem;
    font-weight: 900;
    line-height: 1;
}

.tech-month-modal-list {
    display: grid;
    gap: 0.55rem;
}

.tech-month-modal-item,
.tech-month-modal-empty {
    display: grid;
    gap: 0.24rem;
    padding: 0.78rem;
    border: 1px solid #dce9ec;
    border-radius: 10px;
    background: #f8fcfc;
}

.tech-month-modal-item span {
    color: var(--text-soft);
    font-size: 0.76rem;
    font-weight: 850;
}

.tech-month-modal-item strong {
    color: var(--text);
    font-size: 1rem;
}

.tech-month-modal-item.is-leave {
    border-color: rgba(100, 116, 139, 0.28);
    background: #f1f5f9;
}

.tech-month-modal-item .btn {
    width: fit-content;
    margin-top: 0.32rem;
}

.tech-week-list {
    display: grid;
    gap: 0.65rem;
}

.tech-week-day {
    display: grid;
    gap: 0.62rem;
    padding: 0.85rem;
    border: 1px solid #dce9ec;
    border-radius: 10px;
    background: #f8fcfc;
}

.tech-week-day.is-today {
    border-color: rgba(34, 211, 166, 0.62);
    background: rgba(34, 211, 166, 0.08);
}

.tech-week-day header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.tech-week-day header strong {
    color: var(--text);
    font-size: 1rem;
}

.tech-week-day header span {
    min-width: 28px;
    min-height: 28px;
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    background: #ffffff;
    color: var(--primary-strong);
    font-weight: 850;
}

.tech-week-empty {
    padding: 0.65rem;
    border: 1px dashed #dce9ec;
    border-radius: 8px;
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.58);
    font-weight: 720;
}

.tech-week-events {
    display: grid;
    gap: 0.5rem;
}

.tech-week-event {
    display: grid;
    gap: 0.18rem;
    padding: 0.72rem;
    border: 1px solid rgba(113, 128, 150, 0.16);
    border-radius: 8px;
    background: #ffffff;
}

.tech-week-event time,
.tech-week-event span {
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 800;
}

.tech-week-event-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
}

.tech-work-badge {
    flex: 0 0 auto;
    padding: 0.22rem 0.46rem;
    border-radius: 999px;
    color: #ffffff !important;
    font-size: 0.68rem !important;
    font-weight: 900 !important;
}

.tech-work-badge.is-atelier {
    background: #0f766e;
}

.tech-work-badge.is-pose {
    background: #2563eb;
}

.tech-week-event strong {
    color: var(--text);
    font-size: 1rem;
}

.tech-week-event p {
    margin: 0.2rem 0 0;
    color: var(--text-soft);
    font-size: 0.85rem;
    line-height: 1.35;
}

.tech-week-event-actions {
    margin-top: 0.45rem;
}

.tech-week-event-actions .btn {
    width: 100%;
    min-height: 42px;
    box-shadow: none;
}

.tech-week-entry-status {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 0.45rem;
    margin-top: 0.5rem;
    padding: 0.62rem 0.7rem;
    border: 1px solid rgba(22, 163, 74, 0.22);
    border-radius: var(--radius-sm);
    color: #166534;
    background: rgba(220, 252, 231, 0.78);
}

.tech-week-entry-status svg {
    width: 17px;
    height: 17px;
}

.tech-week-entry-status strong,
.tech-week-entry-status span {
    font-size: 0.86rem;
}

.tech-hours-form,
.tech-hour-lines {
    gap: 0.75rem;
}

.tech-hour-row {
    grid-template-columns: 1fr;
    padding: 0.85rem;
    border-color: #dce9ec;
    border-radius: 10px;
    background: #f8fcfc;
}

.tech-work-hours {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(112px, 0.48fr);
    gap: 0.65rem;
}

.tech-hour-presets {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
}

.tech-hour-presets .btn {
    min-height: 44px;
    box-shadow: none;
}

.tech-confirm-options {
    display: grid;
}

.tech-confirm-options input {
    width: 18px;
    min-height: 18px;
}

.tech-submit {
    width: 100%;
    min-height: 52px;
    font-size: 1rem;
}

.hours-confirm-overlay {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.52);
}

.hours-confirm-dialog {
    width: min(100%, 360px);
    padding: 1rem;
    border-radius: 12px;
    background: #ffffff;
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.24);
}

.hours-confirm-dialog:focus {
    outline: none;
}

.hours-confirm-dialog h2 {
    margin: 0 0 0.45rem;
    font-size: 1.08rem;
}

.hours-confirm-dialog p {
    margin: 0;
    color: #475569;
}

.hours-confirm-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.55rem;
    margin-top: 1rem;
}

.hours-confirm-actions .btn {
    justify-content: center;
    min-height: 44px;
}

.progress,
.progress-track,
.liquid-progress {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(113, 128, 150, 0.18);
}

.progress > span,
.progress-track span,
.liquid-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--accent), var(--primary));
}

.liquid-progress.compact {
    height: 8px;
}

.public-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.2rem;
}

.auth-page {
    display: block;
    padding: 0;
    overflow: hidden;
    background: #ffffff;
    font-family: "Source Sans Pro", "Segoe UI", Arial, sans-serif;
}

body.auth-page::before {
    display: none;
}

.auth-page > .flash {
    position: fixed;
    top: 1.4rem;
    left: 50%;
    z-index: 30;
    width: min(420px, calc(100vw - 2rem));
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow-soft);
    transform: translateX(-50%);
}

.auth-card {
    width: min(100%, 1040px);
    padding: 1rem;
}

.auth-design-page {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(480px, 1fr);
    overflow: hidden;
    background: #fbffff;
}

.auth-design-visual {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 20%, rgba(34, 211, 166, 0.28), transparent 32%),
        linear-gradient(145deg, #031833 0%, #06264a 58%, #0fb88d 140%);
}

.auth-design-mark {
    position: relative;
    width: min(72.25%, 694px);
    max-width: 694px;
    height: auto;
}

.auth-design-panel {
    position: relative;
    min-height: 100vh;
    background:
        radial-gradient(circle at 88% 12%, rgba(34, 211, 166, 0.14), transparent 28%),
        #fbffff;
}

.auth-design-content {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(75%, 640px);
    transform: translate(-50%, -50%);
}

.auth-design-logo {
    margin: 0;
    color: #06264a;
    font-size: clamp(2.4rem, 3.23vw, 3.875rem);
    font-weight: 700;
    letter-spacing: 0.15em;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
}

.auth-design-logo-img {
    width: min(100%, 480px);
    height: auto;
    display: block;
    margin: 0 auto;
}

.auth-design-logo strong {
    color: #22d3a6;
    font-weight: inherit;
}

.auth-design-subtitle {
    margin: 0;
    color: rgba(6, 38, 74, 0.56);
    font-size: 1.125rem;
    font-weight: 400;
    line-height: 1.35;
    text-align: center;
}

.auth-design-form {
    width: 100%;
    max-width: 400px;
    margin: 2rem auto 0;
}

.auth-microsoft-block {
    display: grid;
    gap: 0.55rem;
    width: 100%;
    margin-top: 1.1rem;
    text-align: center;
}

.auth-microsoft-block small {
    color: rgba(6, 38, 74, 0.62);
    font-size: 0.8rem;
    line-height: 1.4;
}

.auth-microsoft-button {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 1rem;
    border: 1px solid #06264a;
    border-radius: 4px;
    background: #ffffff;
    color: #06264a;
    font-size: 1rem;
    font-weight: 600;
}

.auth-microsoft-button:hover {
    background: #eef6f8;
}

.auth-microsoft-button.is-disabled {
    border-color: #dce9ec;
    color: rgba(6, 38, 74, 0.48);
    cursor: not-allowed;
}

.auth-created-by {
    position: absolute;
    left: 50%;
    bottom: 0.9rem;
    display: grid;
    justify-items: center;
    gap: 0.2rem;
    transform: translateX(-50%);
}

.auth-created-by span {
    color: rgba(6, 38, 74, 0.58);
    font-size: 0.66rem;
}

.auth-created-by img {
    width: min(82px, 28vw);
    height: auto;
    display: block;
    border-radius: 2px;
    opacity: 0.74;
}

.auth-design-field {
    display: grid;
    gap: 0.72rem;
    margin: 0 0 2.55rem;
}

.auth-design-field label,
.auth-design-remember,
.auth-design-options a,
.auth-design-legal {
    color: #06264a;
    font-size: 0.9375rem;
    font-weight: 400;
}

.auth-design-field input {
    height: 25px;
    padding: 0;
    border: 0;
    border-bottom: 2px solid #dce9ec;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: #06264a;
    font-size: 1rem;
    outline: 0;
}

.auth-design-field input:focus {
    border-color: #22d3a6;
    background: transparent;
    box-shadow: none;
}

.auth-design-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: 1.25rem;
}

.auth-design-remember {
    display: inline-flex;
    align-items: center;
    gap: 1rem;
    margin: 0;
}

.auth-design-remember input {
    width: 18px;
    height: 18px;
    flex: none;
    margin: 0;
    padding: 0;
    border: 1px solid #8393a3;
    border-radius: 4px;
    box-shadow: none;
    accent-color: #22d3a6;
}

.auth-design-options a {
    white-space: nowrap;
}

.auth-design-actions {
    display: grid;
    grid-template-columns: repeat(2, 185px);
    justify-content: space-between;
    gap: 1.5rem;
    margin-top: 5.05rem;
}

.auth-design-actions button,
.auth-design-actions a {
    min-height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    box-shadow: none;
    font-size: 1.125rem;
    font-weight: 400;
    line-height: 1;
    transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.auth-design-actions button {
    border: 1px solid #0fb88d;
    color: #ffffff;
    background: linear-gradient(135deg, #22d3a6, #0fb88d);
}

.auth-design-actions button:hover,
.auth-design-actions button:active {
    background: linear-gradient(135deg, #35ddb4, #0aa77f);
    transform: none;
}

.auth-design-actions a {
    border: 1px solid #06264a;
    color: #06264a;
    background: #ffffff;
}

.auth-design-actions a:hover {
    background: #eef6f8;
}

.auth-design-legal {
    position: absolute;
    left: 50%;
    bottom: 1.15rem;
    margin: 0;
    transform: translateX(-50%);
    font-size: 0.6875rem;
    white-space: nowrap;
}

.dashboard-board,
.liquid-dashboard,
.content-stack,
.right-rail,
.focus-lens,
.trend-board,
.activity-list,
.doc-table,
.load-table,
.focus-stack,
.timeline-list,
.load-stream,
.knowledge-list,
.activity-stream,
.liquid-board-stack,
.knowledge-column {
    display: grid;
    gap: 0.85rem;
}

.command-stage,
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.9fr);
    gap: 1rem;
}

.liquid-hero-panel,
.hero-primary {
    color: var(--text-on-dark);
    background: linear-gradient(180deg, rgba(27, 35, 45, 0.76), rgba(27, 35, 45, 0.62));
}

.liquid-hero-panel h1,
.liquid-hero-panel h2,
.hero-primary h2 {
    color: #ffffff;
}

.liquid-hero-panel p,
.hero-primary p,
.liquid-hero-panel .panel-kicker,
.metric-pill span,
.metric-pill em,
.signal-chip span {
    color: rgba(248, 250, 252, 0.72);
}

.liquid-panel-top,
.cluster-head,
.liquid-project-head,
.liquid-project-footer,
.liquid-project-assignees,
.liquid-project-meta,
.liquid-board-head,
.liquid-ticket-meta,
.project-head,
.project-footer,
.panel-header,
.hero-head,
.ticket-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.liquid-panel-top,
.cluster-head,
.panel-header,
.hero-head {
    align-items: flex-start;
}

.liquid-hero-panel h1 {
    margin: 0.25rem 0 0.65rem;
    font-size: clamp(2.15rem, 4vw, 3.65rem);
}

.signal-chip,
.metric-pill,
.focus-node,
.timeline-node,
.load-stream-row,
.knowledge-item,
.activity-stream-row,
.liquid-ticket,
.liquid-project-card,
.liquid-board-column,
.stat-bubble,
.metric-card,
.ticket,
.calendar-day,
.doc-row,
.load-row,
.activity-item,
.project-card,
.trend-card {
    border: 1px solid rgba(255, 255, 255, 0.62);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.42);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.liquid-hero-panel .signal-chip,
.liquid-hero-panel .metric-pill {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.14);
}

.signal-chip,
.metric-pill,
.focus-node,
.timeline-node,
.load-stream-row,
.knowledge-item,
.activity-stream-row,
.liquid-ticket,
.liquid-project-card,
.liquid-board-column,
.stat-bubble,
.metric-card,
.ticket {
    padding: 0.85rem;
}

.liquid-hero-actions,
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1rem;
}

.metric-ribbon,
.hero-metrics,
.trend-strip,
.stat-cloud {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.metric-ribbon {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.metric-pill strong,
.metric-card strong,
.trend-card strong,
.stat-bubble strong {
    display: block;
    margin-top: 0.35rem;
    font-size: 1.45rem;
    line-height: 1;
}

.metric-pill em,
.metric-card em,
.trend-card em {
    display: block;
    margin-top: 0.34rem;
    color: var(--text-soft);
    font-style: normal;
    font-size: 0.78rem;
}

.focus-orb,
.focus-ring {
    width: 148px;
    height: 148px;
    display: grid;
    place-items: center;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 50%;
    background: conic-gradient(var(--accent) 0 68%, rgba(113, 128, 150, 0.16) 68% 100%);
    box-shadow: inset 0 0 0 18px rgba(255, 255, 255, 0.68);
    text-align: center;
}

.focus-orb strong,
.focus-ring strong {
    display: block;
    font-size: 1.8rem;
}

.focus-orb span,
.focus-ring span,
.focus-node span,
.liquid-project-copy p,
.liquid-project-footer span,
.liquid-project-assignees span,
.liquid-project-meta span,
.timeline-copy span,
.load-stream-copy span,
.knowledge-item span,
.activity-stream-copy span,
.liquid-ticket p,
.project-card p,
.activity-copy span,
.timestamp,
.load-copy p,
.load-value {
    color: var(--text-soft);
    font-size: 0.84rem;
}

.dashboard-mosaic {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem;
}

.portfolio-cluster {
    grid-column: span 7;
}

.timeline-cluster {
    grid-column: span 5;
}

.analytics-cluster {
    grid-column: span 4;
}

.board-cluster {
    grid-column: span 8;
}

.knowledge-cluster,
.activity-cluster-v2 {
    grid-column: span 6;
}

.liquid-project-grid,
.portfolio-grid,
.kanban-grid,
.liquid-board,
.knowledge-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

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

.liquid-project-card,
.project-card {
    display: grid;
    gap: 0.75rem;
}

.liquid-project-badge,
.project-badge,
.timeline-mark,
.activity-stream-mark,
.activity-badge {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: none;
    border-radius: var(--radius);
    color: #ffffff;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    font-size: 0.78rem;
    font-weight: 800;
}

.liquid-project-copy h3,
.project-card h4 {
    margin: 0 0 0.28rem;
    font-size: 1rem;
}

.avatars {
    display: flex;
    align-items: center;
}

.avatars i {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    margin-right: -0.25rem;
    border: 2px solid rgba(255, 255, 255, 0.82);
    border-radius: 50%;
    color: #ffffff;
    background: linear-gradient(135deg, var(--info), var(--accent));
    font-size: 0.68rem;
    font-style: normal;
    font-weight: 800;
}

.timeline-node,
.activity-stream-row,
.activity-item {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.72rem;
}

.load-stream-row,
.load-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(110px, 1fr) auto;
    align-items: center;
    gap: 0.72rem;
}

.knowledge-item,
.doc-row {
    display: grid;
    gap: 0.25rem;
}

.doc-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    padding: 0.8rem;
}

.liquid-board-column,
.kanban-column {
    display: grid;
    align-content: start;
    gap: 0.72rem;
}

.liquid-empty-pill,
.kanban-empty {
    padding: 0.8rem;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--text-soft);
    text-align: center;
}

.chart-box {
    position: relative;
    min-height: 260px;
}

.calendar-shell {
    overflow: hidden;
}

.calendar-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
    padding: 0.8rem;
    border-bottom: 1px solid rgba(113, 128, 150, 0.18);
}

.gantt-toolbar {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    z-index: 8;
    width: 100%;
    min-width: 100%;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(12px);
    box-sizing: border-box;
}

.gantt-period-nav,
.planning-view-switch {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.gantt-period-nav {
    flex: 1 1 auto;
    justify-content: center;
    min-width: 0;
}

.planning-view-switch {
    flex: 0 0 auto;
    justify-content: flex-end;
}

.planning-view-switch .icon-btn.is-active {
    color: #ffffff;
    border-color: #0f8f7b;
    background: #0f8f7b;
    box-shadow: 0 10px 20px rgba(15, 143, 123, 0.22);
}

.planning-default-view-form {
    margin: 0;
}

.planning-default-view-form label {
    display: inline-flex;
    align-items: center;
    gap: 0.24rem;
    min-height: 34px;
    padding: 0 0.55rem;
    border: 1px solid rgba(113, 128, 150, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.58);
    color: var(--text-soft);
    font-size: 0.72rem;
    font-weight: 780;
    cursor: pointer;
}

.planning-default-view-form input {
    width: 14px;
    height: 14px;
    margin: 0;
    accent-color: #0f8f7b;
}

.planning-default-view-form input:checked + span {
    color: #0f766e;
}

.planning-title-link {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    min-height: 28px;
    margin-left: 0.5rem;
    padding: 0.18rem 0.44rem;
    border: 1px solid rgba(81, 111, 157, 0.22);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.62);
    color: #516f9d;
    font-size: 0.78rem;
    font-weight: 780;
    vertical-align: middle;
    cursor: pointer;
}

.planning-title-link:hover {
    border-color: rgba(81, 111, 157, 0.38);
    background: rgba(255, 255, 255, 0.9);
}

.planning-outlook-modal[hidden] {
    display: none;
}

.planning-outlook-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    display: grid;
    place-items: center;
    padding: 1rem;
}

.planning-outlook-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.36);
}

.planning-outlook-dialog {
    position: relative;
    z-index: 1;
    width: min(620px, 100%);
    padding: 0.8rem;
    border: 1px solid rgba(113, 128, 150, 0.22);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.planning-outlook-dialog:focus {
    outline: none;
}

.planning-outlook-dialog-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.planning-outlook-dialog-head h2 {
    margin: 0;
    font-size: 1rem;
}

.planning-outlook-head,
.planning-outlook-form {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.planning-outlook-select-form,
.planning-outlook-sync-form {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.planning-outlook-head h2 {
    margin: 0;
    font-size: 0.86rem;
    white-space: nowrap;
}

.planning-outlook-head span,
.planning-outlook-warning {
    color: var(--text-soft);
    font-size: 0.78rem;
}

.planning-outlook-select-form div {
    flex: 0 1 280px;
    max-width: 320px;
}

.planning-outlook-form label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.planning-outlook-form select {
    min-height: 34px;
    padding-top: 0.36rem;
    padding-bottom: 0.36rem;
}

.planning-outlook-form .btn {
    min-height: 34px;
    padding-top: 0.36rem;
    padding-bottom: 0.36rem;
    font-size: 0.82rem;
}

.planning-outlook-event-form {
    display: grid;
    gap: 0.75rem;
}

.planning-outlook-event-form label {
    font-size: 0.76rem;
    font-weight: 800;
    color: var(--text-muted);
}

.planning-outlook-check {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 40px;
    margin-top: 1.05rem;
    color: var(--text-soft);
}

.gantt-period-title {
    min-width: 180px;
    color: var(--text);
    text-align: center;
    text-transform: capitalize;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-weekday,
.calendar-day {
    min-height: 118px;
    padding: 0.48rem;
    border-right: 1px solid rgba(113, 128, 150, 0.16);
    border-bottom: 1px solid rgba(113, 128, 150, 0.16);
}

.calendar-weekday {
    min-height: auto;
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.44);
    font-size: 0.78rem;
    font-weight: 800;
    text-align: center;
}

.calendar-day.is-outside {
    opacity: 0.58;
}

.calendar-day.is-today {
    border-color: rgba(75, 123, 120, 0.38);
    background: var(--accent-soft);
}

.day-week-number {
    display: inline-flex;
    margin-top: 0.16rem;
    color: var(--text-soft);
    font-size: 0.68rem;
    font-weight: 800;
}

.calendar-event {
    display: block;
    margin-top: 0.35rem;
    padding: 0.32rem 0.42rem;
    border-radius: 6px;
    color: #ffffff;
    font-size: 0.72rem;
}

.planning-month-grid {
    align-items: stretch;
    background: #eef6f8;
}

.planning-month-day {
    min-height: 132px;
    display: flex;
    flex-direction: column;
    gap: 0.34rem;
    background: #ffffff;
}

.planning-month-day.is-weekend {
    background: #f7fbfb;
}

.planning-month-day-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
}

.planning-month-day-head strong {
    width: 1.8rem;
    height: 1.8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: var(--text);
    font-size: 0.9rem;
}

.planning-month-day.is-today .planning-month-day-head strong {
    color: #ffffff;
    background: #0f8f7b;
}

.planning-month-day-head span,
.planning-month-holiday,
.planning-month-more {
    color: var(--text-soft);
    font-size: 0.68rem;
    font-weight: 800;
}

.planning-month-holiday {
    color: #9d5f12;
}

.planning-month-events {
    display: grid;
    gap: 0.28rem;
}

.planning-month-event {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.28rem 0.38rem;
    align-items: center;
    min-width: 0;
    padding: 0.32rem 0.42rem;
    border-left: 3px solid var(--event-color, #0f8f7b);
    border-radius: 5px;
    color: var(--text);
    background: color-mix(in srgb, var(--event-color, #0f8f7b) 12%, #ffffff);
    font-size: 0.72rem;
    text-decoration: none;
}

.planning-month-event span {
    color: var(--text-soft);
    font-size: 0.66rem;
    font-weight: 850;
}

.planning-month-event strong,
.planning-month-event small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.planning-month-event small {
    grid-column: 2;
    color: var(--text-soft);
    font-size: 0.66rem;
}

.planning-resource-dock {
    display: grid;
    grid-template-columns: minmax(180px, auto) minmax(0, 1fr);
    align-items: center;
    gap: 0.8rem;
    margin-top: 1rem;
}

.planning-resource-dock > div:first-child {
    display: grid;
    gap: 0.12rem;
}

.planning-resource-dock > div:first-child span,
.planning-resource-empty {
    color: var(--text-soft);
    font-size: 0.78rem;
}

.planning-hours-left {
    display: flex;
    flex-wrap: wrap;
    gap: 0.32rem;
    margin-top: 0.28rem;
}

.planning-resource-dock > div:first-child .planning-hours-left span {
    display: inline-flex;
    gap: 0.22rem;
    align-items: center;
    padding: 0.18rem 0.42rem;
    border: 1px solid rgba(15, 118, 110, 0.16);
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.07);
    color: var(--text-soft);
    font-size: 0.68rem;
    font-weight: 850;
    white-space: nowrap;
}

.planning-resource-dock > div:first-child .planning-hours-left strong {
    color: var(--primary-strong);
    font-weight: 950;
}

.planning-resource-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    min-width: 0;
}

.planning-resource-chip {
    display: inline-grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.08rem 0.42rem;
    align-items: center;
    max-width: 210px;
    min-height: 40px;
    padding: 0.34rem 0.58rem;
    border: 1px solid color-mix(in srgb, var(--employee-color, #0f8f7b) 42%, #ffffff);
    border-radius: 8px;
    color: var(--text);
    background: color-mix(in srgb, var(--employee-color, #0f8f7b) 10%, #ffffff);
    box-shadow: none;
    cursor: grab;
}

.planning-resource-chip:active,
.planning-resource-chip.is-dragging {
    cursor: grabbing;
    opacity: 0.62;
}

.planning-resource-chip > span {
    grid-row: span 2;
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    color: #ffffff;
    background: var(--employee-color, #0f8f7b);
    font-size: 0.78rem;
    font-weight: 850;
}

.planning-resource-chip strong,
.planning-resource-chip small {
    min-width: 0;
    overflow: hidden;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.planning-resource-chip strong {
    font-size: 0.78rem;
}

.planning-resource-chip small {
    color: var(--text-soft);
    font-size: 0.66rem;
}

.planning-project-drops {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.32rem;
    margin-top: 0.55rem;
}

.planning-drop-zone {
    display: grid;
    gap: 0.1rem;
    min-height: 40px;
    padding: 0.34rem 0.45rem;
    border: 1px dashed rgba(15, 143, 123, 0.34);
    border-radius: 6px;
    background: rgba(15, 143, 123, 0.06);
    transition: border-color 0.16s ease, background 0.16s ease, transform 0.16s ease;
}

.planning-drop-zone span {
    color: var(--text-soft);
    font-size: 0.62rem;
    font-weight: 850;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.planning-drop-zone strong {
    min-width: 0;
    overflow: hidden;
    font-size: 0.76rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.planning-drop-zone.is-empty strong {
    color: var(--text-soft);
    font-weight: 700;
}

.planning-drop-zone.is-display {
    border-style: solid;
    border-color: rgba(113, 128, 150, 0.18);
    background: rgba(248, 250, 252, 0.72);
}

.planning-drop-zone.is-reinforcement {
    cursor: copy;
}

.planning-drop-zone.is-reinforcement strong {
    color: var(--primary-strong);
}

.planning-drop-zone.is-over {
    border-color: #0f8f7b;
    background: rgba(15, 143, 123, 0.14);
    transform: translateY(-1px);
}

.planning-drop-zone.is-saving {
    opacity: 0.68;
}

.planning-drop-zone.is-saved {
    border-color: #0f9f7c;
    background: rgba(15, 159, 124, 0.16);
}

.gantt-shell {
    position: relative;
    overflow: visible;
    max-width: 100%;
}

.project-gantt-shell {
    margin-top: 0.35rem;
    overflow: hidden;
    border: 1px solid rgba(113, 128, 150, 0.18);
    border-radius: var(--radius);
    background: #ffffff;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.project-gantt-shell .gantt-toolbar {
    position: relative;
    top: auto;
    z-index: 7;
    min-height: 54px;
    padding: 0.62rem 0.75rem;
    border-bottom: 1px solid rgba(113, 128, 150, 0.16);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.98), rgba(255, 255, 255, 0.96));
}

.project-gantt-shell .gantt-period-title {
    min-width: 0;
    color: var(--text);
    font-size: 0.92rem;
    line-height: 1.2;
}

.project-gantt-shell .planning-view-switch {
    gap: 0.38rem;
}

.project-gantt-shell .planning-view-switch .icon-btn {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
}

.gantt-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
}

.gantt-shell .gantt-days,
.gantt-shell .gantt-row {
    cursor: grab;
}

.gantt-shell.is-panning,
.gantt-shell.is-panning .gantt-days,
.gantt-shell.is-panning .gantt-row {
    cursor: grabbing;
}

.gantt-shell.is-panning {
    user-select: none;
}

.gantt-grid {
    position: relative;
    width: 100%;
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(118px, var(--gantt-project-column-width, 14%)) minmax(0, 1fr);
}

.project-gantt-shell .gantt-grid {
    grid-template-columns: minmax(0, 1fr);
}

.project-gantt-shell .gantt-days {
    background: #f8fafc;
}

.project-gantt-shell .gantt-days,
.project-gantt-shell .gantt-row {
    grid-column: 1;
}

.project-gantt-shell .gantt-today-line {
    left: calc((100% / var(--gantt-days)) * var(--today-left));
}

.gantt-today-line {
    position: absolute;
    top: 82px;
    bottom: 0;
    left: calc(var(--gantt-project-column-width, 14%) + (((100% - var(--gantt-project-column-width, 14%)) / var(--gantt-days)) * var(--today-left)));
    z-index: 2;
    width: 2px;
    background: #be123c;
    box-shadow: 0 0 0 1px rgba(190, 18, 60, 0.12), 0 0 18px rgba(190, 18, 60, 0.22);
    pointer-events: none;
}

.gantt-today-line::before {
    content: none;
    position: absolute;
    top: 8px;
    left: 7px;
    padding: 0.14rem 0.36rem;
    border-radius: 999px;
    background: #be123c;
    color: #ffffff;
    font-size: 0.58rem;
    font-weight: 900;
    white-space: nowrap;
}

.gantt-shell.is-scale-month .gantt-today-line,
.gantt-shell.is-scale-year .gantt-today-line {
    top: 64px;
}

.gantt-project-head,
.gantt-calendar-head,
.gantt-days,
.gantt-project-cell,
.gantt-row {
    border-bottom: 1px solid rgba(113, 128, 150, 0.16);
}

.gantt-project-head,
.gantt-calendar-head {
    position: relative;
    z-index: 3;
    min-height: 82px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--text-soft);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.gantt-project-head {
    position: sticky;
    left: 0;
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-right: 1px solid rgba(113, 128, 150, 0.16);
}

.gantt-project-head,
.gantt-days span {
    line-height: 1.15;
}

.gantt-calendar-head {
    display: grid;
    grid-template-rows: 22px 18px minmax(42px, auto);
}

.gantt-calendar-head.is-compact {
    grid-template-rows: 22px minmax(42px, auto);
}

.gantt-shell.is-scale-month .gantt-calendar-head,
.gantt-shell.is-scale-year .gantt-calendar-head {
    grid-template-rows: 22px minmax(42px, auto);
}

.gantt-shell.is-scale-month .gantt-project-head,
.gantt-shell.is-scale-year .gantt-project-head {
    min-height: 64px;
}

.gantt-shell.is-zoom-scale .gantt-week-row,
.gantt-shell.is-scale-month .gantt-week-row,
.gantt-shell.is-scale-year .gantt-week-row {
    display: none;
}

.gantt-month-row,
.gantt-week-row {
    display: grid;
    grid-template-columns: repeat(var(--gantt-days), minmax(0, 1fr));
    border-bottom: 1px solid rgba(113, 128, 150, 0.12);
}

.gantt-month-row span,
.gantt-week-row span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    border-right: 1px solid rgba(113, 128, 150, 0.16);
    color: var(--text-muted);
    font-size: 0.58rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.gantt-month-row span {
    color: var(--text);
    font-size: 0.64rem;
    letter-spacing: 0.03em;
    background: rgba(15, 143, 123, 0.05);
}

.gantt-days,
.gantt-row {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(var(--gantt-days), minmax(0, 1fr));
}

.gantt-days span {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    border-right: 1px solid rgba(113, 128, 150, 0.12);
    overflow: hidden;
    white-space: nowrap;
}

.gantt-shell.is-scale-week .gantt-days span,
.gantt-shell.is-scale-month .gantt-days span,
.gantt-shell.is-scale-year .gantt-days span {
    align-items: flex-start;
    justify-content: center;
    padding-left: clamp(0.12rem, calc(var(--gantt-day-width, 10px) * 0.12), 0.45rem);
    border-right-color: transparent;
    overflow: visible;
}

.gantt-shell.is-scale-week .gantt-days span[data-is-monday="1"],
.gantt-shell.is-scale-month .gantt-days span[data-is-month-start="1"],
.gantt-shell.is-scale-year .gantt-days span[data-is-month-start="1"] {
    border-left: 1px solid rgba(15, 118, 110, 0.32);
    background: rgba(15, 143, 123, 0.055);
}

.gantt-shell.is-scale-week .gantt-day-bg,
.gantt-shell.is-scale-month .gantt-day-bg,
.gantt-shell.is-scale-year .gantt-day-bg {
    border-right-color: transparent;
}

.gantt-shell.is-scale-week .gantt-day-bg[data-is-monday="1"] {
    border-left: 1px solid rgba(15, 118, 110, 0.18);
}

.gantt-shell.is-scale-month .gantt-day-bg[data-is-month-start="1"],
.gantt-shell.is-scale-year .gantt-day-bg[data-is-month-start="1"] {
    border-left: 1px solid rgba(15, 118, 110, 0.24);
    background: rgba(15, 143, 123, 0.035);
}

.gantt-shell.is-scale-week .gantt-days span:not([data-is-monday="1"]) *,
.gantt-shell.is-scale-month .gantt-days span:not([data-is-month-start="1"]) *,
.gantt-shell.is-scale-year .gantt-days span:not([data-is-month-start="1"]) * {
    display: none;
}

.gantt-shell.is-scale-month .gantt-days span strong,
.gantt-shell.is-scale-year .gantt-days span strong {
    max-width: max(7rem, calc(var(--gantt-day-width, 4px) * 24));
    padding: 0.1rem 0.34rem;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.72);
    color: #0f3d3a;
    font-size: 0.62rem;
    text-transform: none;
}

.gantt-shell.is-zoom-scale .gantt-project-cell.is-resources-collapsed {
    min-height: 82px;
}

.gantt-shell.is-zoom-scale .gantt-resources-toggle {
    opacity: 1;
}

.gantt-shell.is-week-view {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.gantt-shell.is-week-view .gantt-days span {
    min-height: 48px;
    text-transform: none;
}

.gantt-shell.is-week-view .gantt-grid {
    min-width: 980px;
}

.gantt-shell.is-week-view .gantt-days span strong {
    font-size: 0.62rem;
}

.gantt-shell.is-week-view .gantt-days span small {
    max-width: 46px;
    font-size: 0.54rem;
    line-height: 1.05;
    text-align: center;
    white-space: normal;
}

.gantt-days span.is-afternoon,
.gantt-day-bg.is-afternoon {
    border-right-color: rgba(113, 128, 150, 0.28);
}

.gantt-days span.is-morning,
.gantt-day-bg.is-morning {
    border-right-style: dashed;
}

.gantt-days span strong,
.gantt-days span small {
    display: block;
    max-width: 100%;
    overflow: hidden;
    line-height: 1;
    text-overflow: clip;
}

.gantt-days span strong {
    color: var(--text);
    font-size: 0.68rem;
    letter-spacing: 0;
}

.gantt-days span small {
    color: var(--text-soft);
    font-size: 0.56rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: none;
}

.gantt-project-cell {
    position: sticky;
    left: 0;
    z-index: 2;
    min-width: 0;
    min-height: var(--planning-row-height, 168px);
    padding: 0.52rem 0.62rem;
    border-right: 1px solid rgba(113, 128, 150, 0.2);
    background: linear-gradient(90deg, var(--project-row-tint, rgba(15, 118, 110, 0.055)), var(--surface) 68%);
    box-shadow: inset 4px 0 0 var(--project-accent, #0f766e), inset 0 -1px 0 rgba(15, 23, 42, 0.08);
}

.gantt-project-cell.is-resources-collapsed {
    min-height: 88px;
}

.gantt-project-cell.is-selected {
    background: linear-gradient(90deg, color-mix(in srgb, var(--project-accent, #0f766e) 16%, #ffffff), var(--surface) 70%);
}

.gantt-project-title {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) 24px;
    align-items: center;
    gap: 0.28rem;
}

.gantt-project-cell a {
    display: block;
    overflow: hidden;
    color: var(--text);
    font-size: 0.66rem;
    font-weight: 800;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gantt-project-cell .gantt-task-add {
    position: absolute;
    right: 0.62rem;
    bottom: 0.52rem;
    min-width: 26px;
    width: 26px;
    height: 26px;
    min-height: 26px;
    padding: 0;
    color: var(--primary-strong);
}

.gantt-project-cell small {
    display: block;
    margin-top: 0.22rem;
    overflow: hidden;
    color: var(--text-soft);
    font-size: 0.62rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-gantt-shell .gantt-project-head {
    padding: 0.48rem;
    font-size: 0.62rem;
}

.project-gantt-shell .gantt-project-cell {
    padding: 0.42rem;
}

.project-gantt-shell .gantt-project-cell a {
    font-size: 0.58rem;
    line-height: 1.1;
}

.project-gantt-shell .gantt-project-cell small {
    font-size: 0.54rem;
}

.project-gantt-shell .gantt-days span {
    min-height: 44px;
    border-right-color: rgba(113, 128, 150, 0.14);
}

.project-gantt-shell .gantt-days span strong {
    font-size: 0.7rem;
}

.project-gantt-shell .gantt-days span small {
    font-size: 0.55rem;
}

.project-gantt-shell .gantt-row {
    min-height: var(--planning-row-height, 150px);
    background: linear-gradient(180deg, rgba(248, 250, 252, 0.74), rgba(255, 255, 255, 0.94));
    box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.07);
}

.project-gantt-shell .gantt-day-bg {
    min-height: var(--planning-row-height, 150px);
    background: rgba(255, 255, 255, 0.62);
}

.project-gantt-shell .gantt-day-bg.is-weekend {
    background: rgba(100, 116, 139, 0.09);
}

.project-gantt-shell .gantt-day-bg.is-holiday {
    background: rgba(190, 18, 60, 0.07);
}

.gantt-resources-toggle {
    width: 18px;
    min-width: 18px;
    height: 22px;
    min-height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--project-accent, var(--primary-strong));
    cursor: pointer;
}

.gantt-resources-toggle:hover,
.gantt-resources-toggle:focus-visible {
    background: color-mix(in srgb, var(--project-accent, #0f766e) 12%, transparent);
    outline: none;
}

.gantt-resources-arrow {
    width: 0;
    height: 0;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
    border-left: 7px solid currentColor;
    transition: transform 0.16s ease;
}

.gantt-resources-toggle[aria-expanded="true"] .gantt-resources-arrow {
    transform: rotate(90deg);
}

.gantt-row {
    position: relative;
    min-height: var(--planning-row-height, 168px);
    align-items: center;
    overflow: hidden;
    background: var(--project-row-tint, rgba(15, 118, 110, 0.04));
    box-shadow: inset 0 1px 0 rgba(15, 23, 42, 0.08), inset 0 -1px 0 rgba(15, 23, 42, 0.08);
    contain: paint;
}

.gantt-row.is-resources-collapsed {
    min-height: 88px;
}

.gantt-row.is-selected {
    background: color-mix(in srgb, var(--project-accent, #0f766e) 10%, #ffffff);
}

.gantt-day-bg {
    height: 100%;
    min-height: var(--planning-row-height, 168px);
    border-right: 1px solid rgba(113, 128, 150, 0.1);
    background: color-mix(in srgb, var(--project-row-tint, rgba(15, 118, 110, 0.04)) 82%, #ffffff);
    pointer-events: none;
}

.gantt-row.is-resources-collapsed .gantt-day-bg {
    min-height: 88px;
}

.gantt-days .is-weekend,
.gantt-day-bg.is-weekend {
    background: color-mix(in srgb, var(--project-row-tint, rgba(15, 118, 110, 0.04)) 52%, rgba(100, 116, 139, 0.12));
}

.gantt-days .is-holiday,
.gantt-day-bg.is-holiday {
    background: rgba(190, 18, 60, 0.08);
}

.gantt-days .is-holiday {
    color: #be123c;
    font-weight: 900;
}

.gantt-bar {
    position: absolute;
    top: 12px;
    left: calc((100% / var(--gantt-days)) * var(--bar-left));
    width: calc((100% / var(--gantt-days)) * var(--bar-width));
    min-width: 10px;
    height: 32px;
    display: grid;
    align-content: center;
    gap: 0.08rem;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--project-accent-strong, #115e59) 62%, #ffffff);
    border-radius: 6px;
    background: linear-gradient(135deg, var(--project-accent-strong, #115e59), var(--project-accent, #0f766e));
    box-shadow: 0 10px 22px color-mix(in srgb, var(--project-accent, #0f766e) 22%, transparent);
    color: #ffffff;
    cursor: grab;
    touch-action: none;
    user-select: none;
    transition: box-shadow 0.16s ease, transform 0.16s ease, border-color 0.16s ease;
}

.project-gantt-shell .gantt-bar {
    top: 14px;
    height: 34px;
    border-radius: 7px;
}

.project-gantt-shell .gantt-bar-label,
.project-gantt-shell .gantt-forecast {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.project-gantt-shell .gantt-forecast {
    opacity: 0.9;
    font-size: 0.64rem;
}

.gantt-unassigned-plan,
.gantt-reinforcement-plan {
    position: absolute;
    left: calc((100% / var(--gantt-days)) * var(--bar-left));
    width: calc((100% / var(--gantt-days)) * var(--bar-width));
    min-width: 10px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    padding: 0 0.42rem;
    overflow: hidden;
    border-radius: 5px;
    color: #ffffff;
    font-size: 0.66rem;
    line-height: 1;
    box-shadow: 0 5px 12px color-mix(in srgb, var(--tech-color, #4B7B78) 22%, transparent);
}

.gantt-unassigned-plan {
    --tech-color: color-mix(in srgb, var(--project-accent, #0f766e) 82%, #ffffff);
    border: 1px solid color-mix(in srgb, var(--project-accent-strong, #115e59) 52%, #ffffff);
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--project-accent, #0f766e) 78%, #ffffff),
        color-mix(in srgb, var(--project-accent-strong, #115e59) 88%, #111827)
    );
    overflow: hidden;
    pointer-events: none;
}

.gantt-unassigned-plan.is-complete {
    --tech-color: color-mix(in srgb, var(--project-accent, #0f766e) 70%, #10b981);
    border-color: color-mix(in srgb, var(--project-accent, #0f766e) 46%, #ffffff);
    background: linear-gradient(
        135deg,
        color-mix(in srgb, var(--project-accent, #0f766e) 68%, #10b981),
        color-mix(in srgb, var(--project-accent-strong, #115e59) 72%, #10b981)
    );
}

.gantt-unassigned-plan.is-open {
    --tech-color: color-mix(in srgb, var(--project-accent, #0f766e) 82%, #ffffff);
    border-color: color-mix(in srgb, var(--project-accent-strong, #115e59) 52%, #ffffff);
}

.gantt-unassigned-plan.is-atelier {
    top: 52px;
}

.gantt-unassigned-plan.is-pose {
    top: 52px;
}

.project-gantt-shell .gantt-unassigned-plan {
    height: 22px;
    border-radius: 5px;
    box-shadow: 0 6px 14px color-mix(in srgb, var(--tech-color, #4B7B78) 18%, transparent);
}

.project-gantt-shell .gantt-unassigned-plan.is-atelier {
    top: 58px;
}

.project-gantt-shell .gantt-unassigned-plan.is-pose {
    top: 84px;
}

.gantt-unassigned-plan.is-pose.is-open {
    --tech-color: color-mix(in srgb, var(--project-accent, #0f766e) 84%, #1d4ed8);
    border-color: color-mix(in srgb, var(--project-accent-strong, #115e59) 58%, #ffffff);
    background: repeating-linear-gradient(
        135deg,
        color-mix(in srgb, var(--project-accent, #0f766e) 88%, #1d4ed8) 0,
        color-mix(in srgb, var(--project-accent, #0f766e) 88%, #1d4ed8) 8px,
        color-mix(in srgb, var(--project-accent-strong, #115e59) 82%, #111827) 8px,
        color-mix(in srgb, var(--project-accent-strong, #115e59) 82%, #111827) 14px
    );
}

.gantt-unassigned-plan.is-pose.is-complete {
    --tech-color: color-mix(in srgb, var(--project-accent, #0f766e) 72%, #0891b2);
    border-color: color-mix(in srgb, var(--project-accent, #0f766e) 48%, #ffffff);
    background: repeating-linear-gradient(
        135deg,
        color-mix(in srgb, var(--project-accent, #0f766e) 72%, #0891b2) 0,
        color-mix(in srgb, var(--project-accent, #0f766e) 72%, #0891b2) 8px,
        color-mix(in srgb, var(--project-accent-strong, #115e59) 72%, #0891b2) 8px,
        color-mix(in srgb, var(--project-accent-strong, #115e59) 72%, #0891b2) 14px
    );
}

.gantt-unassigned-plan span,
.gantt-unassigned-plan strong,
.gantt-reinforcement-plan strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gantt-unassigned-plan span {
    opacity: 0.78;
    font-weight: 850;
}

.gantt-unassigned-plan .gantt-phase-remaining {
    position: absolute;
    top: 50%;
    right: 0.32rem;
    z-index: 3;
    max-width: 9rem;
    padding: 0.14rem 0.32rem;
    overflow: visible;
    border: 1px solid rgba(196, 127, 23, 0.28);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 5px 12px rgba(15, 23, 42, 0.12);
    color: #8a4f0f;
    opacity: 1;
    text-align: right;
    transform: translateY(-50%);
}

.gantt-unassigned-plan .gantt-phase-remaining.is-extra {
    border-color: rgba(190, 18, 60, 0.32);
    color: #be123c;
}

.gantt-unassigned-plan[data-reinforcement-drop] {
    cursor: copy;
    pointer-events: auto;
}

.gantt-unassigned-plan[data-reinforcement-drop].is-over {
    outline: 3px solid rgba(255, 255, 255, 0.86);
    box-shadow: 0 0 0 3px rgba(15, 143, 123, 0.45), 0 16px 30px rgba(15, 23, 42, 0.22);
    filter: saturate(1.08);
}

.gantt-unassigned-plan strong,
.gantt-reinforcement-plan strong {
    flex: 0 1 auto;
    display: inline-flex;
    align-items: center;
    gap: 0.24rem;
    font-weight: 900;
}

.gantt-bar-icon {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.46);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: rgba(15, 23, 42, 0.82);
    opacity: 1;
}

.gantt-bar-icon .icon {
    width: 11px;
    height: 11px;
    stroke-width: 2.4;
}

.gantt-reinforcement-drop {
    position: absolute;
    right: 0;
    left: 0;
    z-index: 1;
    height: calc(var(--fabrication-stack-size, 1) * 22px);
    border-block: 1px dashed rgba(15, 143, 123, 0.16);
    background: rgba(15, 143, 123, 0.035);
}

.gantt-reinforcement-drop.is-atelier {
    top: 80px;
}

.gantt-reinforcement-drop.is-pose {
    top: calc(82px + (var(--fabrication-stack-size, 1) * 22px));
    height: calc(var(--pose-stack-size, 1) * 22px);
}

.project-gantt-shell .gantt-reinforcement-drop.is-atelier {
    top: 112px;
}

.project-gantt-shell .gantt-reinforcement-drop.is-pose {
    top: calc(114px + (var(--fabrication-stack-size, 1) * 22px));
}

.gantt-intervention-drop {
    position: absolute;
    right: 0;
    left: 0;
    z-index: 1;
    top: calc(88px + ((var(--fabrication-stack-size, 1) + var(--pose-stack-size, 1)) * 22px));
    height: calc(var(--intervention-stack-size, 1) * 22px);
    border-block: 1px dashed rgba(124, 58, 237, 0.24);
    background: rgba(124, 58, 237, 0.055);
}

.gantt-reinforcement-drop span,
.gantt-intervention-drop span {
    position: sticky;
    left: 0.5rem;
    font-size: 0.6rem;
    font-weight: 900;
    line-height: 22px;
    pointer-events: none;
}

.gantt-reinforcement-drop span {
    color: rgba(15, 118, 110, 0.64);
}

.gantt-intervention-drop span {
    color: rgba(109, 40, 217, 0.72);
}

.gantt-reinforcement-drop.is-over {
    border-color: rgba(15, 143, 123, 0.5);
    background: rgba(15, 143, 123, 0.12);
}

.gantt-intervention-drop.is-over,
.gantt-intervention-drop.is-highlighted {
    border-color: rgba(124, 58, 237, 0.52);
    background: rgba(124, 58, 237, 0.14);
    box-shadow: inset 0 0 0 2px rgba(124, 58, 237, 0.16);
}

.gantt-reinforcement-plan {
    z-index: 3;
    border: 1px solid color-mix(in srgb, var(--tech-color, #0f8f7b) 50%, #ffffff);
    background: var(--tech-color, #0f8f7b);
    cursor: grab;
    touch-action: none;
    user-select: none;
}

.gantt-reinforcement-absence {
    position: absolute;
    left: calc((100% / var(--gantt-days)) * var(--bar-left));
    width: calc((100% / var(--gantt-days)) * var(--bar-width));
    min-width: 8px;
    height: 22px;
    z-index: 4;
    border: 1px solid rgba(71, 85, 105, 0.36);
    border-radius: 5px;
    background: repeating-linear-gradient(135deg, rgba(100, 116, 139, 0.82) 0, rgba(100, 116, 139, 0.82) 7px, rgba(51, 65, 85, 0.74) 7px, rgba(51, 65, 85, 0.74) 13px);
    box-shadow: 0 5px 12px rgba(15, 23, 42, 0.16);
    opacity: 0.88;
    pointer-events: none;
}

.gantt-reinforcement-delete {
    flex: 0 0 auto;
    width: 18px;
    min-width: 18px;
    height: 18px;
    min-height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.22);
    color: #ffffff;
    font-size: 0.82rem;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

.gantt-reinforcement-delete:hover,
.gantt-reinforcement-delete:focus-visible {
    background: rgba(190, 18, 60, 0.78);
    outline: none;
}

.gantt-reinforcement-plan.is-atelier {
    top: calc(82px + (var(--reinforcement-stack) * 22px));
}

.gantt-reinforcement-absence.is-atelier {
    top: calc(82px + (var(--reinforcement-stack) * 22px));
}

.gantt-reinforcement-plan.is-pose {
    top: calc(82px + (var(--fabrication-stack-size, 1) * 22px) + (var(--reinforcement-stack) * 22px));
}

.gantt-reinforcement-absence.is-pose {
    top: calc(82px + (var(--fabrication-stack-size, 1) * 22px) + (var(--reinforcement-stack) * 22px));
}

.project-gantt-shell .gantt-reinforcement-plan.is-atelier,
.project-gantt-shell .gantt-reinforcement-absence.is-atelier {
    top: calc(114px + (var(--reinforcement-stack) * 22px));
}

.project-gantt-shell .gantt-reinforcement-plan.is-pose,
.project-gantt-shell .gantt-reinforcement-absence.is-pose {
    top: calc(114px + (var(--fabrication-stack-size, 1) * 22px) + (var(--reinforcement-stack) * 22px));
}

.gantt-reinforcement-plan.is-intervention {
    top: calc(88px + ((var(--fabrication-stack-size, 1) + var(--pose-stack-size, 1)) * 22px) + (var(--reinforcement-stack) * 22px));
    border-color: rgba(167, 139, 250, 0.72);
    background: #7c3aed;
}

.gantt-reinforcement-absence.is-intervention {
    top: calc(88px + ((var(--fabrication-stack-size, 1) + var(--pose-stack-size, 1)) * 22px) + (var(--reinforcement-stack) * 22px));
}

.gantt-row.is-resources-collapsed .gantt-reinforcement-plan,
.gantt-row.is-resources-collapsed .gantt-reinforcement-absence,
.gantt-row.is-resources-collapsed .gantt-reinforcement-drop,
.gantt-row.is-resources-collapsed .gantt-intervention-drop {
    display: none;
}

.gantt-reinforcement-plan.is-dragging {
    z-index: 6;
    cursor: grabbing;
    box-shadow: 0 12px 22px color-mix(in srgb, var(--tech-color, #0f8f7b) 30%, transparent);
}

.gantt-reinforcement-plan.is-saving {
    opacity: 0.72;
}

.gantt-reinforcement-plan.is-saved {
    box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.2), 0 5px 12px color-mix(in srgb, var(--tech-color, #0f8f7b) 22%, transparent);
}

.gantt-bar:hover,
.gantt-bar:focus-visible,
.gantt-bar.is-selected {
    border-color: rgba(7, 89, 133, 0.78);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.16), 0 14px 28px rgba(15, 118, 110, 0.24);
    outline: none;
}

.gantt-tech-plan {
    position: absolute;
    left: calc((100% / var(--gantt-days)) * var(--bar-left));
    width: calc((100% / var(--gantt-days)) * var(--bar-width));
    min-width: 6px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.35rem;
    padding: 0 0.48rem;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--tech-color, #4B7B78) 52%, #ffffff);
    border-radius: 5px;
    background: var(--tech-color, #4B7B78);
    color: #ffffff;
    font-size: 0.68rem;
    line-height: 1;
    pointer-events: none;
    box-shadow: 0 5px 12px color-mix(in srgb, var(--tech-color, #4B7B78) 22%, transparent);
}

.gantt-tech-plan.is-atelier {
    top: 50px;
}

.gantt-tech-plan[data-gantt-gap-handle] {
    pointer-events: auto;
    cursor: ew-resize;
    touch-action: none;
    user-select: none;
    transition: box-shadow 0.16s ease, opacity 0.16s ease, transform 0.08s ease;
}

.gantt-tech-plan[data-gantt-gap-handle].is-dragging {
    z-index: 5;
    box-shadow: 0 11px 22px color-mix(in srgb, var(--tech-color, #4B7B78) 30%, transparent);
    opacity: 0.9;
}

.gantt-tech-plan[data-gantt-gap-handle].is-saving {
    opacity: 0.72;
}

.gantt-tech-plan[data-gantt-gap-handle].is-saved {
    box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.18), 0 5px 12px color-mix(in srgb, var(--tech-color, #4B7B78) 22%, transparent);
}

.gantt-tech-plan[data-gantt-gap-handle].is-readonly {
    pointer-events: none;
    cursor: default;
}

.gantt-tech-plan.is-pose {
    top: 78px;
    background: repeating-linear-gradient(
        135deg,
        var(--tech-color, #4B7B78) 0,
        var(--tech-color, #4B7B78) 8px,
        color-mix(in srgb, var(--tech-color, #4B7B78) 82%, #ffffff) 8px,
        color-mix(in srgb, var(--tech-color, #4B7B78) 82%, #ffffff) 14px
    );
}

.gantt-task-marker {
    position: absolute;
    top: calc(102px + (var(--task-stack) * 8px));
    left: calc((100% / var(--gantt-days)) * var(--task-left) + (100% / var(--gantt-days) / 2));
    z-index: 2;
    width: 14px;
    height: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #ffffff;
    border-radius: 999px;
    background: #be123c;
    box-shadow: 0 4px 10px rgba(190, 18, 60, 0.25);
    color: #ffffff;
    transform: translateX(-50%);
}

.gantt-task-marker span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

.gantt-stage-plan {
    position: absolute;
    top: 52px;
    left: calc((100% / var(--gantt-days)) * var(--bar-left));
    z-index: 3;
    width: calc((100% / var(--gantt-days)) * var(--bar-width));
    min-width: 16px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    padding: 0 0.38rem;
    overflow: hidden;
    border: 1px solid rgba(146, 64, 14, 0.42);
    border-radius: 5px;
    background: linear-gradient(135deg, #f59e0b, #fbbf24);
    box-shadow: 0 5px 12px rgba(180, 83, 9, 0.22);
    color: #111827;
    font-size: 0.62rem;
    line-height: 1;
    text-decoration: none;
}

.gantt-stage-plan strong {
    min-width: 0;
    overflow: hidden;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gantt-stage-plan:hover,
.gantt-stage-plan:focus-visible {
    z-index: 6;
    outline: 2px solid rgba(245, 158, 11, 0.34);
    outline-offset: 2px;
}

.gantt-stage-plan.is-done {
    border-color: rgba(5, 150, 105, 0.52);
    background: linear-gradient(135deg, #059669, #10b981);
    color: #ffffff;
    box-shadow: 0 5px 12px rgba(16, 185, 129, 0.24);
}

.gantt-stage-plan.is-in_progress {
    border-color: rgba(29, 78, 216, 0.52);
    background: linear-gradient(135deg, #1d4ed8, #2563eb);
    color: #ffffff;
    box-shadow: 0 5px 12px rgba(37, 99, 235, 0.24);
}

.gantt-stage-plan.is-blocked {
    border-color: rgba(159, 18, 57, 0.52);
    background: linear-gradient(135deg, #9f1239, #be123c);
    color: #ffffff;
    box-shadow: 0 5px 12px rgba(190, 18, 60, 0.24);
}

.gantt-tech-plan span,
.gantt-tech-plan strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gantt-tech-plan span {
    max-width: 58%;
    opacity: 0.86;
}

.gantt-tech-plan strong {
    font-weight: 900;
}

.gantt-bar.is-dragging {
    z-index: 4;
    border-color: rgba(7, 89, 133, 0.7);
    box-shadow: 0 14px 28px rgba(7, 89, 133, 0.24);
    cursor: grabbing;
}

.gantt-bar.is-saving {
    opacity: 0.78;
}

.gantt-bar.is-saved {
    box-shadow: 0 0 0 3px rgba(56, 161, 105, 0.2), 0 10px 22px rgba(15, 118, 110, 0.18);
}

.gantt-bar.is-readonly {
    cursor: default;
}

.gantt-bar-label {
    position: relative;
    z-index: 2;
    min-width: 0;
    display: inline-flex;
    align-items: center;
    gap: 0.26rem;
    padding: 0 0.32rem;
    overflow: hidden;
    font-size: clamp(0.58rem, 0.75vw, 0.7rem);
    font-weight: 800;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gantt-forecast {
    position: relative;
    z-index: 2;
    min-width: 0;
    padding: 0 0.32rem;
    overflow: hidden;
    font-size: 0.62rem;
    font-weight: 800;
    line-height: 1;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: rgba(255, 255, 255, 0.88);
}

.gantt-progress {
    position: absolute;
    inset: 0 auto 0 0;
    background: rgba(255, 255, 255, 0.2);
    pointer-events: none;
}

.gantt-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 3;
    width: 10px;
    background: rgba(255, 255, 255, 0.2);
    cursor: ew-resize;
}

.gantt-handle.is-left {
    left: 0;
}

.gantt-handle.is-right {
    right: 0;
}

.gantt-capacity-strip {
    display: grid;
    grid-template-columns: minmax(118px, var(--gantt-project-column-width, 14%)) minmax(0, 1fr);
    border-top: 1px solid rgba(113, 128, 150, 0.16);
    background: rgba(248, 250, 252, 0.72);
}

.gantt-shell:fullscreen,
.gantt-shell.is-fullscreen-fallback,
.calendar-shell:fullscreen,
.calendar-shell.is-fullscreen-fallback {
    width: 100vw;
    height: 100vh;
    max-width: none;
    margin: 0 !important;
    overflow: hidden;
    border-radius: 0;
    background: var(--surface);
}

.gantt-shell:fullscreen,
.gantt-shell.is-fullscreen-fallback {
    display: flex;
    flex-direction: column;
}

.gantt-shell:fullscreen .gantt-scroll,
.gantt-shell.is-fullscreen-fallback .gantt-scroll {
    flex: 1 1 auto;
    overflow: auto;
}

.gantt-shell:fullscreen .gantt-grid,
.gantt-shell.is-fullscreen-fallback .gantt-grid {
    min-width: 1400px;
}

.gantt-capacity-label {
    position: sticky;
    left: 0;
    z-index: 2;
    display: grid;
    gap: 0.08rem;
    padding: 0.55rem 0.7rem;
    border-right: 1px solid rgba(113, 128, 150, 0.16);
    background: rgba(248, 250, 252, 0.96);
}

.gantt-capacity-label strong {
    color: var(--text);
    font-size: 0.74rem;
    font-weight: 900;
}

.gantt-capacity-label span {
    color: var(--text-soft);
    font-size: 0.65rem;
    font-weight: 800;
}

.gantt-capacity-bars {
    display: grid;
    grid-template-columns: repeat(var(--gantt-days), minmax(0, 1fr));
    align-items: end;
    min-height: 52px;
    padding-top: 0.45rem;
}

.gantt-capacity-bars span {
    position: relative;
    height: 100%;
    min-width: 0;
    border-right: 1px solid rgba(113, 128, 150, 0.08);
}

.gantt-capacity-bars span::after {
    content: "";
    position: absolute;
    right: 18%;
    bottom: 8px;
    left: 18%;
    height: max(4px, var(--capacity-level));
    max-height: 34px;
    border-radius: 999px 999px 3px 3px;
    background: #16a34a;
}

.gantt-capacity-bars span.is-tight::after {
    background: #ca8a04;
}

.gantt-capacity-bars span.is-over::after {
    background: #be123c;
}

.gantt-availability-strip {
    position: fixed;
    bottom: 0;
    left: var(--gantt-availability-left, 0);
    width: var(--gantt-availability-width, auto);
    z-index: 35;
    display: grid;
    grid-template-columns: minmax(118px, var(--gantt-project-column-width, 14%)) minmax(0, 1fr);
    overflow: hidden;
    border-top: 1px solid rgba(113, 128, 150, 0.16);
    background: #ffffff;
    box-shadow: 0 -10px 26px rgba(15, 23, 42, 0.1);
}

.project-gantt-shell .gantt-availability-strip {
    position: relative;
    bottom: auto;
    left: auto;
    width: 100%;
    z-index: 2;
    grid-template-columns: minmax(0, 1fr);
    margin-top: 0;
    box-shadow: none;
}

.gantt-availability-label {
    position: sticky;
    left: 0;
    z-index: 2;
    display: grid;
    gap: 0.08rem;
    align-content: start;
    padding: 0.4rem 0.65rem;
    border-right: 1px solid rgba(113, 128, 150, 0.16);
    background: rgba(255, 255, 255, 0.98);
}

.project-gantt-shell .gantt-availability-label {
    position: sticky;
    grid-column: 1;
    width: 118px;
}

.app-planning .main-content {
    padding-bottom: 4.6rem;
}

.gantt-availability-label strong {
    color: var(--text);
    font-size: 0.74rem;
    font-weight: 900;
}

.gantt-availability-label span {
    color: var(--text-soft);
    font-size: 0.65rem;
    font-weight: 800;
}

.gantt-availability-days {
    display: grid;
    grid-template-columns: repeat(var(--gantt-days), minmax(0, 1fr));
    width: var(--gantt-availability-timeline-width, auto);
    min-width: var(--gantt-availability-timeline-width, auto);
    min-height: 46px;
    transform: translateX(var(--gantt-availability-day-offset, 0));
}

.project-gantt-shell .gantt-availability-days {
    grid-column: 1;
    width: 100%;
    min-width: 100%;
}

.gantt-availability-day {
    min-width: 0;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    justify-content: center;
    gap: 0.14rem;
    padding: 0.28rem 0.1rem;
    border-right: 1px solid rgba(113, 128, 150, 0.08);
}

.gantt-availability-day.is-closed {
    background: rgba(113, 128, 150, 0.06);
}

.planning-day-employee-chip {
    width: 19px;
    min-width: 19px;
    height: 16px;
    min-height: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 1px solid color-mix(in srgb, var(--employee-color, #0f8f7b) 42%, #ffffff);
    border-radius: 6px;
    background: var(--employee-color, #0f8f7b);
    color: #ffffff;
    font-size: 0.58rem;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 3px 8px color-mix(in srgb, var(--employee-color, #0f8f7b) 16%, transparent);
    cursor: grab;
}

.planning-day-employee-chip.is-partial {
    background: conic-gradient(
        var(--employee-color, #0f8f7b) 0 var(--availability-percent, 100%),
        #cbd5e1 var(--availability-percent, 100%) 100%
    );
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.68), 0 4px 10px color-mix(in srgb, var(--employee-color, #0f8f7b) 16%, transparent);
}

.planning-day-employee-chip:active,
.planning-day-employee-chip.is-dragging {
    cursor: grabbing;
    opacity: 0.66;
}

.planning-day-employee-chip.is-unavailable {
    border-color: rgba(71, 85, 105, 0.34);
    background: repeating-linear-gradient(135deg, #94a3b8 0, #94a3b8 6px, #64748b 6px, #64748b 11px);
    box-shadow: none;
    cursor: not-allowed;
    opacity: 0.78;
}

.gantt-availability-empty,
.gantt-availability-more {
    color: var(--text-soft);
    font-size: 0.58rem;
    font-weight: 850;
    line-height: 16px;
}

.gantt-availability-more {
    width: 22px;
    text-align: center;
}

.gantt-inspector {
    position: absolute;
    top: 68px;
    right: 0.75rem;
    z-index: 8;
    width: min(330px, calc(100% - 1.5rem));
    max-height: calc(100% - 86px);
    overflow: auto;
    padding: 0.85rem;
    border: 1px solid rgba(15, 118, 110, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.18);
}

.gantt-inspector[hidden] {
    display: none;
}

.gantt-inspector-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 32px;
    gap: 0.55rem;
    align-items: start;
}

.gantt-inspector-head small {
    display: block;
    margin-bottom: 0.16rem;
    overflow: hidden;
    color: var(--primary-strong);
    font-size: 0.68rem;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.gantt-inspector-head h2 {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.2;
}

.gantt-inspector-dates {
    display: grid;
    grid-template-columns: 1fr 20px 1fr;
    gap: 0.35rem;
    align-items: center;
    margin-top: 0.75rem;
    color: var(--text-soft);
    font-size: 0.76rem;
    font-weight: 900;
}

.gantt-inspector-dates strong {
    height: 2px;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.28);
}

.gantt-inspector-progress {
    height: 18px;
    margin-top: 0.7rem;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.1);
}

.gantt-inspector-progress span {
    min-width: 26px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 0.35rem;
    border-radius: inherit;
    background: linear-gradient(90deg, #0f766e, #16a34a);
    color: #ffffff;
    font-size: 0.62rem;
    font-weight: 900;
}

.gantt-inspector dl {
    display: grid;
    gap: 0.45rem;
    margin: 0.75rem 0;
}

.gantt-inspector dl > div {
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr);
    gap: 0.45rem;
    padding: 0.42rem 0;
    border-bottom: 1px solid rgba(113, 128, 150, 0.12);
}

.gantt-inspector dt,
.gantt-inspector dd {
    margin: 0;
    min-width: 0;
    font-size: 0.74rem;
    line-height: 1.25;
}

.gantt-inspector dt {
    color: var(--text-soft);
    font-weight: 850;
}

.gantt-inspector dd {
    color: var(--text);
    font-weight: 900;
    overflow-wrap: anywhere;
}

.gantt-inspector > .btn {
    width: 100%;
    justify-content: center;
}

.gantt-unscheduled {
    position: absolute;
    left: 0.75rem;
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 0.6rem;
    border: 1px dashed rgba(113, 128, 150, 0.34);
    border-radius: 6px;
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.52);
    font-size: 0.78rem;
    font-weight: 800;
}

.planning-force-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: rgba(17, 24, 39, 0.36);
}

.planning-force-dialog {
    width: min(560px, 100%);
    padding: 1rem;
    border: 1px solid rgba(163, 107, 33, 0.36);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.24);
}

.planning-force-dialog h2 {
    margin: 0 0 0.45rem;
    font-size: 1.08rem;
}

.planning-force-dialog p {
    margin: 0 0 0.85rem;
    color: var(--text-soft);
    line-height: 1.45;
}

.planning-intervention-dialog {
    width: min(520px, 100%);
    border-color: rgba(81, 111, 157, 0.28);
}

.planning-intervention-grid {
    display: grid;
    gap: 0.8rem;
    margin: 0.75rem 0 1rem;
}

.planning-intervention-grid label {
    display: grid;
    gap: 0.32rem;
    color: var(--text-soft);
    font-size: 0.82rem;
    font-weight: 760;
}

.planning-intervention-grid input,
.planning-intervention-grid select {
    width: 100%;
}

.planning-force-check {
    align-items: flex-start;
    margin-bottom: 1rem;
}

.planning-force-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.55rem;
}

.planning-force-actions button:disabled {
    opacity: 0.52;
    cursor: not-allowed;
}

.planning-attention-panel {
    margin-top: 1rem;
    padding: 0.8rem;
    border-color: rgba(163, 107, 33, 0.36);
    background: rgba(255, 247, 237, 0.84);
}

.planning-attention-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.65rem;
}

.planning-attention-head h2 {
    margin: 0;
    font-size: 1.02rem;
}

.planning-attention-head span {
    min-width: 30px;
    padding: 0.16rem 0.46rem;
    border-radius: 999px;
    background: rgba(163, 107, 33, 0.16);
    color: #8a5a18;
    font-weight: 900;
    text-align: center;
}

.planning-attention-list {
    display: grid;
    gap: 0.45rem;
}

.planning-attention-item {
    display: grid;
    gap: 0.16rem;
    padding: 0.62rem 0.68rem;
    border: 1px solid rgba(163, 107, 33, 0.2);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.64);
    color: var(--text);
    text-decoration: none;
}

.planning-attention-item:hover {
    border-color: rgba(163, 107, 33, 0.36);
    background: rgba(255, 255, 255, 0.82);
}

.planning-attention-item strong {
    font-size: 0.82rem;
}

.planning-attention-item span {
    color: var(--text-soft);
    font-size: 0.78rem;
    line-height: 1.35;
}

.planning-unscheduled-card {
    margin-top: 0.75rem;
    padding: 0.7rem;
}

.planning-unscheduled-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.planning-unscheduled-head h2 {
    margin: 0;
    font-size: 0.95rem;
}

.planning-unscheduled-head span {
    min-width: 28px;
    padding: 0.16rem 0.44rem;
    border-radius: 999px;
    background: var(--accent-soft);
    color: var(--accent-strong);
    font-size: 0.78rem;
    font-weight: 900;
    text-align: center;
}

.planning-unscheduled-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.42rem;
    max-height: 176px;
    overflow: auto;
}

.planning-unscheduled-item {
    display: grid;
    gap: 0.16rem;
    min-width: 0;
    padding: 0.48rem 0.56rem;
    border: 1px solid rgba(113, 128, 150, 0.18);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.52);
    color: var(--text);
    text-decoration: none;
}

.planning-unscheduled-item:hover {
    border-color: rgba(75, 123, 120, 0.38);
    background: var(--accent-soft);
}

.planning-unscheduled-item strong,
.planning-unscheduled-item small {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.planning-unscheduled-item strong {
    font-size: 0.78rem;
    line-height: 1.15;
}

.planning-unscheduled-item small {
    color: var(--text-soft);
    font-size: 0.68rem;
}

.planning-unscheduled-item span {
    width: fit-content;
    padding: 0.12rem 0.36rem;
    border-radius: 999px;
    background: rgba(163, 107, 33, 0.12);
    color: #7c4a03;
    font-size: 0.66rem;
    font-weight: 800;
}

.app-planning .table-wrap {
    overflow: hidden;
}

.app-planning table {
    min-width: 0;
    table-layout: fixed;
}

.app-planning th,
.app-planning td {
    overflow-wrap: anywhere;
    word-break: normal;
}

.app-planning td .actions {
    align-items: stretch;
}

.app-planning td .actions .btn,
.app-planning td .actions button {
    min-height: 30px;
    padding: 0.38rem 0.5rem;
    font-size: 0.78rem;
    white-space: normal;
}

.app-planning td .actions .icon-btn,
.app-planning td .actions button.icon-btn {
    width: 30px;
    min-width: 30px;
    min-height: 30px;
    padding: 0;
}

.planning-add-user-form {
    display: flex;
    align-items: center;
    gap: 0.28rem;
    margin-top: 0.42rem;
}

.planning-add-user-form select {
    min-width: 132px;
    min-height: 30px;
    padding: 0.28rem 0.48rem;
    font-size: 0.8rem;
}

.employee-planning {
    overflow: hidden;
}

.employee-planning-toolbar {
    padding-bottom: 1rem;
}

.employee-planning-grid {
    display: grid;
    grid-template-columns: minmax(180px, 240px) repeat(var(--employee-days), minmax(112px, 1fr));
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.38);
}

.employee-planning-head,
.employee-planning-user,
.employee-planning-day {
    min-width: 0;
    border-right: 1px solid rgba(113, 128, 150, 0.18);
    border-bottom: 1px solid rgba(113, 128, 150, 0.18);
}

.employee-planning-head {
    position: sticky;
    top: 0;
    z-index: 2;
    display: grid;
    gap: 0.15rem;
    align-content: center;
    min-height: 46px;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.82);
    color: var(--text-soft);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.employee-planning-head.is-name,
.employee-planning-user {
    position: sticky;
    left: 0;
    z-index: 3;
    background: rgba(255, 255, 255, 0.9);
}

.employee-planning-head strong {
    color: var(--text);
    font-size: 0.86rem;
}

.employee-planning-head.is-weekend,
.employee-planning-day.is-weekend {
    background: rgba(113, 128, 150, 0.08);
}

.employee-planning-head.is-holiday,
.employee-planning-day.is-holiday {
    background: rgba(163, 107, 33, 0.09);
}

.employee-planning-user {
    z-index: 1;
    display: grid;
    gap: 0.2rem;
    align-content: start;
    padding: 0.7rem;
    box-shadow: inset 3px 0 0 var(--employee-color, #4B7B78);
}

.employee-planning-user strong {
    overflow-wrap: anywhere;
}

.employee-planning-user span,
.employee-event small,
.employee-day-total,
.employee-empty {
    color: var(--text-muted);
    font-size: 0.74rem;
}

.employee-planning-day {
    min-height: 92px;
    padding: 0.42rem;
    background: rgba(255, 255, 255, 0.5);
}

.employee-planning-day.is-overloaded {
    box-shadow: inset 0 0 0 2px rgba(182, 79, 93, 0.24);
}

.employee-day-total {
    margin-bottom: 0.32rem;
    font-weight: 800;
    color: color-mix(in srgb, var(--employee-color, #4B7B78) 72%, #1f2937);
}

.employee-event {
    display: grid;
    gap: 0.12rem;
    margin-bottom: 0.28rem;
    padding: 0.38rem 0.42rem;
    border-left: 3px solid var(--event-color);
    border-radius: var(--radius-sm);
    background: color-mix(in srgb, var(--event-color) 12%, #ffffff);
    border-top: 1px solid color-mix(in srgb, var(--event-color) 22%, #ffffff);
    border-right: 1px solid color-mix(in srgb, var(--event-color) 22%, #ffffff);
    border-bottom: 1px solid color-mix(in srgb, var(--event-color) 22%, #ffffff);
    box-shadow: var(--shadow-soft);
}

.employee-event span {
    overflow: hidden;
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 800;
    line-height: 1.18;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.employee-empty {
    display: inline-block;
    padding-top: 0.35rem;
}

.gantt-empty {
    grid-column: 1 / -1;
    margin: 0.8rem;
}

[data-dropzone] {
    position: relative;
    border-style: dashed;
    transition: border-color 0.16s ease, background-color 0.16s ease, transform 0.16s ease;
}

[data-dropzone].drag-active {
    transform: translateY(-1px);
    border-color: rgba(75, 123, 120, 0.48);
    background: rgba(75, 123, 120, 0.08);
}

.hours-page {
    display: grid;
    gap: 1rem;
}

.hours-page > * {
    margin: 0;
}

.hours-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.hours-kpi-grid .kpi {
    min-height: 108px;
}

.hours-balance-table,
.hours-summary-table,
.hours-entries-table {
    table-layout: fixed;
}

.hours-entries-table .actions {
    flex-wrap: nowrap;
}

.leave-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.leave-request-form textarea {
    min-height: 76px;
}

.leave-table {
    table-layout: fixed;
}

.leave-table th:nth-child(1),
.leave-table td:nth-child(1) {
    width: 14%;
}

.leave-table th:nth-child(2),
.leave-table td:nth-child(2) {
    width: 16%;
}

.leave-table th:nth-child(8),
.leave-table td:nth-child(8) {
    width: 18%;
}

.leave-actions {
    gap: 0.35rem;
}

.leave-actions .btn,
.leave-actions button {
    min-height: 30px;
    padding: 0.38rem 0.55rem;
    font-size: 0.78rem;
}

@media (max-width: 1240px) {
    .command-stage,
    .hero-grid,
    .content-grid {
        grid-template-columns: 1fr;
    }

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

    .portfolio-cluster,
    .timeline-cluster,
    .analytics-cluster,
    .board-cluster,
    .knowledge-cluster,
    .activity-cluster-v2 {
        grid-column: auto;
    }

    .metric-ribbon,
    .liquid-project-grid,
    .portfolio-grid,
    .grid-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .auth-page {
        overflow: auto;
    }

    .auth-design-page {
        min-height: 100vh;
        grid-template-columns: 1fr;
        overflow: visible;
    }

    .auth-design-visual {
        min-height: 38vh;
    }

    .auth-design-mark {
        width: min(54vw, 360px);
    }

    .auth-design-panel {
        min-height: 62vh;
        padding: 3rem 1.4rem 4rem;
    }

    .auth-design-content,
    .auth-design-legal {
        position: static;
        width: min(100%, 500px);
        margin-inline: auto;
        transform: none;
    }

    .auth-design-subtitle {
        margin-top: 0;
    }

    .auth-design-form {
        margin-top: 3rem;
    }

    .auth-design-legal {
        margin-top: 3rem;
        text-align: center;
    }

    body.app-page {
        padding-top: var(--mobile-header-height);
        padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
    }

    .content-area {
        margin-left: 0;
    }

    .main-content {
        padding: 0.8rem;
    }

    .topbar {
        min-height: var(--mobile-header-height);
        padding: 0.5rem;
    }

    .topbar-panel {
        min-height: 56px;
        padding: 0.42rem;
    }

    .topbar-brand {
        height: 44px;
    }

    .topbar-wordmark {
        height: 44px;
        max-width: min(52vw, 240px);
    }

    .topbar-copy,
    .user-badge {
        display: none;
    }

    .topbar-right .btn:not(.search-toggle) {
        padding-inline: 0.75rem;
    }

    .search-panel {
        top: var(--mobile-header-height);
        right: 0.5rem;
        width: calc(100vw - 1rem);
    }

    .sidebar-backdrop {
        display: none;
    }

    .sidebar {
        top: auto;
        left: 0.5rem;
        right: 0.5rem;
        bottom: calc(0.5rem + env(safe-area-inset-bottom));
        width: auto;
        height: auto;
        padding: 0;
    }

    .sidebar-panel {
        min-height: auto;
        display: block;
        padding: 0.42rem;
    }

    .sidebar-header,
    .sidebar-note {
        display: none;
    }

    .main-nav {
        display: flex;
        gap: 0.35rem;
        overflow-x: auto;
    }

    .main-nav a {
        min-width: 76px;
        min-height: 66px;
        flex: 0 0 auto;
        flex-direction: column;
        justify-content: center;
        gap: 0.32rem;
        padding: 0.45rem;
        text-align: center;
    }

    .nav-icon {
        width: 32px;
        height: 32px;
    }

    .nav-label {
        font-size: 0.68rem;
    }

    .page-header,
    .liquid-panel-top,
    .cluster-head,
    .panel-header,
    .hero-head,
    .project-footer,
    .ticket-meta,
    .liquid-project-footer,
    .liquid-project-meta,
    .liquid-project-assignees,
    .liquid-ticket-meta,
    .liquid-board-head {
        flex-wrap: wrap;
    }

    .grid-2,
    .grid-3,
    .grid-4,
    .form-grid,
    .form-grid-3,
    .dashboard-mosaic,
    .liquid-board,
    .kanban-grid,
    .knowledge-grid {
        grid-template-columns: 1fr;
    }

    .admin-hub-section {
        grid-template-columns: 1fr;
    }

    .hours-kpi-grid,
    .leave-kpi-grid,
    .kpi-grid,
    .metric-ribbon,
    .hero-metrics,
    .stat-cloud,
    .trend-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .daily-hours-toolbar,
    .daily-hour-row {
        grid-template-columns: 1fr;
    }

    .daily-hour-remove {
        width: fit-content;
    }

    .timeline-node,
    .activity-stream-row,
    .activity-item,
    .load-stream-row,
    .load-row,
    .doc-row {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .timestamp,
    .timeline-node time,
    .activity-stream-row time,
    .load-value {
        text-align: left;
    }

    .table-wrap {
        overflow: visible;
        border: 0;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
    }

    table,
    tbody,
    tr,
    td {
        display: block;
        width: 100%;
    }

    table {
        min-width: 0;
    }

    thead {
        display: none;
    }

    tbody {
        display: grid;
        gap: 0.7rem;
    }

    tr {
        padding: 0.3rem 0.8rem;
        border: 1px solid var(--border-strong);
        border-radius: var(--radius);
        background: linear-gradient(180deg, var(--surface-strong), var(--surface));
        box-shadow: var(--shadow-soft);
    }

    td {
        display: grid;
        grid-template-columns: minmax(98px, 36%) minmax(0, 1fr);
        gap: 0.65rem;
        padding: 0.62rem 0;
        border-bottom: 1px solid rgba(113, 128, 150, 0.16);
    }

    td:last-child {
        border-bottom: 0;
    }

    td::before {
        content: attr(data-label);
        color: var(--text-muted);
        font-size: 0.68rem;
        font-weight: 800;
        letter-spacing: 0.06em;
        text-transform: uppercase;
    }

    td[colspan] {
        display: block;
    }

    td[colspan]::before {
        content: none;
    }
}

@media (max-width: 640px) {
    .auth-design-visual {
        min-height: 31vh;
    }

    .auth-design-mark {
        width: min(64vw, 280px);
    }

    .auth-design-panel {
        padding: 2.25rem 1rem 3rem;
    }

    .auth-design-logo {
        font-size: 2rem;
        letter-spacing: 0.1em;
    }

    .auth-design-subtitle {
        margin-top: 0;
        font-size: 1rem;
    }

    .auth-design-form {
        margin-top: 2.4rem;
    }

    .auth-design-options,
    .auth-design-actions {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .auth-design-options {
        flex-direction: column;
        gap: 0.9rem;
    }

    .auth-design-actions {
        display: grid;
        margin-top: 2.6rem;
    }

    .auth-design-actions button,
    .auth-design-actions a {
        width: 100%;
    }

    .main-content {
        padding: 0.65rem;
        gap: 0.75rem;
    }

    .topbar-right {
        gap: 0.35rem;
    }

    .topbar-right .btn:not(.search-toggle) {
        min-height: 38px;
        padding-inline: 0.6rem;
        font-size: 0.84rem;
    }

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

    .quick-search button,
    .actions .btn,
    .actions button,
    .liquid-hero-actions .btn,
    .hero-actions .btn,
    .cluster-head .btn {
        width: 100%;
    }

    .keyword-search-form .actions button {
        width: auto;
        white-space: nowrap;
    }

    .filters {
        padding: 0.5rem 0.65rem;
    }

    .filters .form-grid,
    .filters .form-grid-3,
    .filters .grid-3 {
        gap: 0.38rem;
    }

    .filters .actions .btn,
    .filters .actions button {
        width: auto;
    }

    .page-header,
    .card,
    .kpi,
    .liquid-panel,
    .hero-card,
    .panel {
        padding: 0.85rem;
    }

    .hours-kpi-grid,
    .leave-kpi-grid,
    .kpi-grid,
    .metric-ribbon,
    .hero-metrics,
    .stat-cloud,
    .trend-strip,
    .liquid-project-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .liquid-hero-panel h1 {
        font-size: 2rem;
    }

    td {
        grid-template-columns: 1fr;
        gap: 0.24rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        transition: none !important;
        animation: none !important;
    }
}

/* ==========================================================================
   Design system aliases & utilities — harmonization layer
   ========================================================================== */

/* Button variants (alias for Bootstrap-like names used in newer pages) */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-strong));
    color: #fff;
    border: 1px solid rgba(157, 79, 30, 0.55);
    box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-outline {
    background: var(--surface-strong);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: none;
}

.btn-outline:hover {
    background: var(--surface);
    border-color: var(--primary);
    color: var(--primary-strong);
}

.btn-secondary {
    background: var(--surface-strong);
    color: var(--text);
    border: 1px solid var(--border);
    box-shadow: none;
}

.btn-secondary:hover {
    background: var(--accent-soft);
    color: var(--accent);
    border-color: var(--accent);
}

.btn-sm {
    padding: 0.32rem 0.7rem;
    font-size: 0.85rem;
    min-height: 32px;
}

.btn-sm.icon-btn {
    width: 30px;
    min-width: 30px;
    min-height: 30px;
    padding: 0;
}

.btn-lg {
    padding: 0.7rem 1.25rem;
    font-size: 1rem;
    min-height: 48px;
}

/* Card sub-structure (alias) — keep neutral so .card padding still applies */
.card-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0 0 0.75rem;
    margin: 0 0 0.85rem;
    border-bottom: 1px solid var(--border);
}

.card-header h2,
.card-header h3 {
    margin: 0;
}

.card-body {
    padding: 0;
}

.card-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
    padding-top: 0.85rem;
    margin-top: 0.85rem;
    border-top: 1px solid var(--border);
}

/* Form sub-structure (alias) */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.32rem;
    margin: 0 0 0.85rem;
}

.form-group label {
    font-weight: 600;
    color: var(--text);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
    margin: 0 0 0.85rem;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 0.85rem;
    border-top: 1px solid var(--border);
}

.form-actions.is-start {
    justify-content: flex-start;
}

.form-actions.is-split {
    justify-content: space-between;
}

/* Page header actions wrapper (alias for .actions) */
.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

/* Filters / actions positioning utilities */
.actions.is-full-row,
.filters .is-full-row {
    grid-column: 1 / -1;
}

.actions.is-end,
.filters .is-end {
    align-self: end;
}

/* Text utilities */
.text-muted {
    color: var(--text-muted);
}

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

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

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

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

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

.text-sm {
    font-size: 0.85rem;
}

.text-lg {
    font-size: 1.05rem;
}

/* Spacing utilities */
.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 0.85rem; }
.mt-3 { margin-top: 1.25rem; }
.mt-4 { margin-top: 1.75rem; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 0.85rem; }
.mb-3 { margin-bottom: 1.25rem; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 0.85rem; }
.gap-3 { gap: 1.25rem; }

/* Stat card alias (= kpi) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 0.85rem;
    margin: 0 0 1rem;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.95rem 1rem;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-card.is-primary { border-color: rgba(201, 109, 47, 0.35); }
.stat-card.is-accent { border-color: rgba(75, 123, 120, 0.35); }
.stat-card.is-info { border-color: rgba(81, 111, 157, 0.35); }
.stat-card.is-success { border-color: rgba(47, 128, 98, 0.35); }
.stat-card.is-warning { border-color: rgba(163, 107, 33, 0.35); }
.stat-card.is-danger { border-color: rgba(182, 79, 93, 0.35); }

.stat-value {
    font-family: var(--font-display);
    font-size: 1.65rem;
    font-weight: 760;
    line-height: 1.05;
    color: var(--text);
}

.stat-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.stat-hint {
    font-size: 0.85rem;
    color: var(--text-soft);
}

/* Severity / action badges (alias to badge variants) */
.severity-badge,
.action-badge,
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.18rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.2;
    border: 1px solid var(--border);
    background: var(--surface-muted);
    color: var(--text);
}

.severity-info,
.action-info,
.status-info {
    background: rgba(81, 111, 157, 0.12);
    color: var(--info);
    border-color: rgba(81, 111, 157, 0.35);
}

.severity-warning,
.action-warning,
.status-warning,
.action-updated {
    background: rgba(163, 107, 33, 0.12);
    color: var(--warning);
    border-color: rgba(163, 107, 33, 0.35);
}

.severity-error,
.severity-danger,
.action-danger,
.status-danger,
.action-deleted {
    background: rgba(182, 79, 93, 0.12);
    color: var(--danger);
    border-color: rgba(182, 79, 93, 0.35);
}

.severity-success,
.action-success,
.status-success,
.action-created {
    background: rgba(47, 128, 98, 0.12);
    color: var(--success);
    border-color: rgba(47, 128, 98, 0.35);
}

.admin-hub {
    display: grid;
    gap: 1rem;
}

.admin-hub-section {
    display: grid;
    grid-template-columns: minmax(180px, 0.32fr) minmax(0, 1fr);
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.admin-hub-section:first-child {
    padding-top: 0;
    border-top: 0;
}

.admin-hub-section h2,
.admin-list-section h2 {
    margin-bottom: 0.28rem;
    font-size: 1rem;
}

.admin-action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
    min-width: 0;
}

.admin-action {
    display: grid;
    gap: 0.28rem;
    min-height: 112px;
    align-content: start;
    padding: 0.85rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.48);
    transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.admin-action:hover {
    transform: translateY(-1px);
    border-color: rgba(201, 109, 47, 0.34);
    background: rgba(255, 255, 255, 0.72);
}

.admin-action strong {
    color: var(--text);
    font-size: 0.96rem;
}

.admin-action span {
    color: var(--text-soft);
    font-size: 0.86rem;
    line-height: 1.45;
}

.admin-settings-card textarea {
    min-height: 172px;
}

.admin-permissions-panel {
    display: grid;
    gap: 1rem;
}

.admin-permissions-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.admin-permissions-head h2 {
    margin-bottom: 0.2rem;
}

.admin-permissions-head p {
    margin: 0;
    color: var(--text-soft);
    font-size: 0.9rem;
}

.admin-permission-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.85rem;
}

.admin-permission-module {
    min-width: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.55);
    overflow: hidden;
}

.admin-permission-module-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.8rem 0.9rem;
    border-bottom: 1px solid var(--border);
    background: rgba(6, 38, 74, 0.04);
}

.admin-permission-module-head span,
.admin-permission-row small {
    color: var(--text-soft);
    font-size: 0.72rem;
}

.admin-permission-module-head span {
    display: block;
    margin-bottom: 0.15rem;
    font-weight: 800;
    text-transform: uppercase;
}

.admin-permission-module-head h3 {
    margin: 0;
    font-size: 1rem;
}

.admin-permission-module-head strong {
    flex: 0 0 auto;
    color: var(--success);
    font-size: 0.86rem;
}

.admin-permission-list {
    display: grid;
    gap: 0;
}

.admin-permission-row {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.7rem 0.9rem;
    border-bottom: 1px solid rgba(113, 128, 150, 0.14);
}

.admin-permission-row:last-child {
    border-bottom: 0;
}

.admin-permission-row input {
    width: auto;
    margin-top: 0.2rem;
}

.admin-permission-row span {
    display: grid;
    gap: 0.12rem;
    min-width: 0;
}

.admin-permission-row strong,
.admin-permission-row small {
    overflow-wrap: anywhere;
}

.admin-permission-row strong {
    color: var(--text);
    font-size: 0.9rem;
}

.company-logo-preview {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    min-height: 74px;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.72);
}

.company-logo-preview img {
    display: block;
    max-width: 220px;
    max-height: 72px;
    object-fit: contain;
}

.admin-list-section {
    margin-top: 1rem;
}

.office365-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.office365-hero h2 {
    margin: 0.25rem 0 0.3rem;
}

.office365-hero p {
    margin: 0;
    color: var(--text-soft);
}

.office365-grid {
    margin: 1rem 0;
}

.office365-action .badge {
    width: fit-content;
}

.agenda-toolbar {
    margin-bottom: 1rem;
}

.agenda-filters {
    margin: 0;
}

.agenda-period {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1rem;
}

.agenda-period h2 {
    margin: 0.2rem 0 0;
}

.agenda-outlook-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
    gap: 1rem;
    align-items: start;
}

.agenda-calendar-card {
    overflow: hidden;
    padding: 0;
}

.agenda-weekdays,
.agenda-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.agenda-weekdays {
    border-bottom: 1px solid var(--border);
    background: rgba(246, 250, 252, 0.92);
}

.agenda-weekdays span {
    min-width: 0;
    padding: 0.72rem 0.5rem;
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 820;
    text-align: center;
    text-transform: uppercase;
}

.agenda-calendar-grid {
    background: rgba(113, 128, 150, 0.14);
    gap: 1px;
}

.agenda-slot {
    min-width: 0;
    min-height: 156px;
    display: flex;
    flex-direction: column;
    background: #ffffff;
}

.agenda-calendar-grid.is-week .agenda-slot {
    min-height: 560px;
}

.agenda-slot.is-outside {
    background: rgba(248, 251, 252, 0.68);
}

.agenda-slot.is-today .agenda-slot-head strong {
    background: var(--accent);
    color: #ffffff;
}

.agenda-slot.is-selected {
    box-shadow: inset 0 0 0 2px rgba(6, 38, 74, 0.34);
}

.agenda-slot-head {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.52rem 0.58rem;
    color: var(--text);
    text-decoration: none;
}

.agenda-slot-head span {
    min-width: 0;
    overflow: hidden;
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 800;
    text-overflow: ellipsis;
    text-transform: capitalize;
    white-space: nowrap;
}

.agenda-slot-head strong {
    width: 30px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 0.86rem;
}

.agenda-slot-events {
    display: grid;
    align-content: start;
    gap: 0.34rem;
    padding: 0 0.48rem 0.55rem;
}

.agenda-event-chip {
    min-width: 0;
    display: grid;
    gap: 0.12rem;
    padding: 0.38rem 0.46rem;
    border-left: 3px solid #2563eb;
    border-radius: 4px;
    background: #e8f1ff;
    color: #12345f;
    text-decoration: none;
}

.agenda-event-chip:hover {
    background: #dbeafe;
}

.agenda-event-chip span,
.agenda-event-chip small {
    overflow: hidden;
    color: #335f91;
    font-size: 0.68rem;
    font-weight: 760;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agenda-event-chip strong {
    min-width: 0;
    overflow: hidden;
    font-size: 0.76rem;
    line-height: 1.22;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.agenda-calendar-grid.is-week .agenda-event-chip strong {
    white-space: normal;
}

.agenda-more {
    padding: 0.1rem 0.18rem;
    color: var(--accent);
    font-size: 0.76rem;
    font-weight: 820;
    text-decoration: none;
}

.agenda-detail-panel {
    position: sticky;
    top: 1rem;
}

.agenda-detail-panel h2 {
    margin: 0.2rem 0 0.9rem;
    font-size: 1.1rem;
    text-transform: capitalize;
}

.agenda-detail-events {
    display: grid;
    gap: 0.62rem;
}

.agenda-detail-event {
    display: grid;
    gap: 0.2rem;
    padding: 0.76rem 0.82rem;
    border: 1px solid var(--border);
    border-left: 4px solid #2563eb;
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.78);
    color: var(--text);
    text-decoration: none;
}

.agenda-detail-event:hover {
    border-color: rgba(37, 99, 235, 0.36);
    box-shadow: var(--shadow-soft);
}

.agenda-detail-event span {
    color: #335f91;
    font-size: 0.78rem;
    font-weight: 820;
}

.agenda-detail-event strong {
    line-height: 1.28;
}

.agenda-detail-event small {
    color: var(--text-muted);
}

@media (max-width: 1100px) {
    .agenda-outlook-shell {
        grid-template-columns: 1fr;
    }

    .agenda-detail-panel {
        position: static;
    }

    .agenda-calendar-grid.is-week .agenda-slot {
        min-height: 340px;
    }
}

@media (max-width: 720px) {
    .agenda-period {
        align-items: stretch;
        flex-direction: column;
    }

    .agenda-period .actions {
        justify-content: stretch;
    }

    .agenda-period .actions .btn {
        flex: 1 1 0;
        justify-content: center;
        min-width: 0;
    }

    .agenda-calendar-card {
        overflow-x: auto;
    }

    .agenda-weekdays,
    .agenda-calendar-grid {
        min-width: 760px;
    }

    .agenda-slot {
        min-height: 128px;
    }

    .agenda-calendar-grid.is-week .agenda-slot {
        min-height: 300px;
    }
}

.onedrive-toolbar {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.75rem;
}

.onedrive-back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    color: var(--text);
    font-weight: 720;
}

.onedrive-back .icon {
    width: 18px;
    height: 18px;
}

.onedrive-table .onedrive-name {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 240px;
}

.onedrive-icon {
    width: 38px;
    height: 38px;
    display: inline-flex;
    flex: none;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.72);
    color: var(--accent);
}

.onedrive-icon.is-folder {
    color: var(--warning);
    background: rgba(245, 158, 11, 0.1);
}

.onedrive-icon.is-pdf {
    color: #be123c;
    background: rgba(190, 18, 60, 0.08);
}

.onedrive-icon.is-word {
    color: #2563eb;
    background: rgba(37, 99, 235, 0.08);
}

.onedrive-icon.is-excel {
    color: #15803d;
    background: rgba(21, 128, 61, 0.08);
}

.onedrive-icon.is-image {
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.08);
}

.onedrive-icon.is-archive {
    color: #92400e;
    background: rgba(146, 64, 14, 0.08);
}

.onedrive-icon .icon {
    width: 21px;
    height: 21px;
}

.onedrive-name strong,
.onedrive-name small {
    display: block;
}

.onedrive-name small {
    margin-top: 0.12rem;
    color: var(--text-soft);
    font-size: 0.76rem;
    font-weight: 680;
}

.onedrive-upload {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.9rem;
    padding: 0.85rem;
    border: 1px dashed rgba(113, 128, 150, 0.42);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.52);
}

.onedrive-upload strong,
.onedrive-upload small {
    display: block;
}

.onedrive-upload small {
    margin-top: 0.16rem;
    color: var(--text-soft);
}

/* Templates / cards grid harmonized */
.templates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 0.85rem;
    margin: 0 0 1rem;
}

.template-card {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.95rem 1rem;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.template-card .template-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
}

.template-card .template-header h3 {
    margin: 0;
    font-size: 1.05rem;
}

.template-description {
    color: var(--text-soft);
    font-size: 0.92rem;
    margin: 0;
}

.template-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 0.5rem;
    padding: 0.6rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.template-details .detail {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.template-details .detail-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.template-details .detail-value {
    font-weight: 600;
    color: var(--text);
}

.template-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: auto;
}

.template-actions .btn {
    flex: 1 1 auto;
    min-width: 0;
}

/* Generic details grid (audit / view) */
.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.6rem 1rem;
}

.detail-row {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.45rem 0;
    border-bottom: 1px dashed var(--border);
}

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

.detail-row .detail-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.detail-row .detail-value {
    color: var(--text);
    font-weight: 500;
    word-break: break-word;
}

/* Audit timeline harmonized (replaces violet gradient) */
.audit-timeline {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding-left: 1.4rem;
}

.audit-timeline::before {
    content: "";
    position: absolute;
    left: 0.4rem;
    top: 0.25rem;
    bottom: 0.25rem;
    width: 2px;
    background: linear-gradient(180deg, var(--primary-soft), var(--accent-soft));
    border-radius: 2px;
}

.audit-entry {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.audit-entry::before {
    content: "";
    position: absolute;
    left: -1.05rem;
    top: 1rem;
    width: 0.7rem;
    height: 0.7rem;
    border-radius: 50%;
    background: var(--primary);
    box-shadow: 0 0 0 3px rgba(201, 109, 47, 0.18);
}

.audit-entry .audit-header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.4rem 0.75rem;
    margin-bottom: 0.4rem;
}

.audit-entry .audit-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.75rem;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.audit-entry .audit-reason {
    color: var(--text-soft);
    font-style: italic;
    margin: 0.35rem 0;
}

.audit-entry .audit-changes {
    margin-top: 0.5rem;
}

.changes-table {
    width: 100%;
    min-width: 0;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.changes-table th,
.changes-table td {
    padding: 0.4rem 0.55rem;
    border-bottom: 1px dashed var(--border);
    text-align: left;
}

.changes-table th {
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    font-size: 0.72rem;
    letter-spacing: 0.05em;
}

.changes-table .old-value {
    color: var(--danger);
    text-decoration: line-through;
    text-decoration-color: rgba(182, 79, 93, 0.5);
}

.changes-table .new-value {
    color: var(--success);
    font-weight: 600;
}

/* Generic table.table — give it the same treatment as native table */
table.table {
    width: 100%;
    border-collapse: collapse;
}

table.table th,
table.table td {
    padding: 0.55rem 0.7rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

table.table th {
    font-weight: 600;
    color: var(--text-muted);
    background: var(--surface-muted);
}

/* Notice variants used by newer pages */
.notice.notice-info { background: rgba(81, 111, 157, 0.1); border-color: rgba(81, 111, 157, 0.35); }
.notice.notice-success { background: rgba(47, 128, 98, 0.1); border-color: rgba(47, 128, 98, 0.35); }
.notice.notice-warning { background: rgba(163, 107, 33, 0.1); border-color: rgba(163, 107, 33, 0.35); }
.notice.notice-danger { background: rgba(182, 79, 93, 0.1); border-color: rgba(182, 79, 93, 0.35); }

/* Mobile: keep new alias structures readable */
@media (max-width: 720px) {
    .card-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .form-actions {
        justify-content: stretch;
    }

    .form-actions .btn,
    .form-actions button {
        flex: 1 1 100%;
    }

    .templates-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .audit-timeline {
        padding-left: 1rem;
    }

    .audit-entry::before {
        left: -0.85rem;
    }
}

/* Planiks visual refresh: aligned with the new logo */
:root {
    --bg: #eef6f8;
    --bg-2: #ffffff;
    --surface: #ffffff;
    --surface-strong: #ffffff;
    --surface-muted: #f4fbfb;
    --surface-dark: #031833;
    --text: #06264a;
    --text-soft: rgba(6, 38, 74, 0.68);
    --text-muted: rgba(6, 38, 74, 0.48);
    --text-on-dark: #ffffff;
    --primary: #22d3a6;
    --primary-strong: #0fb88d;
    --primary-soft: rgba(34, 211, 166, 0.14);
    --accent: #06264a;
    --accent-strong: #031833;
    --accent-soft: rgba(6, 38, 74, 0.09);
    --info: #256b9d;
    --success: #0f9f7c;
    --warning: #b98524;
    --danger: #b64f5d;
    --border: #dce9ec;
    --border-strong: #e8f1f3;
    --shadow: 0 20px 52px rgba(6, 38, 74, 0.11);
    --shadow-soft: 0 10px 28px rgba(6, 38, 74, 0.08);
}

body {
    background:
        linear-gradient(135deg, rgba(34, 211, 166, 0.08), transparent 34%),
        linear-gradient(90deg, rgba(6, 38, 74, 0.035), transparent 30%),
        linear-gradient(180deg, #ffffff 0%, #eef6f8 100%);
}

body::before {
    background-image:
        linear-gradient(rgba(6, 38, 74, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(6, 38, 74, 0.03) 1px, transparent 1px);
}

.topbar-panel,
.page-header,
.card,
.kpi,
.filters,
.table-wrap,
.flash,
.empty-state,
.calendar-shell,
.notice,
.liquid-panel,
.panel,
.project-card,
.kanban-column,
.activity-item,
.doc-row,
.load-row,
.trend-card,
.ops-panel,
.ops-kpi {
    background: #ffffff;
    border-color: var(--border-strong);
    box-shadow: 0 12px 32px rgba(6, 38, 74, 0.08);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.topbar-panel {
    min-height: 64px;
    border-radius: 4px;
}

.topbar-copy strong,
.topbar-kicker,
.sidebar-kicker,
.panel-kicker {
    color: var(--text);
}

.topbar-kicker,
.sidebar-kicker,
.panel-kicker {
    opacity: 0.58;
}

.sidebar-panel {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    background:
        radial-gradient(circle at 18% 10%, rgba(34, 211, 166, 0.34), transparent 34%),
        linear-gradient(160deg, #06264a 0%, #031833 100%);
    box-shadow: 0 18px 42px rgba(3, 24, 51, 0.24);
}

.sidebar-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: rgba(3, 24, 51, 0.34);
    pointer-events: none;
}

.sidebar-panel > * {
    position: relative;
    z-index: 1;
}

button,
.btn {
    border-radius: 4px;
    border-color: rgba(34, 211, 166, 0.48);
    background: linear-gradient(135deg, #22d3a6, #0fb88d);
    color: #ffffff;
    box-shadow: 0 10px 22px rgba(15, 184, 141, 0.16);
    font-weight: 600;
}

button:hover,
.btn:hover {
    background: linear-gradient(135deg, #35e2b7, #0ca47f);
}

.btn-light {
    color: #06264a;
    border-color: #d7e8ec;
    background: #ffffff;
}

.btn-light:hover {
    background: #f4fbfb;
}

input,
select,
textarea {
    border-radius: 4px;
    background: #ffffff;
    box-shadow: none;
}

.ops-dashboard {
    display: grid;
    gap: 1rem;
}

.ops-hero {
    position: relative;
    min-height: 210px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: clamp(1.2rem, 2vw, 1.8rem);
    overflow: hidden;
    border-radius: 4px;
    color: #ffffff;
    background:
        radial-gradient(circle at 82% 12%, rgba(34, 211, 166, 0.38), transparent 30%),
        linear-gradient(120deg, rgba(3, 24, 51, 0.96), rgba(6, 38, 74, 0.84));
    box-shadow: 0 24px 54px rgba(3, 24, 51, 0.22);
}

.ops-hero-copy {
    min-width: 0;
    position: relative;
    z-index: 1;
}

.ops-hero.has-company-logo .ops-hero-copy {
    padding-right: clamp(164px, 31vw, 380px);
}

.ops-hero h1 {
    max-width: 760px;
    margin: 0.35rem 0 0.55rem;
    color: #ffffff;
    font-size: clamp(2rem, 4vw, 3.8rem);
    font-weight: 700;
}

.ops-hero p,
.ops-hero .panel-kicker {
    color: rgba(255, 255, 255, 0.74);
}

.ops-greeting-row {
    display: block;
    min-width: 0;
    width: 100%;
}

.ops-greeting-row > div {
    min-width: 0;
}

.ops-greeting-logo {
    position: absolute;
    top: clamp(0.85rem, 1.5vw, 1.2rem);
    right: clamp(0.85rem, 1.5vw, 1.2rem);
    z-index: 0;
    width: clamp(148px, 28vw, 360px);
    height: calc(100% - clamp(1.7rem, 3vw, 2.4rem));
    max-height: none;
    object-fit: contain;
    box-sizing: border-box;
    padding: clamp(0.45rem, 1vw, 0.8rem);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 26px rgba(0, 0, 0, 0.18);
}

.ops-quick-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.55rem;
}

.ops-company-logo {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-width: min(260px, 32vw);
}

.ops-company-logo img {
    display: block;
    max-width: min(260px, 32vw);
    max-height: 96px;
    object-fit: contain;
    filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.18));
}

.ops-kpis {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0.8rem;
}

.ops-kpi {
    min-height: 128px;
    display: grid;
    align-content: space-between;
    gap: 0.5rem;
    padding: 1rem;
    border-radius: 4px;
}

.ops-kpi span,
.ops-kpi em,
.ops-project-row small,
.ops-timeline-row span,
.ops-task-card span,
.ops-feed-row span,
.ops-alert-row span {
    color: var(--text-soft);
    font-size: 0.84rem;
    line-height: 1.35;
}

.ops-kpi span {
    font-weight: 700;
}

.ops-kpi strong {
    color: var(--text);
    font-size: clamp(1.7rem, 3vw, 2.45rem);
    line-height: 1;
}

.ops-kpi em {
    font-style: normal;
}

.ops-kpi.is-primary {
    border-color: rgba(34, 211, 166, 0.28);
    background: linear-gradient(180deg, #effdfa, #ffffff);
}

.ops-layout {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 1rem;
}

.ops-panel {
    min-width: 0;
    padding: 1rem;
    border-radius: 4px;
}

.ops-priority-panel,
.ops-tasks-panel {
    grid-column: span 8;
}

.ops-alert-panel,
.ops-feed-panel {
    grid-column: span 4;
}

.ops-schedule-panel,
.ops-hours-panel {
    grid-column: span 6;
}

.ops-panel-head,
.ops-project-row,
.ops-timeline-row,
.ops-feed-row,
.ops-task-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8rem;
}

.ops-panel-head {
    align-items: flex-start;
    margin-bottom: 0.9rem;
}

.ops-panel-head h2 {
    margin-bottom: 0;
    font-size: 1.25rem;
}

.ops-project-list,
.ops-alert-list,
.ops-timeline,
.ops-feed {
    display: grid;
    gap: 0.6rem;
}

.ops-project-row,
.ops-alert-row,
.ops-timeline-row,
.ops-feed-row,
.ops-task-card {
    min-width: 0;
    padding: 0.78rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: #f7fcfd;
}

.ops-project-row {
    grid-template-columns: auto minmax(0, 1fr) auto;
}

.ops-project-row:hover,
.ops-alert-row:hover,
.ops-task-card:hover {
    border-color: rgba(34, 211, 166, 0.32);
    background: #effdfa;
}

.ops-row-mark {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    flex: none;
    border-radius: 4px;
    color: #ffffff;
    background: #06264a;
    font-size: 0.78rem;
    font-weight: 800;
}

.ops-row-mark.is-risk {
    background: #b64f5d;
}

.ops-row-mark.is-live {
    background: #0f9f7c;
}

.ops-row-mark.is-review {
    background: #256b9d;
}

.ops-project-main,
.ops-project-side,
.ops-feed-row div,
.ops-timeline-row div {
    min-width: 0;
}

.ops-project-main strong,
.ops-task-card strong,
.ops-feed-row strong,
.ops-timeline-row strong,
.ops-alert-row strong {
    display: block;
    overflow: hidden;
    color: var(--text);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ops-project-side {
    text-align: right;
}

.ops-project-side strong,
.ops-soft-stat {
    color: var(--primary);
}

.ops-alert-row {
    display: grid;
    gap: 0.25rem;
}

.ops-timeline-row {
    justify-content: start;
}

.ops-timeline-row time {
    width: 132px;
    flex: none;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 800;
}

.ops-task-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.7rem;
}

.ops-task-column {
    display: grid;
    align-content: start;
    gap: 0.55rem;
    min-width: 0;
    padding: 0.65rem;
    border: 1px solid var(--border);
    border-radius: 4px;
    background: #f7fcfd;
}

.ops-task-head span {
    min-width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 4px;
    color: #ffffff;
    background: #06264a;
    font-size: 0.78rem;
    font-weight: 800;
}

.ops-task-card {
    display: grid;
    gap: 0.25rem;
    background: #ffffff;
}

.ops-empty-line {
    padding: 0.75rem;
    border: 1px dashed var(--border);
    border-radius: 4px;
    color: var(--text-muted);
    text-align: center;
}

.ops-chart-box {
    min-height: 280px;
}

.ops-feed-row {
    justify-content: start;
}

@media (max-width: 1180px) {
    .ops-kpis {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ops-priority-panel,
    .ops-alert-panel,
    .ops-schedule-panel,
    .ops-hours-panel,
    .ops-tasks-panel,
    .ops-feed-panel {
        grid-column: 1 / -1;
    }
}

@media (max-width: 760px) {
    .project-hero-main,
    .project-summary-board,
    .assistant-grid,
    .project-address-strip,
    .grid-2.project-activity-summary {
        grid-template-columns: 1fr;
    }

    .project-hero-actions {
        justify-content: flex-start;
    }

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

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

    .project-measurements-history {
        grid-template-columns: 1fr;
    }

    .project-measurement-card {
        grid-template-columns: 88px minmax(0, 1fr);
    }

    .project-measurement-thumb {
        width: 88px;
    }

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

    .ops-hero {
        grid-template-columns: 1fr;
        align-items: start;
    }

    .ops-quick-actions {
        justify-content: stretch;
    }

    .ops-quick-actions .btn {
        flex: 1 1 100%;
    }

    .ops-kpis,
    .ops-task-columns {
        grid-template-columns: 1fr;
    }

    .ops-project-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .ops-project-side {
        grid-column: 2;
        text-align: left;
    }

    .ops-panel-head,
    .ops-timeline-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .ops-timeline-row time {
        width: auto;
    }
}

/* Mobile app layout: not a reduced desktop */
@media (max-width: 820px) {
    :root {
        --mobile-header-height: 62px;
        --mobile-nav-height: 78px;
        --radius: 6px;
    }

    html,
    body {
        max-width: 100%;
        overflow-x: hidden;
    }

    body.app-page {
        padding-top: calc(var(--mobile-header-height) + env(safe-area-inset-top));
        padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 0.75rem);
        background: #eef6f8;
    }

    body.technician-portal-page {
        padding-bottom: calc(env(safe-area-inset-bottom) + 0.75rem);
    }

    body::before {
        display: none;
    }

    .topbar {
        min-height: calc(var(--mobile-header-height) + env(safe-area-inset-top));
        padding: env(safe-area-inset-top) 0 0;
        border-bottom: 1px solid var(--border);
        background: rgba(255, 255, 255, 0.96);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
    }

    .topbar-panel {
        min-height: var(--mobile-header-height);
        padding: 0.45rem 0.8rem;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .menu-toggle,
    .topbar-copy,
    .user-badge {
        display: none;
    }

    .topbar-brand {
        height: 42px;
    }

    .topbar-wordmark {
        height: 42px;
        max-width: 58vw;
    }

    .topbar-right {
        gap: 0.4rem;
    }

    .search-toggle {
        width: 42px;
        min-width: 42px;
        height: 42px;
        border-color: var(--border);
        background: #f4fbfb;
    }

    .topbar-right > a.btn {
        min-height: 42px;
        padding-inline: 0.72rem;
        border-color: var(--border);
        background: #ffffff;
        font-size: 0.8rem;
    }

    .technician-portal-page .topbar-right > a.btn {
        display: inline-flex;
    }

    .tech-action-grid {
        grid-template-columns: 1fr;
    }

    .tech-action-card {
        min-height: 104px;
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        align-content: center;
    }

    .tech-action-card small {
        grid-column: 2;
    }

    .search-panel {
        top: calc(var(--mobile-header-height) + env(safe-area-inset-top));
        right: 0;
        left: 0;
        width: auto;
        padding: 0.75rem;
        transform: translateY(-10px);
    }

    .search-panel-inner {
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .quick-search {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 0.5rem;
        padding: 0.65rem;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: #ffffff;
        box-shadow: 0 14px 30px rgba(6, 38, 74, 0.12);
    }

    .quick-search input {
        min-height: 44px;
        border-color: transparent;
        background: #f4fbfb;
    }

    .quick-search button {
        min-height: 44px;
        white-space: nowrap;
    }

    .content-area,
    body.sidebar-compact .content-area {
        margin-left: 0;
    }

    .app-shell {
        min-height: auto;
    }

    .main-content {
        gap: 0.8rem;
        padding: 0.75rem;
    }

    .sidebar {
        top: auto;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: 30;
        width: auto;
        height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
        padding: 0;
    }

    body.sidebar-compact .sidebar {
        width: auto;
        padding: 0;
    }

    .sidebar-panel,
    body.sidebar-compact .sidebar-panel {
        min-height: 100%;
        max-height: none;
        display: block;
        padding: 0.42rem 0.55rem calc(0.42rem + env(safe-area-inset-bottom));
        border: 0;
        border-radius: 18px 18px 0 0;
        background:
            radial-gradient(circle at 20% 0%, rgba(34, 211, 166, 0.34), transparent 38%),
            linear-gradient(180deg, rgba(6, 38, 74, 0.96), rgba(3, 24, 51, 0.99));
        box-shadow: 0 -16px 34px rgba(6, 38, 74, 0.22);
    }

    .sidebar-panel::before,
    .sidebar-header,
    .sidebar-note,
    .sidebar-collapse-toggle {
        display: none;
    }

    .main-nav {
        height: 100%;
        display: grid;
        grid-auto-flow: column;
        grid-auto-columns: minmax(64px, 1fr);
        gap: 0.24rem;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        scroll-snap-type: x mandatory;
    }

    .main-nav a,
    body.sidebar-compact .main-nav a {
        min-width: 64px;
        min-height: 62px;
        flex-direction: column;
        justify-content: center;
        gap: 0.24rem;
        padding: 0.38rem 0.28rem;
        border-radius: 12px;
        scroll-snap-align: center;
    }

    .main-nav a.is-active {
        color: #06264a;
        background: #ffffff;
    }

    .nav-icon,
    body.sidebar-compact .nav-icon {
        width: 30px;
        height: 30px;
        background: rgba(255, 255, 255, 0.1);
    }

    .main-nav a.is-active .nav-icon {
        color: #ffffff;
        background: #22d3a6;
    }

    .nav-label,
    body.sidebar-compact .nav-label {
        position: static;
        width: auto;
        height: auto;
        overflow: hidden;
        clip: auto;
        opacity: 1;
        max-width: 100%;
        color: currentColor;
        font-size: 0.62rem;
        line-height: 1.1;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .page-header {
        display: grid;
        gap: 0.75rem;
        padding: 1rem;
        border: 0;
        border-radius: 12px;
        background: #ffffff;
    }

    .page-header h1 {
        font-size: clamp(1.35rem, 8vw, 2rem);
        line-height: 1.05;
    }

    .page-header p {
        font-size: 0.9rem;
    }

    .page-header .actions,
    .actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(42px, max-content));
        justify-content: start;
        gap: 0.45rem;
    }

    .actions .btn:not(.icon-btn),
    .actions button:not(.icon-btn) {
        min-height: 42px;
    }

    .icon-btn,
    .btn-sm.icon-btn {
        width: 42px;
        min-width: 42px;
        min-height: 42px;
    }

    .card,
    .filters,
    .notice,
    .panel,
    .liquid-panel,
    .ops-panel,
    .ops-kpi,
    .stat-card,
    .template-card {
        padding: 1rem;
        border-radius: 12px;
        border-color: #dce9ec;
        background: #ffffff;
        box-shadow: 0 8px 22px rgba(6, 38, 74, 0.07);
    }

    .filters {
        padding: 0.7rem;
    }

    .filters-toggle {
        min-height: 42px;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: #f4fbfb;
    }

    .filters.is-collapsed form {
        display: none;
    }

    .filters.is-expanded form {
        display: grid;
        gap: 0.65rem;
        margin-top: 0.65rem;
    }

    input,
    select,
    textarea {
        min-height: 46px;
        padding: 0.78rem 0.82rem;
        border-radius: 10px;
        font-size: 16px;
    }

    label {
        font-size: 0.82rem;
    }

    .form-row,
    .form-grid,
    .form-grid-3,
    .grid-2,
    .grid-3,
    .grid-4,
    .admin-hub-section,
    .admin-action-grid,
    .templates-grid,
    .details-grid,
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .form-actions,
    .card-footer {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .form-actions .btn,
    .form-actions button,
    .card-footer .btn,
    .card-footer button {
        width: 100%;
    }

    .table-wrap {
        overflow: visible;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    table,
    thead,
    tbody,
    tr,
    td,
    th {
        display: block;
    }

    table {
        width: 100%;
        min-width: 0;
    }

    thead {
        display: none;
    }

    tbody {
        display: grid;
        gap: 0.7rem;
    }

    tr {
        padding: 0.2rem 0.85rem;
        border: 1px solid #dce9ec;
        border-radius: 12px;
        background: #ffffff;
        box-shadow: 0 8px 22px rgba(6, 38, 74, 0.07);
    }

    td {
        display: grid;
        grid-template-columns: minmax(86px, 34%) minmax(0, 1fr);
        gap: 0.7rem;
        align-items: start;
        padding: 0.72rem 0;
        border-bottom: 1px solid #e8f1f3;
        overflow-wrap: anywhere;
    }

    td:last-child {
        border-bottom: 0;
    }

    td::before {
        content: attr(data-label);
        color: rgba(6, 38, 74, 0.45);
        font-size: 0.68rem;
        font-weight: 800;
        letter-spacing: 0.04em;
        text-transform: uppercase;
    }

    td:not([data-label])::before,
    td[data-label=""]::before,
    td[colspan]::before {
        content: none;
    }

    td[colspan] {
        display: block;
    }

    .ops-dashboard {
        gap: 0.75rem;
    }

    .ops-hero {
        min-height: 176px;
        grid-template-columns: 1fr;
        align-items: end;
        padding: 1rem;
        border-radius: 16px;
    }

    .ops-hero h1 {
        font-size: clamp(1.75rem, 9vw, 2.55rem);
    }

    .ops-greeting-row {
        gap: 0.65rem;
    }

    .ops-hero.has-company-logo .ops-hero-copy {
        padding-right: clamp(112px, 38vw, 158px);
    }

    .ops-greeting-logo {
        top: 0.75rem;
        right: 0.75rem;
        width: clamp(96px, 34vw, 150px);
        height: calc(100% - 1.5rem);
    }

    .ops-quick-actions {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
    }

    .ops-quick-actions .btn {
        width: 100%;
        min-width: 0;
        padding-inline: 0.35rem;
        font-size: 0.78rem;
    }

    .ops-company-logo {
        justify-content: flex-start;
        min-width: 0;
    }

    .ops-company-logo img {
        max-width: 190px;
        max-height: 72px;
    }

    .planning-resource-dock {
        grid-template-columns: 1fr;
    }

    .gantt-availability-strip {
        bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
    }

    .app-planning .main-content {
        padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 4.6rem);
    }

    .planning-resource-list {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 0.2rem;
    }

    .planning-resource-chip {
        min-width: 180px;
    }

    .ops-kpis {
        display: flex;
        gap: 0.65rem;
        margin-inline: -0.75rem;
        padding: 0 0.75rem 0.15rem;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
    }

    .ops-kpi {
        min-width: 72vw;
        min-height: 118px;
        scroll-snap-align: start;
    }

    .ops-layout {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .ops-priority-panel,
    .ops-alert-panel,
    .ops-schedule-panel,
    .ops-hours-panel,
    .ops-tasks-panel,
    .ops-feed-panel {
        grid-column: auto;
    }

    .ops-panel-head {
        display: grid;
        gap: 0.55rem;
    }

    .ops-panel-head .btn {
        width: fit-content;
    }

    .ops-project-row,
    .ops-feed-row {
        grid-template-columns: auto minmax(0, 1fr);
    }

    .ops-project-side {
        grid-column: 2;
        text-align: left;
    }

    .ops-timeline-row {
        display: grid;
        gap: 0.25rem;
    }

    .ops-timeline-row time {
        width: auto;
    }

    .ops-task-columns {
        grid-template-columns: 1fr;
    }

    .ops-project-main strong,
    .ops-task-card strong,
    .ops-feed-row strong,
    .ops-timeline-row strong,
    .ops-alert-row strong {
        white-space: normal;
    }

    .chart-box,
    .ops-chart-box {
        min-height: 220px;
    }

    .gantt-grid,
    .calendar-grid {
        min-width: 720px;
    }

    .gantt-shell,
    .calendar-shell {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 460px) {
    body.app-page {
        padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 0.45rem);
    }

    body.technician-portal-page {
        padding-bottom: calc(env(safe-area-inset-bottom) + 0.45rem);
    }

    .main-content {
        padding: 0.55rem;
    }

    .topbar-wordmark {
        max-width: 50vw;
    }

    .topbar-right > a.btn {
        display: none;
    }

    .technician-portal-page .topbar-right > a.btn {
        display: inline-flex;
    }

    .main-nav {
        grid-auto-columns: 62px;
    }

    .nav-label {
        font-size: 0.58rem;
    }

    .ops-quick-actions {
        grid-template-columns: 1fr;
    }

    .ops-kpi {
        min-width: 82vw;
    }

td {
        grid-template-columns: 1fr;
        gap: 0.22rem;
    }
}

.company-switcher select,
.company-pill {
    min-height: 38px;
    border: 1px solid var(--border-color, #d8dee4);
    border-radius: 8px;
    background: #fff;
    color: inherit;
    font: inherit;
    padding: 0 0.7rem;
}

.company-pill {
    display: inline-flex;
    align-items: center;
    font-weight: 700;
    white-space: nowrap;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.hours-timesheet-card {
    display: grid;
    gap: 0.85rem;
    overflow: hidden;
}

.hours-timesheet-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.hours-timesheet-head h2 {
    margin: 0;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.15;
}

.hours-timesheet-head p {
    margin: 0.22rem 0 0;
    color: var(--text-soft);
    font-size: 0.78rem;
}

.hours-timesheet-stats,
.hours-timesheet-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.hours-timesheet-stats {
    justify-content: flex-end;
}

.hours-timesheet-stats span,
.hours-timesheet-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.34rem;
    min-height: 30px;
    padding: 0.28rem 0.52rem;
    border: 1px solid rgba(113, 128, 150, 0.16);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.56);
    color: var(--text-soft);
    font-size: 0.72rem;
    font-weight: 760;
    line-height: 1;
}

.hours-timesheet-stats strong {
    color: var(--text);
    font-size: 0.84rem;
}

.hours-period-nav {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.65rem;
    padding: 0.72rem;
    border: 1px solid rgba(113, 128, 150, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.58);
}

.hours-period-nav > div {
    min-width: 0;
    text-align: center;
}

.hours-period-nav span,
.hours-period-nav strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hours-period-nav span {
    color: var(--text-soft);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.hours-period-nav strong {
    color: var(--text);
    font-size: 0.94rem;
}

.hours-timesheet-legend i {
    width: 0.72rem;
    height: 0.72rem;
    flex: 0 0 auto;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.hours-timesheet-wrap {
    overflow: auto;
    border: 1px solid rgba(113, 128, 150, 0.16);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.42);
}

.hours-timesheet-table {
    min-width: max(860px, calc(360px + (var(--hours-days, 7) * 86px)));
    table-layout: fixed;
}

.hours-timesheet-table th,
.hours-timesheet-table td {
    padding: 0.46rem 0.5rem;
    vertical-align: middle;
}

.hours-timesheet-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: rgba(247, 251, 251, 0.96);
    text-align: center;
}

.hours-timesheet-table thead th span,
.hours-timesheet-table thead th strong {
    display: block;
    line-height: 1;
}

.hours-timesheet-table thead th strong {
    margin-top: 0.16rem;
    color: var(--text);
    font-size: 0.78rem;
}

.hours-timesheet-table .hours-employee-col,
.hours-timesheet-table .hours-employee-cell {
    position: sticky;
    left: 0;
    z-index: 3;
    width: 210px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 1px 0 0 rgba(113, 128, 150, 0.16);
}

.hours-timesheet-table .hours-employee-col {
    z-index: 4;
    text-align: left;
}

.hours-employee-cell strong,
.hours-employee-cell small,
.hours-total-cell strong,
.hours-total-cell small,
.hours-day-cell strong,
.hours-day-cell small,
.hours-day-cell em {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hours-employee-cell strong {
    color: var(--text);
    font-size: 0.82rem;
}

.hours-employee-cell small,
.hours-total-cell small,
.hours-day-cell small,
.hours-day-cell em {
    margin-top: 0.14rem;
    color: var(--text-soft);
    font-size: 0.62rem;
    font-style: normal;
    line-height: 1.08;
}

.hours-total-cell {
    width: 78px;
    text-align: center;
}

.hours-total-cell strong,
.hours-day-cell strong {
    color: var(--text);
    font-size: 0.78rem;
    font-weight: 900;
}

.hours-total-cell.has-alerts strong {
    color: var(--danger);
}

.hours-total-cell.is-clear strong {
    color: var(--success);
}

.hours-day-cell {
    width: 86px;
    min-width: 86px;
    border-left: 1px solid rgba(113, 128, 150, 0.08);
    text-align: center;
}

.hours-day-cell.is-complete,
.hours-timesheet-legend i.is-complete {
    background: rgba(47, 128, 98, 0.14);
}

.hours-day-cell.is-partial,
.hours-timesheet-legend i.is-partial {
    background: rgba(163, 107, 33, 0.14);
}

.hours-day-cell.is-empty,
.hours-timesheet-legend i.is-empty {
    background: rgba(182, 79, 93, 0.1);
}

.hours-day-cell.is-over,
.hours-timesheet-legend i.is-over {
    background: rgba(81, 111, 157, 0.14);
}

.hours-day-cell.is-closed,
.hours-timesheet-legend i.is-closed {
    background: rgba(113, 128, 150, 0.1);
}

.hours-day-cell.is-complete strong {
    color: var(--success);
}

.hours-day-cell.is-partial strong {
    color: var(--warning);
}

.hours-day-cell.is-empty strong {
    color: var(--danger);
}

.hours-day-cell.is-over strong {
    color: var(--info);
}

.hours-day-cell.is-closed strong,
.hours-day-cell.is-closed small {
    color: rgba(113, 128, 150, 0.72);
}

.hours-timesheet-table .is-today {
    box-shadow: inset 0 0 0 2px rgba(15, 118, 110, 0.22);
}

@media (max-width: 980px) {
    .hours-timesheet-head {
        display: grid;
    }

    .hours-timesheet-stats {
        justify-content: flex-start;
    }

    .hours-period-nav {
        grid-template-columns: 1fr 1fr;
    }

    .hours-period-nav > div {
        grid-column: 1 / -1;
        order: -1;
    }

    .hours-timesheet-wrap.table-wrap {
        overflow: auto;
        border: 1px solid rgba(113, 128, 150, 0.16);
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.42);
        box-shadow: none;
        -webkit-overflow-scrolling: touch;
    }

    .hours-timesheet-table {
        display: table;
        width: 100%;
        min-width: max(860px, calc(360px + (var(--hours-days, 7) * 86px)));
    }

    .hours-timesheet-table thead {
        display: table-header-group;
    }

    .hours-timesheet-table tbody {
        display: table-row-group;
    }

    .hours-timesheet-table tr {
        display: table-row;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .hours-timesheet-table th,
    .hours-timesheet-table td {
        display: table-cell;
        width: auto;
        padding: 0.46rem 0.5rem;
        border-bottom: 1px solid rgba(113, 128, 150, 0.18);
    }

    .hours-timesheet-table td::before,
    .hours-timesheet-table th::before {
        content: none;
    }

    .hours-timesheet-table .hours-employee-col,
    .hours-timesheet-table .hours-employee-cell {
        width: 190px;
    }
}
