html {
    overflow-x: hidden;
}

[hidden] {
    display: none !important;
}

:root {
    --sidebar-width: 260px;
    --sidebar-collapsed-width: 84px;
    --planion-navy-950: #061224;
    --planion-navy-900: #0a1930;
    --planion-navy-850: #0d2340;
    --planion-text: #0b1730;
    --planion-muted: #53677f;
    --planion-surface: rgba(255, 255, 255, 0.94);
    --planion-surface-soft: rgba(246, 250, 255, 0.88);
    --planion-surface-tint: rgba(231, 241, 252, 0.76);
    --planion-border: rgba(66, 135, 196, 0.14);
    --planion-border-strong: rgba(73, 176, 244, 0.22);
    --planion-cyan: #25caff;
    --planion-cyan-soft: rgba(42, 190, 255, 0.12);
    --planion-blue: #216cff;
    --planion-violet: #7c55ff;
    --planion-radius-card: 18px;
    --planion-radius-shell: 24px;
    --planion-shadow-card: 0 18px 44px rgba(14, 33, 62, 0.11), 0 0 28px rgba(54, 182, 255, 0.045), inset 0 1px 0 rgba(255, 255, 255, 0.9);
    --planion-shadow-shell: 0 24px 60px rgba(10, 28, 57, 0.14), 0 0 44px rgba(49, 184, 255, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.78);
}

body.auth-page {
    min-height: 100vh;
    color: #e9f3ff;
    background:
        linear-gradient(rgba(20, 119, 210, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(20, 119, 210, 0.08) 1px, transparent 1px),
        radial-gradient(circle at 16% 22%, rgba(28, 197, 255, 0.2), transparent 28%),
        radial-gradient(circle at 88% 12%, rgba(60, 121, 255, 0.18), transparent 30%),
        linear-gradient(135deg, #020814 0%, #061224 46%, #081a31 100%);
    background-size: 56px 56px, 56px 56px, auto, auto, auto;
}

body.auth-page::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 12% 92%, rgba(23, 100, 255, 0.2), transparent 30%),
        radial-gradient(circle at 72% 18%, rgba(74, 210, 255, 0.12), transparent 28%),
        linear-gradient(115deg, transparent 0 42%, rgba(39, 158, 255, 0.08) 43%, transparent 54%);
    filter: blur(0.2px);
}

body.auth-page .shell.auth-shell {
    min-height: 100vh;
    background:
        linear-gradient(120deg, rgba(6, 18, 36, 0.72), rgba(4, 10, 22, 0.42)),
        transparent;
}

body.auth-page .content.auth-content {
    justify-content: center;
    min-height: 100vh;
    padding: 12px 28px;
    overflow: visible;
}

body.auth-page .content.auth-content .topbar {
    display: none;
}

body.auth-page .content.auth-content > .auth-experience {
    width: min(1420px, 100%);
    max-width: min(1420px, 100%);
}

body.auth-page .flash {
    width: min(920px, 100%);
    max-width: min(920px, 100%);
    color: #102033;
    border: 1px solid rgba(255, 255, 255, 0.24);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.24);
}

.auth-experience {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
    height: min(890px, calc(100vh - 24px));
    min-height: 650px;
    overflow: hidden;
    border: 1px solid rgba(151, 203, 255, 0.24);
    border-radius: 34px;
    background:
        radial-gradient(circle at 36% 74%, rgba(32, 182, 255, 0.1), transparent 26%),
        linear-gradient(90deg, rgba(4, 12, 28, 0.72), rgba(4, 10, 24, 0.96)),
        linear-gradient(135deg, rgba(23, 128, 255, 0.18), rgba(4, 10, 24, 0));
    box-shadow:
        0 34px 90px rgba(0, 0, 0, 0.42),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.auth-brand-panel {
    position: relative;
    min-height: 100%;
    overflow: hidden;
    border-right: 1px solid rgba(151, 203, 255, 0.14);
    background:
        radial-gradient(circle at 58% 70%, rgba(41, 195, 255, 0.16), transparent 30%),
        linear-gradient(rgba(40, 146, 255, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(40, 146, 255, 0.055) 1px, transparent 1px),
        linear-gradient(160deg, rgba(3, 12, 27, 0.08), rgba(2, 7, 18, 0.82));
    background-size: auto, 64px 64px, 64px 64px, auto;
}

.auth-brand-panel::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 58% 68%, rgba(28, 197, 255, 0.3), transparent 26%),
        radial-gradient(circle at 18% 18%, rgba(49, 139, 255, 0.22), transparent 34%);
    opacity: 0.85;
}

.auth-brand-panel::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 42%;
    background:
        radial-gradient(ellipse at 48% 100%, rgba(34, 166, 255, 0.24), transparent 58%),
        linear-gradient(180deg, transparent 0%, rgba(6, 18, 36, 0.74) 76%),
        repeating-linear-gradient(126deg, transparent 0 22px, rgba(46, 169, 255, 0.075) 23px 24px);
}

.auth-brand-panel-glow {
    position: absolute;
    left: 42%;
    bottom: 14%;
    width: 3px;
    height: 360px;
    background: linear-gradient(180deg, transparent, rgba(37, 203, 255, 0.86), transparent);
    filter: drop-shadow(0 0 20px rgba(37, 203, 255, 0.72));
}

.auth-brand-panel-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    min-height: 100%;
    gap: 22px;
    padding: 42px 72px 28px;
}

.auth-hero-brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    width: fit-content;
    color: #ffffff;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 0;
    text-shadow: 0 12px 30px rgba(0, 0, 0, 0.32);
}

.auth-hero-logo {
    display: block;
    width: 56px;
    height: 56px;
    object-fit: contain;
    filter: drop-shadow(0 16px 26px rgba(28, 143, 255, 0.28));
}

.auth-hero-copy {
    display: grid;
    gap: 13px;
    max-width: 520px;
}

.auth-eyebrow {
    margin: 0;
    color: #78d8ff;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.auth-hero-copy h1 {
    margin: 0;
    color: #ffffff;
    font-size: 52px;
    line-height: 1.04;
    letter-spacing: 0;
}

.auth-hero-copy h1 span {
    color: #34c7ff;
    text-shadow: 0 0 34px rgba(52, 199, 255, 0.38);
}

.auth-hero-copy p:not(.auth-eyebrow) {
    margin: 0;
    max-width: 420px;
    color: #b9c9dd;
    font-size: 16px;
    line-height: 1.55;
}

.auth-flow-visual {
    position: relative;
    min-height: 240px;
}

.auth-flow-visual::before {
    content: "";
    position: absolute;
    left: 35%;
    top: 16%;
    width: 270px;
    height: 220px;
    background:
        radial-gradient(circle at 50% 48%, rgba(49, 197, 255, 0.32), transparent 31%),
        repeating-radial-gradient(circle at 50% 52%, rgba(80, 184, 255, 0.24) 0 1px, transparent 1px 31px);
    filter: blur(0.2px);
    opacity: 0.8;
}

.auth-flow-visual::after {
    content: "";
    position: absolute;
    left: 38%;
    right: 18%;
    bottom: 0;
    height: 78px;
    border-radius: 50%;
    border: 1px solid rgba(50, 195, 255, 0.28);
    box-shadow: 0 0 36px rgba(33, 138, 255, 0.28), inset 0 0 30px rgba(33, 138, 255, 0.1);
}

.auth-flow-path {
    position: absolute;
    left: 34%;
    top: 4%;
    width: 330px;
    height: 230px;
    background:
        radial-gradient(circle at 48% 5%, #4be1ff 0 5px, transparent 6px),
        radial-gradient(circle at 58% 35%, #36caff 0 4px, transparent 5px),
        radial-gradient(circle at 50% 62%, #2bbcff 0 4px, transparent 5px),
        radial-gradient(circle at 56% 88%, #7772ff 0 6px, transparent 7px);
    filter: drop-shadow(0 0 14px rgba(48, 199, 255, 0.72));
}

.auth-flow-path::before,
.auth-flow-path::after {
    content: "";
    position: absolute;
    inset: 6px 36px 0 38px;
    border: 2px solid rgba(48, 202, 255, 0.6);
    border-left-color: transparent;
    border-bottom-color: transparent;
    border-radius: 46% 54% 50% 44%;
    transform: rotate(18deg);
}

.auth-flow-path::after {
    inset: 74px 26px 10px 34px;
    border-color: rgba(72, 113, 255, 0.5);
    border-right-color: transparent;
    border-top-color: transparent;
    transform: rotate(-13deg);
}

.auth-flow-card {
    position: absolute;
    z-index: 2;
    display: grid;
    grid-template-columns: auto 1fr auto;
    column-gap: 8px;
    align-items: center;
    min-width: 150px;
    padding: 10px 12px;
    border-radius: 12px;
    color: #dff6ff;
    background: rgba(8, 24, 48, 0.78);
    border: 1px solid rgba(73, 186, 255, 0.34);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28), 0 0 24px rgba(48, 160, 255, 0.13), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
}

.auth-flow-card strong,
.auth-flow-card small {
    grid-column: 2;
}

.auth-flow-card strong {
    font-size: 12px;
}

.auth-flow-card small {
    margin-top: 1px;
    color: #91a9c3;
    font-size: 10px;
}

.auth-flow-card em {
    grid-column: 3;
    grid-row: 1 / span 2;
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #dff8ff;
    font-size: 10px;
    font-style: normal;
    font-weight: 800;
    background: conic-gradient(#35d3ff 0 60%, rgba(70, 121, 172, 0.32) 60% 100%);
    box-shadow: inset 0 0 0 4px rgba(7, 21, 42, 0.92);
}

.flow-dot {
    grid-row: 1 / span 2;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    box-shadow: 0 0 16px currentColor;
}

.flow-dot.cyan {
    color: #25caff;
    background: #25caff;
}

.flow-dot.violet {
    color: #7c55ff;
    background: #7c55ff;
}

.flow-star {
    grid-row: 1 / span 2;
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: #ffffff;
    border-radius: 50%;
    background: linear-gradient(135deg, #1cc7ff, #7166ff);
    box-shadow: 0 0 22px rgba(62, 164, 255, 0.68);
}

.flow-card-kickoff {
    left: 23%;
    top: 0;
}

.flow-card-planning {
    right: 6%;
    top: 28px;
}

.flow-card-design {
    left: 30%;
    top: 78px;
    border-color: rgba(131, 89, 255, 0.42);
}

.flow-card-dev {
    right: 12%;
    top: 132px;
}

.flow-card-test {
    left: 20%;
    bottom: 32px;
    border-color: rgba(131, 89, 255, 0.42);
}

.flow-card-launch {
    left: 48%;
    bottom: 0;
}

.auth-flow-timer {
    position: absolute;
    right: 0;
    top: 88px;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 104px;
    height: 104px;
    color: #b7c9df;
    text-align: center;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(8, 20, 42, 0.94) 0 58%, transparent 59%),
        conic-gradient(#2fcaff 0 76%, #754eff 76% 91%, rgba(79, 142, 205, 0.18) 91% 100%);
    box-shadow: 0 0 36px rgba(37, 136, 255, 0.24);
}

.auth-flow-timer strong {
    color: #e9f3ff;
    font-size: 21px;
    line-height: 1;
}

.auth-flow-timer strong span {
    font-size: 12px;
}

.auth-flow-timer small {
    margin-top: -18px;
    font-size: 9px;
}

.auth-flow-chart {
    position: absolute;
    left: 0;
    bottom: 4px;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(6, 9px);
    align-items: end;
    gap: 8px;
    width: 166px;
    height: 86px;
    padding: 20px 14px 12px;
    border-radius: 14px;
    background: rgba(4, 14, 31, 0.42);
    border: 1px solid rgba(82, 158, 234, 0.12);
}

.auth-flow-chart small {
    position: absolute;
    left: 14px;
    top: 9px;
    color: #5f7791;
    font-size: 8px;
}

.auth-flow-chart span {
    height: var(--bar);
    border-radius: 999px 999px 2px 2px;
    background: linear-gradient(180deg, rgba(44, 200, 255, 0.64), rgba(31, 96, 210, 0.2));
}

.auth-feature-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 4px;
}

.auth-feature-item {
    display: grid;
    justify-items: center;
    gap: 8px;
    min-height: 86px;
    padding: 11px 12px;
    text-align: center;
    color: #9fb3ca;
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(12, 32, 62, 0.44), rgba(4, 15, 32, 0.34));
    border: 1px solid rgba(127, 195, 255, 0.18);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(12px);
}

.auth-feature-item strong {
    color: #edf8ff;
}

.auth-feature-item span:last-child {
    font-size: 13px;
    line-height: 1.4;
}

.auth-feature-icon,
.auth-field-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.auth-feature-icon {
    width: 31px;
    height: 31px;
    border-radius: 12px;
    border: 1px solid rgba(80, 202, 255, 0.48);
    background: rgba(33, 136, 255, 0.12);
}

.project-icon::before {
    content: "";
    width: 17px;
    height: 13px;
    border: 2px solid #5bd5ff;
    border-top-width: 5px;
    border-radius: 4px;
}

.time-icon::before {
    content: "";
    width: 17px;
    height: 17px;
    border: 2px solid #5bd5ff;
    border-radius: 50%;
}

.time-icon::after {
    content: "";
    position: absolute;
    width: 7px;
    height: 2px;
    background: #5bd5ff;
    transform: translate(3px, -1px) rotate(35deg);
    transform-origin: left center;
}

.ai-icon::before {
    content: "";
    width: 16px;
    height: 16px;
    border-radius: 5px;
    border: 2px solid #5bd5ff;
    box-shadow:
        -7px 0 0 -5px #5bd5ff,
        7px 0 0 -5px #5bd5ff,
        0 -7px 0 -5px #5bd5ff,
        0 7px 0 -5px #5bd5ff;
}

.auth-form-panel {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 22px;
    padding: 40px 64px;
    background:
        radial-gradient(circle at 50% 28%, rgba(45, 140, 255, 0.16), transparent 34%),
        radial-gradient(circle at 60% 76%, rgba(37, 203, 255, 0.08), transparent 30%),
        linear-gradient(180deg, rgba(3, 10, 24, 0.22), rgba(2, 7, 18, 0.46));
}

.auth-standalone-panel {
    width: min(640px, 100%);
    min-height: auto;
    padding: 0;
    background: transparent;
}

body.auth-page .auth-card {
    position: relative;
    isolation: isolate;
    width: min(540px, 100%);
    max-width: 540px;
    margin: 0;
    padding: 42px 48px 34px;
    border-radius: 28px;
    color: #e9f3ff;
    background:
        radial-gradient(circle at 50% 0%, rgba(78, 165, 255, 0.16), transparent 38%),
        linear-gradient(180deg, rgba(19, 38, 70, 0.86), rgba(8, 18, 36, 0.88)),
        rgba(8, 18, 36, 0.78);
    border: 1px solid rgba(151, 203, 255, 0.34);
    box-shadow:
        0 0 0 1px rgba(77, 197, 255, 0.08),
        0 0 54px rgba(41, 154, 255, 0.22),
        0 28px 70px rgba(0, 0, 0, 0.38),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(22px);
}

body.auth-page .auth-card::before {
    content: "";
    position: absolute;
    inset: -2px;
    z-index: -1;
    border-radius: 30px;
    background:
        linear-gradient(135deg, rgba(92, 216, 255, 0.76), rgba(104, 126, 255, 0.08) 42%, rgba(61, 202, 255, 0.52));
    opacity: 0.62;
    filter: blur(0.2px);
}

body.auth-page .auth-card::after {
    content: "";
    position: absolute;
    inset: 1px;
    z-index: -1;
    border-radius: 27px;
    box-shadow:
        inset 0 0 46px rgba(72, 165, 255, 0.16),
        0 0 70px rgba(39, 155, 255, 0.2);
}

body.auth-page .auth-card-head {
    gap: 11px;
    margin-bottom: 26px;
    text-align: center;
}

body.auth-page .auth-card-head h3 {
    color: #ffffff;
    font-size: 28px;
    line-height: 1.2;
}

body.auth-page .auth-card .muted,
body.auth-page .auth-checkbox,
body.auth-page .auth-register-note {
    color: #aebcd0;
}

.auth-login-form {
    gap: 16px;
}

.auth-field {
    display: grid;
    grid-template-columns: 22px 1fr;
    align-items: center;
    gap: 14px;
    min-height: 60px;
    padding: 0 20px;
    border-radius: 14px;
    background: rgba(20, 39, 70, 0.8);
    border: 1px solid rgba(155, 191, 230, 0.26);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.auth-field:focus-within {
    border-color: rgba(77, 205, 255, 0.74);
    background: rgba(23, 48, 84, 0.86);
    box-shadow:
        0 0 0 3px rgba(52, 199, 255, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.auth-field input {
    width: 100%;
    min-width: 0;
    padding: 0;
    color: #ffffff;
    background: transparent;
    border: 0;
    border-radius: 0;
    outline: none;
}

.auth-field input::placeholder {
    color: #8d9bb0;
}

.auth-field input::selection {
    color: #ffffff;
    background: rgba(52, 199, 255, 0.36);
}

.auth-field input:-webkit-autofill,
.auth-field input:-webkit-autofill:hover,
.auth-field input:-webkit-autofill:focus,
.auth-field input:-webkit-autofill:active {
    -webkit-text-fill-color: #ffffff;
    caret-color: #ffffff;
    box-shadow: 0 0 0 1000px rgba(20, 39, 70, 0.96) inset;
    transition: background-color 9999s ease-out, color 9999s ease-out;
}

.auth-field-icon {
    width: 22px;
    height: 22px;
    color: #b7c8df;
}

.mail-icon::before {
    content: "";
    width: 19px;
    height: 14px;
    border: 2px solid currentColor;
    border-radius: 4px;
}

.mail-icon::after {
    content: "";
    position: absolute;
    width: 13px;
    height: 13px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: translateY(-3px) rotate(-45deg);
}

.lock-icon::before {
    content: "";
    width: 17px;
    height: 13px;
    margin-top: 6px;
    border: 2px solid currentColor;
    border-radius: 4px;
}

.lock-icon::after {
    content: "";
    position: absolute;
    top: 1px;
    width: 11px;
    height: 10px;
    border: 2px solid currentColor;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
}

.auth-options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 28px;
}

body.auth-page .auth-checkbox input {
    width: 17px;
    height: 17px;
    accent-color: #34c7ff;
}

.auth-text-button {
    display: inline;
    width: auto;
    min-width: 0;
    padding: 0;
    color: #62b8ff;
    background: transparent;
    border: 0;
    border-radius: 0;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    box-shadow: none;
}

.auth-text-button:hover,
.auth-legal-links a:hover {
    color: #9be7ff;
}

.auth-submit-button {
    min-height: 58px;
    margin-top: 6px;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 800;
    background: linear-gradient(135deg, #216cff 0%, #2ecbff 100%);
    box-shadow: 0 18px 36px rgba(34, 140, 255, 0.24);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.auth-submit-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 42px rgba(34, 140, 255, 0.32);
}

.auth-submit-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    width: 100%;
    border-radius: 14px;
    color: #ffffff;
    font-weight: 800;
    background: linear-gradient(135deg, #216cff 0%, #2ecbff 100%);
    box-shadow: 0 18px 36px rgba(34, 140, 255, 0.24);
}

.auth-register-note {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin: 22px 0 0;
    font-size: 14px;
}

.auth-register-note a {
    color: #62b8ff;
    font-weight: 700;
}

.auth-register-note a:hover {
    color: #9be7ff;
}

body.auth-page .auth-language-switch {
    margin-top: 18px;
}

body.auth-page .auth-language-switch span {
    color: #aebcd0;
}

body.auth-page .auth-language-switch-buttons {
    background: rgba(155, 191, 230, 0.12);
    border: 1px solid rgba(155, 191, 230, 0.16);
}

body.auth-page .auth-language-switch-buttons button {
    width: auto;
    color: #aebcd0;
}

body.auth-page .auth-language-switch-buttons button.active {
    color: #03101f;
    background: #5bd5ff;
}

body.auth-page .auth-legal-links {
    margin: 0;
    padding-top: 4px;
}

body.auth-page .auth-legal-links a {
    color: #8fa8c4;
}

body.auth-page .app-copyright-footer {
    display: none;
    color: rgba(220, 239, 255, 0.72);
    background: rgba(5, 18, 38, 0.36);
    border-color: rgba(151, 203, 255, 0.16);
    box-shadow: none;
}

@media (min-width: 1081px) {
    body.auth-page {
        height: 100dvh;
        overflow: hidden;
    }

    body.auth-page .shell.auth-shell {
        min-height: 100dvh;
        height: 100dvh;
    }

    body.auth-page .content.auth-content {
        min-height: 100dvh;
        height: 100dvh;
        padding: 24px 32px;
        align-content: center;
        overflow: hidden;
    }

    body.auth-page .content.auth-content > .auth-experience {
        width: min(1280px, 100%);
        max-width: min(1280px, 100%);
    }

    .auth-experience {
        height: min(760px, calc(100dvh - 48px));
        min-height: 560px;
        grid-template-columns: minmax(0, 1fr) minmax(380px, 0.82fr);
        border-radius: 28px;
    }

    .auth-brand-panel-content {
        gap: 18px;
        padding: 30px 52px 24px;
    }

    .auth-hero-brand {
        font-size: 26px;
    }

    .auth-hero-logo {
        width: 48px;
        height: 48px;
    }

    .auth-hero-copy {
        gap: 10px;
    }

    .auth-hero-copy h1 {
        font-size: 42px;
        line-height: 1.02;
    }

    .auth-hero-copy p:not(.auth-eyebrow) {
        font-size: 15px;
        line-height: 1.45;
    }

    .auth-flow-visual {
        min-height: 200px;
    }

    .auth-feature-strip {
        gap: 12px;
    }

    .auth-feature-item {
        min-height: 72px;
        gap: 6px;
        padding: 9px 10px;
    }

    .auth-feature-icon {
        width: 28px;
        height: 28px;
    }

    .auth-form-panel {
        gap: 16px;
        padding: 32px 48px;
    }

    body.auth-page .auth-card {
        width: min(480px, 100%);
        max-width: 480px;
        padding: 34px 40px 28px;
        border-radius: 24px;
    }

    body.auth-page .auth-card::before {
        border-radius: 26px;
    }

    body.auth-page .auth-card::after {
        border-radius: 23px;
    }

    body.auth-page .auth-card-head {
        margin-bottom: 20px;
    }

    body.auth-page .auth-card-head h3 {
        font-size: 25px;
    }

    .auth-login-form {
        gap: 13px;
    }

    .auth-field {
        min-height: 54px;
    }

    .auth-submit-button,
    .auth-submit-link {
        min-height: 52px;
    }

    body.auth-page .auth-language-switch {
        margin-top: 14px;
    }
}

@media (max-width: 1080px) {
    body.auth-page {
        overflow: auto;
    }

    body.auth-page .shell.auth-shell,
    body.auth-page .content.auth-content {
        min-height: 100vh;
        height: auto;
        overflow: visible;
    }

    body.auth-page .content.auth-content {
        padding: 22px 18px;
    }

    body.auth-page .content.auth-content > .auth-experience,
    body.auth-page .content.auth-content > .flash {
        width: min(720px, 100%);
        max-width: min(720px, 100%);
    }

    .auth-experience {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .auth-brand-panel {
        min-height: 520px;
        border-right: 0;
        border-bottom: 1px solid rgba(151, 203, 255, 0.14);
    }

    .auth-brand-panel-content {
        padding: 34px 28px 28px;
        gap: 24px;
    }

    .auth-hero-logo {
        width: 52px;
        height: 52px;
    }

    .auth-hero-copy h1 {
        font-size: 42px;
    }

    .auth-flow-visual {
        min-height: 220px;
    }

    .auth-flow-visual {
        transform: scale(0.86);
        transform-origin: left top;
    }

    .auth-feature-strip {
        gap: 10px;
    }

    .auth-form-panel {
        padding: 28px;
    }
}

@media (max-width: 640px) {
    body.auth-page {
        overflow: auto;
    }

    body.auth-page .content.auth-content {
        display: flex;
        min-height: 100vh;
        height: auto;
        padding: 14px;
    }

    body.auth-page .content.auth-content > .auth-experience,
    body.auth-page .content.auth-content > .flash,
    body.auth-page .auth-card {
        width: 100%;
        max-width: 100%;
    }

    .auth-experience {
        border-radius: 22px;
    }

    .auth-brand-panel {
        min-height: 440px;
    }

    .auth-brand-panel-content {
        padding: 24px 20px;
    }

    .auth-hero-logo {
        width: 48px;
        height: 48px;
    }

    .auth-hero-copy {
        gap: 12px;
    }

    .auth-hero-copy h1 {
        font-size: 34px;
    }

    .auth-hero-copy p:not(.auth-eyebrow) {
        font-size: 15px;
        line-height: 1.5;
    }

    .auth-flow-visual {
        min-height: 170px;
    }

    .auth-flow-visual {
        transform: scale(0.66);
        transform-origin: left top;
    }

    .auth-flow-timer,
    .auth-flow-chart {
        display: none;
    }

    .auth-feature-strip {
        grid-template-columns: 1fr;
    }

    .auth-feature-item {
        grid-template-columns: 34px 1fr;
        justify-items: start;
        align-items: center;
        min-height: 0;
        text-align: left;
    }

    .auth-feature-item span:last-child {
        display: none;
    }

    .auth-form-panel {
        padding: 18px;
    }

    body.auth-page .auth-card {
        padding: 28px 20px 24px;
        border-radius: 20px;
    }

    .auth-options-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
    }

    .auth-register-note {
        flex-wrap: wrap;
    }
}

body {
    margin: 0;
    font-family: "Segoe UI", Tahoma, sans-serif;
    background: #f4f7fb;
    color: #1b2432;
    overflow-x: hidden;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

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

.shell {
    display: grid;
    grid-template-columns: var(--sidebar-width) 1fr;
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(31, 115, 255, 0.08), transparent 24%),
        linear-gradient(180deg, #f7f9fc 0%, #f2f5fa 100%);
    transition: grid-template-columns 0.24s ease;
}

.shell.sidebar-collapsed {
    grid-template-columns: var(--sidebar-collapsed-width) 1fr;
}

.shell.auth-shell {
    grid-template-columns: 1fr;
}

.sidebar {
    background: #ffffff;
    color: #24324a;
    padding: 24px;
    position: relative;
    z-index: 30;
    display: flex;
    flex-direction: column;
    gap: 20px;
    border-right: 1px solid rgba(36, 50, 74, 0.08);
    box-shadow: 12px 0 36px rgba(17, 37, 66, 0.05);
}

.sidebar-brand {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.sidebar-brand-mark {
    flex: 1 1 auto;
    padding: 14px 16px;
    border-radius: 20px;
    background: linear-gradient(180deg, #ffffff 0%, #f5f8ff 100%);
    border: 1px solid rgba(36, 50, 74, 0.08);
    box-shadow: 0 16px 30px rgba(17, 37, 66, 0.08);
}

.sidebar-brand-logo {
    display: block;
    width: 100%;
    height: 62px;
    object-fit: contain;
    object-position: left center;
}

.sidebar-brand-lockup {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    color: #1d2b3f;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 0;
}

.sidebar-brand-lockup .sidebar-brand-logo {
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.nav-groups {
    gap: 14px;
}

.nav-group {
    display: grid;
    gap: 10px;
}

.nav-group-summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 4px 2px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #7a8aa2;
    cursor: pointer;
}

.nav-group-summary::-webkit-details-marker {
    display: none;
}

.nav-group-summary::after {
    content: "";
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-right: 2px solid #9aabc3;
    border-bottom: 2px solid #9aabc3;
    transform: rotate(45deg);
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.nav-group[open] > .nav-group-summary::after {
    transform: rotate(225deg);
    border-color: #2561d7;
}

.nav-group-links {
    display: grid;
    gap: 10px;
}

.nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f6f8fc;
    border: 1px solid rgba(36, 50, 74, 0.04);
    color: #385074;
    font-weight: 600;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.nav-link-label {
    margin-right: auto;
}

.nav-link-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    background: rgba(37, 97, 215, 0.12);
    color: #1b4fbf;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

.nav a.active,
.nav a:hover {
    background: linear-gradient(135deg, #eef4ff 0%, #ffffff 100%);
    color: #1b3f8b;
    box-shadow: 0 12px 24px rgba(17, 37, 66, 0.08);
    transform: translateX(2px);
}

.nav-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(30, 117, 255, 0.1), rgba(75, 142, 255, 0.16));
    color: #2561d7;
    font-size: 15px;
    line-height: 1;
    flex: 0 0 auto;
}

.mobile-menu-toggle {
    display: none;
    width: 44px;
    min-width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 12px;
    border: 1px solid rgba(36, 50, 74, 0.08);
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(17, 37, 66, 0.08);
}

.mobile-menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    border-radius: 999px;
    background: #24324a;
}

.sidebar-collapse-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    min-width: 38px;
    height: 38px;
    padding: 0;
    border-radius: 12px;
    border: 1px solid rgba(36, 50, 74, 0.08);
    background: #ffffff;
    color: #24324a;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(17, 37, 66, 0.08);
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.sidebar-collapse-toggle:hover {
    transform: translateY(-1px);
}

.sidebar-collapse-toggle span {
    width: 11px;
    height: 11px;
    border-left: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 0.18s ease;
}

.shell.sidebar-collapsed .sidebar-collapse-toggle span {
    transform: rotate(225deg);
}

.shell.sidebar-collapsed .sidebar {
    padding-inline: 16px;
}

.shell.sidebar-collapsed .sidebar-brand {
    justify-content: center;
}

.shell.sidebar-collapsed .sidebar-brand-mark {
    flex: 0 0 auto;
    padding: 8px 0;
}

.shell.sidebar-collapsed .sidebar-brand-lockup {
    justify-content: center;
}

.shell.sidebar-collapsed .sidebar-brand-lockup span,
.shell.sidebar-collapsed .nav-group-summary,
.shell.sidebar-collapsed .nav a span:not(.nav-link-icon) {
    display: none;
}

.shell.sidebar-collapsed .nav,
.shell.sidebar-collapsed .nav-groups,
.shell.sidebar-collapsed .nav-group,
.shell.sidebar-collapsed .nav-group-links {
    align-items: center;
}

.shell.sidebar-collapsed .nav-group-links {
    gap: 12px;
}

.shell.sidebar-collapsed .nav a {
    width: 48px;
    height: 48px;
    justify-content: center;
    padding: 0;
    border-radius: 16px;
}

.shell.sidebar-collapsed .nav a:hover {
    transform: translateX(0) translateY(-1px);
}

.shell.sidebar-collapsed .nav a {
    position: relative;
}

.shell.sidebar-collapsed .nav a:hover::after {
    content: attr(data-label);
    position: absolute;
    left: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%);
    background: #24324a;
    color: #ffffff;
    padding: 6px 10px;
    border-radius: 8px;
    white-space: nowrap;
    font-size: 12px;
    font-weight: 600;
    z-index: 2000;
    pointer-events: none;
    box-shadow: 0 8px 20px rgba(17, 37, 66, 0.16);
}

.shell.sidebar-collapsed .nav a:hover::before {
    content: "";
    position: absolute;
    left: calc(100% + 4px);
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    background: #24324a;
    z-index: 1999;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
    pointer-events: none;
}

.content {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: 28px 32px;
}

.content.auth-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
}

.content.auth-content .topbar {
    width: min(340px, 100%);
    margin-bottom: 18px;
    padding: 0;
}

.content.auth-content .topbar-brand {
    width: 100%;
    justify-content: center;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.content.auth-content > * {
    width: min(360px, 100%);
    max-width: 100%;
}

.content.auth-content .auth-card {
    width: min(340px, 100%);
}

.site-footer {
    display: flex;
    justify-content: center;
    gap: 18px;
    padding: 0 28px 24px;
    font-size: 14px;
    color: #718097;
}

.site-footer a {
    color: #4b6388;
}

.site-footer a:hover {
    color: #1b2432;
}

.topbar {
    margin-bottom: 20px;
    width: 100%;
    padding: 8px 4px 18px;
}

.topbar-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    justify-content: space-between;
    padding: 14px 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(31, 48, 79, 0.08);
    box-shadow: 0 10px 24px rgba(17, 37, 66, 0.06);
}

.topbar-welcome {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    flex: 1 1 auto;
}

.topbar-avatar {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    font-size: 20px;
    font-weight: 700;
    color: #123a78;
    background: linear-gradient(180deg, #eef5ff, #dfeeff);
    border: 1px solid rgba(46, 99, 230, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
    overflow: hidden;
}

.topbar-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.topbar-welcome-copy {
    min-width: 0;
}

.topbar-welcome-copy h2,
.topbar-company-copy strong {
    margin: 0;
}

.topbar-welcome-copy p,
.topbar-company-copy p {
    margin: 4px 0 0;
}

.topbar-request-alert {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    margin-top: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    color: #7a4a00;
    background: #fff0cf;
    border: 1px solid rgba(255, 179, 71, 0.46);
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.topbar-request-alert span {
    display: grid;
    place-items: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    color: #ffffff;
    background: #e67a1f;
}

.topbar-company-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    justify-content: flex-end;
    flex: 0 0 auto;
    margin-left: auto;
}

.topbar-company-copy {
    text-align: right;
}

.settings-avatar-row {
    display: flex;
    align-items: center;
    gap: 18px;
    margin-bottom: 22px;
    padding: 16px 18px;
    border-radius: 20px;
    background: linear-gradient(180deg, #f8fbff, #ffffff);
    border: 1px solid rgba(31, 48, 79, 0.08);
}

.settings-avatar-preview {
    width: 88px;
    height: 88px;
    flex: 0 0 auto;
}

.settings-avatar-image,
.settings-avatar-fallback {
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.settings-avatar-image {
    display: block;
    object-fit: cover;
    border: 1px solid rgba(31, 48, 79, 0.08);
    box-shadow: 0 10px 24px rgba(17, 37, 66, 0.08);
}

.settings-avatar-fallback {
    display: grid;
    place-items: center;
    font-size: 30px;
    font-weight: 700;
    color: #123a78;
    background: linear-gradient(180deg, #eef5ff, #dfeeff);
    border: 1px solid rgba(46, 99, 230, 0.16);
}

.settings-avatar-actions {
    min-width: 0;
    flex: 1 1 auto;
    display: grid;
    gap: 10px;
}

.settings-outlook-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 20px;
    background: linear-gradient(180deg, #f8fbff, #ffffff);
    border: 1px solid rgba(31, 48, 79, 0.08);
}

.topbar-company-logo-wrap {
    width: 72px;
    height: 72px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    padding: 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(24, 34, 41, 0.08);
    box-shadow: 0 12px 28px rgba(18, 32, 41, 0.08);
}

.topbar-company-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.muted {
    color: #5e6a70;
}

.panel,
.auth-card,
.stat-card,
.project-card,
.task-card {
    background: #ffffff;
    border: 1px solid rgba(31, 48, 79, 0.08);
    border-radius: 22px;
    box-shadow: 0 14px 32px rgba(17, 37, 66, 0.08);
}

.panel,
.auth-card {
    padding: 20px;
}

.auth-topbar {
    display: grid;
    justify-items: center;
    gap: 0;
    text-align: center;
    width: 100%;
}

.auth-brand-logo {
    display: block;
    width: min(300px, 100%);
    height: 84px;
    object-fit: contain;
    object-position: center;
    margin: 0 auto;
}

.auth-language-switch {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
}

.auth-language-switch span {
    font-size: 13px;
}

.auth-language-switch-buttons {
    display: inline-flex;
    padding: 3px;
    border-radius: 999px;
    background: rgba(18, 32, 41, 0.08);
}

.auth-language-switch-buttons button {
    border: 0;
    background: transparent;
    color: #395364;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.auth-language-switch-buttons button.active {
    background: #122029;
    color: #fff;
}

.client-status-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(79, 157, 135, 0.14), transparent 28%),
        linear-gradient(180deg, #f5efe6 0%, #edf4f0 100%);
}

.client-status-shell {
    width: min(1040px, calc(100% - 32px));
    margin: 0 auto;
    padding: 46px 0 64px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.app-copyright-footer {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 140px;
    padding: 7px 14px;
    margin: auto auto 0;
    text-align: center;
    font-size: 12px;
    color: #6b778c;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(36, 50, 74, 0.1);
    border-radius: 999px;
    box-shadow: 0 10px 24px rgba(18, 32, 41, 0.08);
    backdrop-filter: blur(8px);
    align-self: center;
}

.content > .app-copyright-footer {
    margin-top: 24px;
}

.client-status-shell > .app-copyright-footer {
    margin-top: 28px;
}

.client-status-panel {
    display: grid;
    gap: 22px;
    padding: 28px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 249, 247, 0.94)),
        radial-gradient(circle at bottom left, rgba(79, 157, 135, 0.08), transparent 30%);
    border-radius: 28px;
    box-shadow:
        0 30px 80px rgba(18, 32, 41, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.client-status-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.9fr);
    gap: 28px;
    padding: 28px;
    border-radius: 28px;
    background:
        radial-gradient(circle at top right, rgba(79, 157, 135, 0.18), transparent 38%),
        radial-gradient(circle at left center, rgba(215, 108, 61, 0.08), transparent 26%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.97), rgba(241, 247, 244, 0.94));
    border: 1px solid rgba(24, 34, 41, 0.08);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.68),
        0 16px 36px rgba(18, 32, 41, 0.08);
}

.client-status-hero-copy {
    display: grid;
    gap: 14px;
    align-content: start;
}

.client-status-title {
    margin: 0;
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.02;
    letter-spacing: -0.03em;
}

.client-status-description {
    margin: 0;
    max-width: 56ch;
}

.client-status-description {
    color: #5e6a70;
    font-size: 15px;
}

.client-status-state {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(79, 157, 135, 0.1);
    color: #1f5c4e;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.client-status-hero-side {
    display: grid;
    gap: 16px;
    align-content: start;
    justify-items: stretch;
}

.client-status-progress-card {
    display: grid;
    gap: 10px;
    padding: 22px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(24, 34, 41, 0.08);
    box-shadow: 0 14px 30px rgba(18, 32, 41, 0.08);
}

.client-status-progress-card strong {
    font-size: 42px;
    line-height: 1;
    letter-spacing: -0.04em;
}

.client-status-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 132px;
    height: 80px;
    margin-bottom: 4px;
    padding: 12px 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(24, 34, 41, 0.08);
    box-shadow: 0 18px 42px rgba(18, 32, 41, 0.1);
}

.client-status-brand-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.client-status-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.client-status-summary-grid .stat-card {
    position: relative;
    overflow: hidden;
    padding: 22px 20px;
    min-height: 116px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 248, 0.9));
}

.client-status-summary-grid .stat-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, rgba(215, 108, 61, 0.82), rgba(79, 157, 135, 0.82));
}

.client-status-summary-grid .stat-card strong {
    font-size: 32px;
    letter-spacing: -0.03em;
}

.client-status-summary-grid .stat-card span {
    font-size: 15px;
    color: #42555d;
}

.client-status-progress {
    height: 12px;
    margin: 0;
}

.client-status-stack {
    display: grid;
    gap: 16px;
}

.client-status-milestone-grid,
.client-update-grid {
    display: grid;
    gap: 12px;
}

.client-status-card {
    background: rgba(247, 250, 248, 0.88);
    border: 1px solid rgba(24, 34, 41, 0.08);
    border-radius: 20px;
    padding: 20px;
    display: grid;
    gap: 12px;
    box-shadow: 0 10px 24px rgba(18, 32, 41, 0.04);
}

.client-status-card p,
.client-status-card .muted {
    margin: 0;
}

.client-status-card .task-meta {
    justify-content: flex-start;
    gap: 14px;
}

.client-status-update-body {
    margin: 0;
    color: #223038;
    white-space: pre-wrap;
    line-height: 1.65;
}

.client-status-milestone-grid .client-status-card,
.client-update-grid .client-status-card {
    background: rgba(255, 255, 255, 0.9);
}

.client-update-grid .client-status-card {
    position: relative;
    padding-left: 24px;
}

.client-update-grid .client-status-card::before {
    content: "";
    position: absolute;
    left: 12px;
    top: 20px;
    bottom: 20px;
    width: 3px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(215, 108, 61, 0.85), rgba(79, 157, 135, 0.65));
}

.client-status-stack > .client-status-card:first-child {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 248, 0.9));
}

.client-share-panel {
    background:
        radial-gradient(circle at top right, rgba(79, 157, 135, 0.12), transparent 24%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 248, 0.92));
}

.client-share-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.client-share-link-input {
    font-family: Consolas, "Courier New", monospace;
    font-size: 13px;
}

.client-update-list {
    display: grid;
    gap: 10px;
    max-height: 320px;
    overflow-y: auto;
    padding-right: 4px;
}

.client-update-card {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(24, 34, 41, 0.08);
    border-radius: 14px;
    padding: 14px;
    display: grid;
    gap: 10px;
}

.client-update-card p {
    margin: 0;
    white-space: pre-wrap;
}

.client-share-empty {
    margin: 0;
}

@media (max-width: 860px) {
    .client-status-shell {
        width: min(100%, calc(100% - 20px));
        padding: 20px 0 36px;
    }

    .client-status-panel {
        padding: 18px;
    }

    .client-status-hero {
        grid-template-columns: 1fr;
        padding: 18px;
        gap: 18px;
    }

    .client-status-title {
        font-size: 30px;
    }

    .client-status-progress-card strong {
        font-size: 34px;
    }
}

.compact {
    padding: 16px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.stats-command-center {
    display: grid;
    gap: 18px;
    margin-bottom: 20px;
}

.stats-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(140px, 1fr));
    gap: 14px;
}

.stats-signal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    align-items: start;
}

.compact-signal-list {
    gap: 8px;
}

.compact-signal-list .planning-item {
    padding: 11px 12px;
}

.stats-mini-metrics {
    display: grid;
    gap: 10px;
}

.stats-mini-metrics article {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(24, 34, 41, 0.06);
}

.stats-mini-metrics strong {
    font-size: 24px;
    color: #08172c;
}

.stats-mini-metrics span {
    color: #465b74;
    text-align: right;
}

.chart-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.capacity-planner-form {
    display: grid;
    grid-template-columns: 190px 170px 170px max-content;
    gap: 14px;
    align-items: end;
    margin-top: 18px;
    justify-content: flex-start;
    width: 100%;
}

.capacity-planner-form label {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.capacity-planner-form input[type="date"],
.capacity-planner-form input[type="number"] {
    width: 100%;
    min-width: 0;
}

.capacity-planner-form button {
    width: auto;
    min-width: 160px;
}

.capacity-planner-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-top: 20px;
}

.capacity-planner-card {
    padding: 20px;
    display: grid;
    gap: 14px;
}

.capacity-fit-note {
    margin: 0;
}

.capacity-timeline-panel {
    margin-top: 20px;
    overflow: hidden;
}

.capacity-timeline-scroll {
    margin-top: 16px;
    overflow-x: hidden;
    overflow-y: auto;
    max-width: 100%;
    max-height: 70vh;
}

.capacity-timeline-grid {
    display: grid;
    grid-template-columns: minmax(104px, 124px) repeat(var(--capacity-days, 14), minmax(0, 1fr));
    gap: 4px;
    align-items: stretch;
    width: 100%;
    min-width: 100%;
}

.capacity-timeline-header,
.capacity-timeline-person,
.capacity-day-cell {
    min-height: 64px;
    border-radius: 10px;
    border: 1px solid rgba(24, 34, 41, 0.08);
    background: rgba(255, 255, 255, 0.72);
}

.capacity-timeline-header {
    display: grid;
    place-items: center;
    gap: 2px;
    padding: 7px 3px;
    font-size: 10px;
    color: #415159;
    position: sticky;
    top: 0;
    z-index: 3;
}

.capacity-timeline-header strong {
    font-size: 11px;
    color: #223038;
}

.capacity-timeline-header small {
    font-size: 9px;
    line-height: 1;
    color: #d76c3d;
    font-weight: 800;
    text-transform: uppercase;
}

.capacity-timeline-sticky {
    position: sticky;
    left: 0;
    z-index: 2;
    box-shadow: 6px 0 14px rgba(18, 32, 41, 0.04);
}

.capacity-timeline-header.capacity-timeline-sticky {
    z-index: 5;
}

.capacity-timeline-person {
    display: grid;
    align-content: center;
    gap: 4px;
    padding: 8px;
    min-width: 0;
}

.capacity-day-cell {
    display: grid;
    gap: 8px;
    align-content: center;
    padding: 7px 3px;
    text-align: center;
    min-width: 0;
}

.capacity-day-track {
    position: relative;
    height: 8px;
    border-radius: 999px;
    background: #e4ece8;
    overflow: hidden;
}

.capacity-day-fill {
    position: absolute;
    inset: 0 auto 0 0;
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #d76c3d, #4f9d87);
}

.capacity-day-fill-calendar {
    background: linear-gradient(90deg, #f0b36d, #d76c3d);
    opacity: 0.95;
    z-index: 1;
}

.capacity-day-fill-work {
    background: linear-gradient(90deg, #d76c3d, #4f9d87);
    z-index: 2;
}

.capacity-day-value {
    font-size: 11px;
    font-weight: 700;
    color: #223038;
}

@media (min-width: 1280px) {
    .capacity-timeline-grid {
        gap: 5px;
    }
}

.capacity-day-note {
    font-size: 10px;
    line-height: 1.15;
    color: #4d6472;
    font-weight: 600;
}

.capacity-day-cell.is-unavailable,
.capacity-timeline-header.is-weekend,
.capacity-day-cell.is-weekend {
    background: rgba(235, 239, 241, 0.78);
}

.capacity-timeline-header.is-week-start,
.capacity-day-cell.is-week-start {
    border-left: 3px solid rgba(215, 108, 61, 0.56);
}

.capacity-day-cell.is-unavailable .capacity-day-track,
.capacity-day-cell.is-weekend .capacity-day-track {
    background: rgba(24, 34, 41, 0.08);
}

.capacity-day-cell.is-unavailable .capacity-day-note {
    color: #8d4f3f;
}

@media (max-width: 1200px) {
    .capacity-planner-form {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    }

    .capacity-planner-form button {
        min-width: 0;
    }
}

.chart-card {
    display: grid;
    gap: 14px;
}

.donut-wrap {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 16px;
    align-items: center;
}

.donut-chart {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    position: relative;
}

.donut-chart::after {
    content: "";
    position: absolute;
    inset: 18px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
}

.donut-chart span {
    position: relative;
    z-index: 1;
    font-weight: 700;
    font-size: 22px;
}

.chart-legend {
    display: grid;
    gap: 8px;
}

.legend-row,
.mini-bar-row,
.compare-row {
    display: grid;
    gap: 8px;
    align-items: center;
}

.legend-row {
    grid-template-columns: 1fr auto;
}

.legend-key {
    display: inline-flex;
    gap: 8px;
    align-items: center;
}

.legend-key i {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.mini-bars,
.compare-chart {
    display: grid;
    gap: 10px;
}

.mini-bar-row {
    grid-template-columns: 96px 1fr auto;
}

.mini-bar-label {
    font-size: 13px;
    font-weight: 600;
    color: #314148;
}

.mini-bar-track,
.compare-track {
    height: 10px;
    background: #e4ece8;
    border-radius: 999px;
    overflow: hidden;
}

.mini-bar-fill,
.compare-fill {
    height: 100%;
    border-radius: 999px;
}

.mini-bar-fill {
    background: linear-gradient(90deg, #d76c3d, #4f9d87);
}

.mini-bar-value,
.compare-values {
    font-size: 12px;
    color: #5e6a70;
}

.line-chart-wrap {
    display: grid;
    gap: 8px;
}

.line-chart {
    width: 100%;
    height: 120px;
    background: linear-gradient(180deg, rgba(215, 108, 61, 0.08), rgba(79, 157, 135, 0.04));
    border-radius: 14px;
}

.line-labels {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    font-size: 12px;
    color: #5e6a70;
    text-align: center;
}

.compare-row {
    grid-template-columns: 96px 1fr auto;
}

.compare-bars {
    display: grid;
    gap: 6px;
}

.compare-fill.estimate {
    background: #d9b44a;
}

.compare-fill.tracked {
    background: #4f9d87;
}

.compare-values {
    display: grid;
    gap: 2px;
    white-space: nowrap;
}

.dashboard-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.planning-panel {
    margin: 20px 0;
}

.planning-grid {
    margin-top: 18px;
}

.planning-list {
    display: grid;
    gap: 10px;
}

.planning-item {
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(24, 34, 41, 0.06);
    border-radius: 14px;
    padding: 12px;
    display: grid;
    gap: 10px;
}

.weekly-workload-item {
    gap: 14px;
}

.weekly-workload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.timesheet-planning-strip {
    margin-top: 14px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.planning-chip-card {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(24, 34, 41, 0.06);
    border-radius: 14px;
    padding: 12px 14px;
    display: grid;
    gap: 4px;
}

.planning-chip-card strong {
    font-size: 22px;
}

.stat-card {
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-card strong {
    font-size: 28px;
}

.panel-head,
.project-card-row,
.task-actions,
.project-meta,
.inline-fields,
.task-meta,
.right-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.admin-tabs-panel {
    position: sticky;
    top: 12px;
    z-index: 20;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    justify-content: flex-start;
    padding: 10px;
}

.admin-tabs-panel button {
    width: auto;
    min-height: 38px;
    flex: 0 0 auto;
    border: 1px solid rgba(24, 34, 41, 0.12);
    border-radius: 8px;
    background: #f5f7f8;
    color: #2d3a42;
    padding: 9px 12px;
    font-weight: 800;
    cursor: pointer;
}

.admin-tabs-panel button:hover,
.admin-tabs-panel button.active,
.admin-tabs-panel button[aria-selected="true"] {
    border-color: rgba(31, 107, 255, 0.28);
    background: #eaf1ff;
    color: #12356f;
}

.project-list,
.task-list,
.split {
    display: grid;
    gap: 16px;
}

.project-kanban-title {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.project-kanban-title strong {
    line-height: 1.2;
}

.project-kanban-title h4 {
    margin: 0;
}

.project-kanban-title a {
    width: fit-content;
    color: #53677f;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.project-kanban-title a:hover {
    color: #1664d9;
}

.project-client-line {
    display: block;
    width: fit-content;
    margin-top: 3px;
    color: #53677f;
    font-size: 12px;
    font-weight: 700;
}

.task-list {
    gap: 10px;
}

.split {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin: 20px 0;
}

.project-card,
.task-card {
    padding: 16px;
}

.compact-list-panel {
    padding: 16px;
}

.compact-task {
    padding: 0;
    overflow: hidden;
}

.task-list .compact-task {
    display: grid;
    gap: 0;
}

.task-list .compact-task > * {
    padding-left: 18px;
    padding-right: 18px;
}

.task-list .compact-task > .project-card-row {
    padding-top: 18px;
}

.task-list .compact-task > .pill-row,
.task-list .compact-task > p {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 8px;
}

.task-list .compact-task > .task-actions {
    padding-top: 14px;
    padding-bottom: 18px;
}

.compact-task form {
    display: grid;
    gap: 10px;
}

.task-editor-accordion {
    display: grid;
}

.task-editor-summary {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 18px 20px;
    cursor: pointer;
}

.task-editor-summary::-webkit-details-marker {
    display: none;
}

.task-editor-summary::after {
    content: "";
    width: 10px;
    height: 10px;
    margin-left: auto;
    border-right: 2px solid #718097;
    border-bottom: 2px solid #718097;
    transform: rotate(45deg);
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.task-editor-accordion[open] > .task-editor-summary::after {
    transform: rotate(225deg);
    border-color: #2561d7;
}

.task-editor-summary-title {
    font-size: 16px;
    line-height: 1.35;
}

.task-editor-body {
    padding: 0 20px 20px;
}

.compact-task-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.compact-title {
    font-weight: 600;
    padding: 9px 10px;
}

.compact-description {
    min-height: 54px;
    padding: 9px 10px;
}

.compact-meta {
    font-size: 13px;
    white-space: nowrap;
}

.task-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.task-support-card {
    background: linear-gradient(180deg, #fbfcff 0%, #f5f8fd 100%);
    border: 1px solid rgba(31, 48, 79, 0.08);
    border-radius: 18px;
    padding: 14px;
    display: grid;
    gap: 10px;
}

.ownership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.ownership-stat {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #ffffff;
    border: 1px solid rgba(31, 48, 79, 0.06);
}

.ownership-stat strong {
    font-size: 14px;
}

.activity-list {
    display: grid;
    gap: 10px;
}

.activity-item {
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(24, 34, 41, 0.06);
}

.activity-item.warning {
    border-color: rgba(171, 59, 59, 0.22);
    background: rgba(255, 244, 242, 0.9);
}

.activity-item.positive {
    border-color: rgba(79, 157, 135, 0.22);
    background: rgba(241, 249, 245, 0.92);
}

.activity-item p {
    margin: 0;
}

.subtask-list,
.comment-list,
.notification-list,
.search-results {
    display: grid;
    gap: 10px;
}

.subtask-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 8px;
    align-items: center;
}

.subtask-toggle {
    width: auto;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(24, 34, 41, 0.12);
    background: #eef3ef;
    color: #314148;
    font-size: 12px;
}

.subtask-toggle.done {
    background: #dceee6;
    color: #1c5d49;
}

.subtask-text.done {
    text-decoration: line-through;
    color: #6b777d;
}

.inline-stack {
    display: grid;
    gap: 8px;
}

.comment-item,
.notification-card,
.search-result-card {
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(24, 34, 41, 0.08);
    border-radius: 14px;
    padding: 12px;
}

.comment-item p,
.notification-card p,
.search-result-card p {
    margin: 0;
}

.notification-card.unread {
    border-color: rgba(215, 108, 61, 0.4);
    box-shadow: inset 3px 0 0 #d76c3d;
}

.notification-card .task-actions {
    margin-top: 10px;
}

.notification-card .small-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 13px;
    border-radius: 12px;
    text-decoration: none;
    line-height: 1;
    border: 1px solid rgba(24, 34, 41, 0.14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.64), 0 8px 18px rgba(17, 37, 66, 0.08);
}

.notification-card a.small-btn.secondary {
    color: #17324f;
    background: rgba(231, 241, 252, 0.96);
    border-color: rgba(66, 135, 196, 0.24);
}

.notification-card a.small-btn.secondary:hover {
    color: #0f3a68;
    background: #dff2ff;
    border-color: rgba(42, 190, 255, 0.42);
}

.search-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
}

.project-dashboard-toolbar {
    grid-template-columns: minmax(240px, 1fr) repeat(4, minmax(160px, 220px)) auto;
    align-items: center;
}

.project-dashboard-toolbar select {
    min-width: 180px;
}

.project-dashboard-toolbar .small-btn {
    width: auto;
    min-width: 96px;
    justify-self: start;
    padding-inline: 18px;
}

.project-index-shell {
    display: grid;
    gap: 14px;
}

.project-index-shell > .panel-head {
    margin-bottom: 0;
}

.project-index-head {
    align-items: center;
    gap: 14px;
}

.project-index-titleline {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 10px 14px;
    min-width: 0;
}

.project-index-titleline h3 {
    margin: 0;
}

.project-view-switch {
    margin-top: 0;
    margin-left: auto;
    flex-shrink: 0;
}

@media (max-width: 640px) {
    .project-index-head {
        align-items: flex-start;
    }

    .project-view-switch {
        margin-left: 0;
    }
}

.project-index-item {
    border-radius: 20px;
    padding: 18px 20px;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.project-index-item:hover {
    transform: translateY(-2px);
    border-color: rgba(37, 97, 215, 0.16);
    box-shadow: 0 18px 34px rgba(17, 37, 66, 0.1);
}

.project-index-item h4 {
    margin: 0;
}

.project-create-panel {
    margin-top: 10px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.project-create-form {
    display: grid;
    gap: 14px;
}

.calendar-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.calendar-hero,
.timesheet-hero {
    background:
        radial-gradient(circle at top right, rgba(215, 108, 61, 0.16), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(244, 248, 246, 0.92));
}

.calendar-hero-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.calendar-hero-top p {
    margin: 6px 0 0;
    max-width: 620px;
}

.meeting-client-field {
    position: relative;
}

.meeting-client-field input[type="search"] {
    padding-right: 36px;
}

.meeting-client-field::after {
    content: "\f002";
    position: absolute;
    right: 13px;
    bottom: 13px;
    color: #8a98a8;
    font-family: "Font Awesome 6 Free";
    font-size: 13px;
    font-weight: 900;
    pointer-events: none;
}

.calendar-summary-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.calendar-metric {
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid rgba(24, 34, 41, 0.08);
    border-radius: 16px;
    padding: 14px;
    display: grid;
    gap: 4px;
}

.calendar-metric strong {
    font-size: 24px;
}

.calendar-metric span {
    color: #5e6a70;
    font-size: 13px;
}

.calendar-board-panel {
    position: relative;
    overflow: hidden;
}

.calendar-grid {
    display: grid !important;
    grid-template-columns: repeat(var(--calendar-days, 7), minmax(0, 1fr));
    gap: 12px;
}

.calendar-weekdays {
    margin-bottom: 10px;
}

.calendar-weekday {
    padding: 0 4px;
    font-size: 12px;
    font-weight: 700;
    color: #5e6a70;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.calendar-cell {
    min-height: 210px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 249, 247, 0.86));
    border: 1px solid rgba(24, 34, 41, 0.08);
    border-radius: 16px;
    padding: 12px;
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 10px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.calendar-cell.outside-month {
    opacity: 0.55;
}

.calendar-cell.today {
    border-color: rgba(215, 108, 61, 0.45);
    box-shadow: inset 0 0 0 1px rgba(215, 108, 61, 0.25);
}

.calendar-cell-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.calendar-day-number {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #edf2ef;
    font-weight: 700;
}

.calendar-day-count {
    min-width: 28px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(24, 34, 41, 0.08);
    color: #314148;
    font-size: 12px;
    text-align: center;
}

.calendar-task-list {
    display: grid;
    gap: 8px;
    align-content: start;
    min-height: 0;
    overflow: visible;
}

.calendar-task-chip {
    display: grid;
    gap: 2px;
    min-height: 64px;
    height: auto;
    margin: 0;
    overflow: visible;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(24, 34, 41, 0.08);
    background: rgba(245, 248, 246, 0.96);
    transition: transform 140ms ease, box-shadow 140ms ease;
    font-size: 12px;
    line-height: 1.25;
    text-decoration: none;
}

.calendar-chip-title {
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.calendar-task-chip small {
    color: #5e6a70;
    font-size: 11px;
}

.calendar-chip-meta {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
}

.calendar-chip-context {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.calendar-chip-context::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    flex: 0 0 auto;
}

.calendar-chip-context.task {
    color: #4b647a;
}

.calendar-chip-context.task::before {
    background: #577590;
}

.calendar-chip-context.project {
    color: #9b4b2a;
    font-weight: 700;
}

.calendar-chip-context.project::before {
    background: #d76c3d;
}

.calendar-task-chip.calendar-absence-chip {
    display: flex;
    align-items: center;
    gap: 7px;
    min-height: 34px;
    height: auto;
    padding: 7px 9px;
    border-radius: 999px;
    background: #fff5df;
    color: #7a4a00;
    cursor: default;
}

.calendar-absence-chip .calendar-chip-title {
    flex: 1 1 auto;
    max-width: none;
    font-size: 11px;
    -webkit-line-clamp: 1;
}

.calendar-absence-chip .calendar-chip-meta {
    min-width: 0;
}

.calendar-chip-context.absence {
    color: #7a4a00;
    font-size: 10px;
}

.calendar-chip-context.absence::before {
    background: #e0a23c;
}

.calendar-task-chip.calendar-event-chip {
    min-height: 46px;
    padding: 9px 11px;
    border-left: 4px solid #3d8fb8;
    background: linear-gradient(135deg, rgba(61, 143, 184, 0.13), rgba(255, 255, 255, 0.96));
    color: #153649;
    cursor: default;
}

.calendar-task-chip.calendar-event-chip.is-absence {
    border-left-color: #e0a23c;
    background: linear-gradient(135deg, rgba(224, 162, 60, 0.16), rgba(255, 255, 255, 0.96));
}

.calendar-chip-context.event {
    color: #345c72;
}

.calendar-chip-context.event::before {
    background: #3d8fb8;
}

.calendar-event-chip.is-absence .calendar-chip-context.event::before {
    background: #e0a23c;
}

.calendar-chip-meta span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.calendar-task-chip:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(18, 32, 41, 0.08);
}

.calendar-task-chip.todo {
    border-left: 4px solid #577590;
}

.calendar-task-chip.progress {
    border-left: 4px solid #4f9d87;
}

.calendar-task-chip.blocked {
    border-left: 4px solid #ab3b3b;
}

.calendar-task-chip.done {
    border-left: 4px solid #8aa29e;
}

.calendar-task-chip.project-deadline {
    background: linear-gradient(135deg, rgba(215, 108, 61, 0.12), rgba(255, 255, 255, 0.95));
    border-left-color: #d76c3d;
}

.calendar-more {
    font-size: 12px;
}

.calendar-empty-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(24, 34, 41, 0.14);
    margin-top: 6px;
}

.calendar-empty-state {
    margin-top: 16px;
    padding: 18px 20px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(245, 248, 246, 0.95), rgba(255, 255, 255, 0.9));
    border: 1px dashed rgba(24, 34, 41, 0.14);
    text-align: center;
}

.timesheet-filter {
    margin-bottom: 18px;
}

.timesheet-days,
.timesheet-entry-list {
    display: grid;
    gap: 12px;
}

.timesheet-day-card {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(245, 248, 246, 0.88));
    border: 1px solid rgba(24, 34, 41, 0.08);
    border-radius: 14px;
    padding: 14px;
    display: grid;
    gap: 10px;
}

.timesheet-entry {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    padding-top: 8px;
    border-top: 1px solid rgba(24, 34, 41, 0.08);
}

.timesheet-entry:first-child {
    padding-top: 0;
    border-top: none;
}

.timesheet-rhythm {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
    gap: 12px;
    align-items: end;
    min-height: 220px;
}

.timesheet-rhythm-bar {
    display: grid;
    gap: 8px;
    justify-items: center;
}

.timesheet-rhythm-track {
    height: 150px;
    width: 100%;
    max-width: 54px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(24, 34, 41, 0.06), rgba(24, 34, 41, 0.12));
    padding: 6px;
    display: flex;
    align-items: flex-end;
}

.timesheet-rhythm-fill {
    width: 100%;
    border-radius: 14px;
    background: linear-gradient(180deg, #4f9d87, #d76c3d);
    min-height: 8px;
}

.timesheet-total-pill {
    display: inline-flex;
    align-items: center;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(79, 157, 135, 0.12);
    color: #215c4a;
    font-size: 12px;
    font-weight: 700;
}

@media (max-width: 1100px) {
    .calendar-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .calendar-weekdays {
        display: none;
    }
}

@media (max-width: 760px) {
    .calendar-grid,
    .search-form {
        grid-template-columns: 1fr;
    }

    .calendar-cell {
        min-height: 150px;
    }

    .client-scope-tabs {
        width: 100%;
    }

    .client-scope-tabs button {
        flex: 1 1 0;
    }

    .calendar-hero-top {
        align-items: stretch;
    }

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

.compact-controls {
    align-items: center;
    gap: 8px;
}

.compact-controls select,
.compact-controls input {
    width: auto;
    min-width: 110px;
    padding: 8px 10px;
}

.compact-actions {
    justify-content: flex-start;
    gap: 8px;
}

.project-card-actions {
    margin-top: 12px;
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: wrap;
}

.client-toolbar {
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
}

.client-scope-tabs {
    display: inline-flex;
    align-items: center;
    padding: 3px;
    border: 1px solid rgba(136, 151, 169, 0.28);
    border-radius: 10px;
    background: rgba(246, 249, 252, 0.86);
}

.client-scope-tabs button {
    border: 0;
    border-radius: 7px;
    padding: 8px 12px;
    min-width: 74px;
    background: transparent;
    color: #53677f;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.client-scope-tabs button.active {
    background: #ffffff;
    color: #0b1730;
    box-shadow: 0 5px 14px rgba(15, 23, 42, 0.1);
}

.client-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.client-card {
    display: grid;
    gap: 12px;
}

.client-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.client-metrics span {
    display: grid;
    gap: 3px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(231, 241, 252, 0.72);
    color: #53677f;
    font-size: 12px;
}

.client-metrics strong {
    color: #0b1730;
    font-size: 20px;
}

.client-detail-grid {
    grid-template-columns: minmax(280px, 0.72fr) minmax(420px, 1.28fr);
    align-items: start;
}

.client-info-panel,
.client-projects-panel {
    min-height: 0;
}

.client-detail-side-stack {
    display: grid;
    gap: 16px;
    align-content: start;
}

.client-contacts-panel .panel-head h4 {
    margin: 0;
    font-size: 0.95rem;
}

.client-contacts-subhead {
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid rgba(36, 50, 74, 0.08);
}

.client-portal-contact-list {
    display: grid;
    gap: 10px;
}

.client-portal-contact-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(36, 50, 74, 0.08);
    background: rgba(255, 255, 255, 0.72);
}

.client-portal-contact-row > div {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.client-portal-contact-row .small-btn {
    flex-shrink: 0;
    align-self: center;
}

.client-project-list {
    display: grid;
    gap: 10px;
}

.client-project-card {
    position: relative;
    display: grid;
    gap: 14px;
    min-height: 178px;
    overflow: hidden;
    padding: 18px;
    color: #102033;
    text-decoration: none;
    border-radius: 18px;
    border: 1px solid rgba(66, 135, 196, 0.14);
    background:
        radial-gradient(circle at 92% 12%, rgba(37, 202, 255, 0.2), transparent 34%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(237, 247, 255, 0.9));
    box-shadow:
        0 16px 38px rgba(14, 33, 62, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.client-project-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, var(--portal-accent, #25caff), var(--portal-primary, #216cff));
}

.client-project-card::after {
    content: "";
    position: absolute;
    right: -42px;
    bottom: -42px;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 1px solid rgba(33, 108, 255, 0.14);
    background: radial-gradient(circle, rgba(33, 108, 255, 0.08), transparent 68%);
}

.client-project-card > * {
    position: relative;
    z-index: 1;
}

.client-project-card:hover {
    transform: translateY(-2px);
    border-color: rgba(42, 190, 255, 0.34);
    box-shadow:
        0 24px 54px rgba(14, 33, 62, 0.16),
        0 0 36px rgba(54, 182, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.96);
}

.project-consultant-strip,
.project-consultant-inline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.project-consultant-strip {
    margin: 8px 0 14px;
}

.project-consultant-inline {
    gap: 8px;
}

.client-portal-admin {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(24, 34, 41, 0.08);
}

.client-portal-project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.client-portal-project-card {
    display: grid;
    gap: 14px;
}

.project-details-panel {
    margin-top: 20px;
}

.company-branding-row {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 18px;
}

.company-branding-preview {
    width: 150px;
    height: 96px;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    padding: 14px 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(24, 34, 41, 0.08);
    box-shadow: 0 14px 34px rgba(18, 32, 41, 0.08);
}

.company-branding-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.company-branding-form-wrap {
    display: grid;
    gap: 10px;
    min-width: min(420px, 100%);
    flex: 1 1 320px;
}

.company-branding-form {
    display: grid;
    gap: 10px;
}

.project-health-panel,
.project-summary-panel {
    margin-top: 20px;
}

.compact-health-grid {
    margin: 12px 0;
}

.project-hero {
    display: grid;
    gap: 10px;
    padding: 18px 20px;
    color: #ffffff;
    background:
        radial-gradient(circle at top left, rgba(110, 175, 255, 0.28), transparent 28%),
        linear-gradient(135deg, #16233f 0%, #273458 54%, #3666d5 100%);
    box-shadow: 0 22px 44px rgba(17, 37, 66, 0.18);
}

.project-hero .panel-head {
    margin-bottom: 2px;
}

.compact-blurb {
    max-width: 720px;
}

.hero-progress-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.hero-progress-copy {
    display: grid;
    gap: 4px;
}

.project-hero .muted,
.project-hero .project-meta,
.project-hero .project-meta strong,
.project-hero .hero-progress-copy,
.project-hero .hero-progress-copy strong {
    color: rgba(255, 255, 255, 0.88);
}

.project-hero .badge {
    background: rgba(255, 239, 205, 0.96);
    color: #7c4d02;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.project-hero .health-metrics {
    color: rgba(255, 255, 255, 0.8);
}

.compact-progress {
    margin: 0;
    height: 8px;
}

.project-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.compact-panel {
    padding: 16px;
}

.content .panel + .panel {
    margin-top: 18px;
}

.project-support-grid {
    margin: 20px 0;
}

.milestone-roadmap-strip {
    margin-top: 20px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 250, 248, 0.92)),
        radial-gradient(circle at top right, rgba(79, 157, 135, 0.12), transparent 28%);
}

.milestone-roadmap-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
    scrollbar-width: thin;
    scroll-snap-type: x proximity;
}

.project-health-inline {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.hero-health-inline {
    gap: 8px;
    margin-bottom: 4px;
}

.compact-status-pill {
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    color: #17324f;
}

.roadmap-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

.roadmap-nav-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    border: 1px solid rgba(24, 34, 41, 0.08);
    background: rgba(255, 255, 255, 0.9);
    color: #182229;
    box-shadow: 0 10px 24px rgba(18, 32, 41, 0.08);
}

.roadmap-nav-btn:hover {
    background: rgba(242, 247, 245, 0.98);
    border-color: rgba(79, 157, 135, 0.25);
}

.milestone-roadmap-card {
    position: relative;
    display: grid;
    gap: 10px;
    flex: 0 0 min(280px, calc(100vw - 96px));
    min-height: 150px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.86);
    border: 1px solid rgba(24, 34, 41, 0.08);
    box-shadow: 0 16px 36px rgba(18, 32, 41, 0.06);
    color: inherit;
    text-align: left;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
    scroll-snap-align: start;
}

.milestone-roadmap-card:hover {
    transform: translateY(-2px);
    border-color: rgba(79, 157, 135, 0.28);
    box-shadow: 0 18px 38px rgba(18, 32, 41, 0.1);
}

.milestone-roadmap-card::after {
    content: "";
    position: absolute;
    top: 26px;
    left: calc(100% + 8px);
    width: 18px;
    height: 2px;
    background: linear-gradient(90deg, rgba(79, 157, 135, 0.45), rgba(24, 34, 41, 0.12));
}

.milestone-roadmap-card:last-child::after {
    display: none;
}

.milestone-roadmap-top {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.milestone-roadmap-title {
    display: block;
    line-height: 1.3;
}

.milestone-roadmap-date {
    margin: 0;
    font-size: 13px;
}

.milestone-roadmap-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.milestone-section {
    background:
        radial-gradient(circle at top right, rgba(79, 157, 135, 0.12), transparent 24%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 250, 248, 0.92));
}

.milestone-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.milestone-apply-form {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 420px;
    flex-wrap: wrap;
}

.milestone-apply-form select {
    min-width: min(360px, 100%);
    flex: 1 1 260px;
}

.milestone-toolbar-actions {
    margin-left: auto;
}

.milestone-toolbar-help {
    margin: 10px 0 0;
}

.milestone-template-list {
    margin-top: 10px;
}

.milestone-template-compact-list {
    margin-top: 14px;
}

.milestone-template-compact-list .widget-item {
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 10px;
}

.milestone-template-card {
    background: rgba(247, 250, 248, 0.92);
}

.milestone-roadmap-open {
    justify-self: start;
}

.milestone-side-summary {
    margin-bottom: 18px;
}

.process-checklist-table {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.process-checklist-row {
    display: grid;
    grid-template-columns: minmax(120px, 0.85fr) minmax(180px, 1.35fr) minmax(170px, 1.1fr) minmax(135px, 0.85fr) minmax(180px, 1.2fr) minmax(170px, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 10px 12px 10px 16px;
    border-radius: 14px;
    background: rgba(247, 250, 248, 0.92);
    border: 1px solid rgba(24, 34, 41, 0.08);
}

.process-checklist-head {
    background: transparent;
    border: none;
    padding: 0 12px 0 16px;
    color: #627178;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.process-checklist-cell {
    min-width: 0;
}

.process-checklist-cell input {
    margin: 0;
}

.process-checklist-done {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.process-checklist-toggle {
    margin: 0;
}

.process-checklist-completed {
    font-size: 13px;
    color: #627178;
}

.process-checklist-action {
    display: flex;
    justify-content: flex-end;
}

.milestone-empty-state {
    margin-top: 18px;
}

.process-checklist-row {
    padding-left: 16px;
}

.milestone-card-top {
    align-items: flex-start;
}

.milestone-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.milestone-roadmap-dot {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex: 0 0 auto;
    box-shadow: 0 0 0 4px rgba(24, 34, 41, 0.06);
}

.milestone-roadmap-dot.todo {
    background: #577590;
}

.milestone-roadmap-dot.progress {
    background: #4f9d87;
}

.milestone-roadmap-dot.blocked {
    background: #ab3b3b;
}

.milestone-roadmap-dot.done {
    background: #8aa29e;
}

.milestone-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}

.milestone-stat-chip {
    background: rgba(245, 248, 246, 0.95);
    border: 1px solid rgba(24, 34, 41, 0.08);
    border-radius: 14px;
    padding: 10px 12px;
    display: grid;
    gap: 3px;
}

.milestone-stat-chip strong {
    font-size: 14px;
}

.milestone-stat-chip span {
    font-size: 12px;
    color: #5e6a70;
}

@media (max-width: 1280px) {
    .process-checklist-head {
        display: none;
    }

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

@media (max-width: 760px) {
    .process-checklist-row {
        grid-template-columns: 1fr;
    }

    .process-checklist-action {
        justify-content: flex-start;
    }
}

.milestone-control-row {
    align-items: center;
}

.compact-field-group {
    display: grid;
    gap: 6px;
    margin-top: 8px;
}

.compact-field-group-inline {
    min-width: min(280px, 100%);
}

.compact-field-label {
    font-size: 13px;
    font-weight: 700;
    color: #223038;
}

.compact-field-help {
    margin: 0;
    font-size: 12px;
    color: #5e6a70;
}

.portal-embedded-page-list {
    display: grid;
    gap: 14px;
}

.portal-embedded-page-row {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid #e1e7eb;
    border-radius: 8px;
    background: #f8fafb;
}

.portal-embedded-page-flags {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.assignment-warning-box {
    margin-top: 6px;
    padding: 8px 10px;
    border-radius: 10px;
    background: #fff0cf;
    color: #7a4a00;
}

.dependency-picker {
    margin-top: 10px;
}

.dependency-search {
    width: 100%;
}

.dependency-selected {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.dependency-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    background: rgba(79, 157, 135, 0.12);
    color: #23453c;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 700;
}

.dependency-chip button {
    width: auto;
    min-width: 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 14px;
    line-height: 1;
}

.dependency-options {
    display: grid;
    gap: 8px;
    max-height: 180px;
    overflow: auto;
    padding: 4px 2px 2px;
}

.dependency-options[hidden] {
    display: none;
}

.dependency-idle-hint,
.dependency-empty-hint {
    margin-top: 2px;
}

.dependency-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    min-width: 0;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(24, 34, 41, 0.08);
    background: rgba(255, 255, 255, 0.9);
    color: #223038;
    text-align: left;
}

.dependency-option::after {
    content: "+";
    font-size: 16px;
    color: #5e6a70;
}

.dependency-option.selected {
    border-color: rgba(79, 157, 135, 0.28);
    background: rgba(79, 157, 135, 0.09);
}

.dependency-option.selected::after {
    content: "Added";
    font-size: 12px;
    font-weight: 700;
    color: #2d6354;
}

.dependency-option[hidden] {
    display: none;
}

.health-metrics {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    color: #314148;
    font-size: 14px;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(18, 32, 41, 0.42);
    display: grid;
    place-items: center;
    padding: 20px;
    z-index: 1200;
}

.project-comment-backdrop {
    place-items: center;
    overflow: hidden;
}

.modal-backdrop[hidden] {
    display: none !important;
}

/** Stack above ticket drawer (z-index ~1410). */
.ticket-task-modal-backdrop {
    z-index: 1460;
}

.modal-card {
    width: min(720px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    background: rgba(255, 255, 255, 0.96);
    border-radius: 20px;
    border: 1px solid rgba(24, 34, 41, 0.08);
    box-shadow: 0 24px 60px rgba(18, 32, 41, 0.2);
    padding: 20px;
}

.account-create-modal {
    width: min(680px, 100%);
}

.modal-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.modal-head h3,
.modal-head p {
    margin: 0;
}

.icon-btn {
    width: auto;
    min-width: 38px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #e7ecef;
    color: #182229;
}

.modal-card.project-comment-modal {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: min(700px, calc(100vh - 72px));
    overflow: hidden;
    margin: 0 auto;
    transform: translateY(-6vh);
}

.project-comment-modal {
    min-height: 0;
}

.project-comment-inline-form {
    display: grid;
    gap: 8px;
    margin-top: 10px;
}

.project-comment-inline-form[hidden] {
    display: none !important;
}

.project-comment-inline-form textarea {
    width: 100%;
    min-height: 78px;
}

.project-comment-body {
    display: grid;
    gap: 6px;
}

.project-comment-author {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.project-comment-text {
    white-space: pre-wrap;
}

.project-comment-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.mention-input-wrap {
    position: relative;
}

.mention-menu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    z-index: 5;
    display: grid;
    gap: 6px;
    padding: 8px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(24, 34, 41, 0.1);
    box-shadow: 0 16px 32px rgba(18, 32, 41, 0.14);
}

.mention-menu[hidden] {
    display: none !important;
}

.portal-nav,
.ticket-list,
.ticket-thread {
    display: grid;
    gap: 12px;
}

.ticket-quick-views {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 14px 0;
}

.ticket-filter-toolbar {
    margin-bottom: 18px;
}

.ticket-panel-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.ticket-dashboard {
    display: grid;
    grid-template-columns: repeat(5, minmax(150px, 1fr));
    gap: 12px;
    margin: 14px 0 18px;
}

.ticket-stat-card {
    display: grid;
    gap: 6px;
    min-height: 116px;
    padding: 14px;
    border-radius: 14px;
    background:
        radial-gradient(circle at 88% 18%, rgba(55, 202, 255, 0.08), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(244, 250, 255, 0.76));
    border: 1px solid rgba(66, 135, 196, 0.12);
    box-shadow: 0 12px 26px rgba(14, 33, 62, 0.06);
}

.ticket-stat-card.is-hot {
    border-color: rgba(216, 65, 79, 0.2);
    background:
        radial-gradient(circle at 88% 18%, rgba(255, 107, 107, 0.1), transparent 30%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 246, 248, 0.78));
}

.ticket-stat-card span {
    color: #53677f;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.ticket-stat-card strong {
    color: var(--planion-text);
    font-size: 28px;
    line-height: 1;
}

.ticket-stat-card small {
    color: #5f7187;
    font-weight: 600;
}

.ticket-status-card {
    min-width: 0;
}

.ticket-status-bars {
    display: grid;
    gap: 4px;
}

.ticket-status-bar {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(214, 229, 242, 0.9);
}

.ticket-status-bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--planion-blue), var(--planion-cyan));
}

.ticket-analytics-shell {
    display: grid;
    gap: 18px;
}

.ticket-analytics-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
}

.ticket-analytics-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.ticket-analytics-card {
    display: grid;
    gap: 14px;
    min-width: 0;
    padding: 16px;
    border: 1px solid rgba(66, 135, 196, 0.12);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: 0 14px 30px rgba(14, 33, 62, 0.06);
}

.ticket-analytics-wide {
    grid-column: span 2;
}

.ticket-analytics-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.ticket-analytics-card-head h4 {
    margin: 0;
}

.ticket-year-chart {
    display: grid;
    grid-template-columns: repeat(12, minmax(28px, 1fr));
    gap: 10px;
    min-height: 230px;
    align-items: end;
    padding: 12px 0 0;
}

.ticket-year-month {
    display: grid;
    gap: 7px;
    min-width: 0;
}

.ticket-year-bars {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    align-items: end;
    gap: 3px;
    height: 180px;
    padding: 6px;
    border-radius: 10px;
    background: rgba(234, 243, 251, 0.7);
}

.ticket-year-bars span {
    display: block;
    min-height: 4px;
    border-radius: 999px 999px 4px 4px;
}

.ticket-year-bars .created,
.ticket-chart-legend .created {
    background: #3a87f6;
}

.ticket-year-bars .closed,
.ticket-chart-legend .closed {
    background: #28b67a;
}

.ticket-year-bars .backlog,
.ticket-chart-legend .backlog {
    background: #d76c3d;
}

.ticket-year-month small {
    color: #617189;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
}

.ticket-chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    color: #5f7187;
    font-size: 12px;
    font-weight: 800;
}

.ticket-chart-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ticket-chart-legend i {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.ticket-aging-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.ticket-aging-grid span {
    display: grid;
    gap: 4px;
    padding: 10px;
    border-radius: 12px;
    background: rgba(245, 249, 252, 0.92);
    color: #5f7187;
    font-size: 12px;
    font-weight: 700;
}

.ticket-aging-grid strong {
    color: var(--planion-text);
    font-size: 24px;
    line-height: 1;
}

.ticket-aging-list {
    display: grid;
    gap: 8px;
}

.ticket-aging-list a {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    padding: 9px 10px;
    border-radius: 10px;
    background: rgba(246, 251, 255, 0.9);
    color: inherit;
    text-decoration: none;
}

.ticket-aging-list span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-aging-list small {
    color: #617189;
    font-weight: 700;
}

.ticket-consultant-table {
    display: grid;
    gap: 6px;
}

.ticket-consultant-row {
    display: grid;
    grid-template-columns: minmax(160px, 1.5fr) repeat(4, minmax(82px, 1fr));
    gap: 10px;
    align-items: center;
    padding: 10px 12px;
    border-radius: 10px;
    background: rgba(246, 251, 255, 0.82);
}

.ticket-consultant-table.is-compact .ticket-consultant-row {
    grid-template-columns: minmax(160px, 1.5fr) repeat(3, minmax(82px, 1fr));
}

.ticket-consultant-row.is-head {
    color: #53677f;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    background: transparent;
}

.ticket-consultant-row strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 980px) {
    .ticket-analytics-grid,
    .ticket-analytics-wide {
        grid-template-columns: 1fr;
        grid-column: auto;
    }

    .ticket-year-chart {
        gap: 6px;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .ticket-year-month {
        min-width: 42px;
    }

    .ticket-consultant-table {
        overflow-x: auto;
    }

    .ticket-consultant-row {
        min-width: 620px;
    }

    .ticket-consultant-table.is-compact .ticket-consultant-row {
        min-width: 500px;
    }

}

@media (max-width: 640px) {
    .ticket-aging-grid {
        grid-template-columns: 1fr;
    }

    .ticket-aging-list a {
        grid-template-columns: 1fr;
    }
}

.ticket-detail-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.ticket-sla-pill.sla-ok {
    color: #145d45;
    background: rgba(213, 245, 232, 0.94);
}

.ticket-sla-pill.sla-risk {
    color: #8a4f00;
    background: #ffe5be;
}

.ticket-sla-pill.sla-breached {
    color: #8c2027;
    background: #f6d6d8;
}

.ticket-sla-pill.sla-done {
    color: #31536f;
    background: rgba(229, 239, 249, 0.88);
}

.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;
}

.ticket-canned-picker {
    position: relative;
}

.ticket-canned-search {
    width: 100%;
}

.ticket-canned-results {
    position: relative;
    max-height: 190px;
    overflow-y: auto;
    border: 1px solid #cfd8dc;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(16, 32, 51, 0.14);
    padding: 6px;
    display: grid;
    gap: 4px;
    margin-top: 6px;
}

.ticket-canned-results[hidden] {
    display: none !important;
}

.ticket-canned-result-item {
    width: 100% !important;
    text-align: left;
    border: 0;
    border-radius: 8px;
    background: transparent;
    padding: 8px 10px;
    cursor: pointer;
    display: grid;
    gap: 3px;
}

.ticket-canned-result-item strong {
    font-size: 13px;
    color: #102033;
}

.ticket-canned-result-item span {
    font-size: 12px;
    color: #4b6175;
}

.ticket-canned-result-item:hover,
.ticket-canned-result-item.is-active {
    background: rgba(66, 135, 196, 0.12);
}

.ticket-canned-empty {
    margin: 4px 8px;
    font-size: 12px;
}

.ticket-canned-admin-card {
    overflow: hidden;
    border: 1px solid rgba(66, 135, 196, 0.12);
    border-radius: 14px;
    background: rgba(246, 251, 255, 0.74);
}

.ticket-canned-admin-card[open] {
    box-shadow: 0 12px 24px rgba(16, 42, 78, 0.08);
}

.ticket-canned-admin-summary {
    list-style: none;
    cursor: pointer;
    padding: 14px;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.ticket-canned-admin-summary::-webkit-details-marker {
    display: none;
}

.ticket-canned-admin-summary::after {
    content: "";
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    margin-top: 4px;
    border-right: 2px solid #6d88ad;
    border-bottom: 2px solid #6d88ad;
    transform: rotate(45deg);
    transition: transform 0.18s ease;
}

.ticket-canned-admin-card[open] .ticket-canned-admin-summary::after {
    transform: rotate(225deg);
}

.ticket-canned-admin-summary > div {
    display: grid;
    gap: 6px;
}

.ticket-canned-admin-summary .muted {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
    overflow: hidden;
}

.ticket-canned-admin-fields {
    display: grid;
    gap: 8px;
    padding: 0 14px 14px;
    border-top: 1px solid rgba(66, 135, 196, 0.12);
}

.ticket-canned-admin-list {
    display: grid;
    gap: 12px;
    max-height: 70vh;
    overflow: auto;
    padding-right: 4px;
}

.ticket-activity-panel {
    margin: 18px 0;
    border: 1px solid rgba(36, 50, 74, 0.1);
    border-radius: 16px;
    background: rgba(246, 251, 255, 0.78);
    overflow: hidden;
}

.ticket-activity-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    cursor: pointer;
}

.ticket-activity-list {
    display: grid;
    gap: 8px;
    padding: 0 14px 14px;
}

.ticket-activity-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 0;
    border-top: 1px solid rgba(36, 50, 74, 0.08);
}

.ticket-activity-item > div {
    display: grid;
    gap: 2px;
}

.ticket-thread-shell {
    display: grid;
    gap: 10px;
}

.ticket-thread-toolbar {
    display: flex;
    justify-content: flex-end;
}

.ticket-event-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 700;
    color: #53677f;
}

.ticket-system-event {
    justify-self: center;
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
    max-width: min(720px, 100%);
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 11px;
    line-height: 1.25;
    color: #6a7888;
    background: rgba(246, 251, 255, 0.76);
    border: 1px solid rgba(36, 50, 74, 0.08);
}

.ticket-system-event small {
    font-size: 10px;
    color: #8a97a8;
}

.portal-nav {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
    padding: 0;
    border-radius: 999px;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.portal-nav a,
.ticket-row {
    border: 1px solid rgba(36, 50, 74, 0.1);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.72);
    padding: 12px 14px;
}

.portal-nav a {
    color: #102033;
    font-weight: 800;
    text-decoration: none;
    transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.portal-nav a:hover {
    background: #1f6bff;
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 10px 20px rgba(12, 26, 39, 0.14);
}

.portal-nav a {
    border-radius: 999px;
}

.ticket-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    color: #102033;
    text-decoration: none;
}

.ticket-row span:first-child {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.ticket-row.active,
.ticket-row:hover {
    border-color: rgba(28, 125, 255, 0.3);
    box-shadow: 0 12px 26px rgba(21, 47, 86, 0.08);
}

.ticket-comment {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 10px;
    align-items: end;
    width: min(78%, 780px);
    padding: 0;
    border: 0;
    background: transparent;
}

.ticket-comment.customer-comment {
    justify-self: start;
}

.ticket-comment.team-comment,
.ticket-comment.internal-comment {
    justify-self: end;
    grid-template-columns: minmax(0, 1fr) 38px;
}

.ticket-comment.team-comment .ticket-comment-avatar,
.ticket-comment.internal-comment .ticket-comment-avatar {
    grid-column: 2;
    grid-row: 1;
}

.ticket-comment.team-comment .ticket-comment-bubble,
.ticket-comment.internal-comment .ticket-comment-bubble {
    grid-column: 1;
    grid-row: 1;
}

.ticket-comment-avatar {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    overflow: hidden;
    border-radius: 50%;
    color: #123a78;
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    background: linear-gradient(180deg, #eef5ff, #dfeeff);
    border: 1px solid rgba(46, 99, 230, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.ticket-comment.team-comment .ticket-comment-avatar,
.ticket-comment.internal-comment .ticket-comment-avatar {
    color: #063146;
    background: linear-gradient(180deg, #dff8ff, #c7efff);
    border-color: rgba(37, 202, 255, 0.24);
}

.ticket-comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ticket-comment-bubble {
    display: grid;
    gap: 8px;
    min-width: 0;
    padding: 14px 16px;
    border-radius: 18px 18px 18px 6px;
    border: 1px solid rgba(33, 108, 255, 0.16);
    background: linear-gradient(180deg, #ffffff, #f6fbff);
    box-shadow: 0 12px 28px rgba(17, 37, 66, 0.06);
}

.ticket-comment.team-comment .ticket-comment-bubble {
    border-color: rgba(37, 202, 255, 0.22);
    border-radius: 18px 18px 6px 18px;
    background: linear-gradient(180deg, #f9fdff, #eef9ff);
}

.ticket-comment.internal-comment .ticket-comment-bubble {
    border-color: rgba(214, 156, 42, 0.28);
    border-radius: 18px 18px 6px 18px;
    background: #fff9e8;
}

.ticket-comment-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.ticket-comment-head > div {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    min-width: 0;
}

.ticket-comment-head strong {
    color: #102033;
}

.ticket-comment-author-meta {
    color: #53677f;
    font-size: 11px;
}

.ticket-comment p,
.ticket-comment-body {
    margin: 0;
    color: #1b2432;
    line-height: 1.5;
}

.ticket-comment-body {
    display: grid;
    gap: 8px;
}

.ticket-comment-body p,
.ticket-comment-body ul,
.ticket-comment-body ol,
.ticket-comment-body blockquote,
.ticket-comment-body pre {
    margin: 0;
}

.ticket-comment-body ul,
.ticket-comment-body ol {
    padding-left: 20px;
}

.ticket-comment-body img {
    display: block;
    max-width: min(100%, 560px);
    max-height: 360px;
    border-radius: 12px;
    border: 1px solid rgba(36, 50, 74, 0.12);
}

.ticket-comment-body blockquote {
    padding-left: 12px;
    border-left: 3px solid rgba(66, 135, 196, 0.24);
    color: #4d5f73;
}

.ticket-comment-body code,
.ticket-comment-body pre {
    border-radius: 8px;
    background: rgba(11, 23, 48, 0.06);
}

.ticket-comment-body code {
    padding: 1px 4px;
}

.ticket-comment-body pre {
    overflow: auto;
    padding: 10px;
}


@media (max-width: 760px) {
    .ticket-dashboard {
        grid-template-columns: 1fr;
    }

    .ticket-comment,
    .ticket-comment.customer-comment,
    .ticket-comment.team-comment,
    .ticket-comment.internal-comment {
        width: 100%;
        grid-template-columns: 34px minmax(0, 1fr);
        justify-self: stretch;
    }

    .ticket-comment.team-comment,
    .ticket-comment.internal-comment {
        grid-template-columns: minmax(0, 1fr) 34px;
    }

    .ticket-comment-avatar {
        width: 34px;
        height: 34px;
        font-size: 13px;
    }

    .ticket-comment-bubble {
        padding: 12px 13px;
    }
}

.ticket-inline-images {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 240px));
    gap: 10px;
}

.ticket-inline-images a {
    display: block;
    overflow: hidden;
    border-radius: 14px;
    border: 1px solid rgba(36, 50, 74, 0.1);
    background: #f6fbff;
}

.ticket-inline-images img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.ticket-file-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ticket-file-list a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    max-width: 100%;
    padding: 9px 11px;
    border-radius: 999px;
    color: #102033;
    text-decoration: none;
    background: #eef6ff;
    border: 1px solid rgba(33, 108, 255, 0.14);
}

.ticket-file-list strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-attachment-overview {
    display: grid;
    gap: 12px;
    margin: 16px 0;
    padding: 14px;
    border: 1px solid rgba(66, 135, 196, 0.12);
    border-radius: 14px;
    background: rgba(246, 251, 255, 0.78);
}

.ticket-attachment-overview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.ticket-attachment-overview-head h4 {
    margin: 0;
}

.ticket-attachment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
}

.ticket-attachment-item {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.86);
    color: inherit;
    text-decoration: none;
    border: 1px solid rgba(66, 135, 196, 0.1);
}

.ticket-attachment-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(214, 229, 242, 0.9);
    color: #31536f;
    font-size: 10px;
    font-weight: 900;
}

.ticket-attachment-copy {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.ticket-attachment-copy strong,
.ticket-attachment-copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ticket-time-panel {
    margin: 18px 0;
    border: 1px solid rgba(36, 50, 74, 0.1);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(248, 253, 255, 0.96), rgba(238, 247, 255, 0.72));
    overflow: hidden;
}

.ticket-time-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 48px 12px 16px;
    cursor: pointer;
    list-style: none;
    position: relative;
}

.ticket-time-summary::-webkit-details-marker {
    display: none;
}

.ticket-time-summary::after {
    content: "v";
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #102033;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(36, 50, 74, 0.1);
    transition: transform 0.16s ease, background 0.16s ease;
}

.ticket-time-panel[open] > .ticket-time-summary::after {
    transform: translateY(-50%) rotate(180deg);
}

.ticket-time-summary h4 {
    margin: 0 0 2px;
}

.ticket-time-summary p {
    margin: 0;
}

.ticket-time-summary-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
}

.ticket-time-body {
    display: grid;
    gap: 14px;
    padding: 0 16px 16px;
}

.ticket-time-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.ticket-time-form {
    padding: 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(36, 50, 74, 0.08);
}

.ticket-time-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 10px;
}

.portal-card {
    max-width: 680px;
}

.portal-hero-card,
.portal-content-card,
.portal-ticket-summary {
    border: 1px solid rgba(36, 50, 74, 0.1);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--planion-shadow-card);
    backdrop-filter: blur(16px);
}

.portal-hero-card {
    display: grid;
    gap: 18px;
    padding: 28px;
    overflow: hidden;
    background:
        radial-gradient(circle at 92% 18%, rgba(37, 202, 255, 0.2), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(244, 249, 255, 0.9));
}

.portal-project-hero {
    display: grid;
    gap: 18px;
    padding: 28px;
    border-radius: 28px;
    color: #ffffff;
    background:
        radial-gradient(circle at 82% 20%, rgba(37, 202, 255, 0.28), transparent 30%),
        radial-gradient(circle at 14% 84%, rgba(124, 85, 255, 0.22), transparent 32%),
        linear-gradient(135deg, #071526 0%, #102946 58%, #175d9c 100%);
    box-shadow: var(--planion-shadow-shell);
}

.portal-project-hero .muted,
.portal-project-hero p,
.portal-project-hero .project-meta {
    color: rgba(232, 244, 255, 0.82);
}

.portal-project-hero h3 {
    margin: 0;
    font-size: clamp(28px, 4vw, 42px);
}

.portal-project-hero > .link-chip {
    width: fit-content;
    color: #102033;
    background: rgba(255, 255, 255, 0.9);
}

.portal-hero-card h3,
.portal-content-card h3,
.portal-ticket-summary h3 {
    margin: 0;
}

.portal-content-card {
    display: grid;
    gap: 16px;
    padding: 22px;
}

.portal-project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 14px;
}

.portal-project-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 18px;
    color: #102033;
    text-decoration: none;
    background: linear-gradient(180deg, #ffffff, #f6fbff);
    border: 1px solid rgba(36, 50, 74, 0.1);
    box-shadow: 0 12px 28px rgba(17, 37, 66, 0.07);
}

.portal-project-card:hover {
    transform: translateY(-1px);
    border-color: rgba(33, 108, 255, 0.24);
    box-shadow: 0 18px 36px rgba(17, 37, 66, 0.11);
}

.portal-project-card p {
    margin: 0;
    color: #53677f;
}

.portal-project-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.72fr);
    gap: 18px;
    align-items: start;
}

.portal-document-list {
    display: grid;
    gap: 10px;
}

.portal-document-list a,
.portal-document-list > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    color: #102033;
    text-decoration: none;
    background: #f6fbff;
    border: 1px solid rgba(36, 50, 74, 0.08);
}

.portal-attachments {
    display: grid;
    gap: 10px;
}

.portal-attachments h4 {
    margin: 0;
}

.portal-ticket-layout {
    display: grid;
    grid-template-columns: minmax(220px, 0.34fr) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.portal-ticket-summary {
    position: sticky;
    top: 18px;
    display: grid;
    gap: 12px;
    padding: 20px;
}

.portal-ticket-summary p {
    margin: 0;
    color: #53677f;
}

.portal-ticket-card {
    min-width: 0;
}

.portal-user-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
}

.portal-user-card {
    display: grid;
    gap: 14px;
}

.portal-user-card h4,
.portal-user-card p {
    margin: 0;
}

.portal-user-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background: #f6fbff;
    color: #53677f;
}

.portal-user-clients {
    display: grid;
    gap: 8px;
}

.portal-users-search {
    margin-bottom: 16px;
}

.portal-users-table td:last-child {
    text-align: right;
    white-space: nowrap;
}

.clients-table-wrap {
    margin-top: 16px;
    overflow-x: auto;
}

.clients-table td:last-child {
    text-align: right;
    white-space: nowrap;
}

.clients-table td:nth-child(3),
.clients-table td:nth-child(4),
.clients-table td:nth-child(5) {
    font-weight: 850;
}

.table-primary-link {
    color: var(--planion-text);
    font-weight: 850;
    text-decoration: none;
}

.table-primary-link:hover {
    color: #2561d7;
}

.portal-user-detail-actions {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.portal-user-type-form {
    display: flex;
    align-items: end;
    gap: 10px;
    flex-wrap: wrap;
}

.portal-user-type-form label {
    display: grid;
    gap: 6px;
    color: #53677f;
    font-size: 0.82rem;
    font-weight: 800;
}

.portal-user-type-form select {
    min-width: 150px;
}

.portal-user-detail-tables {
    display: grid;
    gap: 18px;
}

.portal-user-detail-table-panel {
    min-height: 0;
}

.academy-user-progress-table {
    margin-top: 18px;
}

.academy-user-progress-table .mini-progress {
    width: min(160px, 100%);
    height: 8px;
    margin: 0 0 6px;
}

.portal-detail-table th:last-child,
.portal-detail-table td:last-child {
    text-align: right;
    white-space: nowrap;
}

.portal-table-action-form {
    display: inline-flex;
    justify-content: flex-end;
}

.pill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.portal-client-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(33, 108, 255, 0.14);
    background: #eef6ff;
    color: #102033;
}

.portal-client-pill button {
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 999px;
    background: #ffffff;
    color: #53677f;
    font-weight: 800;
}

.portal-assign-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-top: 14px;
}

.portal-theme-admin {
    display: grid;
    gap: 14px;
    margin: 8px 0;
    padding: 16px;
    border-radius: 16px;
    background: rgba(231, 241, 252, 0.62);
    border: 1px solid rgba(66, 135, 196, 0.12);
}

.portal-theme-color-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.portal-theme-color-grid label {
    display: grid;
    gap: 8px;
    font-weight: 700;
}

.portal-theme-color-grid input[type="color"] {
    width: 100%;
    min-height: 46px;
    padding: 4px;
    border-radius: 14px;
}

.portal-body {
    min-height: 100vh;
    color: var(--portal-text, var(--planion-text));
    background: var(--portal-body-background,
        linear-gradient(rgba(40, 146, 255, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(40, 146, 255, 0.055) 1px, transparent 1px),
        radial-gradient(circle at 18% 16%, rgba(38, 202, 255, 0.26), transparent 28%),
        radial-gradient(circle at 82% 8%, rgba(124, 85, 255, 0.18), transparent 30%),
        linear-gradient(135deg, #f7fbff 0%, #eef6fb 48%, #f4f0ff 100%));
    background-size: 56px 56px, 56px 56px, auto, auto, auto;
}

.portal-shell {
    width: min(1180px, calc(100% - 32px));
    padding: 24px 0 56px;
    gap: 18px;
}

.portal-topbar.project-hero {
    gap: 16px;
    margin-bottom: 4px;
    padding: 22px 24px 16px;
    overflow: hidden;
    border: 1px solid rgba(151, 203, 255, 0.24);
    border-radius: 26px;
    background:
        linear-gradient(rgba(40, 146, 255, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(40, 146, 255, 0.055) 1px, transparent 1px),
        radial-gradient(circle at 90% 72%, color-mix(in srgb, var(--portal-accent, #25caff) 22%, transparent), transparent 22%),
        linear-gradient(135deg, #082139 0%, color-mix(in srgb, var(--portal-primary, #216cff) 38%, #112943) 46%, var(--portal-primary, #286bd7) 100%);
    background-size: 56px 56px, 56px 56px, auto, auto;
    box-shadow: 0 24px 60px rgba(10, 38, 79, 0.2);
}

.portal-topbar-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.portal-topbar-logo-wrap {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    flex: 0 0 auto;
    padding: 8px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.14);
}

.portal-topbar-logo-wrap img {
    width: 100%;
    height: 100%;
    padding: 0;
    object-fit: contain;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.portal-topbar-copy {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.portal-topbar .portal-topbar-copy h2 {
    margin: 0;
    font-size: clamp(22px, 3vw, 32px);
    line-height: 1.05;
    color: #ffffff;
}

.portal-topbar .portal-topbar-copy .muted {
    margin: 0;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.78);
}

.portal-topbar .right-meta .badge {
    background: rgba(6, 18, 36, 0.72);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.16);
}

.portal-hero-metrics {
    color: rgba(255, 255, 255, 0.86);
}

.portal-toolbar {
    margin-top: 2px;
    padding: 14px;
    border-radius: 18px;
    background: rgba(231, 241, 252, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
}

.portal-auth-experience {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.78fr);
    min-height: 620px;
    margin: 42px auto 0;
    overflow: hidden;
    border-radius: 30px;
    border: 1px solid rgba(151, 203, 255, 0.26);
    background:
        radial-gradient(circle at 20% 80%, color-mix(in srgb, var(--portal-accent, #25caff) 14%, transparent), transparent 32%),
        linear-gradient(135deg, rgba(8, 33, 57, 0.96), color-mix(in srgb, var(--portal-primary, #1f6bff) 38%, rgba(15, 49, 81, 0.94)) 48%, rgba(255, 255, 255, 0.78) 48% 100%);
    box-shadow:
        0 34px 90px rgba(13, 42, 77, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.portal-auth-stage {
    position: relative;
    display: grid;
    align-content: space-between;
    min-height: 100%;
    padding: 42px;
    color: #ffffff;
    background:
        linear-gradient(rgba(40, 146, 255, 0.075) 1px, transparent 1px),
        linear-gradient(90deg, rgba(40, 146, 255, 0.075) 1px, transparent 1px),
        radial-gradient(circle at 82% 22%, color-mix(in srgb, var(--portal-accent, #25caff) 26%, transparent), transparent 28%),
        linear-gradient(135deg, rgba(5, 20, 39, 0.2), rgba(5, 20, 39, 0.72));
    background-size: 54px 54px, 54px 54px, auto, auto;
}

.portal-auth-stage::after {
    content: "";
    position: absolute;
    right: -120px;
    bottom: -120px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    border: 1px solid rgba(83, 211, 255, 0.24);
    box-shadow: inset 0 0 80px rgba(37, 202, 255, 0.08), 0 0 70px rgba(37, 202, 255, 0.1);
}

.portal-auth-stage-copy,
.portal-auth-preview {
    position: relative;
    z-index: 1;
}

.portal-auth-kicker {
    display: inline-flex;
    width: fit-content;
    margin-bottom: 14px;
    padding: 7px 11px;
    border-radius: 999px;
    color: #bdeeff;
    font-size: 12px;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.portal-auth-stage-copy h2 {
    max-width: 520px;
    margin: 0;
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.02;
    letter-spacing: 0;
}

.portal-auth-stage-copy p {
    max-width: 440px;
    margin: 16px 0 0;
    color: rgba(231, 244, 255, 0.82);
    font-size: 16px;
    line-height: 1.55;
}

.portal-auth-preview {
    display: grid;
    gap: 14px;
    width: min(520px, 100%);
    padding: 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(14px);
}

.portal-auth-preview-head,
.portal-auth-progress-row,
.portal-auth-mini-grid,
.portal-auth-ticket-card {
    position: relative;
    z-index: 1;
}

.portal-auth-preview-head,
.portal-auth-progress-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.portal-auth-preview-head span,
.portal-auth-progress-row span {
    color: rgba(231, 244, 255, 0.72);
    font-weight: 700;
}

.portal-auth-preview-head strong {
    color: #ffffff;
}

.portal-auth-ticket-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    color: #102033;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.14);
}

.portal-auth-ticket-card p {
    margin: 0;
    color: #53677f;
}

.portal-auth-progress-row {
    display: grid;
    grid-template-columns: auto minmax(120px, 1fr);
}

.portal-auth-mini-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.portal-auth-mini-grid span {
    display: grid;
    gap: 2px;
    padding: 12px;
    border-radius: 16px;
    color: rgba(231, 244, 255, 0.76);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.portal-auth-mini-grid strong {
    color: #ffffff;
    font-size: 22px;
}

.portal-auth-panel {
    display: grid;
    align-content: center;
    justify-items: center;
    padding: 42px;
}

.portal-login-card {
    width: min(460px, 100%);
    padding: 0;
    overflow: hidden;
    border-radius: 26px;
    background: color-mix(in srgb, var(--portal-surface, #ffffff) 92%, transparent);
    border: 1px solid rgba(36, 50, 74, 0.1);
    box-shadow:
        0 28px 80px rgba(18, 32, 41, 0.18),
        inset 0 1px 0 rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(18px);
}

.portal-login-brand {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 28px 30px 22px;
    background:
        radial-gradient(circle at 92% 18%, rgba(42, 196, 255, 0.18), transparent 36%),
        linear-gradient(135deg, #ffffff 0%, #eef7ff 100%);
    color: var(--portal-text, #102033);
}

.portal-login-brand img {
    width: 68px;
    height: 68px;
    padding: 10px;
    object-fit: contain;
    flex: 0 0 auto;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid rgba(36, 50, 74, 0.08);
    box-shadow: 0 16px 34px rgba(18, 32, 41, 0.1);
}

.portal-login-brand h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.08;
    letter-spacing: 0;
}

.portal-login-brand p {
    margin: 0;
    max-width: 34rem;
    color: var(--portal-muted, #53677f);
}

.portal-login-form {
    display: grid;
    gap: 16px;
    padding: 26px 30px 30px;
}

.portal-login-form label {
    display: grid;
    gap: 8px;
    font-weight: 700;
    color: var(--portal-label, var(--portal-text, #172337));
}

.portal-login-form .auth-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--portal-muted, #5d6f85);
}

.portal-login-form input[type="email"],
.portal-login-form input[type="text"] {
    width: 100%;
    min-height: 48px;
    border-radius: 14px;
    border: 1px solid rgba(36, 50, 74, 0.14);
    background: #f7fbff;
    padding: 0 14px;
    color: #172337;
}

.portal-login-form button {
    min-height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--portal-button-bg, var(--portal-accent, #25caff)) 0%, var(--portal-primary, #1c7dff) 100%);
    color: var(--portal-button-text, #ffffff);
    border: 0;
    font-weight: 800;
    box-shadow: 0 18px 32px rgba(28, 125, 255, 0.22);
}

.portal-auth-switch {
    margin: -4px 30px 30px;
    color: #5d6f85;
    font-weight: 600;
}

.portal-auth-switch a {
    color: #0f6fc6;
    font-weight: 800;
    text-decoration: none;
}

@media (max-width: 720px) {
    .portal-shell {
        width: min(100% - 24px, 1100px);
        padding: 18px 0;
    }

    .portal-topbar.project-hero {
        padding: 12px;
    }

    .portal-topbar-brand {
        align-items: flex-start;
    }

    .portal-topbar-logo-wrap {
        width: 58px;
        height: 58px;
        border-radius: 18px;
    }

    .portal-nav {
        justify-content: flex-start;
        border-radius: 20px;
    }

    .portal-nav a {
        flex: 1 1 auto;
        text-align: center;
    }

    .portal-ticket-layout,
    .portal-assign-form,
    .portal-project-layout {
        grid-template-columns: 1fr;
    }

    .portal-ticket-summary {
        position: static;
    }

    .portal-auth-experience {
        grid-template-columns: 1fr;
        min-height: 0;
        margin-top: 18px;
        border-radius: 24px;
        background: rgba(255, 255, 255, 0.74);
    }

    .portal-auth-stage {
        min-height: 0;
        padding: 26px 22px;
    }

    .portal-auth-stage-copy h2 {
        font-size: 34px;
    }

    .portal-auth-stage-copy p {
        margin-top: 10px;
        font-size: 14px;
    }

    .portal-auth-preview {
        display: none;
    }

    .portal-auth-panel {
        padding: 0 12px 12px;
    }

    .portal-login-card {
        width: 100%;
        border-radius: 22px;
    }

    .portal-login-brand {
        padding: 22px;
    }

    .portal-login-brand h1 {
        font-size: 24px;
    }
}

.mention-option {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f3f6f7;
    color: #182229;
    text-align: left;
}

.mention-option:hover {
    background: #e6edef;
}

.mention-option strong,
.mention-option span {
    margin: 0;
}

.project-comment-table-wrap {
    flex: 0 0 auto;
    height: min(320px, 36vh);
    overflow-y: auto;
    overflow-x: auto;
    border: 1px solid rgba(24, 34, 41, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
}

.project-comment-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.project-comment-table th,
.project-comment-table td {
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgba(24, 34, 41, 0.08);
}

.project-comment-table th {
    position: sticky;
    top: 0;
    background: #f6f8f9;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5e6a70;
}

.project-comment-table tr:last-child td {
    border-bottom: none;
}

.project-documents-panel {
    scroll-margin-top: 100px;
}

.documents-usage-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 18px;
}

.documents-usage-card {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(24, 34, 41, 0.08);
    background: rgba(255, 255, 255, 0.72);
}

.documents-table-wrap {
    border: 1px solid rgba(24, 34, 41, 0.08);
    border-radius: 16px;
    overflow: auto;
    background: rgba(255, 255, 255, 0.72);
}

.documents-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.documents-table th,
.documents-table td {
    padding: 12px 14px;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgba(24, 34, 41, 0.08);
}

.documents-table th {
    background: #f6f8f9;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5e6a70;
}

.documents-table tr:last-child td {
    border-bottom: none;
}

.documents-description {
    margin-top: 6px;
    color: #5e6a70;
    white-space: pre-wrap;
}

.documents-visibility-form {
    display: inline-flex;
}

.documents-visibility-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: auto;
    min-width: 0;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(24, 34, 41, 0.1);
    background: #f5f7f7;
    color: #223038;
    font-size: 12px;
    font-weight: 700;
}

.documents-visibility-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: currentColor;
    opacity: 0.85;
}

.documents-visibility-toggle.is-visible {
    background: rgba(79, 157, 135, 0.14);
    border-color: rgba(79, 157, 135, 0.24);
    color: #2c5a4d;
}

.documents-visibility-toggle.is-hidden {
    background: rgba(24, 34, 41, 0.06);
    border-color: rgba(24, 34, 41, 0.1);
    color: #5e6a70;
}

.documents-action-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.protocol-list {
    display: grid;
    gap: 12px;
}

.protocol-card {
    border: 1px solid rgba(24, 34, 41, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.72);
    overflow: hidden;
}

.protocol-summary {
    list-style: none;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    cursor: pointer;
}

.protocol-summary::-webkit-details-marker {
    display: none;
}

.protocol-summary::after {
    content: "";
    width: 10px;
    height: 10px;
    margin-left: auto;
    margin-top: 4px;
    flex: 0 0 auto;
    border-right: 2px solid #5e6a70;
    border-bottom: 2px solid #5e6a70;
    transform: rotate(45deg);
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.protocol-card[open] > .protocol-summary::after {
    transform: rotate(225deg);
}

.section-accordion {
    overflow: hidden;
}

.section-accordion-summary {
    list-style: none;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 18px 20px;
    cursor: pointer;
}

.section-accordion-summary::-webkit-details-marker {
    display: none;
}

.section-accordion-summary::after {
    content: "";
    width: 10px;
    height: 10px;
    margin-top: 6px;
    margin-left: auto;
    flex: 0 0 auto;
    border-right: 2px solid #718097;
    border-bottom: 2px solid #718097;
    transform: rotate(45deg);
    transition: transform 0.18s ease, border-color 0.18s ease;
}

.section-accordion[open] > .section-accordion-summary::after {
    transform: rotate(225deg);
    border-color: #2561d7;
}

.section-accordion-body {
    padding: 0 20px 20px;
}

.protocol-summary-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.protocol-card-body {
    display: grid;
    gap: 12px;
    padding: 0 16px 16px;
}

.project-protocols-overview-card {
    display: grid;
    gap: 18px;
    padding: 22px 24px;
    border: 1px solid rgba(24, 34, 41, 0.08);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 249, 255, 0.94));
    box-shadow: 0 14px 32px rgba(34, 61, 107, 0.08);
}

.project-protocols-overview-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.project-protocols-overview-copy {
    display: grid;
    gap: 4px;
}

.project-protocols-overview-copy h4 {
    margin: 0;
    font-size: 1.85rem;
    line-height: 1.05;
}

.project-protocols-overview-copy p {
    margin: 0;
    max-width: 560px;
    font-size: 1rem;
}

.project-protocols-overview-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    align-items: end;
}

.project-protocols-overview-stat {
    display: grid;
    gap: 6px;
    justify-items: center;
    text-align: center;
    padding: 10px 16px;
}

.project-protocols-overview-stat strong {
    font-size: clamp(3rem, 6vw, 4.4rem);
    line-height: 0.95;
    letter-spacing: -0.04em;
}

.project-protocols-overview-stat span {
    font-size: 1.05rem;
    font-weight: 700;
    color: #6d757f;
}

.project-protocols-overview-stat.is-completed strong {
    color: #124c1f;
}

.project-protocols-overview-stat.is-open strong {
    color: #9d4a17;
}

.project-protocols-overview-note {
    margin: 0;
    font-size: 0.95rem;
}

.protocol-open-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    background: linear-gradient(135deg, #182229, #2a4ea8);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(24, 34, 41, 0.18);
    transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.protocol-open-btn:hover,
.protocol-open-btn:focus-visible {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 14px 26px rgba(24, 34, 41, 0.22);
}

.protocol-table-wrap {
    overflow-x: auto;
}

.protocol-table input,
.protocol-table select {
    min-width: 100%;
}

.protocol-form-note {
    margin-top: -2px;
}

.protocol-recorder-modal {
    width: min(560px, 100%);
}

.protocol-recorder {
    display: grid;
    gap: 16px;
}

.protocol-recorder-consent {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid rgba(157, 74, 23, 0.16);
    border-radius: 12px;
    background: rgba(255, 247, 237, 0.78);
}

.protocol-recorder-consent p {
    margin: 0;
}

.protocol-recorder-source {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 16px;
    border: 1px solid rgba(24, 34, 41, 0.08);
    border-radius: 12px;
    background: rgba(245, 247, 247, 0.72);
}

.protocol-recorder-source-title {
    display: block;
    margin-bottom: 2px;
    font-size: 13px;
    font-weight: 700;
    color: #314148;
}

.protocol-recorder-source label {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    width: 100%;
    min-width: 0;
    padding: 8px 10px;
    border-radius: 10px;
    font-weight: 600;
    color: #223038;
}

.protocol-recorder-source label:has(input:checked) {
    background: rgba(24, 34, 41, 0.06);
}

.protocol-recorder-source input[type="radio"] {
    width: 16px;
    min-width: 16px;
    max-width: 16px;
    height: 16px;
    margin: 0;
    padding: 0;
}

.protocol-recorder-source span {
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.25;
}

.protocol-recorder-status {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 12px 14px;
    border: 1px solid rgba(24, 34, 41, 0.08);
    border-radius: 12px;
    background: rgba(245, 247, 247, 0.86);
}

.protocol-recording-dot {
    width: 10px;
    height: 10px;
    flex: 0 0 auto;
    border-radius: 999px;
    background: #8a969d;
}

.protocol-recording-dot.is-recording {
    background: #c93131;
    box-shadow: 0 0 0 6px rgba(201, 49, 49, 0.12);
}

.protocol-recorder-time {
    margin-left: auto;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    color: #314148;
}

.protocol-recorder-level {
    display: grid;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid rgba(24, 34, 41, 0.08);
    border-radius: 12px;
    background: rgba(245, 247, 247, 0.86);
}

.protocol-recorder-level-label {
    font-size: 12px;
    font-weight: 700;
    color: #314148;
}

.protocol-recorder-level-track {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: rgba(24, 34, 41, 0.12);
}

.protocol-recorder-level-track span {
    display: block;
    width: 0%;
    height: 100%;
    min-width: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, #4f9d87, #d7a03d);
    transition: width 0.08s linear;
}

.protocol-recorder-audio {
    width: 100%;
}

.protocol-summary-text {
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(245, 247, 247, 0.86);
    border: 1px solid rgba(24, 34, 41, 0.08);
    color: #223038;
    line-height: 1.55;
}

.workspace-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    margin-top: 16px;
}

.workspace-overview-card {
    display: grid;
    gap: 14px;
}

.workspace-overview-card h4 {
    margin: 0 0 4px;
}

.workspace-overview-group {
    display: grid;
    gap: 8px;
}

.workspace-overview-group > strong {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5e6a70;
}

.my-times-hero label {
    display: grid;
    gap: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #5e6a70;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.my-times-hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) repeat(2, 180px);
    gap: 18px;
    align-items: stretch;
}

.my-times-hero-main {
    display: grid;
    gap: 18px;
}

.my-times-focus-card {
    display: grid;
    place-items: center;
    gap: 12px;
    min-height: 172px;
    padding: 16px;
    border-radius: 18px;
    color: #c6d8e9;
    background:
        linear-gradient(135deg, rgba(4, 16, 35, 0.95), rgba(5, 33, 55, 0.92)),
        radial-gradient(circle at 75% 20%, rgba(47, 202, 255, 0.2), transparent 36%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 18px 36px rgba(13, 45, 74, 0.18);
    overflow: hidden;
}

.my-times-focus-ring {
    display: grid;
    place-items: center;
    width: 112px;
    height: 112px;
    text-align: center;
    border-radius: 50%;
    background:
        radial-gradient(circle, rgba(7, 22, 43, 0.96) 0 57%, transparent 58%),
        conic-gradient(#2fcaff 0 var(--timer-progress), #754eff var(--timer-progress) 100%);
    box-shadow: 0 0 34px rgba(47, 202, 255, 0.2);
}

.my-times-focus-ring.is-near-target {
    background:
        radial-gradient(circle, rgba(7, 22, 43, 0.96) 0 57%, transparent 58%),
        conic-gradient(#2fcaff 0 var(--timer-progress), #ffb347 var(--timer-progress) 100%);
}

.my-times-focus-ring.is-over-target {
    background:
        radial-gradient(circle, rgba(7, 22, 43, 0.96) 0 57%, transparent 58%),
        conic-gradient(#ff6b4a 0 100%);
    box-shadow: 0 0 34px rgba(255, 107, 74, 0.24);
}

.my-times-focus-ring strong {
    color: #eef7ff;
    font-size: 21px;
    line-height: 1;
}

.my-times-focus-ring small {
    max-width: 72px;
    margin-top: -22px;
    color: #8ea5bb;
    font-size: 10px;
    line-height: 1.15;
}

.my-times-mini-chart {
    display: grid;
    grid-template-columns: repeat(6, 8px);
    align-items: end;
    gap: 7px;
    height: 42px;
}

.my-times-mini-chart span {
    height: var(--bar);
    min-height: 4px;
    border-radius: 999px 999px 2px 2px;
    background: linear-gradient(180deg, rgba(44, 200, 255, 0.76), rgba(31, 96, 210, 0.26));
}

.my-times-mini-chart.week-chart {
    grid-template-columns: repeat(7, 8px);
}

.my-times-days {
    display: grid;
    gap: 16px;
}

.my-times-day .panel-head {
    align-items: flex-start;
}

.my-times-list {
    display: grid;
    gap: 10px;
}

.my-times-row {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px) auto auto;
    gap: 14px;
    align-items: center;
    padding: 14px;
    border: 1px solid rgba(24, 34, 41, 0.08);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.74);
}

.my-times-row p {
    margin: 4px 0 0;
}

.my-times-task-link {
    color: #102a43;
    font-weight: 900;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

.my-times-project-link,
.my-times-client-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #526477;
    font-weight: 600;
    text-decoration: none;
}

.my-times-project-link:hover,
.my-times-client-link:hover {
    color: #102a43;
}

.my-times-client-line {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.my-times-crm-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #102a43;
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
}

.my-times-crm-link:hover {
    background: #0b1f33;
    color: #fff;
}

.my-times-note-line {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-weight: 500;
}

.my-times-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    color: #5e6a70;
}

.my-times-duration {
    white-space: nowrap;
}

.time-entry-list {
    display: grid;
    gap: 12px;
}

.time-entry-summary-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
}

.time-entry-summary-pill {
    display: grid;
    gap: 2px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(222, 234, 247, 0.75);
    color: #1d4158;
    line-height: 1.15;
}

.time-entry-summary-pill strong {
    font-size: 15px;
}

.time-entry-summary-pill small {
    color: #5e6a70;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.time-entry-summary-pill.is-running {
    background: rgba(255, 229, 190, 0.85);
    color: #8a4f00;
}

.time-entry-list-scroll {
    max-height: 420px;
    overflow: auto;
    padding-right: 4px;
}

.side-panel-scroll.time-entry-list-scroll {
    max-height: min(48vh, 520px);
}

.time-entry-card {
    display: grid;
    gap: 10px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(24, 34, 41, 0.08);
    background: rgba(255, 255, 255, 0.72);
}

.time-entry-accordion,
.time-entry-manual-accordion {
    gap: 0;
    padding: 0;
}

.time-entry-card-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 54px;
    padding: 12px 14px;
    cursor: pointer;
    list-style: none;
}

.time-entry-card-summary::-webkit-details-marker {
    display: none;
}

.time-entry-card-summary::marker {
    content: "";
}

.time-entry-main {
    display: grid;
    gap: 3px;
    min-width: 0;
}

.time-entry-main strong,
.time-entry-main .muted {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.time-entry-card-meta {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 8px;
}

.time-entry-card-meta i {
    color: #8a98a8;
    font-size: 12px;
    transition: transform 0.16s ease;
}

.time-entry-accordion[open] .time-entry-card-meta .fa-chevron-down {
    transform: rotate(180deg);
}

.time-entry-manual-accordion[open] .time-entry-card-meta .fa-plus {
    transform: rotate(45deg);
}

.time-entry-card-body {
    padding: 0 14px 14px;
}

.time-entry-card.is-running {
    border-color: rgba(217, 180, 74, 0.28);
    background: rgba(255, 248, 225, 0.72);
}

.time-entry-form,
.time-entry-manual-form {
    gap: 14px;
}

.time-entry-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 1fr));
    gap: 16px;
}

.task-time-side-panel .time-entry-fields {
    grid-template-columns: 1fr;
}

.time-entry-billing-row {
    display: grid;
    grid-template-columns: minmax(220px, 320px);
    gap: 10px;
}

.task-time-side-panel .time-entry-billing-row {
    grid-template-columns: 1fr;
}

.task-time-side-panel .time-entry-card {
    padding: 0;
}

.task-time-side-panel {
    display: grid;
    gap: 16px;
}

.task-time-manual-card {
    margin-top: 4px;
}

.task-time-manual-card .time-entry-manual-form {
    padding: 0 14px 14px;
}

.side-panel-backdrop {
    padding: 0;
}

.side-panel-card {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: min(720px, 100vw);
    height: 100vh;
    max-height: 100vh;
    min-height: 100vh;
    margin: 0;
    box-sizing: border-box;
    overflow: auto;
    border-radius: 24px 0 0 24px;
    padding: 24px 24px 72px;
    box-shadow: -24px 0 60px rgba(18, 32, 41, 0.18);
}

.modal-close {
    width: auto;
    min-width: 38px;
    padding: 8px 12px;
    border-radius: 999px;
    background: #e7ecef;
    color: #182229;
}

body.modal-open {
    overflow: hidden;
}

.project-details-form label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
}

.split-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.settings-mail-preferences {
    display: grid;
    gap: 10px;
    align-content: start;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(246, 248, 252, 0.8);
    border: 1px solid rgba(36, 50, 74, 0.06);
}

.settings-mail-preferences .auth-checkbox {
    margin: 0;
}

.settings-mail-preferences-help {
    margin: 0;
}

.member-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
}

.workspace-access-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.workspace-access-card {
    display: grid;
    gap: 12px;
}

.member-admin-row {
    gap: 10px;
}

.member-admin-head {
    align-items: center;
}

.member-admin-identity {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.member-admin-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    overflow: hidden;
    font-size: 16px;
    font-weight: 700;
    color: #123a78;
    background: linear-gradient(180deg, #eef5ff, #dfeeff);
    border: 1px solid rgba(46, 99, 230, 0.16);
}

.member-admin-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-admin-copy {
    min-width: 0;
}

.member-admin-copy strong,
.member-admin-copy .muted {
    display: block;
}

.member-admin-row .inline-action-form select {
    min-width: 120px;
    width: auto;
}

.admin-overview-widgets {
    grid-template-columns: minmax(520px, 1.35fr) minmax(280px, 0.75fr);
    align-items: start;
}

.admin-members-panel {
    min-height: 0;
}

.admin-members-table-wrap {
    margin-top: 0;
}

.admin-members-table td:last-child {
    text-align: right;
    white-space: nowrap;
}

.admin-members-table td:nth-child(3),
.admin-members-table td:nth-child(4) {
    font-weight: 800;
}

.compact-member-flags {
    margin-top: 6px;
}

.company-user-admin-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    margin: 14px 0 18px;
}

.company-user-admin-controls .inline-action-form {
    align-items: end;
}

.company-user-admin-controls input[type="number"] {
    width: 110px;
}

.admin-summary-stack {
    display: grid;
    gap: 16px;
    align-content: start;
}

.admin-summary-panel {
    min-height: 0;
    align-self: start;
}

.member-chip {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f5f7f7;
    border: 1px solid rgba(24, 34, 41, 0.08);
}

.member-chip input {
    width: auto;
    margin: 0;
}

.small-btn {
    width: auto;
    padding: 9px 14px;
    border-radius: 12px;
    font-size: 13px;
    font-weight: 600;
}

.small-btn.is-loading,
button.is-loading,
input[type="submit"].is-loading,
.small-btn[aria-busy="true"],
button[aria-busy="true"],
input[type="submit"][aria-busy="true"] {
    opacity: 0.72;
    cursor: wait;
    pointer-events: none;
}

form.is-submitting button[type="submit"],
form.is-submitting input[type="submit"] {
    cursor: wait;
}

.widget-panel {
    padding: 16px;
    display: flex;
    flex-direction: column;
    min-height: 260px;
}

.widget-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 0;
    border-top: 1px solid rgba(24, 34, 41, 0.08);
}

.widget-item:first-of-type {
    border-top: none;
}

.widget-item.stacked {
    display: grid;
    justify-content: stretch;
}

.request-attention-summary {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.request-attention-summary > div {
    display: grid;
    gap: 4px;
}

.dashboard-task-item {
    gap: 8px;
    align-content: start;
}

.dashboard-task-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.dashboard-task-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.dashboard-task-meta .pill {
    max-width: 100%;
}

.dashboard-task-reason {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
}

.widget-footer {
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid rgba(24, 34, 41, 0.08);
}

.widget-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #395364;
}

.widget-footer-link:hover {
    color: #182229;
}

.pill.neutral-pill {
    background: #eef3f6;
    color: #4d6472;
}

.widget-link {
    border-radius: 12px;
    transition: background 0.18s ease, transform 0.18s ease;
}

.widget-link:hover {
    background: rgba(24, 34, 41, 0.04);
    transform: translateY(-1px);
}

.workspace-list-form {
    display: grid;
    gap: 10px;
}

.invite-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(24, 34, 41, 0.08);
}

.workspace-select-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    text-align: left;
    background: #fff;
    color: #182229;
    border: 1px solid rgba(24, 34, 41, 0.08);
}

.nested-panel {
    display: grid;
    gap: 12px;
}

.inactive-workspaces {
    margin-top: 12px;
}

.inactive-card {
    opacity: 0.65;
    cursor: default;
}

.admin-action {
    display: flex;
    align-items: flex-end;
}

.inline-action-form {
    display: flex;
    gap: 8px;
    width: auto;
    justify-content: flex-start;
}

.inline-action-form button {
    width: auto;
}

.tenant-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    margin-top: 20px;
}

.tenant-card {
    display: grid;
    gap: 14px;
}

.tenant-meta,
.tenant-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.tenant-meta {
    color: #5e6a70;
    font-size: 14px;
}

.tenant-actions form {
    width: auto;
}

.pill-row {
    display: flex;
    gap: 8px;
    margin: 8px 0 2px;
    flex-wrap: wrap;
}

.pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
}

.pill.overdue {
    background: #f6d6d8;
    color: #8c2027;
}

.pill.due-soon {
    background: #ffe5be;
    color: #8a4f00;
}

.pill.blocked-note {
    background: #e7ecef;
    color: #314148;
    max-width: 100%;
}

.user-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.user-badge-avatar {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    overflow: hidden;
    border-radius: 50%;
    color: #123a78;
    background: linear-gradient(180deg, #eef5ff, #dfeeff);
    border: 1px solid rgba(46, 99, 230, 0.16);
    font-weight: 700;
}

.user-badge-avatar-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-badge-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-badge-xs {
    gap: 6px;
}

.user-badge-xs .user-badge-avatar {
    width: 18px;
    height: 18px;
    font-size: 10px;
}

.user-badge-sm .user-badge-avatar {
    width: 24px;
    height: 24px;
    font-size: 11px;
}

.user-badge-md .user-badge-avatar {
    width: 32px;
    height: 32px;
    font-size: 13px;
}

.pill.assignee-pill {
    background: #ddeaf7;
    color: #18456d;
}

.view-switch {
    display: inline-flex;
    gap: 8px;
    margin-top: 14px;
    padding: 5px;
    border-radius: 999px;
    background: rgba(235, 241, 250, 0.92);
    border: 1px solid rgba(31, 48, 79, 0.06);
}

.view-switch a,
.link-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 8px 12px;
    background: #edf2f8;
    font-size: 14px;
    color: #3a4e6f;
    border: 1px solid transparent;
}

.link-chip.subtle {
    background: #f4f7fb;
}

.project-comment-trigger {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #dde6ea;
    color: #182229;
    border: 1px solid rgba(24, 34, 41, 0.12);
}

.project-comment-trigger:hover {
    background: #d1dde3;
}

.view-switch a.active {
    background: #1f5fd5;
    color: #fff;
    box-shadow: 0 10px 18px rgba(31, 95, 213, 0.22);
}

.project-card.static {
    cursor: default;
}

.progress {
    height: 10px;
    background: #dbe5e0;
    border-radius: 999px;
    overflow: hidden;
    margin: 12px 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #d76c3d, #4f9d87);
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: capitalize;
    color: #1b2432;
}

.badge.todo {
    background: #e7ecef;
}

.badge.progress {
    background: #ffe7c2;
    color: #7c4d02;
}

.badge.done {
    background: #d7f0df;
    color: #245942;
}

.badge.blocked {
    background: #f8d7da;
    color: #7c3139;
}

.badge.new-badge {
    background: #dceefc;
    color: #14507a;
}

input,
textarea,
select,
button {
    width: 100%;
    box-sizing: border-box;
    border-radius: 12px;
    border: 1px solid #cfd8dc;
    padding: 11px 12px;
    font: inherit;
}

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

button {
    background: #122029;
    color: #fff;
    border: none;
    cursor: pointer;
}

button.secondary {
    background: #d76c3d;
}

button.danger {
    background: #ab3b3b;
}

.small-btn,
a.small-btn,
button.small-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: auto;
    min-height: 36px;
    border: 1px solid rgba(18, 32, 41, 0.14);
    background: #122029;
    color: #fff;
    text-decoration: none;
    box-shadow: 0 8px 18px rgba(18, 32, 41, 0.08);
}

.small-btn.secondary,
a.small-btn.secondary,
button.small-btn.secondary {
    border-color: rgba(15, 74, 125, 0.18);
    background: #eef5fb;
    color: #173a56;
    box-shadow: 0 8px 18px rgba(32, 70, 112, 0.06);
}

.small-btn:hover,
a.small-btn:hover,
button.small-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(18, 32, 41, 0.12);
}

.small-btn.secondary:hover,
a.small-btn.secondary:hover,
button.small-btn.secondary:hover {
    border-color: rgba(15, 74, 125, 0.32);
    background: #e3eff8;
    color: #102a43;
}

.small-btn.success-btn,
button.small-btn.success-btn,
a.small-btn.success-btn {
    background: #1fb66b;
    color: #ffffff;
    border-color: rgba(31, 182, 107, 0.35);
    box-shadow: 0 10px 20px rgba(31, 182, 107, 0.22);
}

.small-btn.success-btn:hover,
button.small-btn.success-btn:hover,
a.small-btn.success-btn:hover {
    background: #17995a;
    color: #ffffff;
    border-color: rgba(23, 153, 90, 0.45);
    box-shadow: 0 12px 24px rgba(31, 182, 107, 0.28);
}

button.disabled,
button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

form {
    display: grid;
    gap: 12px;
}

.flash {
    padding: 14px 16px;
    border-radius: 12px;
    margin-bottom: 18px;
}

.flash.success {
    background: #dff3e6;
}

.flash.error {
    background: #f7d9dc;
}

.flash.warning {
    background: #fff0cf;
}

.project-date-risk {
    background: #fff0cf;
    color: #7a4a00;
}

.project-date-risk-text {
    color: #7a4a00;
}

.client-request-public-list {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
}

.client-request-public-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border-radius: 14px;
    background: rgba(231, 241, 252, 0.7);
    border: 1px solid rgba(24, 34, 41, 0.08);
}

.client-request-public-item > div {
    display: grid;
    gap: 4px;
}

.client-request-trap {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.auth-card {
    max-width: 340px;
    width: min(340px, 100%);
    margin: 0 auto;
}

.auth-card-head {
    display: grid;
    gap: 6px;
    margin-bottom: 16px;
}

.auth-card-head h3,
.auth-card-head p {
    margin: 0;
}

.auth-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    color: #5e6a70;
    font-size: 14px;
    cursor: pointer;
}

.auth-checkbox input {
    width: 16px;
    height: 16px;
    margin: 0;
}

.auth-legal-links {
    display: flex;
    justify-content: center;
    gap: 14px;
    margin-top: 14px;
    font-size: 13px;
}

.auth-legal-links a {
    color: #5e6a70;
}

.auth-legal-links a:hover {
    color: #182229;
}

.legal-page {
    max-width: 920px;
    margin: 0 auto;
    display: grid;
    gap: 18px;
}

.legal-notice {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-radius: 16px;
    background: #fef2d9;
    border: 1px solid rgba(188, 140, 52, 0.22);
    color: #5f4a17;
}

.legal-section {
    display: grid;
    gap: 8px;
}

.legal-section h4,
.legal-section p {
    margin: 0;
}

.legal-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 6px;
}

.floating-timer {
    position: fixed;
    right: 20px;
    bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    background: #122029;
    color: #fff;
    border-radius: 999px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22);
    transition: padding 0.2s ease, gap 0.2s ease, transform 0.2s ease;
    z-index: 20;
}

.floating-timer-toggle {
    display: none;
    width: 42px;
    min-width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    font-size: 18px;
    line-height: 1;
}

.floating-timer-copy {
    display: grid;
    gap: 2px;
}

.floating-timer-label,
.floating-timer-task {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.72);
}

.floating-timer-meta {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.58);
}

.floating-timer-elapsed {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.01em;
    color: #fff;
}

.floating-timer.is-live {
    align-items: center;
}

.floating-timer.is-paused {
    background: #26414d;
}

.floating-timer-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.floating-timer-actions button {
    white-space: nowrap;
}

.floating-timer.is-collapsed {
    padding: 12px 14px;
    gap: 0;
    cursor: pointer;
}

.floating-timer.is-collapsed .floating-timer-label,
.floating-timer.is-collapsed .floating-timer-task,
.floating-timer.is-collapsed .floating-timer-meta,
.floating-timer.is-collapsed .floating-timer-actions {
    display: none;
}

.floating-timer.is-collapsed .floating-timer-copy {
    gap: 0;
}

.toast-container {
    position: fixed;
    right: 20px;
    top: 20px;
    display: grid;
    gap: 10px;
    z-index: 1000;
}

.toast {
    padding: 12px 14px;
    border-radius: 14px;
    color: #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.success {
    background: #1d6a54;
}

.toast.error {
    background: #a63c44;
}

.toast.hide {
    opacity: 0;
    transform: translateY(-6px);
}

.confirm-overlay {
    position: fixed;
    inset: 0;
    background: rgba(18, 32, 41, 0.28);
    display: grid;
    place-items: center;
    z-index: 2200;
    padding: 20px;
}

.confirm-dialog {
    width: min(420px, 100%);
    display: grid;
    gap: 14px;
    padding: 20px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(24, 34, 41, 0.08);
    box-shadow: 0 16px 40px rgba(18, 32, 41, 0.18);
}

.confirm-dialog h4,
.confirm-dialog p {
    margin: 0;
}

.timer-note-dialog textarea {
    min-height: 110px;
    resize: vertical;
}

.confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.kanban-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(240px, 1fr));
    gap: 16px;
    align-items: stretch;
}

.project-kanban-board {
    display: grid;
    grid-template-columns: repeat(4, minmax(220px, 1fr));
    gap: 16px;
    margin-top: 16px;
    align-items: stretch;
}

.ticket-kanban-board {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
    align-items: stretch;
    overflow-x: hidden;
    padding-bottom: 4px;
    width: 100%;
    max-width: 100%;
}

.ticket-kanban-board .kanban-column {
    min-width: 0;
    border-radius: 0;
    padding: 0;
    background: #f7f9fb;
    border-color: rgba(24, 34, 41, 0.1);
}

.ticket-board-wrap {
    min-width: 0;
    max-width: 100%;
}

.kanban-panel {
    padding: 16px;
}

.kanban-column {
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid rgba(24, 34, 41, 0.08);
    border-radius: 18px;
    padding: 14px;
    display: flex;
    flex-direction: column;
}

.kanban-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}

.kanban-dropzone {
    min-height: 200px;
    display: grid;
    gap: 12px;
    flex: 1;
    align-content: start;
}

.kanban-dropzone.drag-over {
    background: rgba(215, 108, 61, 0.08);
    border-radius: 14px;
}

.kanban-card {
    background: #fff;
    border-radius: 16px;
    padding: 12px;
    border: 1px solid rgba(24, 34, 41, 0.08);
    box-shadow: 0 8px 24px rgba(18, 32, 41, 0.08);
    cursor: grab;
}

.kanban-card p {
    margin: 8px 0;
    font-size: 14px;
    color: #4d5a60;
}

.kanban-card .task-actions {
    justify-content: flex-start;
}

.kanban-card button.secondary,
.kanban-card .link-chip {
    width: auto;
    padding: 6px 10px;
    font-size: 13px;
    color: #182229;
    background: #dde6ea;
    border: 1px solid rgba(24, 34, 41, 0.12);
}

.kanban-card.dragging {
    opacity: 0.55;
}

.project-kanban-card {
    cursor: grab;
}

.ticket-kanban-card {
    cursor: grab;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    padding: 10px;
    border-radius: 8px;
    box-shadow: none;
    border-color: rgba(24, 34, 41, 0.18);
}

.ticket-kanban-card.active {
    border-color: rgba(33, 108, 255, 0.34);
    box-shadow: 0 16px 32px rgba(21, 47, 86, 0.12);
}

.ticket-kanban-link {
    display: grid;
    gap: 5px;
    color: inherit;
    text-decoration: none;
    min-width: 0;
}

.ticket-kanban-link > * {
    min-width: 0;
    overflow-wrap: anywhere;
}

.ticket-kanban-title {
    color: #006d72;
    font-size: 14px;
    line-height: 1.25;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
}

.ticket-kanban-account {
    color: #182229;
    font-size: 12px;
    font-weight: 750;
}

.ticket-kanban-subtle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #4d5f73;
    font-size: 12px;
    line-height: 1.25;
}

.ticket-kanban-subtle.is-unassigned {
    color: #b93535;
    font-weight: 800;
}

.ticket-kanban-meta {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 9px;
    padding-top: 8px;
    border-top: 1px solid rgba(24, 34, 41, 0.12);
    color: #53677f;
    font-size: 11px;
}

.ticket-kanban-meta .pill {
    max-width: 100%;
    white-space: normal;
    padding: 4px 7px;
    font-size: 11px;
    line-height: 1.1;
}

.ticket-kanban-meta .pill i {
    margin-right: 5px;
}

.ticket-kanban-date {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    width: 100%;
    color: #53677f;
}

@media (max-width: 960px) {
    body.auth-page {
        height: 100dvh;
        overflow: hidden;
    }

    body.auth-page .shell.auth-shell {
        min-height: 100dvh;
        height: 100dvh;
        overflow: hidden;
    }

    .shell {
        grid-template-columns: 1fr;
    }

    .shell.sidebar-collapsed {
        grid-template-columns: 1fr;
    }

    .sidebar {
        order: 1;
        position: relative;
        top: auto;
        z-index: 20;
        padding: 16px 16px 12px;
        gap: 12px;
    }

    .sidebar-brand-mark {
        padding: 10px 12px;
    }

    .sidebar-brand-logo {
        height: 52px;
    }

    .topbar-company-logo-wrap {
        width: 60px;
        height: 60px;
        padding: 8px;
        border-radius: 18px;
    }

    .topbar-brand {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .topbar-company-meta {
        width: 100%;
        justify-content: space-between;
    }

    .topbar-company-copy {
        text-align: left;
    }

    .settings-avatar-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .settings-outlook-card {
        flex-direction: column;
    }

    .my-times-hero-layout {
        grid-template-columns: 1fr;
    }

    .my-times-focus-card {
        min-height: 150px;
        grid-template-columns: auto 1fr;
        justify-content: center;
    }

    .mobile-menu-toggle {
        display: inline-block;
    }

    .sidebar-collapse-toggle {
        display: none;
    }

    .content {
        order: 2;
        padding: 18px;
    }

    .content.auth-content {
        display: grid;
        grid-template-columns: 1fr;
        justify-items: center;
        align-content: center;
        min-height: 100dvh;
        height: 100dvh;
        padding: 20px 0 24px;
        width: 100%;
        max-width: 100%;
        overflow: hidden;
    }

    .app-copyright-footer {
        padding: 6px 12px;
        font-size: 11px;
    }

    .content.auth-content .app-copyright-footer {
        display: none;
    }

    body.auth-page .content.auth-content > * {
        width: min(320px, calc(100vw - 96px));
        max-width: min(320px, calc(100vw - 96px));
        min-width: 0;
        margin-left: auto;
        margin-right: auto;
    }

    body.auth-page .content.auth-content .topbar {
        width: min(320px, calc(100vw - 96px));
        max-width: min(320px, calc(100vw - 96px));
        margin-bottom: 0;
        padding: 0;
    }

    .content.auth-content .topbar-brand {
        padding: 0;
        border-radius: 0;
    }

    .auth-brand-logo {
        width: min(260px, 100%);
        height: 64px;
    }

    body.auth-page .auth-card {
        width: min(320px, calc(100vw - 96px));
        max-width: min(320px, calc(100vw - 96px));
        margin-left: auto;
        margin-right: auto;
    }

    body.auth-page .flash {
        width: min(320px, calc(100vw - 96px));
        max-width: min(320px, calc(100vw - 96px));
        margin-left: auto;
        margin-right: auto;
    }

    .site-footer {
        padding: 0 18px 18px;
        flex-wrap: wrap;
    }

    .nav {
        display: none;
    }

    .sidebar.menu-open .nav-groups {
        display: grid;
        gap: 12px;
    }

    .nav a {
        white-space: normal;
        text-align: left;
        padding: 11px 10px;
        border-radius: 14px;
        font-size: 14px;
    }

    .sidebar.menu-open .nav {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .floating-timer {
        left: auto;
        right: 14px;
        bottom: 14px;
        justify-content: flex-start;
        gap: 10px;
        padding: 10px 12px;
        border-radius: 18px;
        max-width: calc(100vw - 28px);
    }

    .floating-timer-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .floating-timer.is-mobile-collapsed {
        width: 56px;
        min-width: 56px;
        height: 56px;
        padding: 0;
        border-radius: 999px;
        justify-content: center;
    }

    .floating-timer.is-mobile-collapsed .floating-timer-copy,
    .floating-timer.is-mobile-collapsed .floating-timer-actions {
        display: none;
    }

    .floating-timer.is-mobile-collapsed .floating-timer-toggle {
        margin: 0;
        width: 56px;
        min-width: 56px;
        height: 56px;
        background: transparent;
        border: none;
    }

    .floating-timer.is-mobile-expanded {
        left: 14px;
        right: 14px;
        justify-content: space-between;
        padding: 12px 14px;
        border-radius: 18px;
    }

    .floating-timer.is-mobile-expanded .floating-timer-toggle {
        width: 38px;
        min-width: 38px;
        height: 38px;
    }

    .kanban-board {
        grid-template-columns: 1fr;
    }

    .project-kanban-board {
        grid-template-columns: 1fr;
    }

    .milestone-roadmap-card {
        flex-basis: min(240px, calc(100vw - 72px));
        min-height: 138px;
    }

    .roadmap-controls {
        display: none;
    }

    .side-panel-card {
        width: 100vw;
        border-radius: 0;
        padding: 18px 18px 56px;
    }

    .my-times-row {
        grid-template-columns: 1fr;
        align-items: flex-start;
    }

    .my-times-meta {
        align-items: flex-start;
    }

    .project-hero {
        padding: 16px 16px 18px;
        gap: 8px;
    }

    .project-hero .panel-head {
        gap: 10px;
        margin-bottom: 4px;
    }

    .project-hero .right-meta {
        gap: 8px;
    }

    .project-hero .badge {
        padding: 6px 10px;
        font-size: 11px;
    }

    .protocol-summary {
        flex-direction: column;
    }

    .protocol-summary-meta {
        justify-content: flex-start;
    }

    .project-protocols-overview-card {
        padding: 18px;
        gap: 16px;
    }

    .project-protocols-overview-head {
        flex-direction: column;
        align-items: stretch;
    }

    .project-protocols-overview-copy h4 {
        font-size: 1.5rem;
    }

    .project-protocols-overview-stats {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .project-protocols-overview-stat {
        justify-items: flex-start;
        text-align: left;
        padding: 0;
    }

    .project-protocols-overview-stat strong {
        font-size: 3.2rem;
    }

    .protocol-open-btn {
        width: 100%;
    }

    .time-entry-fields {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1080px) {
    body.auth-page {
        height: auto;
        min-height: 100vh;
        overflow: auto;
    }

    body.auth-page .shell.auth-shell,
    body.auth-page .content.auth-content {
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }

    body.auth-page .content.auth-content {
        display: flex;
        padding: 22px 18px;
    }

    .auth-experience {
        height: auto;
        min-height: 0;
    }

    body.auth-page .content.auth-content > .auth-experience,
    body.auth-page .content.auth-content > .flash {
        width: min(720px, 100%);
        max-width: min(720px, 100%);
    }
}

@media (max-width: 640px) {
    .my-times-focus-card {
        grid-template-columns: 1fr;
    }

    .my-times-focus-ring {
        width: 104px;
        height: 104px;
    }

    body.auth-page .content.auth-content {
        padding: 14px;
    }

    body.auth-page .content.auth-content > .auth-experience,
    body.auth-page .content.auth-content > .flash,
    body.auth-page .auth-card {
        width: 100%;
        max-width: 100%;
    }
}

body.auth-page .content.auth-content > .auth-standalone-panel {
    width: min(640px, 100%);
    max-width: min(640px, 100%);
}

body:not(.auth-page):not(.client-status-body) {
    background:
        linear-gradient(rgba(28, 125, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(28, 125, 255, 0.04) 1px, transparent 1px),
        radial-gradient(circle at 15% 18%, rgba(42, 196, 255, 0.18), transparent 28%),
        radial-gradient(circle at 78% 6%, rgba(71, 98, 255, 0.12), transparent 30%),
        linear-gradient(135deg, var(--planion-navy-950) 0%, var(--planion-navy-900) 32%, #e4eef8 32%, #f3f7fc 100%);
    background-size: 64px 64px, 64px 64px, auto, auto, auto;
    color: var(--planion-text);
}

body:not(.auth-page):not(.client-status-body) .shell {
    background:
        linear-gradient(126deg, transparent 0 45%, rgba(255, 255, 255, 0.34) 45% 46%, transparent 46% 100%),
        radial-gradient(circle at 24% 10%, rgba(53, 205, 255, 0.18), transparent 28%),
        radial-gradient(circle at 72% 18%, rgba(59, 167, 255, 0.12), transparent 34%),
        linear-gradient(135deg, rgba(3, 11, 26, 0.96) 0 var(--sidebar-width), rgba(228, 238, 248, 0.97) var(--sidebar-width) 100%);
}

body:not(.auth-page):not(.client-status-body) .shell.sidebar-collapsed {
    background:
        linear-gradient(126deg, transparent 0 45%, rgba(255, 255, 255, 0.34) 45% 46%, transparent 46% 100%),
        radial-gradient(circle at 24% 10%, rgba(53, 205, 255, 0.18), transparent 28%),
        radial-gradient(circle at 72% 18%, rgba(59, 167, 255, 0.12), transparent 34%),
        linear-gradient(135deg, rgba(3, 11, 26, 0.96) 0 var(--sidebar-collapsed-width), rgba(228, 238, 248, 0.97) var(--sidebar-collapsed-width) 100%);
}

body:not(.auth-page):not(.client-status-body) .sidebar {
    position: relative;
    overflow: visible;
    color: #d9e8fb;
    background:
        radial-gradient(circle at 38% 0%, rgba(37, 203, 255, 0.22), transparent 34%),
        linear-gradient(rgba(65, 160, 255, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(65, 160, 255, 0.06) 1px, transparent 1px),
        linear-gradient(180deg, rgba(5, 18, 39, 0.98), rgba(4, 12, 28, 0.98));
    background-size: auto, 48px 48px, 48px 48px, auto;
    border-right: 1px solid rgba(111, 197, 255, 0.18);
    box-shadow:
        18px 0 54px rgba(6, 18, 39, 0.28),
        inset -1px 0 0 rgba(255, 255, 255, 0.04);
}

body:not(.auth-page):not(.client-status-body) .sidebar::after {
    content: "";
    position: absolute;
    inset: auto 18px 18px 18px;
    height: 160px;
    pointer-events: none;
    background: radial-gradient(ellipse at center, rgba(38, 191, 255, 0.16), transparent 64%);
}

body:not(.auth-page):not(.client-status-body) .sidebar-brand-mark {
    position: relative;
    z-index: 1;
    padding: 8px 4px;
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

body:not(.auth-page):not(.client-status-body) .sidebar-brand-lockup {
    color: #ffffff;
    text-shadow: 0 12px 30px rgba(0, 0, 0, 0.35);
}

body:not(.auth-page):not(.client-status-body) .sidebar-brand-lockup .sidebar-brand-logo {
    filter: drop-shadow(0 14px 24px rgba(35, 157, 255, 0.35));
}

body:not(.auth-page):not(.client-status-body) .nav,
body:not(.auth-page):not(.client-status-body) .nav-group {
    position: relative;
    z-index: 1;
}

body:not(.auth-page):not(.client-status-body) .nav-group-summary {
    color: #88a7ca;
}

body:not(.auth-page):not(.client-status-body) .nav-group-summary::after {
    border-color: #4fa9e6;
}

body:not(.auth-page):not(.client-status-body) .nav a {
    color: #bdd2eb;
    background:
        linear-gradient(180deg, rgba(21, 43, 76, 0.74), rgba(8, 24, 48, 0.54));
    border: 1px solid rgba(104, 166, 230, 0.16);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

body:not(.auth-page):not(.client-status-body) .nav a.active,
body:not(.auth-page):not(.client-status-body) .nav a:hover {
    color: #ffffff;
    background:
        radial-gradient(circle at 20% 50%, rgba(48, 204, 255, 0.3), transparent 42%),
        linear-gradient(135deg, rgba(30, 112, 255, 0.74), rgba(28, 201, 255, 0.38));
    border-color: rgba(95, 212, 255, 0.5);
    box-shadow:
        0 16px 34px rgba(3, 12, 28, 0.28),
        0 0 26px rgba(44, 189, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.14);
}

body:not(.auth-page):not(.client-status-body) .nav-link-icon {
    color: #7ee0ff;
    background: rgba(79, 187, 255, 0.14);
}

body:not(.auth-page):not(.client-status-body) .sidebar-collapse-toggle {
    position: relative;
    z-index: 40;
    background: rgba(15, 38, 72, 0.76);
    border-color: rgba(116, 198, 255, 0.24);
    color: #9de8ff;
    box-shadow:
        0 12px 26px rgba(2, 10, 24, 0.26),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body:not(.auth-page):not(.client-status-body) .shell.sidebar-collapsed .sidebar-collapse-toggle {
    position: absolute;
    top: 16px;
    right: -19px;
}

body:not(.auth-page):not(.client-status-body) .content {
    padding: 26px 28px 32px;
}

body:not(.auth-page):not(.client-status-body) .topbar {
    padding: 0;
    margin-bottom: 28px;
}

body:not(.auth-page):not(.client-status-body) .topbar-brand {
    padding: 16px 20px;
    border-radius: var(--planion-radius-shell);
    background:
        radial-gradient(circle at 10% 26%, rgba(47, 203, 255, 0.14), transparent 30%),
        radial-gradient(circle at 88% 30%, rgba(75, 118, 255, 0.08), transparent 24%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(242, 248, 255, 0.78));
    border: 1px solid var(--planion-border-strong);
    box-shadow: var(--planion-shadow-shell);
    backdrop-filter: blur(18px);
}

body:not(.auth-page):not(.client-status-body) .topbar-avatar,
body:not(.auth-page):not(.client-status-body) .topbar-company-logo-wrap {
    border-color: rgba(71, 191, 255, 0.28);
    box-shadow:
        0 12px 28px rgba(26, 74, 140, 0.12),
        0 0 28px rgba(50, 187, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

body:not(.auth-page):not(.client-status-body) .muted {
    color: var(--planion-muted);
}

body:not(.auth-page):not(.client-status-body) .flash {
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, 0.54);
    box-shadow: 0 18px 38px rgba(21, 47, 86, 0.08);
    border-left-width: 5px;
    color: var(--planion-text);
    font-weight: 700;
}

body:not(.auth-page):not(.client-status-body) .flash.success {
    background: #ecf8f0;
    border-left-color: #21a65b;
}

body:not(.auth-page):not(.client-status-body) .flash.error {
    background: #fff0f1;
    border-left-color: #dc3545;
}

body:not(.auth-page):not(.client-status-body) .flash.warning {
    background: #fff8e6;
    border-left-color: #e2a80f;
}

body:not(.auth-page):not(.client-status-body) .stats-grid {
    gap: 18px;
    margin-bottom: 22px;
}

body:not(.auth-page):not(.client-status-body) .panel,
body:not(.auth-page):not(.client-status-body) .stat-card,
body:not(.auth-page):not(.client-status-body) .project-card,
body:not(.auth-page):not(.client-status-body) .task-card {
    background:
        radial-gradient(circle at 86% 28%, rgba(55, 202, 255, 0.08), transparent 26%),
        linear-gradient(180deg, var(--planion-surface), var(--planion-surface-soft));
    border: 1px solid var(--planion-border);
    border-radius: var(--planion-radius-card);
    box-shadow: var(--planion-shadow-card);
}

body:not(.auth-page):not(.client-status-body) .stat-card {
    position: relative;
    min-height: 104px;
    overflow: hidden;
    padding: 22px 20px;
}

body:not(.auth-page):not(.client-status-body) .stat-card::after {
    content: "";
    position: absolute;
    inset: auto 18px 0 auto;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(45, 199, 255, 0.16), transparent 66%);
}

body:not(.auth-page):not(.client-status-body) .stat-card strong {
    position: relative;
    z-index: 1;
    color: #08172c;
    font-size: 30px;
    letter-spacing: 0;
}

body:not(.auth-page):not(.client-status-body) .stat-card span {
    position: relative;
    z-index: 1;
    color: #465b74;
}

body:not(.auth-page):not(.client-status-body) .stat-card.stat-card-accent {
    background:
        radial-gradient(circle at 88% 18%, rgba(31, 182, 107, 0.18), transparent 30%),
        linear-gradient(180deg, #f7fff9, #ecf9f2);
    border-color: rgba(31, 182, 107, 0.18);
}

@media (max-width: 1280px) {
    .stats-kpi-grid {
        grid-template-columns: repeat(3, minmax(160px, 1fr));
    }

}

@media (max-width: 760px) {
    .stats-kpi-grid,
    .stats-signal-grid {
        grid-template-columns: 1fr;
    }
}

body:not(.auth-page):not(.client-status-body) .dashboard-widgets {
    grid-template-columns: repeat(5, minmax(180px, 1fr));
    gap: 18px;
    align-items: stretch;
}

body:not(.auth-page):not(.client-status-body) .widget-panel {
    min-height: 278px;
    padding: 18px;
    overflow: hidden;
}

body:not(.auth-page):not(.client-status-body) .admin-overview-widgets {
    grid-template-columns: minmax(560px, 1.35fr) minmax(300px, 0.75fr);
    align-items: start;
}

body:not(.auth-page):not(.client-status-body) .admin-members-panel,
body:not(.auth-page):not(.client-status-body) .admin-summary-panel {
    min-height: 0;
}

body:not(.auth-page):not(.client-status-body) .client-detail-grid {
    grid-template-columns: minmax(320px, 0.48fr) minmax(640px, 1.52fr);
    align-items: start;
}

body:not(.auth-page):not(.client-status-body) .client-info-panel {
    min-height: 0;
}

body:not(.auth-page):not(.client-status-body) .client-projects-panel {
    min-height: 560px;
}

body:not(.auth-page):not(.client-status-body) .client-detail-side-stack .client-projects-panel {
    min-height: 0;
}

body:not(.auth-page):not(.client-status-body) .client-project-list {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 16px;
}

body:not(.auth-page):not(.client-status-body) .admin-summary-stack {
    display: grid;
    gap: 16px;
    align-content: start;
}

body:not(.auth-page):not(.client-status-body) .admin-summary-panel .widget-item:last-child {
    padding-bottom: 0;
}

body:not(.auth-page):not(.client-status-body) .widget-panel .panel-head {
    align-items: flex-start;
    gap: 12px;
}

body:not(.auth-page):not(.client-status-body) .widget-panel .panel-head h3 {
    margin: 0;
    color: var(--planion-text);
    font-size: 18px;
    line-height: 1.25;
}

body:not(.auth-page):not(.client-status-body) .panel-head .muted {
    font-size: 14px;
}

body:not(.auth-page):not(.client-status-body) .widget-item {
    border-top-color: rgba(39, 76, 123, 0.08);
}

body:not(.auth-page):not(.client-status-body) .widget-link {
    padding: 10px;
    margin: 0 -4px;
}

body:not(.auth-page):not(.client-status-body) .widget-link:hover {
    background: linear-gradient(135deg, rgba(233, 245, 255, 0.98), rgba(245, 250, 255, 0.92));
    box-shadow: inset 3px 0 0 rgba(42, 190, 255, 0.64);
}

body:not(.auth-page):not(.client-status-body) .widget-footer {
    border-top-color: rgba(39, 76, 123, 0.08);
}

body:not(.auth-page):not(.client-status-body) .widget-footer-link,
body:not(.auth-page):not(.client-status-body) .widget-link {
    color: #184a85;
}

body:not(.auth-page):not(.client-status-body) .pill {
    border: 1px solid rgba(66, 135, 196, 0.08);
}

body:not(.auth-page):not(.client-status-body) .pill.neutral-pill {
    color: #31536f;
    background: rgba(229, 239, 249, 0.88);
}

body:not(.auth-page):not(.client-status-body) .pill.assignee-pill {
    color: #164b7c;
    background: rgba(213, 232, 250, 0.92);
}

body:not(.auth-page):not(.client-status-body) .pill.due-soon {
    color: #285e83;
    background: rgba(214, 239, 253, 0.95);
}

body:not(.auth-page):not(.client-status-body) .pill.overdue {
    color: #8c2432;
    background: rgba(255, 224, 230, 0.94);
}

body:not(.auth-page):not(.client-status-body) .project-index-shell {
    margin-top: 4px;
    padding: 18px 22px 22px;
    position: relative;
    overflow: hidden;
}

body:not(.auth-page):not(.client-status-body) .project-index-shell::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(37, 202, 255, 0.75), rgba(124, 85, 255, 0.36), transparent);
    pointer-events: none;
}

body:not(.auth-page):not(.client-status-body) .project-dashboard-toolbar {
    padding: 10px 12px;
    border-radius: 16px;
    background: var(--planion-surface-tint);
    border: 1px solid rgba(66, 135, 196, 0.12);
}

body:not(.auth-page):not(.client-status-body) input,
body:not(.auth-page):not(.client-status-body) textarea,
body:not(.auth-page):not(.client-status-body) select {
    border-color: rgba(66, 103, 151, 0.18);
    background: rgba(255, 255, 255, 0.86);
}

body:not(.auth-page):not(.client-status-body) input:focus,
body:not(.auth-page):not(.client-status-body) textarea:focus,
body:not(.auth-page):not(.client-status-body) select:focus {
    outline: none;
    border-color: rgba(42, 190, 255, 0.72);
    box-shadow: 0 0 0 3px var(--planion-cyan-soft);
}

@media (max-width: 1280px) {
    body:not(.auth-page):not(.client-status-body) .dashboard-widgets {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    body:not(.auth-page):not(.client-status-body) .admin-overview-widgets {
        grid-template-columns: 1fr;
    }

    body:not(.auth-page):not(.client-status-body) .admin-summary-stack {
        grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    }
}

@media (max-width: 960px) {
    body:not(.auth-page):not(.client-status-body) .sidebar {
        background:
            radial-gradient(circle at 18% 0%, rgba(37, 203, 255, 0.18), transparent 38%),
            linear-gradient(180deg, rgba(5, 18, 39, 0.98), rgba(4, 12, 28, 0.98));
    }

    body:not(.auth-page):not(.client-status-body) .content {
        padding: 18px;
    }

    body:not(.auth-page):not(.client-status-body) .topbar-brand {
        border-radius: 20px;
    }
}

body:not(.auth-page):not(.client-status-body) .project-index-item {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
}

body:not(.auth-page):not(.client-status-body) .project-index-item::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: linear-gradient(180deg, rgba(37, 202, 255, 0.84), rgba(124, 85, 255, 0.36));
    opacity: 0;
    transition: opacity 0.18s ease;
}

body:not(.auth-page):not(.client-status-body) .project-index-item:hover::before {
    opacity: 1;
}

body:not(.auth-page):not(.client-status-body) .project-index-item:hover {
    border-color: rgba(42, 190, 255, 0.24);
    box-shadow:
        0 22px 52px rgba(14, 33, 62, 0.14),
        0 0 36px rgba(54, 182, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

body:not(.auth-page):not(.client-status-body) .project-card-actions .link-chip,
body:not(.auth-page):not(.client-status-body) .link-chip {
    border-color: rgba(66, 135, 196, 0.14);
    background: rgba(231, 241, 252, 0.82);
    color: #17487d;
}

body:not(.auth-page):not(.client-status-body) .link-chip:hover {
    border-color: rgba(42, 190, 255, 0.34);
    background: rgba(219, 242, 255, 0.9);
    color: #0f3a68;
}

body:not(.auth-page):not(.client-status-body) .project-hero {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(92, 198, 255, 0.22);
    background:
        radial-gradient(circle at 14% 18%, rgba(37, 202, 255, 0.24), transparent 30%),
        radial-gradient(circle at 82% 22%, rgba(124, 85, 255, 0.18), transparent 28%),
        linear-gradient(rgba(91, 174, 255, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(91, 174, 255, 0.055) 1px, transparent 1px),
        linear-gradient(135deg, rgba(5, 19, 42, 0.98), rgba(13, 35, 64, 0.96) 48%, rgba(22, 86, 172, 0.92));
    background-size: auto, auto, 54px 54px, 54px 54px, auto;
    box-shadow:
        0 28px 68px rgba(8, 25, 55, 0.22),
        0 0 48px rgba(42, 190, 255, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

body:not(.auth-page):not(.client-status-body) .project-hero::after {
    content: "";
    position: absolute;
    right: 22px;
    bottom: -56px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    border: 1px solid rgba(74, 208, 255, 0.24);
    box-shadow: inset 0 0 58px rgba(74, 208, 255, 0.08);
    pointer-events: none;
}

body:not(.auth-page):not(.client-status-body) .project-hero > * {
    position: relative;
    z-index: 1;
}

body:not(.auth-page):not(.client-status-body) .project-hero .badge {
    color: #dff7ff;
    background: rgba(13, 35, 64, 0.74);
    border: 1px solid rgba(95, 212, 255, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

body:not(.auth-page):not(.client-status-body) .project-hero .muted,
body:not(.auth-page):not(.client-status-body) .project-hero .project-meta,
body:not(.auth-page):not(.client-status-body) .project-hero .health-metrics {
    color: #b9d8f4;
}

body:not(.auth-page):not(.client-status-body) .project-hero .hero-progress-copy strong,
body:not(.auth-page):not(.client-status-body) .project-hero .health-metrics strong,
body:not(.auth-page):not(.client-status-body) .project-hero .project-meta strong {
    color: #ffffff;
}

body:not(.auth-page):not(.client-status-body) .project-hero .project-date-risk-text {
    color: #ffbd4a;
}

body:not(.auth-page):not(.client-status-body) .project-hero .hero-health-inline > .muted {
    color: #9fc4e6;
}

body:not(.auth-page):not(.client-status-body) .project-hero .progress,
body:not(.auth-page):not(.client-status-body) .project-hero .compact-progress {
    background: rgba(5, 18, 39, 0.62);
    border: 1px solid rgba(95, 212, 255, 0.18);
}

body:not(.auth-page):not(.client-status-body) .project-hero .progress-fill {
    background: linear-gradient(90deg, var(--planion-blue), var(--planion-cyan));
    box-shadow: 0 0 20px rgba(37, 202, 255, 0.34);
}

body:not(.auth-page):not(.client-status-body) .project-toolbar {
    padding: 12px;
    border-radius: 18px;
    background: rgba(231, 241, 252, 0.68);
    border: 1px solid rgba(66, 135, 196, 0.1);
}

body:not(.auth-page):not(.client-status-body) .kanban-panel {
    position: relative;
    overflow: hidden;
    padding: 18px;
}

body:not(.auth-page):not(.client-status-body) .kanban-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(37, 202, 255, 0.72), rgba(124, 85, 255, 0.3), transparent);
    pointer-events: none;
}

body:not(.auth-page):not(.client-status-body) .kanban-column {
    background:
        linear-gradient(180deg, rgba(232, 242, 252, 0.82), rgba(241, 247, 253, 0.62));
    border: 1px solid rgba(66, 135, 196, 0.14);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.68),
        0 12px 28px rgba(14, 33, 62, 0.07);
}

body:not(.auth-page):not(.client-status-body) .kanban-head {
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(66, 135, 196, 0.1);
}

body:not(.auth-page):not(.client-status-body) .kanban-head h4 {
    margin: 0;
    color: var(--planion-text);
}

body:not(.auth-page):not(.client-status-body) .kanban-card {
    color: var(--planion-text);
    background:
        radial-gradient(circle at 88% 18%, rgba(55, 202, 255, 0.08), transparent 32%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 251, 255, 0.92));
    border: 1px solid rgba(66, 135, 196, 0.14);
    box-shadow:
        0 12px 28px rgba(14, 33, 62, 0.09),
        inset 0 1px 0 rgba(255, 255, 255, 0.88);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

body:not(.auth-page):not(.client-status-body) .kanban-card:hover {
    transform: translateY(-2px);
    border-color: rgba(42, 190, 255, 0.26);
    box-shadow:
        0 18px 38px rgba(14, 33, 62, 0.13),
        0 0 30px rgba(54, 182, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body:not(.auth-page):not(.client-status-body) .kanban-card p {
    color: var(--planion-muted);
}

body:not(.auth-page):not(.client-status-body) .project-kanban-title a {
    color: #55708f;
}

body:not(.auth-page):not(.client-status-body) .project-kanban-title a:hover {
    color: var(--planion-blue);
}

body:not(.auth-page):not(.client-status-body) .project-client-line {
    color: #55708f;
}

body:not(.auth-page):not(.client-status-body) .kanban-dropzone.drag-over {
    background: rgba(42, 190, 255, 0.1);
    outline: 1px dashed rgba(42, 190, 255, 0.44);
}

body:not(.auth-page):not(.client-status-body) .task-support-card,
body:not(.auth-page):not(.client-status-body) .project-details-panel {
    background:
        radial-gradient(circle at 86% 28%, rgba(55, 202, 255, 0.07), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 250, 255, 0.88));
    border: 1px solid var(--planion-border);
    box-shadow: var(--planion-shadow-card);
}

body:not(.auth-page):not(.client-status-body) .ownership-stat,
body:not(.auth-page):not(.client-status-body) .activity-item,
body:not(.auth-page):not(.client-status-body) .comment-item,
body:not(.auth-page):not(.client-status-body) .notification-card,
body:not(.auth-page):not(.client-status-body) .search-result-card {
    background: rgba(255, 255, 255, 0.82);
    border-color: rgba(66, 135, 196, 0.1);
}

@media (max-width: 1280px) {
    body:not(.auth-page):not(.client-status-body) .kanban-board,
    body:not(.auth-page):not(.client-status-body) .project-kanban-board {
        grid-template-columns: repeat(2, minmax(240px, 1fr));
    }

    body:not(.auth-page):not(.client-status-body) .client-detail-grid {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 760px) {
    body:not(.auth-page):not(.client-status-body) .kanban-board,
    body:not(.auth-page):not(.client-status-body) .project-kanban-board {
        grid-template-columns: 1fr;
    }

    body:not(.auth-page):not(.client-status-body) .project-toolbar {
        align-items: stretch;
    }

    .portal-user-detail-actions,
    .portal-user-type-form {
        align-items: stretch;
        justify-content: stretch;
        width: 100%;
    }

    .portal-user-type-form label,
    .portal-user-type-form button,
    .portal-user-detail-actions > .small-btn {
        width: 100%;
    }
}

body.client-status-body {
    min-height: 100vh;
    color: var(--planion-text);
    background:
        linear-gradient(rgba(42, 148, 255, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(42, 148, 255, 0.045) 1px, transparent 1px),
        radial-gradient(circle at 10% 12%, rgba(37, 202, 255, 0.18), transparent 28%),
        radial-gradient(circle at 86% 0%, rgba(124, 85, 255, 0.11), transparent 30%),
        linear-gradient(135deg, #f7fbff 0%, #e6f0fa 48%, #f8fbff 100%);
    background-size: 64px 64px, 64px 64px, auto, auto, auto;
}

body.portal-body.client-status-body {
    color: var(--portal-text, #0b1730);
    background: var(--portal-body-background, linear-gradient(135deg, #f7fbff 0%, #eef6fb 48%, #f4f0ff 100%)) !important;
    background-size: 56px 56px, 56px 56px, auto, auto, auto !important;
}

body.portal-body.client-status-body::before {
    background:
        radial-gradient(circle at 10% 14%, color-mix(in srgb, var(--portal-primary, #1f6bff) 22%, transparent), transparent 30%),
        radial-gradient(circle at 88% 10%, color-mix(in srgb, var(--portal-accent, #25caff) 18%, transparent), transparent 28%);
}

body.portal-body .portal-content-card,
body.portal-body .portal-hero-card,
body.portal-body .portal-ticket-summary,
body.portal-body .portal-ticket-card,
body.portal-body .portal-project-card,
body.portal-body .ticket-comment,
body.portal-body .portal-login-card {
    color: var(--portal-text, #0b1730);
    background:
        radial-gradient(circle at 90% 14%, color-mix(in srgb, var(--portal-accent, #25caff) 10%, transparent), transparent 30%),
        linear-gradient(180deg, color-mix(in srgb, var(--portal-surface, #ffffff) 96%, transparent), color-mix(in srgb, var(--portal-surface, #ffffff) 86%, var(--portal-primary, #1f6bff)));
    border-color: color-mix(in srgb, var(--portal-accent, #25caff) 24%, transparent);
}

body.portal-body .muted,
body.portal-body .portal-project-card p,
body.portal-body .portal-ticket-summary p,
body.portal-body .portal-login-brand p {
    color: var(--portal-muted, #53677f);
}

body.portal-body .portal-login-brand {
    background:
        radial-gradient(circle at 92% 18%, color-mix(in srgb, var(--portal-accent, #25caff) 18%, transparent), transparent 36%),
        linear-gradient(135deg, color-mix(in srgb, var(--portal-surface, #ffffff) 98%, transparent), color-mix(in srgb, var(--portal-surface-soft, #f6fbff) 92%, var(--portal-primary, #1f6bff)));
    color: var(--portal-text, #102033);
}

body.portal-body .small-btn,
body.portal-body .portal-login-form button {
    background: var(--portal-button-bg, var(--portal-primary, #1f6bff));
    color: var(--portal-button-text, #ffffff);
    border-color: color-mix(in srgb, var(--portal-button-bg, #1f6bff) 42%, transparent);
}

body.portal-body .small-btn.secondary,
body.portal-body .portal-nav a,
body.portal-body .ticket-row {
    color: var(--portal-text, #102033);
    background: color-mix(in srgb, var(--portal-surface, #ffffff) 84%, transparent);
    border-color: color-mix(in srgb, var(--portal-accent, #25caff) 22%, transparent);
}

body.portal-body .portal-nav a:hover,
body.portal-body .small-btn.secondary:hover {
    background: var(--portal-primary, #1f6bff);
    color: var(--portal-button-text, #ffffff);
}

body.portal-body .pill,
body.portal-body .pill.assignee-pill,
body.portal-body .pill.neutral-pill {
    color: var(--portal-text, #102033);
    background: color-mix(in srgb, var(--portal-accent, #25caff) 18%, var(--portal-surface, #ffffff));
    border-color: color-mix(in srgb, var(--portal-accent, #25caff) 28%, transparent);
}

body.portal-body .flash {
    color: var(--portal-text, #102033);
    border: 1px solid color-mix(in srgb, var(--portal-accent, #25caff) 22%, transparent);
}

body.portal-body .flash.success {
    background: color-mix(in srgb, #dff3e6 92%, var(--portal-surface, #ffffff));
}

body.portal-body .flash.error {
    background: color-mix(in srgb, #f7d9dc 92%, var(--portal-surface, #ffffff));
}

body.portal-body .flash.warning {
    background: color-mix(in srgb, #fff0cf 94%, var(--portal-surface, #ffffff));
}

body.portal-body input,
body.portal-body textarea,
body.portal-body select {
    color: var(--portal-text, #102033);
    background: color-mix(in srgb, var(--portal-surface, #ffffff) 94%, transparent);
    border-color: color-mix(in srgb, var(--portal-accent, #25caff) 24%, transparent);
}

body.portal-body.client-status-body {
    background: var(--portal-background, #f4f6f8) !important;
    background-size: auto !important;
}

body.portal-body.client-status-body::before {
    display: none;
}

.portal-enterprise-banner {
    display: grid;
    grid-template-columns: minmax(220px, 0.9fr) minmax(280px, 1.4fr) auto;
    align-items: center;
    gap: 18px;
    padding: 18px 20px;
    border-radius: 8px;
    color: var(--portal-button-text, #ffffff);
    background: var(--portal-primary, #1f4f8f);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.14);
}

.portal-banner-brand,
.portal-banner-metrics {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.portal-enterprise-banner .portal-topbar-logo-wrap {
    width: 56px;
    height: 56px;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: none;
}

.portal-enterprise-banner .portal-topbar-copy h2,
.portal-enterprise-banner .portal-topbar-copy p {
    margin: 0;
    color: inherit;
}

.portal-enterprise-banner .portal-topbar-copy h2 {
    font-size: 24px;
}

.portal-banner-center {
    display: grid;
    gap: 4px;
    min-height: 74px;
    align-content: center;
    padding: 14px 18px;
    border-radius: 8px;
    color: var(--portal-text, #172337);
    background: #ffffff;
}

.portal-banner-center span {
    color: var(--portal-muted, #53677f);
    font-size: 13px;
}

.portal-banner-metrics span {
    display: grid;
    gap: 2px;
    min-width: 86px;
    padding: 10px 12px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.82);
    font-size: 12px;
}

.portal-banner-metrics strong {
    color: #ffffff;
    font-size: 22px;
}

.portal-enterprise-layout {
    display: grid;
    grid-template-columns: 230px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
    margin-top: 18px;
}

.portal-side-nav {
    position: sticky;
    top: 18px;
    display: grid;
    gap: 18px;
    padding: 14px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.portal-side-nav nav,
.portal-side-actions {
    display: grid;
    gap: 8px;
}

.portal-language-switch {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.portal-language-switch button {
    border: 0;
    background: transparent;
    color: color-mix(in srgb, var(--portal-button-text, #ffffff) 78%, transparent);
    font-weight: 800;
    cursor: pointer;
    padding: 0 2px;
}

.portal-language-switch button.active {
    color: var(--portal-accent, #d6a21f);
}

.portal-side-nav nav a {
    display: block;
    padding: 11px 12px;
    border-radius: 6px;
    color: var(--portal-text, #172337);
    text-decoration: none;
    font-weight: 700;
    border: 1px solid transparent;
}

.portal-side-nav nav a:hover,
.portal-side-nav nav a.active {
    color: var(--portal-button-text, #ffffff);
    background: var(--portal-primary, #1f4f8f);
}

.portal-main-panel {
    display: grid;
    gap: 16px;
    min-height: 560px;
    padding: 18px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

body.portal-body .portal-main-panel .portal-content-card,
body.portal-body .portal-main-panel .portal-ticket-summary,
body.portal-body .portal-main-panel .portal-ticket-card,
body.portal-body .portal-main-panel .portal-project-card {
    border-radius: 8px;
    background: var(--portal-surface, #ffffff);
    border-color: rgba(15, 23, 42, 0.1);
    box-shadow: none;
}

.portal-dashboard-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.portal-overview-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: color-mix(in srgb, var(--portal-background, #f4f6f8) 55%, #ffffff);
}

.portal-overview-card span {
    color: var(--portal-muted, #53677f);
    font-weight: 700;
}

.portal-overview-card strong {
    color: var(--portal-text, #172337);
    font-size: 32px;
}

.portal-overview-card a {
    color: var(--portal-primary, #1f4f8f);
    font-weight: 800;
    text-decoration: none;
}

.portal-main-panel .portal-project-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.portal-main-panel .ticket-row {
    border-radius: 8px;
}

@media (max-width: 860px) {
    .portal-enterprise-banner,
    .portal-enterprise-layout {
        grid-template-columns: 1fr;
    }

    .portal-side-nav {
        position: static;
    }

    .portal-side-nav nav {
        grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    }
}

/* Portal composition refresh: masthead, left rail, white content canvas. */
body.portal-body.client-status-body {
    background: #dfe2e6 !important;
}

.portal-shell {
    width: 100%;
    padding: 0;
}

.portal-enterprise-banner {
    position: relative;
    grid-template-columns: 260px minmax(320px, 760px) minmax(150px, auto) auto;
    min-height: 342px;
    gap: 28px;
    align-items: start;
    padding: 28px 30px 48px;
    border-radius: 0;
    background: var(--portal-primary, #050505);
    box-shadow: none;
}

.portal-banner-brand {
    align-items: flex-start;
}

.portal-enterprise-banner .portal-topbar-logo-wrap {
    width: 160px;
    height: 82px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.portal-enterprise-banner .portal-topbar-logo-wrap img {
    object-fit: contain;
    object-position: left top;
    filter: brightness(0) invert(1);
}

.portal-enterprise-banner .portal-topbar-copy {
    display: none;
}

.portal-banner-center {
    grid-column: 2 / 3;
    align-self: center;
    min-height: 0;
    padding: 0;
    border-radius: 0;
    color: var(--portal-button-text, #ffffff);
    background: transparent;
}

.portal-banner-center strong {
    display: block;
    max-width: 780px;
    color: var(--portal-button-text, #ffffff);
    font-size: clamp(38px, 5vw, 64px);
    line-height: 1.05;
    font-weight: 900;
}

.portal-banner-center strong::after {
    content: ".";
    color: var(--portal-accent, #d6a21f);
}

.portal-banner-center span {
    display: block;
    margin-top: 24px;
    min-height: 50px;
    max-width: 960px;
    padding: 12px 22px;
    border-radius: 999px;
    color: color-mix(in srgb, var(--portal-text, #172337) 72%, #607086);
    background: #ffffff;
    font-size: 18px;
    font-weight: 600;
}

.portal-banner-center span::before {
    content: "⌕";
    margin-right: 12px;
    color: #111827;
    font-weight: 900;
}

.portal-banner-metrics {
    grid-column: 3 / 4;
    align-self: end;
    justify-content: end;
}

.portal-banner-metrics span {
    min-width: 96px;
    border-radius: 0;
    background: transparent;
    text-align: right;
}

.portal-banner-tools {
    grid-column: 4 / 5;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--portal-button-text, #ffffff);
    font-size: 22px;
}

.portal-banner-tools .portal-language-switch div {
    display: inline-flex;
    gap: 5px;
}

.portal-banner-tools .portal-language-switch div::before {
    content: "";
}

.portal-banner-tools .portal-language-switch button + button::before {
    content: "/";
    margin-right: 8px;
    color: var(--portal-button-text, #ffffff);
}

.portal-enterprise-layout {
    width: min(1500px, 100%);
    margin: 0 auto;
    grid-template-columns: 370px minmax(0, 1fr);
    gap: 0;
    align-items: stretch;
}

.portal-side-nav {
    position: static;
    min-height: calc(100vh - 342px);
    padding: 42px 30px;
    border: 0;
    border-radius: 0;
    background: #e2e5e9;
    box-shadow: none;
}

.portal-side-nav nav {
    gap: 14px;
}

.portal-side-nav nav::before {
    content: "Portal";
    display: block;
    margin-bottom: 10px;
    color: #000000;
    font-size: 24px;
    font-weight: 900;
    text-transform: uppercase;
}

.portal-side-nav nav a {
    padding: 8px 0;
    border: 0;
    border-radius: 0;
    color: #000000;
    background: transparent;
    font-size: 22px;
    line-height: 1.18;
    font-weight: 900;
}

.portal-side-nav nav a::before {
    content: "+";
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin-right: 14px;
    border: 2px solid currentColor;
    border-radius: 50%;
    color: var(--portal-accent, #d6a21f);
    font-weight: 600;
}

.portal-side-nav nav a:hover,
.portal-side-nav nav a.active {
    color: var(--portal-accent, #d6a21f);
    background: transparent;
}

.portal-side-actions {
    margin-top: 28px;
}

.portal-side-actions .small-btn,
.portal-side-actions .small-btn.secondary {
    justify-content: center;
    border-radius: 0;
}

.portal-main-panel {
    min-height: calc(100vh - 342px);
    padding: 64px 40px;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
}

.portal-main-panel > .flash {
    margin-bottom: 10px;
}

.portal-main-panel .portal-content-card {
    padding: 0;
    border: 0 !important;
    background: #ffffff !important;
}

.portal-main-panel .portal-content-card > .panel-head {
    align-items: end;
    padding-bottom: 20px;
    border-bottom: 1px solid #eef0f3;
}

.portal-main-panel .portal-content-card h3 {
    color: #111827;
    font-size: clamp(32px, 4vw, 52px);
    line-height: 1.08;
    font-weight: 900;
}

.portal-main-panel .portal-content-card h3::before {
    content: "PORTAL";
    display: block;
    margin-bottom: 24px;
    color: #111827;
    font-size: 26px;
    line-height: 1;
}

.portal-dashboard-overview {
    margin-bottom: 34px;
}

.portal-overview-card {
    border-radius: 0;
    background: #f7f7f8;
}

.portal-main-panel .portal-project-card,
.portal-main-panel .ticket-row {
    border-radius: 0;
    box-shadow: none;
}

@media (max-width: 980px) {
    .portal-enterprise-banner {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .portal-banner-center,
    .portal-banner-metrics,
    .portal-banner-tools {
        grid-column: auto;
    }

    .portal-enterprise-layout {
        grid-template-columns: 1fr;
    }

    .portal-side-nav,
    .portal-main-panel {
        min-height: 0;
    }
}

body.client-status-body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background:
        linear-gradient(124deg, transparent 0 45%, rgba(255, 255, 255, 0.5) 45% 46%, transparent 46% 100%),
        radial-gradient(circle at 50% 100%, rgba(37, 202, 255, 0.1), transparent 34%);
}

body.portal-body.client-status-body::before {
    display: none;
    content: none;
}

.client-status-shell {
    position: relative;
    z-index: 1;
    width: min(1220px, calc(100% - 40px));
    padding: 34px 0 56px;
}

.client-status-panel {
    position: relative;
    overflow: hidden;
    gap: 24px;
    padding: 24px;
    border-radius: 30px;
    background:
        radial-gradient(circle at 84% 8%, rgba(37, 202, 255, 0.11), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 249, 255, 0.9));
    border: 1px solid rgba(66, 135, 196, 0.16);
    box-shadow:
        0 34px 90px rgba(15, 40, 72, 0.14),
        0 0 42px rgba(54, 182, 255, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.client-status-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, rgba(37, 202, 255, 0.78), rgba(124, 85, 255, 0.34), transparent);
    pointer-events: none;
}

.client-status-hero {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    padding: 30px;
    background:
        radial-gradient(circle at 14% 20%, rgba(37, 202, 255, 0.22), transparent 32%),
        radial-gradient(circle at 88% 18%, rgba(124, 85, 255, 0.15), transparent 28%),
        linear-gradient(rgba(91, 174, 255, 0.055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(91, 174, 255, 0.055) 1px, transparent 1px),
        linear-gradient(135deg, rgba(6, 18, 36, 0.98), rgba(11, 31, 58, 0.96) 54%, rgba(24, 105, 188, 0.9));
    background-size: auto, auto, 58px 58px, 58px 58px, auto;
    border: 1px solid rgba(92, 198, 255, 0.24);
    box-shadow:
        0 28px 68px rgba(8, 25, 55, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.client-status-hero::after {
    content: "";
    position: absolute;
    right: 24px;
    bottom: -70px;
    width: 280px;
    height: 280px;
    border-radius: 50%;
    border: 1px solid rgba(74, 208, 255, 0.24);
    box-shadow: inset 0 0 70px rgba(74, 208, 255, 0.08);
}

.client-status-hero > * {
    position: relative;
    z-index: 1;
}

.client-status-title {
    color: #ffffff;
    letter-spacing: 0;
}

.client-status-description,
.client-status-hero .muted {
    color: rgba(222, 239, 255, 0.8);
}

.client-status-state {
    color: #dff8ff;
    background: rgba(8, 24, 48, 0.76);
    border: 1px solid rgba(95, 212, 255, 0.34);
    box-shadow:
        0 0 26px rgba(37, 202, 255, 0.13),
        inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.client-status-brand {
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(255, 255, 255, 0.28);
    box-shadow:
        0 18px 42px rgba(0, 0, 0, 0.18),
        0 0 34px rgba(50, 184, 255, 0.08);
}

.client-status-progress-card {
    color: #eaf7ff;
    background:
        radial-gradient(circle at 78% 20%, rgba(37, 202, 255, 0.16), transparent 34%),
        linear-gradient(180deg, rgba(17, 40, 73, 0.82), rgba(8, 22, 45, 0.78));
    border: 1px solid rgba(95, 212, 255, 0.28);
    box-shadow:
        0 22px 48px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px);
}

.client-status-progress-card strong {
    color: #ffffff;
}

.client-status-progress {
    background: rgba(5, 18, 39, 0.64);
    border: 1px solid rgba(95, 212, 255, 0.18);
}

.client-status-progress .progress-bar,
.client-status-progress .progress-fill {
    background: linear-gradient(90deg, var(--planion-blue), var(--planion-cyan));
    box-shadow: 0 0 20px rgba(37, 202, 255, 0.34);
}

.client-status-summary-grid {
    gap: 18px;
}

.client-status-summary-grid .stat-card {
    border: 1px solid var(--planion-border);
    border-radius: 18px;
    background:
        radial-gradient(circle at 86% 28%, rgba(55, 202, 255, 0.08), transparent 28%),
        linear-gradient(180deg, var(--planion-surface), var(--planion-surface-soft));
    box-shadow: var(--planion-shadow-card);
}

.client-status-summary-grid .stat-card::after {
    height: 3px;
    background: linear-gradient(90deg, rgba(37, 202, 255, 0.78), rgba(124, 85, 255, 0.34));
}

.client-status-summary-grid .stat-card strong {
    color: var(--planion-text);
    letter-spacing: 0;
}

.client-status-summary-grid .stat-card span {
    color: var(--planion-muted);
}

.client-status-card,
.client-status-milestone-grid .client-status-card,
.client-update-grid .client-status-card,
.client-status-stack > .client-status-card:first-child {
    background:
        radial-gradient(circle at 88% 18%, rgba(55, 202, 255, 0.07), transparent 28%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 251, 255, 0.9));
    border: 1px solid var(--planion-border);
    box-shadow: var(--planion-shadow-card);
}

.client-status-card .panel-head h3 {
    margin: 0;
    color: var(--planion-text);
}

.client-status-update-body {
    color: #20324b;
}

.client-update-grid .client-status-card::before {
    background: linear-gradient(180deg, rgba(37, 202, 255, 0.82), rgba(124, 85, 255, 0.38));
}

.client-status-shell > .app-copyright-footer {
    color: #4d647c;
    background: rgba(255, 255, 255, 0.72);
    border-color: rgba(66, 135, 196, 0.14);
}

@media (max-width: 860px) {
    .client-status-shell {
        width: min(100%, calc(100% - 20px));
    }

    .client-status-panel {
        padding: 14px;
        border-radius: 22px;
    }

    .client-status-hero {
        padding: 22px;
        border-radius: 20px;
    }
}

body:not(.auth-page):not(.client-status-body) .ticket-kanban-board {
    grid-template-columns: repeat(7, minmax(0, 1fr));
    overflow-x: hidden;
}



.ticket-reply-form {
    display: block;
    margin-top: 10px;
}

.ticket-reply-compact {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #fff;
    border: 1px solid rgba(36, 50, 74, 0.08);
}

.reply-avatar,
.reply-send-btn {
    flex: 0 0 auto;
}

.reply-avatar .avatar-circle {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: #eef4ff;
    color: #1b3f8b;
    display: grid;
    place-items: center;
    font-weight: 700;
}

.reply-main {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    gap: 6px;
}

.reply-main textarea {
    width: 100%;
    min-height: 160px !important;
    max-height: 280px;
    padding: 9px 11px;
    font-size: 14px;
}

.reply-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.reply-toolbar select {
    width: auto;
    min-width: 150px;
    height: 30px;
    padding: 0 8px;
    font-size: 12px;
}

.file-upload {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 30px;
    border-radius: 8px;
    border: 1px solid #cfd8dc;
    cursor: pointer;
}

.file-upload input {
    display: none;
}

.reply-send-btn {
    width: auto;
    height: 42px;
    padding: 0 18px;
    border-radius: 10px;
    white-space: nowrap;
}

/* === Ticket conversation / compact composer final merge === */
.ticket-thread-toolbar,
.ticket-event-toggle {
    display: none !important;
}

.ticket-thread-shell {
    margin-top: 18px;
}

.ticket-thread {
    display: grid;
    gap: 22px;
    padding: 8px 4px 18px;
}

.ticket-system-event {
    justify-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    max-width: min(760px, 92%);
    padding: 0;
    color: #53677f;
    background: transparent;
    border: 0;
    font-size: 13px;
    line-height: 1.35;
    text-align: center;
}

.ticket-system-event::before,
.ticket-system-event::after {
    content: "";
    width: clamp(44px, 8vw, 160px);
    height: 1px;
    background: rgba(66, 135, 196, 0.14);
}

.ticket-system-icon {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    color: #102033;
    background: rgba(11, 23, 48, 0.06);
    border: 1px solid rgba(36, 50, 74, 0.08);
    font-size: 18px;
    line-height: 1;
}

.ticket-system-label {
    font-weight: 600;
}

.ticket-system-event small {
    font-size: 12px;
    color: #53677f;
}

.ticket-reply-form {
    display: block !important;
    margin: 12px 0 22px;
}

.ticket-reply-compact {
    display: flex !important;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    background: #ffffff;
    border: 1px solid rgba(36, 50, 74, 0.1);
    box-shadow: 0 10px 26px rgba(17, 37, 66, 0.05);
}

.ticket-reply-compact .reply-avatar,
.ticket-reply-compact .reply-send-btn {
    flex: 0 0 auto;
}

.ticket-reply-compact .avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    overflow: hidden;
    background: linear-gradient(180deg, #eef5ff, #dfeeff);
    color: #1b3f8b;
    display: grid;
    place-items: center;
    font-weight: 800;
}

.ticket-reply-compact .avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ticket-reply-compact .reply-main {
    flex: 1 1 auto;
    min-width: 0;
    display: grid;
    gap: 8px;
}

.ticket-reply-compact textarea,
.ticket-reply-compact select,
.ticket-reply-compact button {
    width: auto !important;
}

.ticket-reply-compact textarea {
    width: 100% !important;
    min-height: 180px !important;
    max-height: 320px;
    resize: vertical;
    padding: 10px 12px;
    font-size: 14px;
    line-height: 1.45;
}

.ticket-editor-shell {
    overflow: hidden;
    border: 1px solid rgba(36, 50, 74, 0.12);
    border-radius: 14px;
    background: #fff;
}

.ticket-editor-toolbar {
    display: flex;
    align-items: center;
    gap: 2px;
    padding: 6px;
    border-bottom: 1px solid rgba(36, 50, 74, 0.1);
    background: #f7fafc;
}

.ticket-editor-toolbar button {
    display: inline-grid;
    place-items: center;
    width: 30px !important;
    height: 30px;
    padding: 0;
    border-radius: 8px;
    border: 1px solid transparent;
    background: transparent;
    color: #334e68;
}

.ticket-editor-toolbar button:hover {
    border-color: rgba(66, 135, 196, 0.22);
    background: #fff;
    color: #102a43;
}

.ticket-rich-editor {
    min-height: 150px;
    max-height: 320px;
    overflow: auto;
    padding: 12px;
    color: #102033;
    font-size: 14px;
    line-height: 1.5;
    outline: none;
}

.ticket-rich-editor:empty::before {
    content: attr(data-placeholder);
    color: #8a98a8;
}

.ticket-rich-editor p,
.ticket-rich-editor ul,
.ticket-rich-editor ol,
.ticket-rich-editor blockquote,
.ticket-rich-editor pre {
    margin: 0 0 8px;
}

.ticket-rich-editor img {
    display: block;
    max-width: min(100%, 520px);
    max-height: 280px;
    border-radius: 10px;
    border: 1px solid rgba(36, 50, 74, 0.12);
}

.ticket-signature-preview {
    display: grid;
    gap: 6px;
    padding: 12px 14px;
    border-radius: 12px;
    background: rgba(246, 251, 255, 0.9);
    border: 1px solid rgba(66, 135, 196, 0.12);
}

.ticket-signature-preview strong,
.ticket-signature-preview p {
    margin: 0;
}

.portal-ticket-reply-form textarea {
    min-height: 180px;
}

.ticket-reply-compact .reply-toolbar {
    display: flex !important;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.ticket-reply-compact .reply-toolbar select {
    width: auto !important;
    min-width: 150px;
    height: 34px;
    padding: 0 10px;
    font-size: 13px;
}

.ticket-reply-compact .file-upload {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: auto !important;
    min-width: 112px;
    height: 34px;
    padding: 0 10px;
    border-radius: 10px;
    border: 1px solid #cfd8dc;
    background: #ffffff;
    color: #102033;
    font-size: 13px;
    cursor: pointer;
}

.ticket-reply-compact .file-upload input {
    display: none !important;
}

.ticket-reply-compact .reply-send-btn {
    width: auto !important;
    min-width: 132px;
    height: 44px;
    padding: 0 18px;
    border-radius: 10px;
    white-space: nowrap;
    align-self: flex-start;
}

@media (max-width: 760px) {
    .ticket-reply-compact {
        display: grid !important;
        grid-template-columns: 40px 1fr;
    }

    .ticket-reply-compact .reply-send-btn {
        grid-column: 2;
        justify-self: end;
    }

    .ticket-system-event::before,
    .ticket-system-event::after {
        width: 32px;
    }
}

/* Ticket chat: full page = normal document scroll; drawer = internal scroll + flex column */
.ticket-chat-page-root {
    display: block;
}

.ticket-chat-shell {
    display: block;
    overflow: visible;
    background: rgba(255, 255, 255, 0.92);
    border-radius: 16px;
    border: 1px solid rgba(36, 50, 74, 0.1);
    box-shadow: 0 12px 40px rgba(14, 33, 62, 0.06);
}

.ticket-chat-shell--page {
    max-width: min(1240px, calc(100vw - 48px));
    margin: 0 auto;
    width: 100%;
}

.ticket-chat-shell--drawer {
    height: 100%;
    border-radius: 0;
    border: 0;
    box-shadow: none;
    background: transparent;
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

.ticket-chat-page-header {
    flex-shrink: 0;
    padding: 16px 18px 12px;
    border-bottom: 1px solid rgba(36, 50, 74, 0.08);
}

.ticket-chat-page-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.ticket-chat-page-header-nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.ticket-chat-page-header-nav .inline-form,
.ticket-drawer-toolbar-actions .inline-form {
    display: inline-flex;
    margin: 0;
}

.ticket-chat-header-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.task-source-ticket-meta {
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.ticket-chat-page-title {
    margin: 0 0 6px;
    font-size: 1.35rem;
}

.ticket-drawer-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 1px solid rgba(36, 50, 74, 0.1);
    flex-shrink: 0;
    background: rgba(255, 255, 255, 0.96);
}

.ticket-drawer-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ticket-drawer-toolbar-title {
    font-weight: 800;
    font-size: 14px;
}

.ticket-chat-manage-panel {
    flex-shrink: 0;
    border-bottom: 1px solid rgba(36, 50, 74, 0.06);
    background: rgba(255, 255, 255, 0.55);
}

.ticket-chat-manage-summary {
    cursor: pointer;
    padding: 10px 16px;
    font-weight: 700;
    list-style: none;
}

.ticket-chat-manage-summary::-webkit-details-marker {
    display: none;
}

.ticket-chat-manage-body {
    padding: 0 16px 14px;
}

.ticket-chat-description {
    margin: 0 0 12px;
}

/* Conversation area: grows with content on full page; scrolls inside drawer only */
.ticket-chat-messages-scroll {
    padding: 12px 16px 8px;
    overflow: visible;
}

.ticket-drawer-body .ticket-chat-messages-scroll,
.ticket-chat-shell--drawer .ticket-chat-messages-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.ticket-chat-messages-scroll .ticket-thread-shell {
    margin-top: 0;
}

.ticket-chat-composer {
    flex-shrink: 0;
    padding: 10px 14px 14px;
    border-top: 1px solid rgba(36, 50, 74, 0.1);
    background: rgba(247, 250, 255, 0.96);
}

.ticket-drawer-backdrop[hidden] {
    display: none !important;
}

.ticket-drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(10, 20, 40, 0.45);
    z-index: 1400;
    touch-action: none;
    overscroll-behavior: none;
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.ticket-drawer-panel[hidden] {
    display: none !important;
}

.ticket-drawer-panel {
    position: fixed;
    top: 0;
    right: 0;
    height: 100vh;
    height: 100dvh;
    width: clamp(420px, 50vw, 61.8vw);
    min-width: 38.2vw;
    max-width: 94vw;
    z-index: 1410;
    background: #f5f8fd;
    display: flex;
    flex-direction: column;
    box-shadow: -12px 0 48px rgba(8, 18, 40, 0.28);
    overscroll-behavior: contain;
}

html.ticket-drawer-open,
body.ticket-drawer-open {
    overflow: hidden !important;
    height: 100%;
}

.ticket-drawer-body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    padding: 0 0 8px;
}

.ticket-drawer-body .ticket-chat-shell {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Drawer: compact reply strip so more space stays on the conversation */
.ticket-drawer-body .ticket-chat-composer {
    padding: 6px 10px 10px;
    border-top-width: 1px;
}

.ticket-drawer-body .ticket-reply-form {
    margin: 0 !important;
}

.ticket-drawer-body .ticket-reply-compact {
    padding: 8px 10px;
    gap: 8px;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(17, 37, 66, 0.04);
}

.ticket-drawer-body .ticket-reply-compact .avatar-circle {
    width: 32px;
    height: 32px;
    font-size: 13px;
}

.ticket-drawer-body .ticket-reply-compact .reply-main {
    gap: 5px;
}

.ticket-drawer-body .ticket-reply-compact textarea {
    min-height: 48px !important;
    max-height: 100px;
    padding: 8px 10px;
    font-size: 13px;
    line-height: 1.4;
}

.ticket-drawer-body .ticket-reply-compact .reply-toolbar {
    gap: 6px;
}

.ticket-drawer-body .ticket-reply-compact .reply-toolbar select {
    height: 30px;
    min-width: 120px;
    font-size: 12px;
}

.ticket-drawer-body .ticket-reply-compact .file-upload {
    min-width: auto;
    height: 30px;
    padding: 0 8px;
    font-size: 12px;
}

.ticket-drawer-body .ticket-reply-compact .reply-send-btn {
    height: 36px;
    min-width: 100px;
    padding: 0 14px;
    font-size: 13px;
}

.ticket-drawer-body .ticket-signature-preview {
    padding: 8px 10px;
    font-size: 12px;
}

.ticket-drawer-body .ticket-signature-preview p {
    font-size: 12px;
}

.portal-ticket-chat-layout .portal-ticket-card {
    display: block;
    min-height: 0;
}

.portal-ticket-messages-scroll {
    overflow: visible;
    padding-right: 4px;
}

.portal-ticket-composer {
    flex-shrink: 0;
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(36, 50, 74, 0.08);
}

/* Portal composition: full masthead, left rail, white work canvas */
body.portal-body.client-status-body {
    min-height: 100vh;
    margin: 0;
    background: color-mix(in srgb, var(--portal-background, #e4e7eb) 78%, #d5d9df);
    color: var(--portal-text, #121826);
}

body.portal-body.client-status-body::before {
    display: none;
}

body.portal-body .portal-shell {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

body.portal-body .portal-enterprise-banner {
    display: grid;
    grid-template-columns: 280px minmax(420px, 1fr) 280px;
    grid-template-rows: auto minmax(180px, 1fr);
    column-gap: 28px;
    align-items: start;
    width: 100%;
    min-height: 342px;
    margin: 0;
    padding: 36px 30px 48px;
    border-radius: 0;
    background: var(--portal-primary, #000);
    color: var(--portal-on-primary, #fff);
    box-shadow: none;
    overflow: hidden;
}

body.portal-body .portal-banner-brand {
    grid-column: 1;
    grid-row: 1;
    align-items: flex-start;
}

body.portal-body .portal-enterprise-banner .portal-topbar-logo-wrap {
    width: 180px;
    height: 92px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

body.portal-body .portal-enterprise-banner .portal-topbar-logo-wrap img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: left top;
    filter: none;
}

body.portal-body .portal-enterprise-banner .portal-topbar-copy {
    display: none;
}

body.portal-body .portal-banner-center {
    grid-column: 2;
    grid-row: 2;
    align-self: center;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    text-align: center;
}

body.portal-body .portal-banner-center strong {
    display: block;
    margin: 0;
    color: var(--portal-on-primary, #fff);
    font-size: clamp(48px, 5vw, 68px);
    line-height: 1.02;
    font-weight: 900;
    letter-spacing: 0;
}

body.portal-body .portal-banner-center strong::after {
    content: ".";
    color: var(--portal-accent, #e0a316);
}

body.portal-body .portal-banner-center span {
    position: relative;
    display: block;
    width: min(100%, 960px);
    min-height: 50px;
    margin: 34px auto 0;
    padding: 12px 24px 12px 54px;
    border-radius: 999px;
    background: var(--portal-surface, #fff);
    color: var(--portal-muted, #53657d);
    text-align: left;
    font-size: 20px;
    line-height: 1.3;
    box-shadow: none;
}

body.portal-body .portal-banner-center span::before {
    content: "\2315";
    position: absolute;
    left: 22px;
    top: 50%;
    transform: translateY(-50%) rotate(-20deg);
    color: var(--portal-text, #111827);
    font-size: 27px;
    line-height: 1;
}

body.portal-body .portal-banner-tools {
    grid-column: 3;
    grid-row: 1;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 20px;
    color: var(--portal-on-primary, #fff);
    font-size: 26px;
    font-weight: 800;
}

body.portal-body .portal-banner-tools > span {
    width: 26px;
    height: 26px;
    font-size: 0;
    line-height: 1;
    position: relative;
}

body.portal-body .portal-banner-tools > span::before {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    font-size: 25px;
}

body.portal-body .portal-banner-tools > span:first-child::before {
    content: "\2709";
}

body.portal-body .portal-banner-tools > span:nth-child(2)::before {
    content: "\25CE";
}

body.portal-body .portal-banner-tools .portal-language-switch div {
    gap: 7px;
}

body.portal-body .portal-banner-tools .portal-language-switch button {
    color: color-mix(in srgb, var(--portal-on-primary, #fff) 78%, transparent);
    font-size: 24px;
    font-weight: 900;
}

body.portal-body .portal-banner-tools .portal-language-switch button.active {
    color: var(--portal-accent, #e0a316);
}

body.portal-body .portal-banner-tools .portal-language-switch button + button::before {
    content: "/";
    margin: 0 7px 0 0;
    color: var(--portal-on-primary, #fff);
}

body.portal-body .portal-banner-metrics {
    grid-column: 3;
    grid-row: 2;
    align-self: end;
    justify-self: start;
    display: flex;
    gap: 52px;
    color: var(--portal-on-primary, #fff);
}

body.portal-body .portal-banner-metrics span {
    display: grid;
    gap: 4px;
    min-width: 70px;
    color: var(--portal-on-primary, #fff);
    font-size: 14px;
    text-align: center;
}

body.portal-body .portal-banner-metrics strong {
    color: var(--portal-on-primary, #fff);
    font-size: 31px;
    line-height: 1;
}

body.portal-body .portal-enterprise-layout {
    display: grid;
    grid-template-columns: 370px minmax(0, 1140px);
    align-items: stretch;
    justify-content: start;
    width: 100%;
    max-width: none;
    margin: 0;
    border-radius: 0;
    background: color-mix(in srgb, var(--portal-background, #e4e7eb) 86%, #d5d9df);
    box-shadow: none;
}

body.portal-body .portal-side-nav {
    min-height: calc(100vh - 342px);
    padding: 46px 28px 36px;
    border: 0;
    border-radius: 0;
    background: color-mix(in srgb, var(--portal-background, #e4e7eb) 88%, #d8dce2);
}

body.portal-body .portal-side-nav nav {
    display: grid;
    gap: 8px;
    margin-top: 28px;
}

body.portal-body .portal-side-nav nav::before {
    content: "PORTAL";
    display: block;
    margin-bottom: 28px;
    color: var(--portal-text, #111827);
    font-size: 24px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: 0;
}

body.portal-body .portal-side-nav nav a {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 14px 0 52px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--portal-text, #111827);
    font-size: 18px;
    font-weight: 800;
    line-height: 1.1;
    box-shadow: none;
}

body.portal-body .portal-side-nav nav a::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 50%;
    display: grid;
    width: 24px;
    height: 24px;
    transform: translateY(-50%);
    place-items: center;
    border: 2px solid color-mix(in srgb, currentColor 82%, transparent);
    border-radius: 7px;
    background:
        linear-gradient(currentColor, currentColor) center / 10px 2px no-repeat,
        linear-gradient(currentColor, currentColor) center / 2px 10px no-repeat;
    opacity: 0.9;
}

body.portal-body .portal-side-nav nav a:hover,
body.portal-body .portal-side-nav nav a.active {
    color: var(--portal-accent, #e0a316);
    background: color-mix(in srgb, var(--portal-surface, #fff) 56%, transparent);
    transform: none;
}

body.portal-body .portal-side-actions {
    margin-top: 42px;
    padding-top: 24px;
    border-top: 1px solid color-mix(in srgb, var(--portal-text, #111827) 12%, transparent);
}

body.portal-body .portal-main-panel {
    min-height: calc(100vh - 342px);
    padding: 64px 40px 80px;
    border: 0;
    border-radius: 0;
    background: var(--portal-surface, #fff);
    box-shadow: none;
}

body.portal-body .portal-main-panel .portal-content-card {
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

body.portal-body .portal-main-panel .portal-content-card > .panel-head {
    align-items: end;
    gap: 24px;
    margin: 0 0 20px;
    padding-bottom: 22px;
    border-bottom: 1px solid color-mix(in srgb, var(--portal-text, #111827) 11%, transparent);
}

body.portal-body .portal-main-panel .portal-content-card h3 {
    margin: 0;
    color: var(--portal-text, #111827);
    font-size: clamp(46px, 4vw, 64px);
    line-height: 1;
    font-weight: 900;
    letter-spacing: 0;
}

body.portal-body .portal-main-panel .portal-content-card h3::before {
    content: "PORTAL";
    display: block;
    margin-bottom: 28px;
    color: var(--portal-text, #111827);
    font-size: 27px;
    line-height: 1;
    font-weight: 900;
}

body.portal-body .portal-main-panel .portal-ticket-summary,
body.portal-body .portal-main-panel .portal-project-card,
body.portal-body .portal-main-panel .ticket-row {
    border: 1px solid color-mix(in srgb, var(--portal-accent, #e0a316) 26%, transparent);
    border-radius: 0;
    background: color-mix(in srgb, var(--portal-surface, #fff) 96%, var(--portal-accent, #e0a316));
    box-shadow: none;
}

@media (max-width: 1180px) {
    body.portal-body .portal-enterprise-banner {
        grid-template-columns: 210px 1fr;
        grid-template-rows: auto auto auto;
        min-height: 0;
    }

    body.portal-body .portal-banner-center,
    body.portal-body .portal-banner-metrics {
        grid-column: 1 / -1;
    }

    body.portal-body .portal-banner-tools {
        grid-column: 2;
    }

    body.portal-body .portal-banner-center {
        margin-top: 36px;
    }

    body.portal-body .portal-banner-metrics {
        justify-self: center;
        margin-top: 26px;
    }

    body.portal-body .portal-enterprise-layout {
        grid-template-columns: 300px minmax(0, 1fr);
    }

    body.portal-body .portal-side-nav nav a {
        font-size: 18px;
    }
}

@media (max-width: 760px) {
    body.portal-body .portal-enterprise-banner {
        display: block;
        padding: 24px 20px 34px;
    }

    body.portal-body .portal-banner-tools {
        justify-content: flex-start;
        margin-top: 20px;
    }

    body.portal-body .portal-banner-center {
        margin-top: 34px;
        text-align: left;
    }

    body.portal-body .portal-banner-center strong {
        font-size: 42px;
    }

    body.portal-body .portal-banner-center span {
        font-size: 17px;
    }

    body.portal-body .portal-banner-metrics {
        justify-content: flex-start;
        margin-top: 24px;
    }

    body.portal-body .portal-enterprise-layout {
        display: block;
    }

    body.portal-body .portal-side-nav {
        min-height: 0;
        padding: 28px 20px;
    }

    body.portal-body .portal-side-nav nav {
        gap: 8px;
        margin-top: 18px;
    }

    body.portal-body .portal-side-nav nav a {
        min-height: 46px;
        font-size: 18px;
    }

    body.portal-body .portal-main-panel {
        min-height: 0;
        padding: 38px 20px 56px;
    }

    body.portal-body .portal-main-panel .portal-content-card h3 {
        font-size: 40px;
    }
}

/* Portal compact enterprise refinement */
body.portal-body .portal-enterprise-banner {
    grid-template-columns: 260px minmax(0, 1fr) auto;
    grid-template-rows: 1fr;
    min-height: 88px;
    padding: 18px 32px;
    align-items: center;
    column-gap: 24px;
}

body.portal-body .portal-banner-brand,
body.portal-body .portal-banner-center,
body.portal-body .portal-banner-tools {
    grid-row: 1;
}

body.portal-body .portal-banner-brand {
    align-items: center;
}

body.portal-body .portal-enterprise-banner .portal-topbar-logo-wrap {
    width: 148px;
    height: 52px;
}

body.portal-body .portal-banner-center {
    align-self: center;
    max-width: none;
    margin: 0;
    text-align: left;
}

body.portal-body .portal-banner-center strong {
    font-size: clamp(24px, 2.2vw, 34px);
    line-height: 1.1;
}

body.portal-body .portal-banner-center span {
    width: min(100%, 520px);
    min-height: 0;
    margin: 8px 0 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: color-mix(in srgb, var(--portal-on-primary, #fff) 82%, transparent);
    font-size: 14px;
    font-weight: 650;
}

body.portal-body .portal-banner-center span::before {
    display: none;
}

body.portal-body .portal-banner-tools {
    grid-column: 3;
    gap: 14px;
    font-size: 18px;
}

body.portal-body .portal-banner-tools > span,
body.portal-body .portal-banner-tools > span::before {
    display: none;
}

body.portal-body .portal-banner-tools .portal-language-switch button {
    font-size: 17px;
}

body.portal-body .portal-banner-metrics {
    display: none;
}

body.portal-body .portal-enterprise-layout {
    grid-template-columns: 260px minmax(0, 1240px);
}

body.portal-body .portal-side-nav {
    min-height: calc(100vh - 88px);
    padding: 18px 14px;
}

body.portal-body .portal-side-nav nav {
    gap: 1px;
    margin-top: 0;
}

body.portal-body .portal-side-nav nav::before {
    margin: 0 0 10px;
    padding: 0 6px;
    font-size: 15px;
}

body.portal-body .portal-side-nav nav a,
body.portal-body .portal-side-nav nav a.active,
body.portal-body .portal-side-nav nav a:hover {
    min-height: 0;
    padding: 3px 6px;
    border-radius: 5px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.15;
}

body.portal-body .portal-side-nav nav a:hover,
body.portal-body .portal-side-nav nav a.active {
    background: color-mix(in srgb, var(--portal-surface, #fff) 36%, transparent);
}

body.portal-body .portal-side-nav nav a::before {
    display: none;
}

body.portal-body .portal-side-actions {
    margin-top: 16px;
    padding-top: 12px;
}

body.portal-body .portal-side-actions .small-btn {
    min-height: 34px;
    padding: 0 12px;
    border-radius: 7px;
    font-size: 13px;
}

body.portal-body .portal-main-panel {
    min-height: calc(100vh - 88px);
    padding: 40px 50px 64px;
}

body.portal-body .portal-dashboard-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin: 0 0 34px;
}

body.portal-body .portal-overview-card {
    min-height: 112px;
    padding: 20px;
    border: 1px solid color-mix(in srgb, var(--portal-text, #111827) 10%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--portal-surface, #fff) 96%, var(--portal-background, #e4e7eb));
    box-shadow: none;
}

body.portal-body .portal-overview-card span {
    font-size: 13px;
    font-weight: 750;
}

body.portal-body .portal-overview-card strong {
    margin: 12px 0 8px;
    font-size: 30px;
    line-height: 1;
}

body.portal-body .portal-overview-card a {
    font-size: 13px;
}

body.portal-body .portal-main-panel .portal-content-card {
    margin-top: 32px;
}

body.portal-body .portal-main-panel .portal-content-card:first-child,
body.portal-body .portal-dashboard-overview + .portal-content-card {
    margin-top: 0;
}

body.portal-body .portal-main-panel .portal-content-card > .panel-head {
    align-items: center;
    margin-bottom: 18px;
    padding-bottom: 14px;
}

body.portal-body .portal-main-panel > .portal-content-card:first-child > .panel-head,
body.portal-body .portal-main-panel > .portal-content-card:first-of-type > .panel-head {
    margin-bottom: 20px;
    padding-bottom: 16px;
}

body.portal-body .portal-main-panel .portal-content-card > .panel-head {
    min-height: 0;
}

body.portal-body .portal-main-panel .portal-content-card > .panel-head + .ticket-list,
body.portal-body .portal-main-panel .portal-content-card > .panel-head + .portal-request-list,
body.portal-body .portal-main-panel .portal-content-card > .panel-head + .portal-project-grid,
body.portal-body .portal-main-panel .portal-content-card > .panel-head + .portal-license-table-wrap,
body.portal-body .portal-main-panel .portal-content-card > .panel-head + .portal-document-list {
    margin-top: 0;
}

body.portal-body .portal-embed-card {
    position: relative;
    min-height: 0;
    padding: 10px;
}

body.portal-body .portal-embed-frame-wrap {
    overflow: hidden;
    width: 100%;
    min-height: 520px;
    height: calc(100vh - 210px);
    border: 1px solid rgba(15, 23, 42, 0.12);
    border-radius: 8px;
    background: #fff;
}

body.portal-body .portal-embed-external-link {
    position: absolute;
    top: 18px;
    right: 18px;
    z-index: 2;
    padding: 7px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    color: #12356f;
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
}

body.portal-body .portal-embed-frame-wrap iframe {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 520px;
    border: 0;
}

body.portal-body .portal-main-panel .portal-content-card h3 {
    font-size: clamp(24px, 2.2vw, 34px);
    line-height: 1.12;
    font-weight: 850;
}

body.portal-body .portal-main-panel .portal-content-card h3::before {
    margin-bottom: 8px;
    color: var(--portal-accent, #e0a316);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.08em;
}

body.portal-body .portal-main-panel .portal-ticket-summary,
body.portal-body .portal-main-panel .portal-project-card,
body.portal-body .portal-main-panel .ticket-row {
    border-radius: 8px;
}

body.portal-body .portal-main-panel .portal-project-card {
    padding: 22px 20px;
}

@media (max-width: 1180px) {
    body.portal-body .portal-enterprise-banner {
        grid-template-columns: 210px minmax(0, 1fr) auto;
    }

    body.portal-body .portal-enterprise-layout {
        grid-template-columns: 230px minmax(0, 1fr);
    }

    body.portal-body .portal-main-panel {
        padding: 34px 28px 54px;
    }
}

@media (max-width: 760px) {
    body.portal-body .portal-enterprise-banner {
        padding: 18px 20px;
    }

    body.portal-body .portal-banner-center {
        margin-top: 18px;
    }

    body.portal-body .portal-banner-center strong {
        font-size: 28px;
    }

    body.portal-body .portal-dashboard-overview {
        grid-template-columns: 1fr;
    }

    body.portal-body .portal-main-panel .portal-content-card h3 {
        font-size: 30px;
    }
}

/* Keep portal sidebar controls content-sized, not stretched */
body.portal-body .portal-side-nav {
    display: grid;
    grid-auto-rows: max-content;
    align-content: start;
    gap: 12px;
}

body.portal-body .portal-side-nav nav,
body.portal-body .portal-side-actions {
    display: grid;
    grid-auto-rows: max-content;
    align-content: start;
    gap: 3px;
}

body.portal-body .portal-side-nav nav a,
body.portal-body .portal-side-nav nav a.active,
body.portal-body .portal-side-nav nav a:hover,
body.portal-body .portal-side-actions .small-btn,
body.portal-body .portal-side-actions .small-btn.secondary {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
    width: auto;
    min-width: 0;
    max-width: max-content;
    height: auto;
    min-height: 0;
    padding: 4px 7px;
    line-height: 1.15;
}

body.portal-body .portal-side-actions {
    margin-top: 8px;
    padding-top: 10px;
}

body.portal-body .portal-license-table-wrap {
    overflow-x: auto;
    border: 1px solid color-mix(in srgb, var(--portal-text, #111827) 10%, transparent);
    border-radius: 8px;
    background: var(--portal-surface, #fff);
}

body.portal-body .portal-license-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}

body.portal-body .portal-license-table th,
body.portal-body .portal-license-table td {
    padding: 15px 18px;
    border-bottom: 1px solid color-mix(in srgb, var(--portal-text, #111827) 8%, transparent);
    text-align: left;
    vertical-align: middle;
}

body.portal-body .portal-license-table th {
    background: color-mix(in srgb, var(--portal-background, #e4e7eb) 55%, var(--portal-surface, #fff));
    color: var(--portal-muted, #53657d);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

body.portal-body .portal-license-table td {
    color: var(--portal-text, #111827);
    font-size: 14px;
}

body.portal-body .portal-license-table tbody tr:last-child td {
    border-bottom: 0;
}

body.portal-body .portal-license-table tbody tr:hover {
    background: color-mix(in srgb, var(--portal-accent, #e0a316) 7%, transparent);
}

body.portal-body .portal-license-table code {
    display: inline-flex;
    padding: 5px 8px;
    border-radius: 6px;
    background: color-mix(in srgb, var(--portal-background, #e4e7eb) 70%, var(--portal-surface, #fff));
    color: var(--portal-text, #111827);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 13px;
    letter-spacing: 0;
}

body.portal-body .portal-ticket-summary {
    align-content: start;
}

body.portal-body .portal-ticket-meta {
    display: grid;
    gap: 10px;
    margin: 8px 0 0;
    padding: 16px 0 0;
    border-top: 1px solid color-mix(in srgb, var(--portal-text, #111827) 10%, transparent);
}

body.portal-body .portal-ticket-meta div {
    display: grid;
    grid-template-columns: minmax(86px, 0.48fr) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

body.portal-body .portal-ticket-meta dt,
body.portal-body .portal-ticket-meta dd {
    margin: 0;
}

body.portal-body .portal-ticket-meta dt {
    color: var(--portal-muted, #53677f);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

body.portal-body .portal-ticket-meta dd {
    color: var(--portal-text, #111827);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.hubspot-insight-list {
    display: grid;
    gap: 10px;
}

body.portal-body .portal-project-hero {
    margin: 0 0 28px;
    padding: 28px 30px;
    border-radius: 10px;
    box-shadow: none;
}

body.portal-body .portal-project-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    gap: 28px;
    align-items: start;
    width: 100%;
    margin: 30px 0 0;
}

body.portal-body .portal-project-layout > .portal-content-card {
    min-width: 0;
    margin-top: 0;
}

body.portal-body .portal-project-layout + .portal-content-card,
body.portal-body .portal-content-card + .portal-project-layout {
    margin-top: 34px;
}

body.portal-body .portal-project-layout .portal-document-list {
    display: grid;
    gap: 10px;
}

body.portal-body .portal-project-layout .portal-document-list a,
body.portal-body .portal-project-layout .portal-document-list > div {
    align-items: center;
    min-width: 0;
    border-radius: 8px;
}

body.portal-body .portal-project-layout .portal-document-list strong,
body.portal-body .portal-project-layout .portal-document-list span {
    min-width: 0;
    overflow-wrap: anywhere;
}

body.portal-body .portal-project-layout .ticket-thread {
    display: grid;
    gap: 12px;
}

body.portal-body .portal-project-layout .ticket-comment {
    display: block;
    min-width: 0;
    padding: 16px 18px;
    border: 1px solid color-mix(in srgb, var(--portal-text, #111827) 8%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--portal-surface, #fff) 96%, var(--portal-background, #e4e7eb));
    box-shadow: none;
}

body.portal-body .portal-project-layout .ticket-comment-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    min-width: 0;
}

body.portal-body .portal-project-layout .ticket-comment-head strong,
body.portal-body .portal-project-layout .ticket-comment-head .muted {
    min-width: 0;
    overflow-wrap: anywhere;
}

body.portal-body .portal-project-layout .ticket-comment p {
    margin: 10px 0 0;
    max-width: none;
    color: var(--portal-text, #111827);
    line-height: 1.45;
    overflow-wrap: anywhere;
}

@media (max-width: 980px) {
    body.portal-body .portal-project-layout {
        grid-template-columns: 1fr;
    }
}

/* Compact portal page headers */
body.portal-body .portal-main-panel {
    display: grid;
    grid-auto-rows: max-content;
    align-content: start;
    gap: 26px;
    padding-top: 30px;
}

body.portal-body .portal-main-panel > .portal-content-card,
body.portal-body .portal-main-panel .portal-content-card {
    display: grid;
    grid-auto-rows: max-content;
    align-content: start;
    gap: 18px;
}

body.portal-body .portal-main-panel .portal-content-card > .panel-head {
    margin: 0;
    padding-bottom: 12px;
    min-height: 0;
}

body.portal-body .portal-main-panel > .portal-content-card:first-child > .panel-head,
body.portal-body .portal-main-panel > .portal-content-card:first-of-type > .panel-head {
    margin: 0;
    padding-bottom: 12px;
}

body.portal-body .portal-main-panel .portal-content-card h3 {
    font-size: clamp(24px, 2vw, 32px);
}

body.portal-body .portal-main-panel .portal-content-card h3::before {
    margin-bottom: 6px;
    font-size: 10px;
}

body.portal-body .portal-project-hero {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0 0 18px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: var(--portal-text, #111827);
    box-shadow: none;
}

body.portal-body .portal-project-hero > .link-chip {
    display: none;
}

body.portal-body .portal-project-hero .panel-head {
    align-items: end;
    margin: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid color-mix(in srgb, var(--portal-text, #111827) 11%, transparent);
}

body.portal-body .portal-project-hero h3 {
    margin: 0;
    color: var(--portal-text, #111827);
    font-size: clamp(28px, 2.6vw, 38px);
    line-height: 1.08;
    font-weight: 850;
}

body.portal-body .portal-project-hero h3::before {
    content: "PORTAL";
    display: block;
    margin-bottom: 6px;
    color: var(--portal-accent, #e0a316);
    font-size: 10px;
    line-height: 1;
    font-weight: 850;
    letter-spacing: 0.08em;
}

body.portal-body .portal-project-hero .muted,
body.portal-body .portal-project-hero p,
body.portal-body .portal-project-hero .project-meta {
    color: var(--portal-muted, #53677f);
}

body.portal-body .portal-project-hero .panel-head strong {
    color: var(--portal-muted, #53677f);
    font-size: 14px;
}

body.portal-body .portal-project-hero > p {
    margin: 0;
    max-width: 780px;
    color: var(--portal-text, #111827);
}

body.portal-body .portal-project-hero .progress {
    height: 8px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--portal-text, #111827) 10%, transparent);
}

body.portal-body .portal-project-hero .progress-bar {
    background: var(--portal-accent, #e0a316);
}

body.portal-body .portal-ticket-chat-layout .ticket-comment,
body.portal-body .portal-ticket-chat-layout .ticket-comment-bubble {
    box-shadow: none !important;
}

body.portal-body .portal-ticket-chat-layout .ticket-comment {
    border: 0 !important;
    background: transparent !important;
}

body.portal-body .portal-ticket-chat-layout .ticket-comment-avatar {
    box-shadow: none !important;
}

.calendar-filter-bar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin: 16px 0 0;
}

.calendar-filter-bar label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.calendar-filter-bar select {
    min-width: 170px;
}

.plani-meeting-chip {
    border-left-color: #f2b21a;
}

.planned-meeting-chip {
    border-left-color: #2b8fd6;
}

.calendar-chip-type-icon {
    display: inline-flex;
    width: 1.1em;
    margin-right: 4px;
    color: currentColor;
    opacity: 0.82;
}

/* Service portal visual refresh */
body.portal-body {
    --portal-brand-dark: #050a12;
    --portal-card-shadow: 0 16px 38px rgba(17, 24, 39, 0.08);
    --portal-line-soft: color-mix(in srgb, var(--portal-text, #111827) 10%, transparent);
    background: #f3f6fa !important;
}

body.portal-body .portal-shell {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    margin: 0;
    background: #fff;
}

body.portal-body .portal-enterprise-banner {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    min-height: 116px;
    margin: 0;
    padding: 24px 52px;
    border: 0;
    border-radius: 0;
    background:
        radial-gradient(circle at 16% 0%, rgba(74, 118, 166, 0.18), transparent 28%),
        linear-gradient(135deg, #02060b 0%, var(--portal-brand-dark) 72%, #02060b 100%);
    color: #fff;
    box-shadow: none;
}

body.portal-body .portal-banner-brand {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    align-items: center;
    gap: 34px;
    min-width: 0;
}

body.portal-body .portal-topbar-logo-wrap {
    display: flex;
    align-items: center;
    width: 170px;
    height: 58px;
    padding-right: 34px;
    border-right: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

body.portal-body .portal-topbar-logo-wrap img {
    width: 125px;
    max-width: 125px;
    max-height: 58px;
    object-fit: contain;
    object-position: left center;
}

body.portal-body .portal-topbar-copy h2 {
    margin: 0;
    color: #fff;
    font-size: clamp(28px, 2.4vw, 38px);
    line-height: 1;
    font-weight: 850;
    letter-spacing: 0;
}

body.portal-body .portal-topbar-copy h2::after {
    content: ".";
    color: var(--portal-accent, #f2ad00);
}

body.portal-body .portal-topbar-copy p {
    margin: 10px 0 0;
    color: rgba(255, 255, 255, 0.76);
    font-size: 15px;
    font-weight: 700;
}

body.portal-body .portal-banner-center,
body.portal-body .portal-banner-metrics {
    display: none;
}

body.portal-body .portal-banner-tools {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 24px;
}

body.portal-body .portal-banner-tools > span {
    display: none;
}

body.portal-body .portal-banner-tools::after {
    content: "";
    width: 54px;
    height: 54px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 50%;
    background:
        radial-gradient(circle, transparent 0 5px, rgba(255, 255, 255, 0.86) 6px 7px, transparent 8px),
        conic-gradient(from 0deg, transparent 0 8%, rgba(255, 255, 255, 0.8) 8% 11%, transparent 11% 20%);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    opacity: 0.9;
}

body.portal-body .portal-language-switch {
    display: flex;
    align-items: center;
    gap: 9px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 16px;
    font-weight: 850;
}

body.portal-body .portal-language-switch div {
    display: flex;
    align-items: center;
    gap: 9px;
}

body.portal-body .portal-language-switch button {
    padding: 0;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.72);
    font: inherit;
    cursor: pointer;
}

body.portal-body .portal-language-switch button + button::before {
    content: "/";
    margin-right: 9px;
    color: rgba(255, 255, 255, 0.72);
}

body.portal-body .portal-language-switch a,
body.portal-body .portal-language-switch span,
body.portal-body .portal-language-switch button {
    color: rgba(255, 255, 255, 0.72);
    text-decoration: none;
}

body.portal-body .portal-language-switch .active,
body.portal-body .portal-language-switch strong,
body.portal-body .portal-language-switch button.active {
    color: var(--portal-accent, #f2ad00);
}

body.portal-body .portal-enterprise-layout {
    display: grid;
    grid-template-columns: 292px minmax(0, 1fr);
    min-height: calc(100vh - 116px);
    background: #fff;
}

body.portal-body .portal-side-nav {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 28px;
    min-height: calc(100vh - 116px);
    padding: 44px 26px 28px;
    border-right: 1px solid #e1e7ef;
    background: #f6f8fb;
    box-shadow: none;
}

body.portal-body .portal-side-nav nav {
    display: grid;
    gap: 14px;
}

body.portal-body .portal-side-nav nav a {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 54px;
    padding: 0 18px 0 64px;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--portal-text, #111827);
    font-size: 16px;
    font-weight: 760;
    line-height: 1.1;
    text-decoration: none;
    box-shadow: none;
}

body.portal-body .portal-side-nav nav a::before {
    position: absolute;
    left: 20px;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    color: currentColor;
    font-size: 22px;
    font-weight: 500;
}

body.portal-body .portal-side-nav nav a:nth-child(1)::before {
    content: "\2302";
}

body.portal-body .portal-side-nav nav a:nth-child(2)::before {
    content: "\25A1";
    font-size: 19px;
}

body.portal-body .portal-side-nav nav a:nth-child(3)::before {
    content: "\25AB";
    font-size: 21px;
}

body.portal-body .portal-side-nav nav a:nth-child(4)::before {
    content: "\25C7";
    font-size: 19px;
}

body.portal-body .portal-side-nav nav a.active,
body.portal-body .portal-side-nav nav a:hover {
    background: color-mix(in srgb, var(--portal-accent, #f2ad00) 13%, #fff);
    color: var(--portal-accent, #f2ad00);
}

body.portal-body .portal-side-actions {
    display: grid;
    gap: 14px;
    margin-top: 14px;
    padding-top: 28px;
    border-top: 1px solid #dce3eb;
}

body.portal-body .portal-side-actions .small-btn,
body.portal-body .portal-side-actions .small-btn.secondary {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    min-height: 54px;
    width: 100%;
    padding: 0 22px 0 58px;
    border: 0;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 800;
    text-align: left;
    box-shadow: none;
}

body.portal-body .portal-side-actions .small-btn {
    position: relative;
    background: linear-gradient(135deg, var(--portal-accent, #f2ad00), color-mix(in srgb, var(--portal-accent, #f2ad00) 78%, #ffdd61));
    color: #fff;
    box-shadow: 0 14px 30px color-mix(in srgb, var(--portal-accent, #f2ad00) 26%, transparent);
}

body.portal-body .portal-side-actions .small-btn::before {
    content: "+";
    position: absolute;
    left: 22px;
    font-size: 28px;
    line-height: 1;
    font-weight: 300;
}

body.portal-body .portal-side-actions .small-btn.secondary {
    position: relative;
    background: transparent;
    color: var(--portal-text, #111827);
}

body.portal-body .portal-side-actions .small-btn.secondary::before {
    content: ">";
    position: absolute;
    left: 24px;
    color: var(--portal-text, #111827);
    font-size: 22px;
    font-weight: 600;
}

body.portal-body .portal-help-card {
    display: grid;
    gap: 10px;
    margin-top: auto;
    padding: 24px 18px;
    border: 1px solid color-mix(in srgb, var(--portal-accent, #f2ad00) 22%, transparent);
    border-radius: 12px;
    background:
        radial-gradient(circle at 18% 12%, color-mix(in srgb, var(--portal-accent, #f2ad00) 18%, transparent), transparent 28%),
        color-mix(in srgb, var(--portal-accent, #f2ad00) 7%, #fff);
}

body.portal-body .portal-help-icon {
    display: block;
    width: 34px;
    height: 34px;
    border: 2px solid var(--portal-accent, #f2ad00);
    border-radius: 50%;
}

body.portal-body .portal-help-icon::after {
    content: "";
    display: block;
    width: 7px;
    height: 13px;
    margin: 7px auto 0;
    border: solid var(--portal-accent, #f2ad00);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

body.portal-body .portal-help-card strong {
    color: var(--portal-text, #111827);
    font-size: 16px;
    font-weight: 850;
}

body.portal-body .portal-help-card p {
    margin: 0;
    color: var(--portal-muted, #607089);
    font-size: 14px;
    line-height: 1.45;
}

body.portal-body .portal-help-card a {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 8px;
    padding: 11px 18px;
    border: 1px solid var(--portal-accent, #f2ad00);
    border-radius: 999px;
    color: var(--portal-accent, #f2ad00);
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

body.portal-body .portal-main-panel {
    display: block;
    min-width: 0;
    padding: 48px 60px 76px;
    background:
        linear-gradient(180deg, rgba(246, 248, 251, 0.84), #fff 220px),
        #fff;
}

body.portal-body .portal-dashboard-overview {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 30px;
    margin: 0 0 56px;
}

body.portal-body .portal-overview-card {
    position: relative;
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-areas:
        "icon label"
        "number number"
        "link link";
    align-items: center;
    min-height: 188px;
    padding: 28px 30px;
    overflow: hidden;
    border: 1px solid #dfe6ef;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: var(--portal-card-shadow);
}

body.portal-body .portal-overview-card::before {
    content: "";
    grid-area: icon;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--portal-accent, #f2ad00) 15%, #fff);
}

body.portal-body .portal-overview-card::after {
    content: "";
    position: absolute;
    right: -24px;
    bottom: -18px;
    width: 150px;
    height: 118px;
    border-radius: 24px 24px 0 24px;
    background: color-mix(in srgb, var(--portal-accent, #f2ad00) 18%, transparent);
    transform: rotate(14deg);
}

body.portal-body .portal-overview-card:nth-child(2)::before,
body.portal-body .portal-overview-card:nth-child(2)::after {
    background-color: rgba(69, 214, 118, 0.16);
}

body.portal-body .portal-overview-card:nth-child(3)::before,
body.portal-body .portal-overview-card:nth-child(3)::after {
    background-color: rgba(139, 103, 255, 0.16);
}

body.portal-body .portal-overview-card span {
    grid-area: label;
    color: var(--portal-text, #111827);
    font-size: 17px;
    font-weight: 650;
}

body.portal-body .portal-overview-card strong {
    grid-area: number;
    align-self: end;
    margin-top: 18px;
    color: var(--portal-text, #111827);
    font-size: 44px;
    line-height: 1;
    font-weight: 850;
}

body.portal-body .portal-overview-card a {
    grid-area: link;
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    width: max-content;
    margin-top: 12px;
    color: #10ad57;
    font-size: 16px;
    font-weight: 750;
    text-decoration: none;
}

body.portal-body .portal-overview-card a::before {
    content: "";
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: currentColor;
}

body.portal-body .portal-overview-card:nth-child(3) a {
    color: #875cff;
}

body.portal-body .portal-main-panel > .portal-content-card {
    margin: 0 0 54px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

body.portal-body .portal-main-panel > .portal-content-card > .panel-head {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 22px;
    margin: 0 0 24px;
    padding: 0;
    border: 0;
}

body.portal-body .portal-main-panel > .portal-content-card > .panel-head h3 {
    margin: 0;
    color: var(--portal-text, #111827);
    font-size: clamp(28px, 2vw, 34px);
    line-height: 1.08;
    font-weight: 850;
}

body.portal-body .portal-main-panel > .portal-content-card > .panel-head h3::before {
    content: "PORTAL";
    display: block;
    margin-bottom: 10px;
    color: var(--portal-accent, #f2ad00);
    font-size: 11px;
    line-height: 1;
    font-weight: 850;
    letter-spacing: 0.1em;
}

body.portal-body .portal-main-panel .academy-hero-card h3::before,
body.portal-body .portal-main-panel > .portal-content-card.academy-track-detail > .panel-head h3::before,
body.portal-body .portal-main-panel > .portal-content-card.academy-lesson-detail > .panel-head h3::before,
body.portal-body .portal-main-panel .academy-quiz-start h3::before,
body.portal-body .portal-main-panel .academy-guided-next h3::before,
body.portal-body .portal-main-panel .academy-certificate h3::before,
body.portal-body .portal-main-panel .academy-section-card h3::before {
    content: none;
    display: none;
}

body.portal-body .portal-main-panel > .portal-content-card > .panel-head .muted {
    color: var(--portal-accent, #f2ad00);
    font-size: 15px;
    font-weight: 800;
}

body.portal-body .portal-main-panel > .portal-content-card.academy-lesson-detail > .panel-head {
    align-items: start;
    margin: 0 0 8px !important;
    padding: 0 !important;
    border-bottom: 0 !important;
}

body.portal-body .portal-main-panel > .portal-content-card.academy-lesson-detail > .panel-head h3 {
    font-size: clamp(28px, 2.25vw, 38px) !important;
    line-height: 1.02 !important;
}

body.portal-body .academy-lesson-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 8px;
    color: var(--portal-muted);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

body.portal-body .academy-lesson-back-link:hover {
    color: var(--portal-accent);
}

body.portal-body .portal-main-panel > .portal-content-card.academy-lesson-detail {
    display: block;
    min-height: 0;
    height: auto;
    overflow: visible;
    margin-bottom: 24px !important;
}

body.portal-body.portal-page-portal-academy-lesson .portal-enterprise-layout {
    min-height: calc(100vh - 68px);
    overflow: visible !important;
}

body.portal-body.portal-page-portal-academy-lesson .portal-main-panel {
    padding-top: 28px;
    padding-bottom: 36px;
    overflow: visible !important;
}

body.portal-body.portal-page-portal-academy-lesson .portal-main-panel > .portal-content-card {
    margin-bottom: 28px !important;
}

body.portal-body.portal-page-portal-academy-lesson .portal-shell,
body.portal-body.portal-page-portal-academy-lesson.client-status-body {
    overflow-y: visible !important;
}

html.portal-page-portal-academy-lesson {
    height: 100%;
    overflow-y: hidden;
}

body.portal-body.portal-page-portal-academy-lesson {
    height: 100vh;
    overflow-y: auto !important;
}

body.portal-body .portal-main-panel .planning-list {
    display: grid;
    gap: 16px;
}

body.portal-body .portal-main-panel .planning-item {
    position: relative;
    display: grid;
    gap: 6px;
    min-height: 102px;
    padding: 26px 96px 24px 104px;
    overflow: hidden;
    border: 1px solid #dde5ee;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.06);
}

body.portal-body .portal-main-panel .planning-item::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: var(--portal-accent, #f2ad00);
}

body.portal-body .portal-main-panel .planning-item::after {
    content: "";
    position: absolute;
    left: 28px;
    top: 50%;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background:
        linear-gradient(var(--portal-accent, #f2ad00), var(--portal-accent, #f2ad00)) center 17px / 20px 3px no-repeat,
        linear-gradient(var(--portal-accent, #f2ad00), var(--portal-accent, #f2ad00)) center 29px / 20px 3px no-repeat,
        color-mix(in srgb, var(--portal-accent, #f2ad00) 13%, #fff);
    transform: translateY(-50%);
}

body.portal-body .portal-main-panel .planning-item .project-card-row {
    display: flex;
    align-items: center;
    gap: 18px;
    min-width: 0;
}

body.portal-body .portal-main-panel .planning-item strong {
    color: var(--portal-text, #111827);
    font-size: 18px;
    font-weight: 850;
}

body.portal-body .portal-main-panel .planning-item p {
    margin: 0;
    color: var(--portal-muted, #7b8798);
    font-size: 15px;
    font-weight: 650;
}

body.portal-body .portal-main-panel .planning-item .pill {
    margin-left: auto;
    padding: 10px 16px;
    border: 0;
    border-radius: 999px;
    background: color-mix(in srgb, var(--portal-accent, #f2ad00) 13%, #fff);
    color: var(--portal-text, #111827);
    font-size: 13px;
    font-weight: 650;
    white-space: nowrap;
}

body.portal-body .portal-main-panel .planning-item .link-chip {
    position: absolute;
    right: 26px;
    top: 50%;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid #dde5ee;
    border-radius: 50%;
    background: #f8fafc;
    color: var(--portal-text, #111827);
    font-size: 0;
    text-decoration: none;
    transform: translateY(-50%);
}

body.portal-body .portal-main-panel .planning-item .link-chip::before {
    content: ">";
    font-size: 22px;
    line-height: 1;
}

body.portal-body .portal-project-grid,
body.portal-body .ticket-list {
    gap: 16px;
}

body.portal-body .portal-project-card,
body.portal-body .ticket-row,
body.portal-body .portal-license-table,
body.portal-body .portal-document-list a,
body.portal-body .portal-document-list > div {
    border-color: #dde5ee;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 10px 26px rgba(17, 24, 39, 0.05);
}

@media (max-width: 1100px) {
    body.portal-body .portal-enterprise-layout {
        grid-template-columns: 240px minmax(0, 1fr);
    }

    body.portal-body .portal-main-panel {
        padding: 38px 32px 58px;
    }

    body.portal-body .portal-dashboard-overview {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    body.portal-body .portal-enterprise-banner {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 22px 24px;
    }

    body.portal-body .portal-banner-brand {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    body.portal-body .portal-topbar-logo-wrap {
        width: auto;
        padding-right: 0;
        border-right: 0;
    }

    body.portal-body .portal-banner-tools {
        justify-content: space-between;
    }

    body.portal-body .portal-enterprise-layout {
        grid-template-columns: 1fr;
    }

    body.portal-body .portal-side-nav {
        min-height: 0;
        padding: 20px;
    }

    body.portal-body .portal-help-card {
        display: none;
    }

    body.portal-body .portal-main-panel {
        padding: 28px 20px 46px;
    }

    body.portal-body .portal-main-panel .planning-item {
        padding: 22px 22px 22px 88px;
    }

    body.portal-body .portal-main-panel .planning-item .project-card-row {
        align-items: flex-start;
        flex-direction: column;
    }

    body.portal-body .portal-main-panel .planning-item .pill {
        margin-left: 0;
        white-space: normal;
    }
}

/* Service portal polish pass with Font Awesome icons */
body.portal-body {
    --portal-header-height: 112px;
    --portal-sidebar-width: 286px;
    --portal-app-bg: #f4f7fb;
    --portal-panel-bg: #ffffff;
    --portal-border-soft: #dce5ef;
    background: var(--portal-app-bg) !important;
}

body.portal-body .portal-enterprise-banner {
    grid-template-columns: minmax(0, 1fr) auto !important;
    min-height: var(--portal-header-height) !important;
    padding: 24px 46px !important;
    background:
        radial-gradient(circle at 18% 0%, rgba(69, 105, 150, 0.18), transparent 34%),
        linear-gradient(135deg, #03070d 0%, #070d16 58%, #03070d 100%) !important;
}

body.portal-body .portal-banner-brand {
    display: grid !important;
    grid-template-columns: 190px minmax(0, 1fr) !important;
    gap: 36px !important;
    align-items: center !important;
}

body.portal-body .portal-topbar-logo-wrap {
    width: 190px !important;
    height: 58px !important;
    padding-right: 36px !important;
    border-right: 1px solid rgba(255, 255, 255, 0.18) !important;
    background: transparent !important;
}

body.portal-body .portal-topbar-logo-wrap img {
    width: 126px !important;
    max-width: 126px !important;
    max-height: 58px !important;
    object-fit: contain !important;
    object-position: left center !important;
}

body.portal-body .portal-topbar-copy {
    display: block !important;
    min-width: 0;
}

body.portal-body .portal-topbar-copy h2 {
    display: block !important;
    margin: 0 !important;
    color: #fff !important;
    font-size: clamp(29px, 2.2vw, 38px) !important;
    line-height: 1 !important;
    font-weight: 850 !important;
    letter-spacing: 0 !important;
}

body.portal-body .portal-topbar-copy p {
    display: block !important;
    margin: 10px 0 0 !important;
    color: rgba(255, 255, 255, 0.76) !important;
    font-size: 15px !important;
    font-weight: 700 !important;
}

body.portal-body .portal-banner-tools {
    display: flex !important;
    align-items: center !important;
    gap: 28px !important;
}

body.portal-body .portal-banner-tools::after {
    display: none !important;
}

body.portal-body .portal-version-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 18px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: background 0.18s ease, border-color 0.18s ease;
}

body.portal-body .portal-version-link:hover {
    border-color: color-mix(in srgb, var(--portal-accent, #f2ad00) 64%, rgba(255, 255, 255, 0.18));
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

body.portal-body .portal-enterprise-layout {
    grid-template-columns: var(--portal-sidebar-width) minmax(0, 1fr) !important;
    min-height: calc(100vh - var(--portal-header-height)) !important;
    background: var(--portal-app-bg) !important;
}

body.portal-body .portal-side-nav {
    gap: 28px !important;
    min-height: calc(100vh - var(--portal-header-height)) !important;
    padding: 42px 26px 28px !important;
    border-right: 1px solid var(--portal-border-soft) !important;
    background: #f6f9fd !important;
}

body.portal-body .portal-side-nav nav {
    gap: 10px !important;
}

body.portal-body .portal-side-nav nav a {
    display: grid !important;
    grid-template-columns: 28px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 18px !important;
    min-height: 54px !important;
    padding: 0 16px !important;
    border-radius: 11px !important;
    color: var(--portal-text, #111827) !important;
    font-size: 15px !important;
    font-weight: 780 !important;
}

body.portal-body .portal-side-nav nav a::before {
    content: none !important;
}

body.portal-body .portal-side-nav nav a i {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    color: currentColor;
    font-size: 18px;
}

body.portal-body .portal-side-nav nav a.active,
body.portal-body .portal-side-nav nav a:hover {
    background: color-mix(in srgb, var(--portal-accent, #f2ad00) 12%, #fff) !important;
    color: var(--portal-accent, #f2ad00) !important;
    box-shadow: none !important;
}

body.portal-body .portal-side-actions {
    gap: 10px !important;
    margin-top: 16px !important;
    padding-top: 28px !important;
}

body.portal-body .portal-side-actions .small-btn,
body.portal-body .portal-side-actions .small-btn.secondary {
    display: grid !important;
    grid-template-columns: 28px minmax(0, 1fr) !important;
    gap: 14px !important;
    align-items: center !important;
    min-height: 52px !important;
    padding: 0 18px !important;
    border-radius: 15px !important;
    font-size: 15px !important;
    line-height: 1 !important;
}

body.portal-body .portal-side-actions .small-btn::before,
body.portal-body .portal-side-actions .small-btn.secondary::before {
    content: none !important;
}

body.portal-body .portal-side-actions .small-btn i,
body.portal-body .portal-side-actions .small-btn.secondary i {
    font-size: 16px;
}

body.portal-body .portal-side-actions .small-btn.secondary {
    background: transparent !important;
}

body.portal-body .portal-help-card {
    gap: 9px !important;
    margin-top: auto !important;
    padding: 22px 18px !important;
    border-radius: 13px !important;
}

body.portal-body .portal-help-icon {
    display: grid !important;
    place-items: center !important;
    width: 36px !important;
    height: 36px !important;
    border: 0 !important;
    background: color-mix(in srgb, var(--portal-accent, #f2ad00) 13%, #fff) !important;
    color: var(--portal-accent, #f2ad00) !important;
}

body.portal-body .portal-help-icon::after {
    content: none !important;
}

body.portal-body .portal-help-icon i {
    font-size: 18px;
}

body.portal-body .portal-main-panel {
    padding: 40px 56px 72px !important;
    background:
        linear-gradient(180deg, rgba(249, 251, 253, 0.82), #fff 260px),
        #fff !important;
}

body.portal-body .portal-dashboard-overview {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 30px !important;
    margin: 0 0 54px !important;
}

body.portal-body .portal-overview-card {
    grid-template-columns: 68px minmax(0, 1fr) !important;
    grid-template-areas:
        "icon label"
        "number number"
        "link link" !important;
    min-height: 204px !important;
    padding: 29px 31px !important;
    border: 1px solid var(--portal-border-soft) !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: 0 18px 42px rgba(17, 24, 39, 0.075) !important;
}

body.portal-body .portal-overview-card > i {
    grid-area: icon;
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--portal-accent, #f2ad00) 15%, #fff);
    color: var(--portal-accent, #f2ad00);
    font-size: 22px;
}

body.portal-body .portal-overview-card:nth-child(2) > i {
    background: rgba(36, 205, 99, 0.14);
    color: #18aa55;
}

body.portal-body .portal-overview-card:nth-child(3) > i {
    background: rgba(132, 93, 255, 0.14);
    color: #835cff;
}

body.portal-body .portal-overview-card::before {
    content: none !important;
}

body.portal-body .portal-overview-card::after {
    right: -30px !important;
    bottom: -28px !important;
    width: 158px !important;
    height: 122px !important;
    border-radius: 28px 28px 0 28px !important;
    opacity: 0.9 !important;
}

body.portal-body .portal-overview-card span {
    align-self: center !important;
    position: relative;
    z-index: 1;
    font-size: 17px !important;
    font-weight: 720 !important;
}

body.portal-body .portal-overview-card strong {
    position: relative;
    z-index: 1;
    margin-top: 24px !important;
    font-size: 47px !important;
}

body.portal-body .portal-overview-card a {
    margin-top: 14px !important;
    font-size: 16px !important;
    font-weight: 800 !important;
}

body.portal-body .portal-main-panel > .portal-content-card {
    margin-bottom: 52px !important;
}

body.portal-body .portal-main-panel > .portal-content-card > .panel-head {
    margin-bottom: 24px !important;
    padding: 0 !important;
}

body.portal-body .portal-main-panel > .portal-content-card > .panel-head h3 {
    font-size: clamp(30px, 2.35vw, 38px) !important;
}

body.portal-body .portal-main-panel > .portal-content-card > .panel-head .small-btn,
body.portal-body .portal-main-panel > .portal-content-card > .panel-head .link-chip {
    min-height: 38px;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--portal-accent, #f2ad00);
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

body.portal-body .portal-main-panel .planning-item {
    min-height: 112px !important;
    padding: 28px 34px 26px 104px !important;
    border: 1px solid var(--portal-border-soft) !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: 0 13px 32px rgba(17, 24, 39, 0.065) !important;
}

body.portal-body .portal-main-panel .planning-item::after {
    content: none !important;
}

body.portal-body .portal-main-panel .planning-item-icon {
    position: absolute;
    left: 30px;
    top: 50%;
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--portal-accent, #f2ad00) 13%, #fff);
    color: var(--portal-accent, #f2ad00);
    font-size: 20px;
    transform: translateY(-50%);
}

body.portal-body .portal-main-panel .planning-item .project-card-row {
    align-items: center !important;
}

body.portal-body .portal-main-panel .planning-item .pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px !important;
    font-size: 13px !important;
}

body.portal-body .portal-main-panel .planning-item .pill::before {
    content: "\f133";
    font-family: "Font Awesome 6 Free";
    font-weight: 400;
    color: currentColor;
}

body.portal-body .portal-project-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
    gap: 18px !important;
}

body.portal-body .portal-project-card,
body.portal-body .ticket-row,
body.portal-body .portal-ticket-card,
body.portal-body .portal-license-table-wrap,
body.portal-body .portal-document-list a,
body.portal-body .portal-document-list > div {
    border: 1px solid var(--portal-border-soft) !important;
    border-radius: 12px !important;
    background: #fff !important;
    box-shadow: 0 12px 30px rgba(17, 24, 39, 0.055) !important;
}

body.portal-body .portal-project-card {
    padding: 24px !important;
}

body.portal-body .ticket-row {
    padding: 22px 24px !important;
}

body.portal-body .portal-license-table-wrap {
    overflow: hidden;
}

body.portal-body .portal-license-table {
    width: 100%;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

body.portal-body .portal-license-table th {
    background: #f7f9fc;
    color: var(--portal-muted, #64748b);
    font-size: 12px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

body.portal-body .portal-license-table th,
body.portal-body .portal-license-table td {
    padding: 18px 20px;
    border-bottom: 1px solid #e8eef5;
}

body.portal-body .portal-project-hero {
    margin: 0 0 34px !important;
    padding: 0 0 26px !important;
    border-bottom: 1px solid var(--portal-border-soft) !important;
}

body.portal-body .portal-project-layout {
    gap: 28px !important;
}

@media (max-width: 1100px) {
    body.portal-body {
        --portal-sidebar-width: 248px;
    }

    body.portal-body .portal-main-panel {
        padding: 34px 30px 56px !important;
    }

    body.portal-body .portal-dashboard-overview {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 760px) {
    body.portal-body .portal-enterprise-banner {
        grid-template-columns: 1fr !important;
        gap: 18px !important;
        min-height: auto !important;
        padding: 22px 22px !important;
    }

    body.portal-body .portal-banner-brand {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    body.portal-body .portal-topbar-logo-wrap {
        width: auto !important;
        height: auto !important;
        padding-right: 0 !important;
        border-right: 0 !important;
    }

    body.portal-body .portal-banner-tools {
        justify-content: space-between !important;
        gap: 14px !important;
    }

    body.portal-body .portal-version-link {
        padding: 0 14px;
    }

    body.portal-body .portal-enterprise-layout {
        grid-template-columns: 1fr !important;
    }

    body.portal-body .portal-side-nav {
        min-height: 0 !important;
        padding: 18px !important;
    }

    body.portal-body .portal-main-panel {
        padding: 28px 18px 44px !important;
    }

    body.portal-body .portal-main-panel .planning-item {
        padding: 24px 20px 24px 88px !important;
    }
}

/* Font Awesome refinement */
body:not(.auth-page):not(.client-status-body) .nav-link-icon.fa-solid,
body:not(.auth-page):not(.client-status-body) .nav-link-icon.fa-regular {
    font-family: "Font Awesome 6 Free";
    font-size: 14px;
    font-style: normal;
    line-height: 1;
}

body:not(.auth-page):not(.client-status-body) .nav-link-icon.fa-regular {
    font-weight: 400;
}

body:not(.auth-page):not(.client-status-body) .nav-link-icon.fa-solid {
    font-weight: 900;
}

body:not(.auth-page):not(.client-status-body) .nav a.active .nav-link-icon,
body:not(.auth-page):not(.client-status-body) .nav a:hover .nav-link-icon {
    color: #ffffff;
    background: linear-gradient(135deg, #2ab9ff, #2561d7);
    box-shadow: 0 8px 18px rgba(37, 97, 215, 0.28);
}

body.portal-body .portal-version-link,
body.portal-body .portal-help-link {
    width: 44px !important;
    min-width: 44px !important;
    height: 44px !important;
    min-height: 44px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    border: 1px solid rgba(255, 255, 255, 0.18) !important;
    background: rgba(255, 255, 255, 0.06) !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 17px !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer;
}

body.portal-body .portal-version-link i,
body.portal-body .portal-help-link i {
    line-height: 1;
}

body.portal-body .portal-version-link:hover,
body.portal-body .portal-help-link:hover {
    color: var(--portal-accent, #f2ad00) !important;
    border-color: color-mix(in srgb, var(--portal-accent, #f2ad00) 64%, rgba(255, 255, 255, 0.18)) !important;
}

body.portal-body .portal-help-card {
    display: block;
}

/* More Font Awesome replacements across Planion */
.calendar-chip-type-icon.fa-regular {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15em;
    margin-right: 5px;
    font-size: 0.92em;
    color: currentColor;
    opacity: 0.9;
}

.ticket-attachment-icon i,
.ticket-system-icon.fa-solid,
.file-upload i,
.flow-star i {
    line-height: 1;
}

.ticket-attachment-icon i {
    font-size: 18px;
}

.ticket-system-icon.fa-solid {
    font-size: 14px;
}

.file-upload {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.file-upload i {
    color: currentColor;
    font-size: 14px;
}

.modal-close,
.portal-client-pill button {
    font-size: 0 !important;
}

.modal-close::before,
.portal-client-pill button::before {
    content: "\f00d";
    font-family: "Font Awesome 6 Free";
    font-size: 15px;
    font-weight: 900;
    line-height: 1;
}

.icon-btn i {
    font-size: 15px;
    line-height: 1;
}

.auth-feature-icon.fa-solid,
.auth-feature-icon.fa-regular,
.auth-field-icon.fa-solid,
.auth-field-icon.fa-regular {
    font-family: "Font Awesome 6 Free";
    font-style: normal;
    line-height: 1;
}

.auth-feature-icon.fa-solid,
.auth-field-icon.fa-solid {
    font-weight: 900;
}

.auth-feature-icon.fa-regular,
.auth-field-icon.fa-regular {
    font-weight: 400;
}

.auth-feature-icon.fa-solid,
.auth-feature-icon.fa-regular {
    color: #5bd5ff;
    font-size: 15px;
}

.auth-field-icon.fa-solid,
.auth-field-icon.fa-regular {
    color: #b7c8df;
    font-size: 16px;
}

/* Ticket attention color */
body:not(.auth-page):not(.client-status-body) .nav a[href*="page=tickets"] .nav-link-icon,
body:not(.auth-page):not(.client-status-body) .nav a[href*="page=request-dashboard"] .nav-link-icon {
    color: #ff6b6b;
    background: rgba(255, 79, 79, 0.14);
}

body:not(.auth-page):not(.client-status-body) .nav a[href*="page=tickets"].active .nav-link-icon,
body:not(.auth-page):not(.client-status-body) .nav a[href*="page=tickets"]:hover .nav-link-icon,
body:not(.auth-page):not(.client-status-body) .nav a[href*="page=request-dashboard"].active .nav-link-icon,
body:not(.auth-page):not(.client-status-body) .nav a[href*="page=request-dashboard"]:hover .nav-link-icon {
    color: #ffffff;
    background: linear-gradient(135deg, #ff6b6b, #d92626);
    box-shadow: 0 8px 18px rgba(217, 38, 38, 0.28);
}

.nav-link-badge {
    background: #e11919;
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(225, 25, 25, 0.28);
}

/* Polished portal empty states */
body.portal-body .portal-empty-state {
    display: grid;
    justify-items: start;
    gap: 10px;
    padding: 28px;
    border: 1px dashed color-mix(in srgb, var(--portal-text, #111827) 14%, transparent);
    border-radius: 14px;
    background:
        radial-gradient(circle at 24px 18px, color-mix(in srgb, var(--portal-accent, #f2ad00) 10%, transparent), transparent 42%),
        color-mix(in srgb, var(--portal-background, #f4f7fb) 42%, #fff);
}

body.portal-body .portal-empty-icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: color-mix(in srgb, var(--portal-accent, #f2ad00) 13%, #fff);
    color: var(--portal-accent, #f2ad00);
    font-size: 19px;
}

body.portal-body .portal-empty-state strong {
    color: var(--portal-text, #111827);
    font-size: 17px;
    font-weight: 850;
}

body.portal-body .portal-empty-state p {
    max-width: 560px;
    margin: 0;
    color: var(--portal-muted, #64748b);
    line-height: 1.5;
}

body.portal-body .portal-empty-state .link-chip {
    margin-top: 6px;
}

/* Plani inbox polish */
.planion-empty-state {
    display: grid;
    justify-items: start;
    gap: 10px;
    margin-top: 16px;
    padding: 28px;
    border: 1px dashed rgba(66, 135, 196, 0.22);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(246, 250, 255, 0.88), rgba(255, 255, 255, 0.94));
}

.planion-empty-state > span {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: rgba(37, 106, 255, 0.1);
    color: #2561d7;
    font-size: 18px;
}

.planion-empty-state strong {
    color: var(--planion-text);
    font-size: 17px;
    font-weight: 850;
}

.planion-empty-state p {
    max-width: 620px;
    margin: 0;
    color: var(--planion-muted);
    line-height: 1.5;
}

.planion-empty-state .link-chip {
    margin-top: 4px;
}

.panel > .planion-empty-state:first-child,
.ticket-board-wrap > .planion-empty-state:first-child {
    margin-top: 0;
}

.search-form + .planion-empty-state,
.plani-inbox-toolbar + .planion-empty-state,
.view-switch + [data-project-empty] {
    margin-top: 18px;
}

[data-project-empty] > .planion-empty-state {
    margin-top: 0;
}

.plani-session-card {
    border-left: 4px solid #2b8fd6;
}

.plani-session-card.status-summary_ready {
    border-left-color: #1fb66b;
}

.plani-session-card.status-processing,
.plani-session-card.status-recording,
.plani-session-card.status-connected,
.plani-session-card.is-active {
    border-left-color: #f2b21a;
}

.plani-session-card.status-failed,
.plani-session-card.status-error {
    border-left-color: #e11919;
}

.plani-status-pill {
    background: rgba(43, 143, 214, 0.12);
    color: #1a5f9d;
}

.status-summary_ready .plani-status-pill {
    background: rgba(31, 182, 107, 0.12);
    color: #147c49;
}

.status-processing .plani-status-pill,
.status-recording .plani-status-pill,
.status-connected .plani-status-pill,
.is-active .plani-status-pill {
    background: rgba(242, 178, 26, 0.16);
    color: #8c6000;
}

.status-failed .plani-status-pill,
.status-error .plani-status-pill {
    background: rgba(225, 25, 25, 0.12);
    color: #b61f1f;
}

.plani-progress-line {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    color: var(--planion-muted);
    font-size: 13px;
    font-weight: 700;
}

.plani-progress-line span:first-child::before {
    content: "\f0ae";
    margin-right: 7px;
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    color: #2561d7;
}

.plani-summary-box {
    display: grid;
    gap: 8px;
    margin-top: 8px;
    padding: 18px;
    border: 1px solid rgba(66, 135, 196, 0.16);
    border-radius: 14px;
    background: rgba(246, 250, 255, 0.82);
}

.plani-summary-label {
    color: var(--planion-muted);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.plani-summary-box .protocol-summary-text {
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.plani-inbox-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin: 0 0 18px;
}

.segmented-control {
    display: inline-flex;
    gap: 4px;
    padding: 4px;
    border: 1px solid rgba(66, 135, 196, 0.16);
    border-radius: 999px;
    background: rgba(246, 250, 255, 0.9);
}

.segmented-control a {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 13px;
    border-radius: 999px;
    color: var(--planion-muted);
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

.segmented-control a.active {
    background: #fff;
    color: var(--planion-text);
    box-shadow: 0 6px 18px rgba(14, 33, 62, 0.08);
}

.plani-inbox-search {
    position: relative;
    min-width: min(360px, 100%);
    flex: 1 1 260px;
}

.plani-inbox-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    color: var(--planion-muted);
    transform: translateY(-50%);
}

.plani-inbox-search input {
    width: 100%;
    padding-left: 40px;
}

.plani-note-table-wrap {
    overflow-x: auto;
}

.plani-note-table th:last-child,
.plani-note-table td:last-child {
    width: 104px;
    text-align: right;
}

.plani-note-title {
    display: inline-flex;
    color: var(--planion-text);
    font-weight: 850;
    text-decoration: none;
}

.plani-note-title:hover {
    color: #2561d7;
}

.plani-note-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin-top: 5px;
    color: var(--planion-muted);
    font-size: 12px;
    font-weight: 700;
}

.table-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
}

.table-actions .icon-btn {
    display: inline-grid;
    place-items: center;
    min-width: 34px;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid rgba(66, 135, 196, 0.14);
    background: #fff;
    color: var(--planion-text);
}

.table-actions .icon-btn:hover {
    color: #2561d7;
    border-color: rgba(37, 97, 215, 0.26);
}

.table-actions .icon-btn.danger {
    color: #c21f1f;
}

.project-table td:first-child {
    min-width: 260px;
}

.project-table .project-index-item {
    position: static;
    overflow: visible;
    border-radius: 0;
    padding: 0;
    transform: none;
    box-shadow: none;
}

.project-table .project-index-item::before {
    display: none;
    content: none;
}

.project-table .project-index-item:hover {
    transform: none;
    box-shadow: none;
}

.project-table td:nth-child(6),
.project-table td:nth-child(8) {
    white-space: nowrap;
}

.table-progress {
    display: grid;
    gap: 6px;
    min-width: 120px;
}

.table-progress span {
    color: var(--planion-muted);
    font-size: 12px;
    font-weight: 850;
}

.table-progress .progress {
    height: 7px;
    margin: 0;
}

.audit-table td:first-child {
    min-width: 160px;
}

.audit-table td:nth-child(2) {
    width: 48%;
}

.sync-mini {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 850;
}

.sync-mini.success {
    color: #15945a;
}

.sync-mini.warning {
    color: #9a6a00;
}

.plani-note-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.plani-note-detail-grid > div {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid rgba(66, 135, 196, 0.14);
    border-radius: 14px;
    background: rgba(246, 250, 255, 0.7);
}

.plani-note-detail-grid span {
    color: var(--planion-muted);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.plani-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.plani-chip-list span {
    padding: 8px 11px;
    border-radius: 999px;
    background: rgba(246, 250, 255, 0.92);
    color: var(--planion-text);
    font-size: 13px;
    font-weight: 750;
}

.plani-topic-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 12px;
}

.plani-topic-card {
    display: grid;
    gap: 10px;
    padding: 16px;
    border: 1px solid rgba(66, 135, 196, 0.14);
    border-radius: 14px;
    background: #fff;
}

.plani-topic-card h4 {
    margin: 0;
    color: var(--planion-text);
}

.plani-topic-card strong {
    color: var(--planion-muted);
    font-size: 11px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.plani-topic-card ul {
    display: grid;
    gap: 6px;
    margin: 0;
    padding-left: 18px;
}

.plani-transcript summary {
    cursor: pointer;
    color: var(--planion-text);
    font-weight: 850;
}

.plani-transcript pre {
    max-height: 420px;
    overflow: auto;
    margin: 14px 0 0;
    padding: 16px;
    border: 1px solid rgba(66, 135, 196, 0.14);
    border-radius: 14px;
    background: #f8fbff;
    color: var(--planion-text);
    white-space: pre-wrap;
    line-height: 1.55;
}

.sync-notice {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    margin-top: 12px;
    padding: 13px 14px;
    border-radius: 12px;
    border: 1px solid rgba(66, 135, 196, 0.14);
    background: rgba(246, 250, 255, 0.86);
}

.sync-notice > span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: rgba(37, 97, 215, 0.1);
    color: #2561d7;
}

.sync-notice strong {
    display: block;
    color: var(--planion-text);
    font-size: 13px;
    font-weight: 850;
}

.sync-notice p {
    margin: 4px 0 0;
    color: var(--planion-muted);
    font-size: 13px;
    line-height: 1.45;
}

.sync-notice.success {
    border-color: rgba(31, 182, 107, 0.22);
    background: rgba(237, 252, 244, 0.9);
}

.sync-notice.success > span {
    background: rgba(31, 182, 107, 0.12);
    color: #15945a;
}

.sync-notice.warning {
    border-color: rgba(242, 178, 26, 0.28);
    background: rgba(255, 250, 235, 0.92);
}

.sync-notice.warning > span {
    background: rgba(242, 178, 26, 0.16);
    color: #9a6a00;
}

body.portal-body .sync-notice {
    box-shadow: none;
}

.deployment-check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 12px;
}

.deployment-check-card {
    display: grid;
    gap: 8px;
    padding: 14px;
    border: 1px solid rgba(66, 135, 196, 0.14);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.94);
}

.deployment-check-card.ok {
    border-color: rgba(31, 182, 107, 0.24);
}

.deployment-check-card.warning {
    border-color: rgba(242, 178, 26, 0.28);
}

.deployment-check-card.error {
    border-color: rgba(231, 76, 60, 0.26);
}

.deployment-check-card p {
    margin: 0;
    color: var(--planion-text);
    font-size: 14px;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.deployment-check-card > span {
    font-size: 12px;
    line-height: 1.45;
}

.topbar-briefing-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    margin-top: 10px;
    padding: 8px 12px;
    border: 1px solid rgba(37, 97, 215, 0.16);
    border-radius: 999px;
    background: rgba(246, 250, 255, 0.94);
    color: var(--planion-text);
    font: inherit;
    font-size: 13px;
    font-weight: 850;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(14, 33, 62, 0.08);
}

.topbar-briefing-btn i {
    color: #e0a815;
}

.topbar-briefing-btn:hover {
    border-color: rgba(224, 168, 21, 0.42);
    background: #fff9e8;
}

.topbar-help-btn {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(37, 97, 215, 0.16);
    border-radius: 999px;
    background: rgba(246, 250, 255, 0.94);
    color: var(--planion-text);
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(14, 33, 62, 0.08);
}

.topbar-help-btn:hover {
    border-color: rgba(37, 202, 255, 0.42);
    background: #eef9ff;
    color: #0d5a8f;
}

.topbar-feedback-btn {
    border-color: rgba(224, 168, 21, 0.24);
    background: #fffaf0;
    color: #b77900;
}

.topbar-feedback-btn:hover {
    border-color: rgba(224, 168, 21, 0.54);
    background: #fff3cf;
    color: #8a5d00;
}

.consultant-briefing-modal {
    width: min(1080px, calc(100vw - 32px));
    max-height: min(820px, calc(100vh - 48px));
    overflow: auto;
}

.internal-feedback-modal {
    width: min(620px, calc(100vw - 32px));
}

.feedback-form {
    display: grid;
    gap: 16px;
}

.feedback-type-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.feedback-type-option {
    cursor: pointer;
}

.feedback-type-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.feedback-type-option span {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 12px 14px;
    border: 1px solid rgba(24, 34, 41, 0.12);
    border-radius: 10px;
    background: #f7fafc;
    color: #25323a;
    font-weight: 850;
}

.feedback-type-option input:checked + span {
    border-color: rgba(224, 168, 21, 0.55);
    background: #fff7df;
    color: #8a5d00;
}

.feedback-message-field {
    display: grid;
    gap: 8px;
    color: #25323a;
    font-weight: 800;
}

.feedback-message-field textarea {
    min-height: 150px;
    resize: vertical;
}

@media (max-width: 640px) {
    .feedback-type-grid {
        grid-template-columns: 1fr;
    }
}

.contextual-help-modal {
    width: min(860px, calc(100vw - 32px));
    max-height: min(820px, calc(100vh - 48px));
    overflow: auto;
}

.contextual-help-list {
    display: grid;
    gap: 12px;
}

.contextual-help-item {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 14px;
    padding: 16px;
    border: 1px solid rgba(66, 135, 196, 0.14);
    border-radius: 16px;
    background: linear-gradient(180deg, #fff 0%, rgba(246, 250, 255, 0.86) 100%);
}

.contextual-help-icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    color: #0d5a8f;
    background: rgba(37, 202, 255, 0.12);
}

.contextual-help-meta {
    margin-bottom: 4px;
}

.contextual-help-meta span {
    color: #e0a815;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.contextual-help-item h4,
.contextual-help-item p {
    margin: 0;
}

.contextual-help-item p {
    margin-top: 6px;
    color: var(--planion-muted);
    line-height: 1.5;
}

.contextual-help-item ul {
    margin: 10px 0 0;
    padding-left: 18px;
    color: var(--planion-text);
}

.contextual-help-item li + li {
    margin-top: 4px;
}

.contextual-help-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: fit-content;
    margin-top: 10px;
    color: #0d5a8f;
    font-size: 13px;
    font-weight: 850;
    text-decoration: none;
}

.contextual-help-link:hover {
    color: var(--planion-primary);
}

.contextual-help-footnote {
    margin: 14px 0 0;
}

.help-hero-panel {
    margin-bottom: 18px;
}

.help-head-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.help-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.help-card {
    display: grid;
    gap: 10px;
    align-content: start;
    min-height: 210px;
    padding: 18px;
    border: 1px solid rgba(66, 135, 196, 0.14);
    border-radius: 18px;
    background: linear-gradient(180deg, #fff 0%, rgba(246, 250, 255, 0.86) 100%);
    color: var(--planion-text);
    text-decoration: none;
    box-shadow: 0 16px 34px rgba(14, 33, 62, 0.07);
}

.help-card:hover {
    border-color: rgba(37, 202, 255, 0.34);
    transform: translateY(-1px);
}

.help-card-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: #0d5a8f;
    background: rgba(37, 202, 255, 0.12);
}

.help-card strong {
    font-size: 16px;
}

.help-card p {
    margin: 0;
    color: var(--planion-muted);
    line-height: 1.5;
}

.help-card ul {
    margin: 0;
    padding-left: 18px;
    color: var(--planion-text);
    font-size: 13px;
    line-height: 1.45;
}

.help-card small {
    align-self: end;
    color: #e0a815;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.help-card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 2px;
}

.help-card-actions .inline-action-form {
    width: 100%;
}

.help-card-actions .small-btn {
    width: fit-content;
}

.help-article-panel .panel-head {
    align-items: flex-start;
}

.help-article-content {
    color: var(--planion-text);
    line-height: 1.7;
}

.help-article-content img {
    max-width: 100%;
    height: auto;
    border-radius: 14px;
    border: 1px solid rgba(66, 135, 196, 0.14);
}

.briefing-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 6px 0 18px;
}

.briefing-metrics article {
    padding: 14px;
    border: 1px solid rgba(66, 135, 196, 0.14);
    border-radius: 14px;
    background: linear-gradient(180deg, #fff 0%, rgba(246, 250, 255, 0.86) 100%);
}

.briefing-metrics strong {
    display: block;
    color: var(--planion-text);
    font-size: 28px;
    line-height: 1;
}

.briefing-metrics span {
    display: block;
    margin-top: 6px;
    color: var(--planion-muted);
    font-size: 12px;
    font-weight: 850;
    text-transform: uppercase;
}

.briefing-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.briefing-section {
    display: grid;
    gap: 10px;
    min-height: 160px;
    padding: 14px;
    border: 1px solid rgba(66, 135, 196, 0.14);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.94);
}

.briefing-section.wide {
    grid-column: 1 / -1;
}

.briefing-section-head {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
}

.briefing-section-head i {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 12px;
    background: rgba(224, 168, 21, 0.12);
    color: #d9a00f;
}

.briefing-section-head h4 {
    margin: 0;
    color: var(--planion-text);
    font-size: 16px;
}

.briefing-section-head span {
    color: var(--planion-muted);
    font-size: 12px;
    font-weight: 850;
}

.briefing-list {
    display: grid;
    gap: 8px;
}

.briefing-item {
    display: grid;
    gap: 4px;
    padding: 10px 11px;
    border: 1px solid rgba(66, 135, 196, 0.12);
    border-radius: 12px;
    background: rgba(246, 250, 255, 0.66);
    color: inherit;
    text-decoration: none;
}

.briefing-item:hover {
    border-color: rgba(37, 97, 215, 0.24);
    background: #fff;
}

.briefing-item strong {
    color: var(--planion-text);
    font-size: 14px;
}

.briefing-item span {
    color: var(--planion-muted);
    font-size: 12px;
    font-weight: 700;
}

.academy-admin-toolbar {
    position: sticky;
    top: 76px;
    z-index: 6;
}

.academy-admin-no-results {
    margin: 12px 0 0;
}

.academy-admin-track {
    padding: 0;
    overflow: hidden;
}

.academy-admin-track-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
    cursor: pointer;
    list-style: none;
}

.academy-admin-track-summary::-webkit-details-marker {
    display: none;
}

.academy-admin-track-summary h3 {
    margin: 0;
}

.academy-admin-track-summary .muted {
    margin: 4px 0 0;
}

.academy-admin-track-summary-meta {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
}

.academy-admin-track-summary-meta i {
    color: var(--planion-muted);
    transition: transform 160ms ease;
}

.academy-admin-track[open] .academy-admin-track-summary-meta i {
    transform: rotate(180deg);
}

.academy-admin-track-body {
    display: grid;
    gap: 18px;
    padding: 0 22px 22px;
    border-top: 1px solid rgba(66, 135, 196, 0.12);
}

.academy-admin-track-body > .inline-action-form {
    justify-content: flex-end;
    margin-top: 18px;
}

.academy-admin-track .academy-admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.academy-admin-item,
.academy-admin-form {
    padding: 12px;
    border: 1px solid rgba(66, 135, 196, 0.14);
    border-radius: 14px;
    background: rgba(246, 250, 255, 0.72);
}

.academy-admin-item {
    margin-bottom: 10px;
}

.academy-admin-item summary {
    cursor: pointer;
    color: var(--planion-text);
    font-weight: 850;
}

.academy-admin-form {
    display: grid;
    gap: 10px;
    margin-top: 10px;
}

.academy-admin-image-preview {
    display: grid;
    gap: 8px;
}

.academy-admin-image-preview img {
    width: min(100%, 520px);
    max-height: 240px;
    object-fit: contain;
    border: 1px solid rgba(66, 135, 196, 0.18);
    border-radius: 12px;
    background: #fff;
}

.academy-editor-toolbar {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    padding: 8px;
    border: 1px solid rgba(66, 135, 196, 0.16);
    border-bottom: 0;
    border-radius: 12px 12px 0 0;
    background: rgba(255, 255, 255, 0.82);
    align-self: start;
    width: auto;
    max-width: 100%;
}

.academy-editor-toolbar button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    min-width: 34px;
    height: 32px;
    padding: 0;
    border: 1px solid rgba(66, 135, 196, 0.16);
    border-radius: 9px;
    background: #fff;
    color: var(--planion-text);
    cursor: pointer;
    font-weight: 800;
    line-height: 1;
}

.academy-editor-toolbar button:hover {
    border-color: rgba(66, 135, 196, 0.32);
    background: rgba(246, 250, 255, 0.92);
}

.academy-rich-editor {
    min-height: 220px;
    padding: 16px;
    border: 1px solid rgba(66, 135, 196, 0.16);
    border-radius: 0 0 12px 12px;
    background: #fff;
    color: var(--planion-text);
    line-height: 1.6;
    outline: none;
}

.academy-rich-editor:empty::before {
    content: attr(data-placeholder);
    color: var(--planion-muted);
}

.academy-rich-editor img,
body.portal-body .academy-lesson-content img {
    display: block;
    max-width: 100%;
    max-height: 520px;
    margin: 14px 0;
    object-fit: contain;
    border: 1px solid rgba(66, 135, 196, 0.14);
    border-radius: 14px;
    background: #fff;
}

body.portal-body .academy-lesson-content img {
    width: auto;
    max-width: min(100%, 760px);
    max-height: 360px;
    cursor: zoom-in;
}

body.portal-body .academy-image-lightbox {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: grid;
    place-items: center;
    padding: 28px;
    border: 0;
    background: rgba(4, 10, 18, 0.82);
}

body.portal-body .academy-image-lightbox[hidden] {
    display: none;
}

body.portal-body .academy-image-lightbox img {
    max-width: min(96vw, 1500px);
    max-height: 92vh;
    object-fit: contain;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.34);
}

body.portal-body .academy-image-lightbox button {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.26);
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.72);
    color: #fff;
    cursor: pointer;
}

.academy-rich-editor hr[data-academy-page-break] {
    height: auto;
    margin: 22px 0;
    border: 0;
    border-top: 2px dashed rgba(66, 135, 196, 0.34);
    text-align: center;
}

.academy-rich-editor hr[data-academy-page-break]::after {
    content: "Page break";
    position: relative;
    top: -11px;
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    background: #fff;
    color: var(--planion-muted);
    font-size: 11px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.academy-rich-editor figure,
body.portal-body .academy-lesson-content figure {
    margin: 16px 0;
}

.academy-rich-editor figcaption,
body.portal-body .academy-lesson-content figcaption {
    color: var(--planion-muted);
    font-size: 13px;
}

body.portal-body .academy-hero-card {
    background:
        radial-gradient(circle at 88% 24%, color-mix(in srgb, var(--portal-accent) 28%, transparent), transparent 26%),
        linear-gradient(135deg, var(--portal-surface) 0%, color-mix(in srgb, var(--portal-primary) 7%, #fff) 100%);
}

body.portal-body .academy-track-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
}

body.portal-body .academy-type-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

body.portal-body .academy-type-card {
    display: grid;
    gap: 10px;
    padding: 18px;
    border: 1px solid rgba(66, 135, 196, 0.14);
    border-radius: 18px;
    background: var(--portal-surface, #fff);
    color: var(--portal-text);
    text-decoration: none;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.06);
}

body.portal-body .academy-type-card.is-active {
    border-color: color-mix(in srgb, var(--portal-accent) 42%, transparent);
    background: color-mix(in srgb, var(--portal-accent) 8%, var(--portal-surface, #fff));
}

body.portal-body .academy-type-card strong {
    font-size: 18px;
}

body.portal-body .academy-type-card p {
    margin: 0;
    color: var(--portal-muted);
    line-height: 1.45;
}

body.portal-body .academy-type-card small {
    color: var(--portal-accent);
    font-weight: 850;
}

body.portal-body .academy-track-card {
    display: grid;
    gap: 12px;
    padding: 18px;
    border: 1px solid rgba(66, 135, 196, 0.14);
    border-radius: 18px;
    background: var(--portal-surface, #fff);
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.08);
}

body.portal-body .academy-track-card.is-locked {
    opacity: 0.72;
}

body.portal-body .academy-track-icon {
    display: inline-grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--portal-accent) 16%, #fff);
    color: var(--portal-accent);
    font-size: 20px;
    line-height: 1;
}

body.portal-body .academy-track-card h4,
body.portal-body .academy-lesson-card h4 {
    margin: 0;
    color: var(--portal-text);
}

body.portal-body .academy-track-card p,
body.portal-body .academy-lesson-card p {
    margin: 0;
    color: var(--portal-muted);
    line-height: 1.55;
}

body.portal-body .academy-track-detail > .progress,
body.portal-body .academy-track-card .progress {
    height: 8px;
    margin: 0;
}

body.portal-body .academy-lesson-list {
    display: grid;
    gap: 14px;
}

body.portal-body .academy-lesson-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: start;
    padding: 16px;
    border: 1px solid rgba(66, 135, 196, 0.14);
    border-radius: 16px;
    background: var(--portal-surface, #fff);
}

body.portal-body a.academy-lesson-card {
    color: inherit;
    text-decoration: none;
}

body.portal-body .academy-lesson-summary-card {
    grid-template-columns: 180px minmax(0, 1fr) auto;
    align-items: center;
}

body.portal-body .academy-lesson-thumb {
    width: 180px;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(66, 135, 196, 0.14);
    background: color-mix(in srgb, var(--portal-accent) 10%, #fff);
}

body.portal-body .academy-lesson-thumb-empty {
    display: grid;
    place-items: center;
    color: var(--portal-accent);
    font-size: 28px;
}

body.portal-body .academy-lesson-state {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--portal-accent);
    font-weight: 850;
}

body.portal-body .academy-guided-next,
body.portal-body .academy-lesson-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

body.portal-body .academy-lesson-nav {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(66, 135, 196, 0.14);
}

body.portal-body .academy-lesson-card.is-done {
    border-color: rgba(31, 182, 107, 0.28);
    background: color-mix(in srgb, #1fb66b 7%, var(--portal-surface, #fff));
}

body.portal-body .academy-lesson-image {
    display: block;
    width: min(100%, 920px);
    max-height: 520px;
    margin: 12px 0;
    object-fit: contain;
    border: 1px solid rgba(66, 135, 196, 0.14);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 16px 42px rgba(15, 23, 42, 0.07);
}

body.portal-body .academy-lesson-content {
    color: var(--portal-text);
    line-height: 1.65;
}

body.portal-body .academy-lesson-pager {
    display: grid;
    gap: 10px;
    margin: 10px 0 0;
}

body.portal-body .academy-lesson-page-status {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    margin: 0 0 14px;
    color: var(--portal-muted);
    font-size: 14px;
    font-weight: 800;
}

body.portal-body .academy-step-radio {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

body.portal-body .academy-step-radio:not(:checked) + .academy-lesson-page {
    display: none;
}

body.portal-body .academy-lesson-page {
    min-height: clamp(420px, calc(100vh - 360px), 680px);
    overflow: visible;
    padding: clamp(18px, 2.4vw, 30px);
    border: 1px solid rgba(66, 135, 196, 0.14);
    border-radius: 18px;
    background: var(--portal-surface, #fff);
    box-shadow: 0 18px 48px rgba(15, 23, 42, 0.06);
}

body.portal-body .academy-lesson-step-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    position: static;
    margin-top: 18px;
}

body.portal-body .academy-lesson-step-nav .link-chip[hidden] {
    display: none;
}

body.portal-body .academy-lesson-step-nav .link-chip:disabled,
body.portal-body .academy-lesson-step-nav .link-chip.is-disabled {
    cursor: not-allowed;
    opacity: 0.45;
}

body.portal-body .academy-lesson-step-nav button.link-chip {
    font: inherit;
    cursor: pointer;
}

body.portal-body .academy-lesson-step-nav label.link-chip {
    cursor: pointer;
}

body.portal-body .academy-lesson-content p,
body.portal-body .academy-lesson-content ul,
body.portal-body .academy-lesson-content ol,
body.portal-body .academy-lesson-content blockquote,
body.portal-body .academy-lesson-content pre {
    margin: 12px 0;
}

body.portal-body .academy-lesson-content h3,
body.portal-body .academy-lesson-content h4 {
    margin: 18px 0 8px;
}

body.portal-body .academy-lesson-content a {
    color: var(--portal-accent);
    font-weight: 800;
}

body.portal-body .academy-video-frame {
    position: relative;
    overflow: hidden;
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 18px 0;
    border-radius: 18px;
    background: #0b1220;
}

body.portal-body .academy-video-frame iframe,
body.portal-body .academy-lesson-content iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: 18px;
}

body.portal-body .academy-quiz-form {
    display: grid;
    gap: 18px;
}

body.portal-body .academy-quiz-warning {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    margin: 0 0 18px;
    padding: 10px 14px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--portal-accent) 12%, #fff);
    color: var(--portal-text);
    font-weight: 750;
}

body.portal-body .academy-quiz-form fieldset {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 16px;
    border: 1px solid rgba(66, 135, 196, 0.14);
    border-radius: 16px;
}

body.portal-body .academy-quiz-form legend {
    color: var(--portal-text);
    font-weight: 850;
}

body.portal-body .portal-certificate-overview {
    border-left: 4px solid var(--portal-accent);
}

body.portal-body .portal-certificate-list {
    display: grid;
    gap: 12px;
}

body.portal-body .portal-certificate-item {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border: 1px solid rgba(66, 135, 196, 0.14);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.74);
    color: var(--portal-text);
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

body.portal-body .portal-certificate-item:hover {
    transform: translateY(-1px);
    border-color: color-mix(in srgb, var(--portal-accent) 36%, #dbe7f2);
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

body.portal-body .portal-certificate-icon {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--portal-accent) 16%, #fff);
    color: var(--portal-accent);
}

body.portal-body .portal-certificate-item strong,
body.portal-body .portal-certificate-item small {
    display: block;
}

body.portal-body .portal-certificate-item small {
    margin-top: 4px;
    color: var(--portal-muted);
    font-weight: 700;
}

body.portal-body .academy-certificate {
    display: grid;
    justify-items: center;
    gap: 16px;
    max-width: 900px;
    margin: 20px auto;
    padding: 54px;
    border: 1px solid color-mix(in srgb, var(--portal-accent) 34%, #dbe7f2);
    border-radius: 24px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 255, 0.92)),
        radial-gradient(circle at 20% 20%, color-mix(in srgb, var(--portal-accent) 18%, transparent), transparent 30%);
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.14);
    text-align: center;
}

body.portal-body .academy-certificate-logo {
    max-width: 160px;
    max-height: 80px;
    object-fit: contain;
}

body.portal-body .academy-certificate > span {
    color: var(--portal-accent);
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

body.portal-body .academy-certificate h2 {
    margin: 0;
    color: var(--portal-text);
    font-size: clamp(34px, 6vw, 64px);
}

body.portal-body .academy-certificate h3 {
    margin: 0;
    color: var(--portal-text);
    font-size: clamp(22px, 4vw, 38px);
}

body.portal-body .academy-certificate-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

body.portal-body .academy-certificate-meta span {
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.8);
    color: var(--portal-text);
    font-weight: 850;
}

body.portal-body .academy-certificate-share {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 18px auto 0;
}

body.portal-body .academy-certificate-share-title {
    width: 100%;
    color: var(--portal-muted);
    font-size: 13px;
    font-weight: 850;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

body.portal-body .academy-certificate-share .link-chip {
    border-color: rgba(66, 135, 196, 0.18);
    background: #fff;
}

@media (max-width: 820px) {
    .briefing-metrics,
    .briefing-grid,
    .academy-admin-track .academy-admin-grid {
        grid-template-columns: 1fr;
    }

    body.portal-body .academy-lesson-card {
        grid-template-columns: 1fr;
    }

    body.portal-body .academy-lesson-summary-card {
        grid-template-columns: 1fr;
    }

    body.portal-body .academy-lesson-thumb {
        width: 100%;
    }

    body.portal-body .academy-guided-next,
    body.portal-body .academy-lesson-nav {
        align-items: stretch;
        flex-direction: column;
    }
}

/* List and table consistency pass */
body:not(.auth-page):not(.client-status-body) .planning-list,
body:not(.auth-page):not(.client-status-body) .ticket-list,
body:not(.auth-page):not(.client-status-body) .portal-request-list {
    display: grid;
    gap: 12px;
}

body:not(.auth-page):not(.client-status-body) .planning-item,
body:not(.auth-page):not(.client-status-body) .ticket-row {
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

body:not(.auth-page):not(.client-status-body) .planning-item:hover,
body:not(.auth-page):not(.client-status-body) .ticket-row:hover {
    border-color: rgba(37, 97, 215, 0.2);
    box-shadow: 0 14px 32px rgba(14, 33, 62, 0.1);
    transform: translateY(-1px);
}

body:not(.auth-page):not(.client-status-body) .documents-table,
body:not(.auth-page):not(.client-status-body) .protocol-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    overflow: hidden;
    border: 1px solid rgba(66, 135, 196, 0.14);
    border-radius: 14px;
    background: #fff;
}

body:not(.auth-page):not(.client-status-body) .documents-table th,
body:not(.auth-page):not(.client-status-body) .protocol-table th {
    background: rgba(246, 250, 255, 0.95);
    color: var(--planion-muted);
    font-size: 12px;
    font-weight: 850;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

body:not(.auth-page):not(.client-status-body) .documents-table td,
body:not(.auth-page):not(.client-status-body) .protocol-table td {
    color: var(--planion-text);
    vertical-align: top;
}

body:not(.auth-page):not(.client-status-body) .documents-table tr:hover td,
body:not(.auth-page):not(.client-status-body) .protocol-table tr:hover td {
    background: rgba(246, 250, 255, 0.68);
}

body.portal-body:not(.portal-page-portal-embed),
body.portal-body:not(.portal-page-portal-embed) .portal-shell,
body.portal-body:not(.portal-page-portal-embed) .portal-enterprise-layout,
body.portal-body:not(.portal-page-portal-embed) .portal-main-panel {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
}

body.portal-body:not(.portal-page-portal-embed) .portal-side-nav {
    max-height: none !important;
    overflow: visible !important;
}

body.portal-body .portal-main-panel .portal-sub-panel-head {
    margin-top: 30px !important;
    margin-bottom: 18px !important;
    padding-top: 24px !important;
    border-top: 1px solid var(--portal-border-soft, rgba(148, 163, 184, 0.28)) !important;
}

body.portal-body .portal-main-panel .portal-sub-panel-head h3 {
    font-size: 20px !important;
}

body.portal-body .portal-main-panel .portal-past-meetings {
    margin-top: 0;
}

body.portal-body .portal-main-panel .portal-past-meetings > summary {
    cursor: pointer;
    list-style: none;
}

body.portal-body .portal-main-panel .portal-past-meetings > summary::-webkit-details-marker {
    display: none;
}

body.portal-body .portal-main-panel .portal-past-meetings > summary::after {
    content: "\f078";
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--portal-accent, #f2ad00) 12%, #fff);
    color: var(--portal-accent, #f2ad00);
    font-family: "Font Awesome 6 Free";
    font-size: 12px;
    font-weight: 900;
    transition: transform 0.16s ease;
}

body.portal-body .portal-main-panel .portal-past-meetings[open] > summary::after {
    transform: rotate(180deg);
}

/* Portal embeds own the available viewport; the embedded page keeps its own scroll. */
body.portal-body.portal-page-portal-embed,
body.portal-body.portal-page-portal-embed .portal-shell {
    height: 100vh !important;
    max-height: 100vh !important;
    overflow: hidden !important;
}

body.portal-body.portal-page-portal-embed .portal-enterprise-layout {
    min-height: 0 !important;
    height: calc(100vh - var(--portal-header-height, 112px)) !important;
    overflow: hidden !important;
}

body.portal-body.portal-page-portal-embed .portal-side-nav {
    min-height: 0 !important;
    max-height: 100% !important;
    overflow: auto !important;
}

body.portal-body.portal-page-portal-embed .portal-main-panel {
    min-height: 0 !important;
    overflow: hidden !important;
    padding-bottom: 10px !important;
}

body.portal-body.portal-page-portal-embed .portal-main-panel > .portal-content-card.portal-embed-card {
    display: grid !important;
    grid-template-rows: minmax(0, 1fr) !important;
    height: 100% !important;
    min-height: 0 !important;
    margin-bottom: 0 !important;
    padding: 8px !important;
    overflow: hidden !important;
}

body.portal-body.portal-page-portal-embed .portal-embed-frame-wrap,
body.portal-body.portal-page-portal-embed .portal-embed-frame-wrap iframe {
    min-height: 0 !important;
}
