:root {
    --humi-red: #e50914;
    --humi-blue: #124f8f;
    --ink: #182331;
    --muted: #687385;
    --line: #dfe6ef;
    --surface: #ffffff;
    --page: #f4f7fb;
    --success: #138a5b;
    --warning: #c78100;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 0;
    min-height: 100%;
    -webkit-text-size-adjust: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    background: var(--page);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    overflow-x: clip;
}

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

button,
input,
select,
textarea {
    font: inherit;
    max-width: 100%;
}

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

.app-shell__topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 76px;
    padding-top: calc(12px + env(safe-area-inset-top));
    padding-right: calc(clamp(18px, 4vw, 48px) + env(safe-area-inset-right));
    padding-bottom: 12px;
    padding-left: calc(clamp(18px, 4vw, 48px) + env(safe-area-inset-left));
    background: rgba(255, 255, 255, .94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(16px);
    isolation: isolate;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
}

.brand-lockup__logo {
    width: 210px;
    max-width: 42vw;
    height: auto;
    object-fit: contain;
}

.brand-lockup__system {
    padding-left: 14px;
    border-left: 1px solid var(--line);
    color: var(--humi-blue);
    font-weight: 800;
    white-space: nowrap;
}

.app-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: flex-end;
    min-width: 0;
}

.app-nav-toggle {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 14px;
    border: 1px solid #c9d8e8;
    border-radius: 999px;
    background: #fff;
    color: var(--humi-blue);
    box-shadow: 0 10px 24px rgba(18, 79, 143, .08);
    font-weight: 850;
}

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

.app-nav a {
    padding: 10px 12px;
    border-radius: 8px;
    color: var(--muted);
    font-weight: 700;
    font-size: .92rem;
}

.app-nav a:hover {
    color: var(--humi-blue);
    background: #edf4fb;
}

.nav-logout {
    margin: 0;
}

.nav-logout button {
    padding: 10px 12px;
    border: 0;
    border-radius: 8px;
    color: var(--muted);
    background: transparent;
    font-weight: 700;
    font-size: .92rem;
}

.nav-logout button:hover {
    color: var(--humi-blue);
    background: #edf4fb;
}

.app-shell {
    flex: 1 0 auto;
    width: min(1480px, 100%);
    margin: 0 auto;
    padding-top: clamp(18px, 3vw, 36px);
    padding-right: calc(clamp(18px, 3vw, 36px) + env(safe-area-inset-right));
    padding-bottom: clamp(18px, 3vw, 36px);
    padding-left: calc(clamp(18px, 3vw, 36px) + env(safe-area-inset-left));
    min-width: 0;
}

.app-footer {
    flex: 0 0 auto;
    margin-top: clamp(18px, 3vw, 36px);
    padding-top: clamp(44px, 7vw, 74px);
    padding-right: calc(clamp(18px, 4vw, 48px) + env(safe-area-inset-right));
    padding-left: calc(clamp(18px, 4vw, 48px) + env(safe-area-inset-left));
    padding-bottom: calc(26px + env(safe-area-inset-bottom));
    background-color: #0b1424;
    background-image:
        linear-gradient(rgba(148, 163, 184, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, .08) 1px, transparent 1px);
    background-size: 80px 80px;
    color: #dbe7f3;
    font-size: .9rem;
}

.app-footer__inner {
    width: min(1480px, 100%);
    margin: 0 auto;
    display: grid;
    grid-template-columns: minmax(260px, 1.45fr) minmax(180px, .85fr) minmax(190px, .75fr) minmax(190px, .85fr);
    gap: clamp(18px, 3vw, 34px);
    padding: 0 0 clamp(24px, 3vw, 34px);
}

.app-footer__brand p {
    max-width: 560px;
    margin: 14px 0 0;
    color: #b9c8d8;
    line-height: 1.65;
}

.app-footer__identity {
    display: flex;
    align-items: center;
    gap: 13px;
}

.app-footer__logo {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
    background: #ffffff;
    padding: 7px;
}

.app-footer__identity strong {
    display: block;
    color: #ffffff;
    font-size: 1.05rem;
    letter-spacing: .01em;
}

.app-footer__identity span {
    display: block;
    margin-top: 2px;
    color: #93a9bf;
    font-size: .82rem;
}

.app-footer__section h2 {
    margin: 0 0 12px;
    color: #ffffff;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.app-footer__section a {
    display: flex;
    align-items: center;
    gap: 9px;
    width: fit-content;
    margin-bottom: 10px;
    color: #c7d6e7;
    font-weight: 700;
    transition: color .15s ease, transform .15s ease;
}

.app-footer__section a:hover {
    color: #ffffff;
    transform: translateX(2px);
}

.app-footer__section svg,
.app-footer__badges svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
}

.app-footer__meta {
    padding: 0 0 12px;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, .1);
}

.app-footer__meta:last-child {
    border-bottom: 0;
    margin-bottom: 0;
    padding-bottom: 0;
}

.app-footer__meta span,
.app-footer__bottom {
    color: #93a9bf;
}

.app-footer__meta strong {
    display: block;
    margin-top: 3px;
    color: #eef6ff;
    font-size: .92rem;
}

.app-footer__badges {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 9px;
}

.app-footer__badges span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
    border: 1px solid rgba(147, 169, 191, .22);
    border-radius: 999px;
    background: rgba(255, 255, 255, .045);
    color: #dbe7f3;
    font-weight: 700;
}

.app-footer__bottom {
    width: min(1480px, 100%);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.workbench {
    display: grid;
    gap: 22px;
    min-width: 0;
}

.workbench__summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
    gap: 28px;
    align-items: end;
    min-width: 0;
}

.workbench__summary h1,
.tracking-form h1,
.confirmation-panel h1,
.section-heading--page h1,
.ticket-detail-layout h1 {
    margin: 0;
    color: #111827;
    font-size: clamp(2rem, 4vw, 4.2rem);
    line-height: 1.03;
    font-weight: 850;
}

.lead-copy {
    max-width: 820px;
    color: var(--muted);
    font-size: 1.04rem;
    line-height: 1.68;
}

.eyebrow {
    margin: 0 0 8px;
    color: var(--humi-red);
    font-size: .76rem;
    font-weight: 850;
    letter-spacing: 0;
    text-transform: uppercase;
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    min-width: 0;
}

.metric-grid--wide {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 22px;
}

.metric-box,
.surface {
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: 0 16px 42px rgba(18, 79, 143, .08);
}

.metric-box {
    min-height: 116px;
    padding: 18px;
    border-radius: 8px;
}

.metric-box span {
    color: var(--muted);
    font-size: .86rem;
    font-weight: 750;
}

.metric-box strong {
    display: block;
    margin-top: 10px;
    color: var(--humi-blue);
    font-size: 2.1rem;
    line-height: 1;
}

.metric-box small {
    display: block;
    margin-top: 8px;
    color: #59687f;
    font-size: .78rem;
    line-height: 1.35;
}

.metric-box--alert strong {
    color: var(--humi-red);
}

.metric-box--success strong {
    color: var(--success);
}

.metric-box--link {
    position: relative;
    display: block;
    color: inherit;
    text-decoration: none;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.metric-box--link:hover,
.metric-box--link:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(18, 79, 143, .28);
    box-shadow: 0 18px 46px rgba(18, 79, 143, .14);
    color: inherit;
    outline: none;
}

.metric-box--link em {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 12px;
    color: var(--humi-blue);
    font-size: .78rem;
    font-style: normal;
    font-weight: 850;
}

.metric-box--link em svg {
    width: 14px;
    height: 14px;
}

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

.workbench__main,
.ticket-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr);
    gap: 22px;
    align-items: start;
    min-width: 0;
}

.surface {
    border-radius: 8px;
    padding: clamp(18px, 2.4vw, 28px);
    min-width: 0;
}

.surface--form {
    min-width: 0;
}

.detail-main-stack {
    display: grid;
    gap: 22px;
    min-width: 0;
}

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
    min-width: 0;
}

.section-heading h2,
.form-section h3,
.kb-card h2 {
    margin: 0;
    color: #172033;
    font-size: 1.22rem;
    font-weight: 820;
}

.section-heading--page {
    margin-bottom: 22px;
}

.dashboard-period-filter {
    margin-bottom: 22px;
    padding: 16px 18px;
}

.dashboard-period-filter__form {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-width: 0;
}

.dashboard-period-filter h2 {
    margin: 0 0 6px;
    color: #172033;
    font-size: 1.08rem;
    font-weight: 850;
}

.dashboard-period-filter__controls {
    display: flex;
    align-items: end;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.dashboard-period-filter__controls label {
    display: grid;
    gap: 6px;
    min-width: 160px;
    margin: 0;
}

.dashboard-period-filter__controls span {
    color: #50627a;
    font-size: .75rem;
    font-weight: 850;
    text-transform: uppercase;
}

.form-section {
    padding: 20px 0;
    border-top: 1px solid var(--line);
}

.form-section:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.form-section h3 {
    margin-bottom: 14px;
    font-size: 1rem;
}

.form-section--inline {
    display: flex;
    align-items: center;
    gap: 14px;
}

.captcha-input {
    max-width: 160px;
}

.form-control,
.form-select {
    min-height: 46px;
    border-color: #cbd6e3;
    border-radius: 8px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--humi-blue);
    box-shadow: 0 0 0 .2rem rgba(18, 79, 143, .16);
}

.notice-panel {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border: 1px solid #cfe0f2;
    border-radius: 10px;
    background: #f4f8fd;
    color: #1f334d;
}

.notice-panel strong {
    color: #0f1f35;
    font-weight: 850;
}

.notice-panel span {
    color: #52677f;
    font-size: .94rem;
}

.notice-panel p {
    margin: 4px 0 0;
    color: #334963;
}

.notice-panel--warning {
    border-color: #f5d79a;
    background: #fff8e8;
}

.phone-prefix-field .input-group-text {
    border-color: #cbd6e3;
    border-radius: 8px 0 0 8px;
    background: #eaf3fb;
    color: var(--humi-blue);
    font-weight: 850;
}

.phone-prefix-field .form-control {
    border-left: 0;
    border-radius: 0 8px 8px 0;
}

.segmented-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    min-width: 0;
}

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

.segmented-grid label {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-weight: 700;
    color: #26374d;
    background: #f9fbfd;
    min-width: 0;
}

.segmented-grid input {
    accent-color: var(--humi-blue);
}

.evaluation-request-fields[hidden] {
    display: none !important;
}

.evaluation-request-card {
    padding: 18px;
    border: 1px solid #b8d7fb;
    border-radius: 8px;
    background: #f3f8ff;
}

.evaluation-request-card .section-heading {
    margin-bottom: 12px;
}

.evaluation-request-card .section-heading h3 {
    margin: 0;
    color: #0f2743;
    font-size: 1.02rem;
    font-weight: 900;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.button-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    border-radius: 8px;
    font-weight: 800;
    text-align: center;
}

.btn svg,
.icon-link svg,
.control-list svg,
.attachment-list svg,
.success-mark svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.3;
}

.btn-primary {
    color: #fff;
    background: var(--humi-blue);
    border-color: var(--humi-blue);
}

.btn-primary:hover {
    color: #fff;
    background: #0f447d;
    border-color: #0f447d;
}

.side-stack {
    display: grid;
    gap: 18px;
}

.icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--humi-blue);
    background: #f7fbff;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border-radius: 8px;
    color: var(--humi-blue);
    background: #eaf3fb;
    font-size: .75rem;
    font-weight: 850;
    white-space: nowrap;
}

.status-pill--critical {
    color: #fff;
    background: var(--humi-red);
}

.status-pill--success {
    color: #064f3b;
    background: #ccefe1;
}

.status-pill--high {
    color: #fff;
    background: #b94b00;
}

.status-pill--medium {
    color: #4e3700;
    background: #ffe5a3;
}

.status-pill--low {
    color: #064f3b;
    background: #ccefe1;
}

.status-pill--readonly {
    color: #193450;
    background: #e6edf5;
}

.article-list {
    display: grid;
    gap: 14px;
}

.article-list__item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 13px;
    padding: 14px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #ffffff;
    color: inherit;
    box-shadow: 0 10px 22px rgba(18, 79, 143, .06);
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.article-list__item:hover {
    border-color: #b7c8dc;
    color: inherit;
    box-shadow: 0 16px 28px rgba(18, 79, 143, .11);
    transform: translateY(-1px);
}

.article-list__icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eef5ff;
    color: #2563eb;
}

.article-list__icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.2;
}

.article-list__content {
    min-width: 0;
}

.article-list__content > span,
.kb-card span,
.detail-grid span,
.timeline-preview span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}

.article-list strong {
    display: block;
    margin: 4px 0;
    color: #162034;
}

.article-list p,
.activity-item p,
.kb-card p,
.muted-text {
    color: var(--muted);
}

.article-list p,
.activity-item p {
    margin: 0;
    font-size: .92rem;
    line-height: 1.55;
}

.control-list {
    display: grid;
    gap: 12px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.control-list li,
.attachment-list div {
    display: flex;
    gap: 10px;
    align-items: center;
    color: #26374d;
    font-weight: 700;
}

.control-list svg,
.attachment-list svg {
    color: var(--humi-blue);
    flex: 0 0 auto;
}

.check-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #26374d;
    font-weight: 750;
}

.check-row input {
    accent-color: var(--humi-blue);
}

.tracking-layout,
.login-layout,
.confirmation-layout {
    display: grid;
    gap: 22px;
    width: min(960px, 100%);
    max-width: 960px;
    margin: 0 auto;
}

@supports selector(:has(*)) {
    .tracking-layout:not(:has(.ticket-result)) {
        flex: 1 0 auto;
        align-content: center;
    }
}

.login-layout {
    min-height: 68vh;
    place-items: center;
}

.login-panel {
    width: min(520px, 100%);
}

.offline-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
}

.offline-panel {
    width: min(680px, 100%);
    text-align: center;
}

.offline-logo {
    width: min(220px, 70vw);
    height: auto;
    margin-bottom: 18px;
}

.confirmation-layout {
    min-height: 70vh;
    place-items: center;
}

.confirmation-panel {
    width: min(760px, 100%);
    text-align: center;
}

.success-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 12px;
    border-radius: 50%;
    color: #fff;
    background: var(--success);
}

.verification-box {
    width: min(420px, 100%);
    margin: 22px auto;
    padding: 18px;
    border: 1px dashed var(--humi-blue);
    border-radius: 8px;
    background: #f4f9ff;
}

.verification-box strong {
    display: block;
    color: var(--humi-blue);
    font-size: 2rem;
    line-height: 1.1;
}

.verification-box p {
    margin: 8px 0 0;
    color: var(--muted);
}

.timeline-preview,
.detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 20px 0;
}

.timeline-preview div,
.detail-grid div {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfe;
}

.timeline-preview strong,
.detail-grid strong {
    display: block;
    margin-top: 4px;
    color: #172033;
}

.dashboard-layout {
    display: grid;
    gap: 22px;
}

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

.dashboard-grid--wide {
    grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr);
}

.bar-list {
    display: grid;
    gap: 13px;
}

.bar-row {
    display: grid;
    grid-template-columns: 84px minmax(0, 1fr) 32px;
    align-items: center;
    gap: 10px;
    font-weight: 800;
}

.bar-row--link {
    padding: 6px;
    margin: -6px;
    color: inherit;
    text-decoration: none;
    border-radius: 8px;
    transition: background .15s ease, transform .15s ease;
}

.bar-row--link:hover,
.bar-row--link:focus-visible {
    background: #f8fafc;
    color: inherit;
    transform: translateX(2px);
    outline: none;
}

.bar-row div {
    height: 10px;
    overflow: hidden;
    border-radius: 999px;
    background: #e9eef5;
}

.bar-row div span {
    display: block;
    height: 100%;
    min-width: 4px;
    background: linear-gradient(90deg, var(--humi-blue), var(--humi-red));
}

.status-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.status-cloud span,
.status-cloud a {
    padding: 9px 11px;
    border-radius: 8px;
    background: #f2f6fb;
    color: #26374d;
    font-weight: 800;
}

.status-cloud a {
    transition: background .15s ease, color .15s ease, transform .15s ease;
}

.status-cloud a:hover,
.status-cloud a:focus-visible {
    background: #e5f0fb;
    color: var(--humi-blue);
    transform: translateY(-1px);
    outline: none;
}

.latest-ticket-tabs {
    display: flex;
    gap: 10px;
    margin: 0 0 16px;
    padding: 0;
    border-bottom: 1px solid var(--line);
}

.latest-ticket-tabs .nav-item {
    list-style: none;
}

.latest-ticket-tabs__button {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 9px 14px;
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
    background: transparent;
    color: #50627a;
    font-weight: 850;
}

.latest-ticket-tabs__button strong {
    min-width: 28px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #edf4ff;
    color: var(--humi-blue);
    font-size: .78rem;
    text-align: center;
}

.latest-ticket-tabs__button.active {
    border-color: var(--line);
    background: #fff;
    color: #172033;
    box-shadow: 0 -8px 24px rgba(18, 79, 143, .05);
}

.latest-ticket-tabs__button.active strong {
    background: var(--humi-blue);
    color: #fff;
}

.latest-ticket-tab-content {
    min-width: 0;
}

.pending-control-panel {
    margin-top: 16px;
    padding: 14px;
    border: 1px solid #f2c27b;
    border-radius: 8px;
    background: #fff8ed;
}

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

.completion-evidence-summary {
    display: grid;
    gap: 6px;
    margin-top: 16px;
    padding: 12px 14px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: .86rem;
    line-height: 1.45;
}

.completion-evidence-summary strong {
    color: #172554;
    font-weight: 900;
}

.completion-evidence-summary[hidden] {
    display: none;
}

.completion-evidence-panel {
    margin-top: 16px;
    padding: 14px;
    border: 1px solid #b7d2ff;
    border-radius: 8px;
    background: #f4f8ff;
}

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

.form-hint {
    margin-top: 6px;
    color: var(--muted);
    font-size: .82rem;
    line-height: 1.45;
}

.form-error {
    margin: 6px 0 0;
    color: #b42318;
    font-size: .82rem;
    font-weight: 800;
    line-height: 1.4;
}

.required-mark {
    color: #dc2626;
    font-weight: 900;
}

.status-reason-template {
    display: grid;
    gap: 6px;
    margin-top: 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbff;
}

.status-reason-template .form-label {
    margin-bottom: 0;
    font-size: .84rem;
}

.evidence-upload-note {
    display: grid;
    gap: 4px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid #cfe0ff;
    border-radius: 8px;
    background: #f5f8ff;
    color: #23324a;
}

.evidence-upload-note strong {
    color: #172033;
    font-size: .92rem;
}

.evidence-upload-note span {
    color: var(--muted);
    font-size: .86rem;
    line-height: 1.55;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.settings-card {
    display: grid;
    gap: 8px;
    min-height: 190px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 16px 42px rgba(18, 79, 143, .08);
}

.settings-card svg {
    width: 28px;
    height: 28px;
    color: var(--humi-blue);
}

.settings-card span,
.settings-card small {
    color: var(--muted);
    font-weight: 800;
}

.settings-card strong {
    color: var(--humi-blue);
    font-size: 2.4rem;
    line-height: 1;
}

.settings-form-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: end;
}

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

.ticket-filter-form {
    grid-template-columns: repeat(6, minmax(150px, 1fr));
}

.compact-filter-field {
    display: grid;
    gap: 4px;
    margin: 0;
}

.compact-filter-field span {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 850;
    line-height: 1;
    text-transform: uppercase;
}

.compact-filter-field .form-control {
    min-height: 46px;
}

.settings-form-grid__wide {
    grid-column: 1 / -1;
}

.settings-check-row {
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.admin-list,
.subcategory-list {
    display: grid;
    gap: 14px;
}

.admin-row {
    display: grid;
    gap: 14px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfe;
}

.admin-row__title strong,
.admin-row__title span {
    display: block;
}

.admin-row__title span {
    color: var(--muted);
    font-size: .86rem;
    font-weight: 750;
}

.sla-guide-grid,
.sla-policy-summary {
    display: grid;
    gap: 12px;
}

.sla-guide-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 18px;
}

.sla-guide-item,
.sla-policy-summary div {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfe;
}

.sla-guide-item {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.sla-guide-item svg {
    width: 20px;
    height: 20px;
    margin-top: 2px;
    color: var(--humi-blue);
    flex: 0 0 auto;
}

.sla-guide-item span,
.sla-policy-summary span,
.sla-field small {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 800;
}

.sla-guide-item strong,
.sla-policy-summary strong {
    display: block;
    margin-top: 3px;
    color: #172033;
    line-height: 1.35;
}

.sla-control-note {
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.sla-policy-card {
    gap: 16px;
}

.sla-policy-card__header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.sla-policy-card__header .admin-row__title {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.sla-policy-card__header .status-pill {
    width: fit-content;
}

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

.sla-edit-panel {
    display: grid;
    gap: 14px;
}

.sla-edit-group {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.sla-edit-group__heading {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.sla-edit-group__heading svg {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    color: var(--humi-blue);
    flex: 0 0 auto;
}

.sla-edit-group__heading strong,
.sla-edit-group__heading span {
    display: block;
}

.sla-edit-group__heading strong {
    color: #172033;
    line-height: 1.25;
}

.sla-edit-group__heading span {
    color: var(--muted);
    font-size: .8rem;
    font-weight: 750;
}

.sla-field-grid {
    display: grid;
    gap: 14px;
}

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

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

.sla-field {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.sla-field .form-label {
    margin-bottom: 0;
    color: #26374d;
    font-weight: 850;
}

.sla-field small {
    line-height: 1.45;
}

.sla-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.sla-card-footer .settings-check-row {
    flex: 1 1 auto;
    margin: 0;
}

.sla-card-footer .btn {
    min-width: 220px;
    white-space: nowrap;
}

.subcategory-list {
    padding-top: 14px;
    border-top: 1px solid var(--line);
}

.subcategory-row {
    padding: 12px;
    border: 1px dashed #cbd6e3;
    border-radius: 8px;
    background: #fff;
}

.subcategory-row--new {
    background: #f5fbff;
}

.copy-box {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    color: #172033;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: .88rem;
    overflow-wrap: anywhere;
}

.template-editor-list {
    display: grid;
    gap: 16px;
}

.template-editor-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfe;
}

.template-editor-card__head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    min-width: 0;
}

.template-editor-card__head h3 {
    margin: 0;
    color: #172033;
    font-size: 1rem;
    font-weight: 820;
}

.template-editor-card__head code,
.variable-cloud code {
    padding: 5px 7px;
    border: 1px solid #cbd6e3;
    border-radius: 7px;
    color: #1e4268;
    background: #eef6fc;
    font-size: .78rem;
    overflow-wrap: anywhere;
}

.template-preview {
    display: grid;
    gap: 7px;
}

.template-preview span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 850;
    text-transform: uppercase;
}

.template-preview pre {
    min-height: 54px;
    margin: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: #172033;
    background: #fff;
    font: .88rem/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.variable-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ai-chat-fab {
    position: fixed;
    right: calc(22px + env(safe-area-inset-right));
    bottom: calc(22px + env(safe-area-inset-bottom));
    z-index: 80;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 58px;
    height: 58px;
    border: 0;
    border-radius: 50%;
    color: #fff;
    background: var(--humi-blue);
    box-shadow: 0 18px 44px rgba(18, 79, 143, .32);
}

.ai-chat-fab:hover,
.ai-chat-fab:focus-visible {
    background: #0f447d;
}

.ai-chat-fab svg {
    width: 28px;
    height: 28px;
    stroke-width: 2.3;
}

.ai-chat-modal[hidden] {
    display: none;
}

.ai-chat-modal {
    position: fixed;
    inset: 0;
    z-index: 90;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    padding: calc(18px + env(safe-area-inset-top)) calc(18px + env(safe-area-inset-right)) calc(92px + env(safe-area-inset-bottom)) calc(18px + env(safe-area-inset-left));
    background: rgba(12, 21, 32, .28);
}

.ai-chat-panel {
    display: grid;
    grid-template-rows: auto minmax(220px, 1fr) auto;
    width: min(420px, calc(100vw - 36px));
    max-height: min(680px, calc(100dvh - 124px));
    border: 1px solid rgba(203, 214, 227, .92);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 28px 70px rgba(17, 24, 39, .24);
    overflow: hidden;
}

.ai-chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    color: #fff;
    background: #123f70;
}

.ai-chat-header span,
.ai-chat-header strong {
    display: block;
}

.ai-chat-header span {
    font-size: .72rem;
    font-weight: 850;
    text-transform: uppercase;
    opacity: .82;
}

.ai-chat-header strong {
    font-size: 1rem;
    font-weight: 850;
}

.ai-chat-header button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 8px;
    color: #fff;
    background: rgba(255, 255, 255, .08);
}

.ai-chat-header button svg {
    width: 18px;
    height: 18px;
}

.ai-chat-log {
    display: grid;
    align-content: start;
    gap: 10px;
    min-height: 0;
    padding: 16px;
    overflow-y: auto;
    background: #f5f8fc;
}

.ai-chat-message {
    display: flex;
}

.ai-chat-message span {
    max-width: min(86%, 340px);
    padding: 10px 12px;
    border-radius: 8px;
    font-size: .92rem;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.ai-chat-message--bot {
    justify-content: flex-start;
}

.ai-chat-message--bot span {
    color: #172033;
    background: #fff;
    border: 1px solid var(--line);
}

.ai-chat-message--user {
    justify-content: flex-end;
}

.ai-chat-message--user span {
    color: #fff;
    background: var(--humi-blue);
}

.ai-chat-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 46px;
    gap: 10px;
    padding: 12px;
    border-top: 1px solid var(--line);
    background: #fff;
}

.ai-chat-form textarea {
    min-height: 46px;
    max-height: 120px;
    padding: 10px 12px;
    border: 1px solid #cbd6e3;
    border-radius: 8px;
    resize: vertical;
}

.ai-chat-form button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 8px;
    color: #fff;
    background: var(--humi-blue);
}

.ai-chat-form button:disabled {
    cursor: wait;
    opacity: .65;
}

.ai-chat-form button svg {
    width: 19px;
    height: 19px;
}

.app-table {
    margin: 0;
}

.table-responsive {
    border-radius: 8px;
}

.table-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.table-pagination--single {
    justify-content: flex-end;
}

.table-pagination p {
    margin: 0;
    color: var(--muted);
    font-size: .88rem;
    font-weight: 750;
}

.table-pagination nav {
    display: flex;
}

.table-pagination .pagination {
    margin: 0;
    gap: 4px;
}

.table-pagination .page-link {
    border-radius: 8px;
    color: var(--humi-blue);
    font-weight: 800;
}

.table-pagination .page-item.active .page-link {
    color: #fff;
    background: var(--humi-blue);
    border-color: var(--humi-blue);
}

.table-pagination .page-item.disabled .page-link {
    color: #5c6878;
    background: #eef2f7;
}

.app-table th {
    color: var(--muted);
    font-size: .78rem;
    text-transform: uppercase;
}

.app-table td {
    border-color: var(--line);
}

.app-table td strong,
.app-table td span {
    display: block;
    overflow-wrap: anywhere;
}

.app-table td span {
    max-width: 340px;
    color: var(--muted);
    font-size: .9rem;
}

.app-table td .status-pill {
    display: inline-flex;
    max-width: none;
    color: var(--humi-blue);
    background: #eaf3fb;
    font-size: .75rem;
}

.app-table td .status-pill--critical {
    color: #fff;
    background: var(--humi-red);
}

.app-table td .status-pill--success {
    color: #064f3b;
    background: #ccefe1;
}

.app-table td .status-pill--high {
    color: #fff;
    background: #b94b00;
}

.app-table td .status-pill--medium {
    color: #4e3700;
    background: #ffe5a3;
}

.app-table td .status-pill--low {
    color: #064f3b;
    background: #ccefe1;
}

.app-table td .status-pill--readonly {
    color: #193450;
    background: #e6edf5;
}

.app-table td .ticket-source-pill {
    display: inline-flex;
    width: fit-content;
    max-width: 100%;
    margin-top: 6px;
    padding: 3px 8px;
    border: 1px solid #cfe0f1;
    border-radius: 999px;
    color: #17466f;
    background: #f2f7fc;
    font-size: .72rem;
    font-weight: 800;
}

.app-table tr.ticket-row--needs-response {
    --bs-table-bg: #fff8ed;
    --bs-table-striped-bg: #fff8ed;
}

.app-table tr.ticket-row--needs-response > * {
    animation: ticketNeedsResponsePulse 1.35s ease-in-out infinite;
    background-color: #fff8ed;
}

.app-table tr.ticket-row--needs-response > td:first-child {
    box-shadow: inset 4px 0 0 #f97316;
}

@keyframes ticketNeedsResponsePulse {
    0%,
    100% {
        background-color: #fff8ed;
    }

    50% {
        background-color: #ffe4cf;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-table tr.ticket-row--needs-response > * {
        animation: none;
        background-color: #fff8ed;
    }
}

.app-table--dashboard-detail td span {
    max-width: 460px;
}

.app-table--dashboard-detail td {
    vertical-align: top;
}

.app-table--dashboard-detail .icon-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    color: var(--humi-blue);
    background: #edf5ff;
    border: 1px solid #cfe0f3;
    transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.app-table--dashboard-detail .icon-link:hover,
.app-table--dashboard-detail .icon-link:focus-visible {
    background: var(--humi-blue);
    border-color: var(--humi-blue);
    color: #fff;
    transform: translateY(-1px);
    outline: none;
}

.app-table--dashboard-detail .icon-link svg {
    width: 16px;
    height: 16px;
}

.user-access-table-wrap {
    border: 1px solid var(--line);
    background: #fff;
}

.user-access-tabs {
    display: flex;
    gap: 8px;
    margin: 0 0 14px;
    border-bottom: 1px solid var(--line);
    flex-wrap: wrap;
}

.user-access-tabs__button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border: 0;
    border-bottom: 3px solid transparent;
    color: #52677f;
    background: transparent;
    font-weight: 850;
    line-height: 1;
}

.user-access-tabs__button strong {
    min-width: 24px;
    padding: 4px 7px;
    border-radius: 999px;
    color: var(--humi-blue);
    background: #edf5ff;
    font-size: .78rem;
    text-align: center;
}

.user-access-tabs__button.active {
    color: var(--humi-blue);
    border-bottom-color: var(--humi-blue);
}

.user-access-tabs__button.active strong {
    color: #fff;
    background: var(--humi-blue);
}

.user-access-tab-content {
    min-width: 0;
}

.user-access-table th,
.user-access-table td {
    vertical-align: middle;
}

.user-access-table .form-control,
.user-access-table .form-select {
    min-height: 38px;
    padding: 8px 10px;
    font-size: .9rem;
}

.compact-field-stack {
    display: grid;
    gap: 8px;
    min-width: 0;
}

.user-access-table__check {
    min-height: 38px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbff;
}

.user-access-table__save {
    width: 100%;
    justify-content: center;
    min-width: 96px;
}

.user-access-table__actions {
    display: grid;
    gap: 8px;
    min-width: 126px;
}

.user-access-table__reset {
    width: 100%;
    justify-content: center;
}

.user-access-password-hint {
    color: #63748c;
    font-size: .78rem;
    line-height: 1.35;
}

.user-access-hidden-forms {
    display: none;
}

.user-password-reset-modal .modal-content {
    border: 1px solid #d9e3ee;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 24px 70px rgba(15, 31, 53, .22);
}

.reset-password-summary {
    display: grid;
    gap: 10px;
    margin: 16px 0 0;
}

.reset-password-summary div {
    display: grid;
    grid-template-columns: 120px minmax(0, 1fr);
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #edf2f7;
}

.reset-password-summary div:last-child {
    border-bottom: 0;
}

.reset-password-summary dt {
    color: #63748c;
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.reset-password-summary dd {
    margin: 0;
    color: #0f1f35;
    font-weight: 750;
}

.category-settings-table-wrap {
    border: 1px solid var(--line);
    background: #fff;
}

.category-settings-table th,
.category-settings-table td {
    vertical-align: top;
}

.category-settings-table .form-control,
.category-settings-table .form-select {
    min-height: 38px;
    padding: 8px 10px;
    font-size: .9rem;
}

.category-settings-table td:nth-child(1) {
    min-width: 270px;
}

.category-settings-table td:nth-child(2) {
    min-width: 190px;
}

.category-settings-table td:nth-child(3) {
    min-width: 230px;
}

.category-settings-table td:nth-child(6) {
    min-width: 190px;
}

.category-agent-select {
    min-height: 86px;
}

.category-agent-select option {
    padding: 5px 6px;
}

.agent-picker {
    position: relative;
    width: 100%;
}

.agent-picker__toggle {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 40px;
    padding: 8px 12px;
    border-color: #cbd8e6;
    color: #102238;
    background: #fff;
    font-size: .88rem;
    font-weight: 850;
    text-align: left;
}

.agent-picker__toggle::after {
    margin-left: auto;
}

.agent-picker__menu {
    width: min(340px, calc(100vw - 40px));
    max-height: 286px;
    overflow-y: auto;
    padding: 8px;
    border: 1px solid #cbd8e6;
    border-radius: 8px;
    box-shadow: 0 18px 42px rgba(15, 35, 56, .18);
}

.agent-picker--compact .agent-picker__menu {
    width: min(320px, calc(100vw - 40px));
}

.agent-picker__option {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    width: 100%;
    margin: 0;
    padding: 9px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #122236;
    cursor: pointer;
}

.agent-picker__option + .agent-picker__option {
    margin-top: 4px;
}

.agent-picker__option:hover {
    border-color: #c7dcf4;
    background: #f3f8ff;
}

.agent-picker__option .form-check-input {
    flex: 0 0 auto;
    margin-top: 2px;
}

.agent-picker__option span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.agent-picker__option strong,
.agent-picker__option small {
    overflow-wrap: anywhere;
}

.agent-picker__option strong {
    font-size: .86rem;
    line-height: 1.25;
}

.agent-picker__option small {
    color: var(--muted);
    font-size: .76rem;
    line-height: 1.25;
}

.agent-picker__empty {
    display: block;
    padding: 10px;
    color: var(--muted);
    font-size: .84rem;
    font-weight: 750;
}

.category-agent-help {
    display: block;
    margin-top: 6px;
    max-width: 260px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 750;
}

.category-description-field {
    min-height: 58px;
    resize: vertical;
}

.category-slug-field {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: .84rem;
}

.category-sort-field {
    max-width: 96px;
}

.category-active-check {
    min-height: 38px;
    padding: 0 10px;
    background: #f8fbff;
}

.category-save-button {
    width: 100%;
    justify-content: center;
    min-width: 92px;
}

.category-subcategory-open {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 116px;
    font-weight: 850;
}

.category-subcategory-open span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    color: #fff;
    background: var(--humi-blue);
    font-size: .86rem;
    font-weight: 900;
}

.category-subcategory-modal .modal-content {
    border: 1px solid #cbd8e6;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 26px 70px rgba(15, 35, 56, .24);
}

.category-subcategory-modal .modal-header {
    align-items: flex-start;
    gap: 14px;
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
    background: #fff;
}

.category-subcategory-modal .modal-title {
    margin: 0;
    color: #0e1f34;
    font-size: 1.25rem;
    font-weight: 900;
    line-height: 1.2;
}

.category-subcategory-modal .modal-body {
    padding: 18px;
    background: #f5f8fc;
    overflow-x: auto;
}

.category-subcategory-modal .modal-footer {
    border-top: 1px solid var(--line);
    background: #fff;
}

.category-subcategory-details {
    min-width: min(100%, 520px);
}

.category-subcategory-details summary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 8px 10px;
    border: 1px solid #cfe0f3;
    border-radius: 8px;
    color: var(--humi-blue);
    background: #edf5ff;
    font-size: .88rem;
    font-weight: 850;
}

.category-subcategory-details summary strong {
    min-width: 22px;
    padding: 2px 7px;
    border-radius: 999px;
    color: #fff;
    background: var(--humi-blue);
    text-align: center;
}

.category-subcategory-details summary span {
    display: inline;
    max-width: none;
    color: inherit;
    font-size: inherit;
}

.category-subcategory-details[open] summary {
    margin-bottom: 10px;
    background: #e4f0fb;
}

.category-subcategory-panel {
    display: grid;
    gap: 8px;
    min-width: 760px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbff;
}

.category-subcategory-panel--modal {
    min-width: 980px;
    padding: 0;
    border: 0;
    background: transparent;
}

.category-subcategory-grid {
    display: grid;
    grid-template-columns: minmax(160px, 1.25fr) minmax(140px, .95fr) minmax(112px, .75fr) minmax(220px, 1.45fr) 78px 86px;
    gap: 8px;
    align-items: center;
}

.agent-picker--subcategory .agent-picker__menu {
    width: min(320px, calc(100vw - 40px));
}

.category-subcategory-agent-select {
    width: 100%;
    min-height: 82px;
    font-size: .8rem;
}

.category-subcategory-grid--head {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.category-subcategory-grid--row {
    padding: 8px;
    border: 1px solid #dce6f0;
    border-radius: 8px;
    background: #fff;
}

.category-subcategory-grid--new {
    border-color: #b8d7fb;
    background: #f1f7ff;
}

.category-subcategory-legacy-details {
    margin: 10px 0 2px;
    background: #fff;
}

.category-subcategory-panel--legacy {
    min-width: 0;
    padding: 10px;
    border: 0;
    border-top: 1px solid var(--line);
    border-radius: 0;
    background: #f8fbff;
}

.category-subcategory-grid--legacy {
    border-color: #e2e8f0;
    background: #fbfcfe;
    opacity: .92;
}

.category-settings-hidden-forms {
    display: none;
}

.category-normalization-panel {
    border-color: #cfe0f3;
    background: linear-gradient(180deg, #ffffff 0%, #f6faff 100%);
}

.category-ticket-count {
    display: inline-flex;
    width: fit-content;
    padding: 4px 9px;
    border-radius: 999px;
    color: #124f8f;
    background: #eaf3ff;
    font-size: .78rem;
    font-weight: 850;
}

.category-legacy-details {
    margin-top: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbff;
    overflow: hidden;
}

.category-legacy-details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    cursor: pointer;
    color: #26374d;
    font-weight: 900;
}

.category-legacy-details summary strong {
    padding: 4px 9px;
    border-radius: 999px;
    color: #53657c;
    background: #e9eef5;
    font-size: .78rem;
}

.category-legacy-table {
    margin: 0;
    background: #fff;
}

.ticket-detail-layout {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
}

.detail-grid {
    grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
    gap: 8px;
    margin: 14px 0 0;
}

.compliance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
    gap: 8px;
    margin-top: 8px;
}

.detail-grid div,
.compliance-grid div {
    min-width: 0;
    min-height: 62px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    overflow: hidden;
}

.detail-grid span,
.compliance-grid span {
    display: block;
    color: var(--muted);
    font-size: .68rem;
    font-weight: 850;
    line-height: 1.25;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.detail-grid strong,
.compliance-grid strong {
    display: block;
    margin-top: 4px;
    color: #172033;
    font-size: .88rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
    word-break: break-word;
    hyphens: auto;
}

.ticket-evaluation-panel {
    border-color: #cfe0f3;
}

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

.evaluation-form__grid,
.evaluation-readonly-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.evaluation-check-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.evaluation-check-grid label,
.evaluation-send-panel label {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    padding: 10px 12px;
    border: 1px solid #d8e4f0;
    border-radius: 8px;
    background: #f9fbfd;
    color: #1d2c42;
    font-weight: 800;
}

.evaluation-check-grid input,
.evaluation-send-panel input {
    accent-color: var(--humi-blue);
}

.evaluation-send-panel {
    display: grid;
    gap: 9px;
    padding: 14px;
    border: 1px solid #cfe0f3;
    border-radius: 8px;
    background: #f3f8ff;
}

.evaluation-send-panel strong {
    color: #0f2743;
    font-size: .92rem;
    font-weight: 900;
}

.evaluation-send-panel p {
    margin: 0;
    color: var(--muted);
    font-size: .84rem;
    font-weight: 650;
}

.signature-pad-panel {
    display: grid;
    gap: 12px;
    padding: 16px;
    border: 1px solid #cfe0f3;
    border-radius: 10px;
    background: #f8fbff;
}

.signature-pad-panel .section-heading {
    align-items: flex-start;
    margin-bottom: 0;
}

.signature-pad-panel h3 {
    margin: 0;
    color: #0f2743;
    font-size: 1rem;
}

.signature-pad-canvas {
    width: 100%;
    height: 180px;
    display: block;
    border: 1px solid #c7d7e8;
    border-radius: 8px;
    background: #fff;
    touch-action: none;
}

.evaluation-readonly-grid div {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbff;
}

.evaluation-readonly-grid span,
.evaluation-remarks-box strong {
    display: block;
    color: var(--muted);
    font-size: .74rem;
    font-weight: 850;
    text-transform: uppercase;
}

.evaluation-readonly-grid strong {
    display: block;
    margin-top: 4px;
    color: #001a3d;
    font-weight: 900;
}

.evaluation-remarks-box {
    display: grid;
    gap: 8px;
    margin-top: 12px;
    padding: 14px;
    border: 1px solid #d8e4f0;
    border-radius: 8px;
    background: #fff;
}

.evaluation-remarks-box p {
    margin: 0 0 8px;
    white-space: pre-wrap;
}

.activity-timeline {
    display: grid;
    gap: 14px;
}

.activity-item {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 12px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line);
}

.activity-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.activity-item > span {
    color: var(--humi-blue);
    font-weight: 850;
}

.activity-item strong {
    display: block;
    margin-bottom: 4px;
}

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

.attachment-item {
    min-width: 0;
}

.attachment-preview-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fbff;
    color: #26374d;
    text-align: left;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.attachment-preview-card:hover,
.attachment-preview-card:focus-visible {
    border-color: #9fc4ff;
    box-shadow: 0 8px 22px -18px rgba(18, 79, 143, .45);
    transform: translateY(-1px);
}

.attachment-preview-card svg {
    color: var(--humi-blue);
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.attachment-preview-card__content {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.attachment-preview-card__content strong {
    color: #172033;
    font-size: .88rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.attachment-preview-card__content small {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 750;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.attachment-preview-card__action {
    padding: 5px 8px;
    border-radius: 999px;
    background: #eaf3ff;
    color: var(--humi-blue);
    font-size: .72rem;
    font-weight: 900;
    white-space: nowrap;
}

.attachment-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 1060;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(10, 24, 42, .58);
}

.attachment-preview-modal[hidden] {
    display: none;
}

.attachment-preview-open {
    overflow: hidden;
}

.attachment-preview-modal__panel {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(1040px, 100%);
    max-height: min(820px, calc(100vh - 44px));
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 24px 70px -30px rgba(0, 0, 0, .5);
    overflow: hidden;
}

.attachment-preview-modal__header,
.attachment-preview-modal__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 16px 18px;
    border-bottom: 1px solid var(--line);
}

.attachment-preview-modal__footer {
    border-top: 1px solid var(--line);
    border-bottom: 0;
    background: #f8fafc;
    color: var(--muted);
    font-size: .84rem;
    font-weight: 750;
}

.attachment-preview-modal__header h2 {
    margin: 2px 0 0;
    color: #172033;
    font-size: 1.05rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.attachment-preview-modal__header span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: .8rem;
    font-weight: 750;
    overflow-wrap: anywhere;
}

.attachment-preview-modal__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: #52637a;
}

.attachment-preview-modal__body {
    min-height: 280px;
    overflow: auto;
    background: #eef3f8;
}

.attachment-preview-modal__body img,
.attachment-preview-modal__body video {
    display: block;
    max-width: 100%;
    max-height: calc(100vh - 230px);
    margin: auto;
    object-fit: contain;
}

.attachment-preview-modal__body iframe {
    display: block;
    width: 100%;
    height: min(680px, calc(100vh - 230px));
    border: 0;
    background: #fff;
}

.attachment-preview-modal__fallback {
    display: grid;
    place-items: center;
    gap: 12px;
    min-height: 320px;
    padding: 28px;
    color: #31445c;
    text-align: center;
}

.attachment-preview-modal__fallback svg {
    width: 48px;
    height: 48px;
    color: var(--humi-blue);
}

.attachment-preview-modal__fallback p {
    max-width: 520px;
    margin: 0;
}

.collapsible-surface {
    padding: 0;
    overflow: hidden;
}

.collapsible-surface__summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    min-height: 74px;
    padding: 18px 20px;
    cursor: pointer;
    list-style: none;
}

.collapsible-surface__summary::-webkit-details-marker {
    display: none;
}

.collapsible-surface__summary h2 {
    margin: 0;
    color: #172033;
    font-size: 1rem;
    line-height: 1.3;
}

.collapsible-surface__summary .eyebrow {
    margin-bottom: 3px;
}

.collapsible-surface__summary svg {
    width: 20px;
    height: 20px;
    color: #64748b;
    transition: transform .2s ease;
}

.collapsible-surface[open] .collapsible-surface__summary {
    border-bottom: 1px solid var(--line);
}

.collapsible-surface[open] .collapsible-surface__summary svg {
    transform: rotate(180deg);
}

.collapsible-surface__meta {
    padding: 5px 9px;
    border-radius: 999px;
    background: #edf4ff;
    color: var(--humi-blue);
    font-size: .72rem;
    font-weight: 900;
    white-space: nowrap;
}

.collapsible-surface__body {
    padding: 14px 18px 18px;
}

.audit-section,
.reply-form,
.stacked-form {
    margin-top: 22px;
}

.conversation-list {
    display: grid;
    gap: 12px;
}

.conversation-item,
.evidence-item {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
    background: #fbfdff;
}

.conversation-item > div {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.conversation-item span,
.conversation-item small,
.evidence-item small {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
}

.conversation-item p,
.evidence-item p {
    margin: 0;
    color: #30445d;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

.conversation-item--internal {
    background: #fffaf0;
    border-color: #f2dfb5;
}

.conversation-item--outbound {
    background: #f5fbff;
}

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

.evidence-item span {
    display: block;
    margin-bottom: 6px;
    color: var(--humi-blue);
    font-size: .76rem;
    font-weight: 850;
}

.evidence-link {
    display: inline-flex;
    width: fit-content;
    margin-top: 10px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--humi-blue);
    font-size: .84rem;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
}

.evidence-link:hover,
.evidence-link:focus-visible {
    color: #0b3f73;
    text-decoration: underline;
}

.audit-list {
    display: grid;
    gap: 12px;
}

.audit-row {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fbfcfe;
}

.audit-row > div,
.audit-row--compact {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.audit-row strong,
.audit-row span,
.audit-row small {
    display: block;
}

.audit-row span,
.audit-row small {
    color: var(--muted);
    font-size: .82rem;
    font-weight: 700;
}

.audit-row p {
    margin: 8px 0 0;
    color: #30445d;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.rating-summary {
    display: grid;
    gap: 6px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f5fbff;
}

.rating-summary strong {
    color: var(--humi-blue);
    font-size: 2rem;
    line-height: 1;
}

.rating-summary span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 850;
}

.rating-summary p {
    margin: 0;
    color: #30445d;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.feedback-panel {
    border-color: #bbf7d0;
    background: #f6fef9;
}

.feedback-form {
    padding: 16px;
    border: 1px solid #d8e8dc;
    border-radius: 8px;
    background: #fff;
}

.stacked-form .btn {
    width: 100%;
}

.kb-portal {
    width: min(1120px, 100%);
    margin: 0 auto;
    display: grid;
    gap: clamp(28px, 4vw, 44px);
}

.kb-portal__hero {
    max-width: 760px;
    margin: 0 auto;
    padding-top: clamp(18px, 3vw, 30px);
    text-align: center;
}

.kb-portal__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: var(--humi-blue);
    font-size: .82rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.kb-portal__hero h1 {
    margin: 0;
    color: #0f172a;
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    line-height: 1.04;
    font-weight: 880;
    letter-spacing: 0;
}

.kb-portal__hero p {
    max-width: 680px;
    margin: 16px auto 0;
    color: #5d6c80;
    font-size: 1.02rem;
    line-height: 1.7;
}

.kb-portal__actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 22px;
    flex-wrap: wrap;
}

.kb-solution-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.kb-solution-card {
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    border: 1px solid #dbe3ef;
    border-radius: 8px;
    background: #ffffff;
    color: inherit;
    box-shadow: 0 12px 28px rgba(18, 79, 143, .07);
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.kb-solution-card:hover {
    border-color: #b7c8dc;
    color: inherit;
    box-shadow: 0 18px 34px rgba(18, 79, 143, .12);
    transform: translateY(-2px);
}

.kb-solution-card__icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #eef5ff;
    color: #2563eb;
}

.kb-solution-card__icon svg {
    width: 20px;
    height: 20px;
    stroke-width: 2.2;
}

.kb-solution-card__category {
    margin-top: 18px;
    color: #2563eb;
    font-size: .78rem;
    font-weight: 850;
}

.kb-solution-card h2 {
    margin: 7px 0 10px;
    color: #172033;
    font-size: 1.08rem;
    line-height: 1.35;
    font-weight: 850;
}

.kb-solution-card p {
    margin: 0;
    color: #596b80;
    line-height: 1.65;
}

.kb-solution-card__link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: auto;
    padding-top: 18px;
    color: var(--humi-blue);
    font-size: .88rem;
    font-weight: 850;
}

.kb-solution-card__link svg {
    width: 16px;
    height: 16px;
}

.kb-help-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: clamp(24px, 3vw, 34px);
    border-radius: 8px;
    background: #2563eb;
    color: #ffffff;
    box-shadow: 0 22px 46px rgba(37, 99, 235, .22);
}

.kb-help-panel .kb-portal__eyebrow {
    margin-bottom: 8px;
    color: #dbeafe;
}

.kb-help-panel h2 {
    margin: 0;
    color: #ffffff;
    font-size: clamp(1.35rem, 2.4vw, 1.8rem);
    font-weight: 850;
}

.kb-help-panel p {
    max-width: 660px;
    margin: 8px 0 0;
    color: #dbeafe;
    line-height: 1.65;
}

.kb-help-panel__actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.kb-empty-state {
    grid-column: 1 / -1;
    text-align: left;
}

.kb-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.kb-card {
    min-height: 240px;
}

.kb-card h2 {
    margin: 8px 0 10px;
}

.kb-content {
    color: #30445d;
    line-height: 1.6;
}

@media (max-width: 1120px) {
    .workbench__summary,
    .workbench__main,
    .ticket-detail-layout {
        grid-template-columns: 1fr;
    }

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

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

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

@media (max-width: 900px) {
    .kb-help-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .kb-help-panel__actions {
        justify-content: flex-start;
    }

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

    .metric-grid--wide,
    .segmented-grid,
    .detail-grid,
    .compliance-grid,
    .sla-guide-grid,
    .sla-policy-summary,
    .sla-field-grid--three,
    .settings-grid,
    .settings-form-grid,
    .settings-form-grid--compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .evaluation-form__grid,
    .evaluation-readonly-grid,
    .evaluation-check-grid {
        grid-template-columns: 1fr;
    }

    .section-heading--page {
        align-items: flex-start;
        flex-direction: column;
    }

    .dashboard-period-filter__form {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-period-filter__controls {
        justify-content: flex-start;
    }
}

@media (max-width: 760px) {
    .app-footer,
    .section-heading,
    .form-section--inline {
        align-items: stretch;
        flex-direction: column;
    }

    .button-row {
        justify-content: flex-start;
    }

    .app-shell__topbar {
        align-items: center;
        flex-direction: row;
        gap: 12px;
        min-height: 66px;
        padding-top: calc(10px + env(safe-area-inset-top));
        padding-right: calc(16px + env(safe-area-inset-right));
        padding-bottom: 10px;
        padding-left: calc(16px + env(safe-area-inset-left));
    }

    .app-nav-toggle {
        display: inline-flex;
        flex: 0 0 auto;
    }

    .app-nav {
        position: absolute;
        top: calc(100% + 8px);
        right: calc(14px + env(safe-area-inset-right));
        left: calc(14px + env(safe-area-inset-left));
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 6px;
        max-height: calc(100svh - 92px);
        padding: 10px;
        overflow-y: auto;
        border: 1px solid #d2dfed;
        border-radius: 14px;
        background: rgba(255, 255, 255, .98);
        box-shadow: 0 24px 60px rgba(15, 31, 53, .2);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-8px) scale(.98);
        transform-origin: top right;
        transition: opacity .18s ease, transform .18s ease;
    }

    .app-shell__topbar.is-nav-open .app-nav {
        opacity: 1;
        pointer-events: auto;
        transform: translateY(0) scale(1);
    }

    .app-nav a,
    .nav-logout button {
        display: flex;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        min-height: 44px;
        padding: 11px 12px;
        text-align: left;
        border-radius: 10px;
        color: #22354d;
    }

    .nav-logout {
        margin: 0;
    }

    .nav-logout button {
        background: transparent;
    }

    .dashboard-period-filter__controls {
        align-items: stretch;
        flex-direction: column;
    }

    .dashboard-period-filter__controls label,
    .dashboard-period-filter__controls .btn {
        width: 100%;
    }

    .app-footer {
        padding-right: calc(16px + env(safe-area-inset-right));
        padding-left: calc(16px + env(safe-area-inset-left));
    }

    .app-footer__inner {
        grid-template-columns: 1fr;
        padding: 22px;
    }

    .app-footer__bottom {
        align-items: flex-start;
        flex-direction: column;
        padding: 13px 22px;
    }

    .kb-help-panel .btn {
        width: 100%;
        min-width: 0;
    }

    .brand-lockup {
        flex-wrap: wrap;
        flex: 1 1 auto;
    }

    .brand-lockup__system {
        border-left: 0;
        padding-left: 0;
    }

    .metric-grid,
    .metric-grid--wide,
    .segmented-grid,
    .timeline-preview,
    .detail-grid,
    .compliance-grid,
    .dashboard-grid,
    .evidence-grid,
    .sla-guide-grid,
    .sla-policy-summary,
    .sla-field-grid--two,
    .sla-field-grid--three,
    .settings-grid,
    .settings-form-grid,
    .settings-form-grid--compact,
    .kb-grid {
        grid-template-columns: 1fr;
    }

    .kb-solution-grid {
        grid-template-columns: 1fr;
    }

    .sla-policy-card__header {
        align-items: stretch;
        flex-direction: column;
    }

    .sla-card-footer {
        align-items: stretch;
        flex-direction: column;
    }

    .sla-card-footer .btn {
        width: 100%;
        min-width: 0;
    }

    .workbench__summary h1,
    .tracking-form h1,
    .confirmation-panel h1,
    .section-heading--page h1,
    .ticket-detail-layout h1 {
        font-size: 2rem;
    }

    .form-actions {
        justify-content: stretch;
    }

    .form-actions .btn {
        flex: 1 1 180px;
    }

    .table-responsive {
        overflow-x: visible;
    }

    .table-pagination {
        align-items: flex-start;
        flex-direction: column;
    }

    .table-pagination nav {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .app-table,
    .app-table tbody,
    .app-table tr,
    .app-table td {
        display: block;
        width: 100%;
    }

    .app-table thead {
        display: none;
    }

    .app-table tbody {
        display: grid;
        gap: 12px;
    }

    .app-table tr {
        padding: 12px;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #fff;
    }

    .app-table td {
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        gap: 10px;
        padding: 8px 0;
        border: 0;
        align-items: center;
    }

    .app-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: .72rem;
        font-weight: 850;
        text-transform: uppercase;
    }

    .app-table td:not([data-label]) {
        display: block;
        text-align: center;
    }

    .app-table td:not([data-label])::before {
        content: none;
    }

    .audit-row > div,
    .audit-row--compact {
        flex-direction: column;
    }
}

@media (max-width: 560px) {
    .app-shell__topbar {
        gap: 10px;
    }

    .brand-lockup {
        width: auto;
        justify-content: flex-start;
        gap: 10px;
    }

    .brand-lockup__logo {
        width: min(156px, 44vw);
        max-width: 100%;
    }

    .brand-lockup__system {
        font-size: .88rem;
    }

    .app-nav-toggle span {
        display: none;
    }

    .surface {
        padding: 16px;
    }

    .metric-box {
        min-height: 92px;
    }

    .button-row .btn,
    .form-actions .btn {
        width: 100%;
        flex: 1 1 100%;
    }

    .status-pill {
        justify-content: center;
        white-space: normal;
        text-align: center;
    }

    .verification-box strong {
        font-size: 1.55rem;
    }

    .template-editor-card__head {
        align-items: stretch;
        flex-direction: column;
    }

    .ai-chat-fab {
        right: calc(16px + env(safe-area-inset-right));
        bottom: calc(16px + env(safe-area-inset-bottom));
        width: 54px;
        height: 54px;
    }

    .ai-chat-modal {
        padding: calc(12px + env(safe-area-inset-top)) calc(12px + env(safe-area-inset-right)) calc(82px + env(safe-area-inset-bottom)) calc(12px + env(safe-area-inset-left));
    }

    .ai-chat-panel {
        width: 100%;
        max-height: calc(100dvh - 104px);
        grid-template-rows: auto minmax(180px, 1fr) auto;
    }

    .ai-chat-message span {
        max-width: 92%;
    }
}

@media (max-width: 360px) {
    .app-shell {
        padding-right: calc(12px + env(safe-area-inset-right));
        padding-left: calc(12px + env(safe-area-inset-left));
    }

    .app-table td {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .workbench__summary h1,
    .tracking-form h1,
    .confirmation-panel h1,
    .section-heading--page h1,
    .ticket-detail-layout h1 {
        font-size: 1.7rem;
    }

    .ai-chat-form {
        grid-template-columns: minmax(0, 1fr) 44px;
    }

    .ai-chat-form button {
        width: 44px;
        height: 44px;
    }
}
