:root {
    --bg: #f2f6fd;
    --navy: #081d50;
    --navy-soft: #12378d;
    --blue: #2f66ff;
    --text: #12213f;
    --muted: #6f7a93;
    --border: #dde6f5;
    --white: #ffffff;
    --green: #65c56f;
    --yellow: #f4b63d;
    --orange: #ff9f43;
    --purple: #8a6bff;
    --shadow: 0 18px 38px rgba(7, 29, 79, 0.08);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
    margin: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: radial-gradient(circle at top left, #eef4ff 0, #f8fbff 36%, #eef3fa 100%);
    color: var(--text);
    overflow: hidden;
}

body.voice-mode-open {
    overflow: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }

.login-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 10px 24px;
    overflow-y: hidden;
    overflow-x: hidden;
    background:
        linear-gradient(135deg, rgba(7, 22, 58, 0.74), rgba(13, 47, 126, 0.46)),
        url('../img/bg.png') center center / cover no-repeat fixed;
}
.login-shell {
    width: min(1120px, 100%);
    display: block;
    max-height: calc(100vh - 20px);
}
.login-panel, .content-card, .hero-panel, .service-side-card, .stat-card {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}
.login-unified-card {
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.05fr 0.95fr;
}
.login-brand {
    background: linear-gradient(160deg, #091f56 0%, #0d2f7e 100%);
    color: #fff;
    padding: 20px 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.login-logo, .brand-logo, .hero-brand img { width: 60px; object-fit: contain; }
.login-brand .lang-grid {
    align-self: flex-end;
    width: auto;
    grid-template-columns: repeat(2, minmax(54px, auto));
    margin-top: 0;
    margin-bottom: 10px;
}
.eyebrow {
    display: inline-flex;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    margin-top: 8px;
    margin-bottom: 10px;
    font-size: 0.76rem;
}
.login-brand h1 { font-size: 2.15rem; margin: 0 0 8px; }
.login-brand p {
    max-width: 520px;
    line-height: 1.45;
    font-size: 0.96rem;
    color: rgba(255, 255, 255, 0.84);
}
.login-feature-list { display: grid; gap: 8px; margin-top: 14px; }
.feature-chip {
    padding: 10px 14px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.08);
    font-size: 0.92rem;
}
.login-form-card {
    padding: 18px 26px;
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.98);
}
.login-form-card h2 {
    margin: 12px 0 8px;
    font-size: 1.75rem;
}
.login-form-card > p {
    margin: 0;
    line-height: 1.4;
    font-size: 0.96rem;
}
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--text);
    font-size: 0.84rem;
}
.status-pill.online .dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--green);
}
.login-form { display: grid; gap: 10px; margin-top: 14px; }
.login-form label {
    display: grid;
    gap: 5px;
    color: var(--muted);
    font-size: 0.9rem;
}
.login-form input, .chat-input-row input, .search-box input, .history-toolbar input, .history-toolbar select {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 11px 14px;
    background: #fff;
    color: var(--text);
}
.primary-btn, .ghost-btn, .send-btn, .lang-btn, .sidebar-toggle {
    border: 0;
    cursor: pointer;
}
.primary-btn {
    background: linear-gradient(135deg, #0e2c77 0%, #1b4bc6 100%);
    color: #fff;
    border-radius: 14px;
    padding: 13px 18px;
    font-weight: 700;
}

.contact-form-card {
    display: grid;
    gap: 14px;
    margin-top: 14px;
    padding: 16px;
    border: 1px solid #e1e9fb;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.contact-field {
    display: grid;
    gap: 8px;
    color: var(--navy);
    font-size: 0.86rem;
    font-weight: 800;
}

.contact-field input,
.contact-field select,
.contact-field textarea {
    width: 100%;
    border: 1px solid #dfe8f8;
    border-radius: 14px;
    background: #ffffff;
    color: var(--navy);
    padding: 12px 14px;
    outline: none;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.04);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.contact-field textarea {
    resize: vertical;
    min-height: 118px;
}

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
    border-color: #2457f5;
    background: #fbfdff;
    box-shadow: 0 0 0 4px rgba(36, 87, 245, 0.10);
}

.contact-form-actions {
    display: flex;
    justify-content: flex-end;
}

.ghost-btn {
    background: #f4f7ff;
    color: var(--text);
    border-radius: 999px;
    padding: 10px 16px;
}
.full-width { width: 100%; }
.alert.error {
    margin-top: 16px;
    border-radius: 14px;
    padding: 14px 16px;
    background: #fff0f0;
    color: #bb2e2e;
}
.login-divider {
    position: relative;
    margin: 14px 0 12px;
    text-align: center;
}

.login-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--border);
}

.login-divider span {
    position: relative;
    padding: 0 14px;
    background: #fff;
    color: var(--muted);
}

.digitalid-login-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 12px 16px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: linear-gradient(135deg, #fff 0%, #f8fbff 100%);
    box-shadow: var(--shadow);
}
.digitalid-login-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 22px 42px rgba(7, 29, 79, 0.12);
}

.digitalid-mini-logo,
.digitalid-logo {
    font-weight: 800;
    letter-spacing: -0.04em;
}

.digitalid-mini-logo {
    font-size: 1.25rem;
    flex-shrink: 0;
    margin: 0 auto;
    text-align: center;
}
.digitalid-register-copy {
    margin: 18px 0 0;
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}
.digitalid-register-copy a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}
.digitalid-register-copy a:hover {
    text-decoration: underline;
}
.login-card-note {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(240, 245, 255, 0.95), rgba(247, 250, 255, 0.92));
    border: 1px solid var(--border);
}
.login-card-note strong {
    display: block;
    margin-bottom: 4px;
    color: var(--navy);
}
.login-card-note p {
    margin: 0;
    color: var(--muted);
    line-height: 1.45;
    font-size: 0.92rem;
}
.login-connected-panel {
    margin-top: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}
.login-connected-label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
}
.login-connected-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.login-connected-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.92);
    color: var(--navy);
    font-weight: 600;
    font-size: 0.92rem;
}

.digitalid-logo {
    font-size: 4rem;
    line-height: 1;
}

.digitalid-mini-logo .my,
.digitalid-logo .my {
    color: #e40046;
}

.digitalid-mini-logo .digital,
.digitalid-logo .digital {
    color: #1d4699;
}

.digitalid-mini-logo .id,
.digitalid-logo .id {
    color: #20a6df;
}

.digitalid-body {
    min-height: 100vh;
    overflow: hidden;
    background:
        radial-gradient(circle at center, rgba(255, 255, 255, 0.96) 0%, rgba(251, 252, 255, 0.98) 70%, #ffffff 100%),
        repeating-radial-gradient(circle at center, rgba(17, 39, 86, 0.04) 0 2px, transparent 2px 96px);
}

.digitalid-scene {
    position: relative;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 32px 18px;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(0, 0, 0, 0.03) 0 2px, transparent 2px 120px),
        linear-gradient(115deg, rgba(15, 45, 114, 0.05) 1px, transparent 1px),
        linear-gradient(25deg, rgba(15, 45, 114, 0.05) 1px, transparent 1px);
    background-size: 180px 180px, 180px 180px, 180px 180px;
}

.digitalid-panel {
    position: relative;
    z-index: 2;
    width: min(420px, 100%);
    text-align: center;
}

.digitalid-back {
    display: inline-flex;
    margin-bottom: 20px;
    padding: 10px 16px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.88);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    color: var(--navy);
    font-weight: 700;
}

.digitalid-panel h1 {
    margin: 10px 0 16px;
    font-size: 2rem;
    text-transform: uppercase;
}

.digitalid-timer {
    display: inline-block;
    margin-bottom: 18px;
    padding: 14px 22px;
    background: #f7aa12;
    color: #042b8d;
    font-size: 1.3rem;
    font-weight: 800;
    border-radius: 4px;
}

.digitalid-panel p {
    margin: 0 0 16px;
    font-size: 1.35rem;
    line-height: 1.4;
}

.digitalid-method-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0 auto 14px;
}

.digitalid-method {
    min-height: 44px;
    border: 1px solid #d7e5ff;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--navy);
    font-weight: 800;
    cursor: pointer;
}

.digitalid-method.active {
    background: linear-gradient(135deg, #2457f5, #7c3aed);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 12px 26px rgba(36, 87, 245, 0.22);
}

.digitalid-auth-panel {
    display: none;
    margin: 0 auto 14px;
    padding: 14px;
    border: 1px solid #d7e5ff;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 14px 28px rgba(18, 33, 63, 0.08);
    text-align: left;
}

.digitalid-auth-panel.active {
    display: grid;
    gap: 9px;
}

.digitalid-auth-panel strong {
    color: var(--navy);
    font-size: 1rem;
}

.digitalid-auth-panel span,
.digitalid-auth-panel small {
    color: var(--muted);
    font-size: 0.82rem;
    line-height: 1.45;
}

.digitalid-otp-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 7px;
}

.digitalid-otp-row i {
    min-height: 42px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #f5f8ff;
    border: 1px solid #dbe6fb;
    color: #042b8d;
    font-style: normal;
    font-weight: 900;
    font-size: 1.15rem;
}

.digitalid-face-frame {
    height: 112px;
    border-radius: 22px;
    border: 2px solid #2457f5;
    background:
        linear-gradient(90deg, #2457f5 18px, transparent 18px) 18px 20px / 58px 2px no-repeat,
        linear-gradient(#2457f5 18px, transparent 18px) 18px 20px / 2px 58px no-repeat,
        linear-gradient(270deg, #2457f5 18px, transparent 18px) right 18px top 20px / 58px 2px no-repeat,
        linear-gradient(#2457f5 18px, transparent 18px) right 18px top 20px / 2px 58px no-repeat,
        radial-gradient(circle at center, rgba(36, 87, 245, 0.14), transparent 45%);
    display: grid;
    place-items: center;
}

.digitalid-face-frame b {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 3px solid #2457f5;
    position: relative;
}

.digitalid-face-frame b::before,
.digitalid-face-frame b::after {
    content: "";
    position: absolute;
    top: 19px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #2457f5;
}

.digitalid-face-frame b::before { left: 15px; }
.digitalid-face-frame b::after { right: 15px; }

.digitalid-face-frame em {
    display: none;
}

.digitalid-passkey-btn {
    min-height: 46px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #102e83, #2457f5);
    color: #fff;
    font-weight: 900;
    cursor: pointer;
}

.digitalid-passkey-btn:disabled {
    opacity: 0.58;
    cursor: not-allowed;
}

.digitalid-body.is-desktop-auth .mobile-auth-only,
.digitalid-body.is-desktop-auth [data-digitalid-panel="face"],
.digitalid-body.is-desktop-auth [data-digitalid-panel="passkey"] {
    display: none !important;
}

.digitalid-body.is-desktop-auth .digitalid-method-tabs {
    grid-template-columns: 1fr;
}

.qr-frame {
    width: 302px;
    height: 302px;
    margin: 0 auto 18px;
    padding: 18px;
    border-radius: 12px;
    background: #d9d9d9;
    box-shadow: 0 16px 34px rgba(18, 33, 63, 0.1);
}

.qr-grid {
    position: relative;
    width: 100%;
    height: 100%;
    background:
        linear-gradient(90deg, #111 10px, transparent 10px) 0 0 / 26px 26px,
        linear-gradient(#111 10px, transparent 10px) 0 0 / 26px 26px,
        linear-gradient(90deg, transparent 13px, #111 13px 18px, transparent 18px) 0 0 / 26px 26px,
        linear-gradient(transparent 13px, #111 13px 18px, transparent 18px) 0 0 / 26px 26px,
        #fff;
    overflow: hidden;
}

.qr-corner {
    position: absolute;
    width: 54px;
    height: 54px;
    border: 6px solid #111;
    background: #fff;
}

.qr-corner::after {
    content: "";
    position: absolute;
    inset: 10px;
    background: #111;
}

.qr-corner.tl { top: 10px; left: 10px; }
.qr-corner.tr { top: 10px; right: 10px; }
.qr-corner.bl { bottom: 10px; left: 10px; }
.qr-corner.br { bottom: 10px; right: 10px; }

.digitalid-cancel {
    width: 240px;
    max-width: 100%;
    padding: 14px 20px;
    border: 0;
    border-radius: 999px;
    background: #ff1d16;
    color: #fff;
    font-size: 1.2rem;
    cursor: pointer;
}

.digitalid-caption {
    display: grid;
    gap: 8px;
    margin-top: 26px;
    font-size: 1.2rem;
}

.digitalid-shape,
.digitalid-circle {
    position: absolute;
    z-index: 1;
}

.digitalid-shape {
    width: 180px;
    height: 360px;
    border-radius: 110px;
    border: 24px solid #f4ab11;
    background: #fff;
}

.digitalid-shape::before {
    content: "";
    position: absolute;
    inset: 22px;
    border-radius: 90px;
    background: linear-gradient(180deg, #e40046 0%, #e40046 100%);
}

.shape-left-top {
    top: -70px;
    left: -34px;
    transform: rotate(20deg);
}

.shape-left-bottom {
    bottom: -120px;
    left: -30px;
    transform: rotate(24deg);
}

.shape-left-bottom::before {
    background: linear-gradient(180deg, #1aa4de 0%, #1aa4de 100%);
}

.shape-right-top {
    top: -94px;
    right: 40px;
    width: 160px;
    height: 290px;
    border-color: #1b4b99;
    transform: rotate(-25deg);
}

.shape-right-top::before {
    background: #e40046;
}

.shape-right-bottom {
    right: 34px;
    bottom: -168px;
    width: 110px;
    height: 240px;
    border-width: 18px;
    transform: rotate(-68deg);
}

.shape-right-bottom::before {
    inset: 16px;
}

.digitalid-circle {
    border-radius: 50%;
}

.circle-left {
    left: 92px;
    top: 170px;
    width: 170px;
    height: 170px;
    background: #1aa4de;
}

.circle-right {
    right: 86px;
    bottom: 112px;
    width: 152px;
    height: 152px;
    border: 24px solid #1aa4de;
    background: transparent;
}

.app-shell {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr);
    height: 100vh;
    overflow: hidden;
}
.sidebar {
    background: linear-gradient(180deg, #081d50 0%, #07163d 100%);
    color: #fff;
    padding: 14px;
    transition: width 0.25s ease;
    overflow: hidden;
}
.sidebar-inner {
    display: flex;
    flex-direction: column;
    gap: 14px;
    height: 100%;
    overflow-y: hidden;
}
.brand-block {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 6px 10px;
}
.brand-logo {
    width: 72px;
}
.brand-copy h1 { margin: 0; font-size: 1.35rem; line-height: 1.1; }
.brand-copy p {
    margin: 4px 0 0;
    font-size: 0.72rem;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.78);
}
.side-nav { display: grid; gap: 8px; }
.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    color: rgba(255, 255, 255, 0.92);
}
.nav-icon {
    min-width: 34px;
    height: 34px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: rgba(255, 255, 255, 0.1);
}
.nav-icon-svg,
.service-icon-svg {
    display: inline-flex;
    width: 18px;
    height: 18px;
}
.nav-icon-svg svg,
.service-icon-svg svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.nav-item.active, .nav-item:hover {
    background: linear-gradient(135deg, rgba(65, 118, 255, 0.95) 0%, rgba(34, 76, 197, 0.95) 100%);
}
.language-card, .privacy-card, .ethics-card {
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 18px;
    padding: 14px;
    background: rgba(255, 255, 255, 0.05);
}
.language-card {
    margin-top: auto;
}
.lang-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-top: 10px;
}
.lang-btn {
    padding: 9px 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}
.lang-btn.active { background: #2f66ff; }
.privacy-card p, .ethics-card p {
    margin: 0;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.82);
}

.app-main {
    min-width: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    height: 100vh;
    overflow: hidden;
}
.topbar {
    z-index: 30;
    margin: 0;
    padding: 16px 22px;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
}
.topbar-main, .topbar-actions, .topbar-user {
    display: flex;
    align-items: center;
    gap: 14px;
}
.topbar-main { min-width: 0; }
.topbar-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
}
.topbar-mobile-logo {
    display: none;
    width: 38px;
    height: 38px;
    object-fit: contain;
    flex-shrink: 0;
}
.topbar-brand { min-width: 0; }
.topbar-kicker {
    display: inline-block;
    margin-bottom: 4px;
    color: var(--blue);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}
.topbar-brand strong {
    display: block;
    font-size: 1.3rem;
    line-height: 1.2;
}
.topbar-brand p, .topbar-user p {
    margin: 4px 0 0;
    color: var(--muted);
}
.sidebar-toggle {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: linear-gradient(135deg, #081d50 0%, #133a98 100%);
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    box-shadow: var(--shadow);
}
.sidebar-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: #fff;
}
.user-chip {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #0e2c77 0%, #3169ff 100%);
    color: #fff;
    font-weight: 800;
}
.topbar-logout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 18px;
    border-radius: 14px;
    background: linear-gradient(135deg, #081d50 0%, #133a98 100%);
    color: #fff;
    font-weight: 700;
    box-shadow: var(--shadow);
}
.topbar-logout-mobile {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 14px;
    align-items: center;
    justify-content: center;
    border: 1px solid #f1c8cf;
    background: #fff7f8;
    color: #c23b52;
    flex-shrink: 0;
}
.topbar-logout-mobile-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
}
.topbar-logout-mobile-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.topbar-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: #f7faff;
    color: var(--navy);
    font-size: 0.92rem;
    font-weight: 600;
}
.header-language-switch {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px;
    border-radius: 999px;
    border: 1px solid #d9e3f5;
    background: #f7faff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}
.header-lang-btn {
    min-width: 48px;
    padding: 8px 14px;
    border-radius: 999px;
    color: #5a6f97;
    font-size: 0.86rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-align: center;
    transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}
.header-lang-btn:hover {
    color: var(--navy);
    transform: translateY(-1px);
}
.header-lang-btn.active {
    background: linear-gradient(135deg, #0d2b72 0%, #2f66ff 100%);
    color: #fff;
    box-shadow: 0 10px 22px rgba(13, 43, 114, 0.18);
}
.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--green);
}

.main-content {
    padding: 22px 18px 18px;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(360px, 0.95fr);
    gap: 18px;
    align-content: start;
    min-height: 0;
    overflow-y: auto;
}
.chat-layout {
    grid-template-columns: 1fr;
    align-items: start;
}
.main-content.single-column { grid-template-columns: 1fr; }
.chat-page-fullscreen {
    padding-top: 14px;
    padding-bottom: 14px;
}
.demo-banner {
    grid-column: 1 / -1;
    padding: 14px 18px;
    border-radius: 16px;
    background: #fff6df;
    border: 1px solid #f4d88f;
    color: #7b5b00;
    font-weight: 600;
}
.hero-panel, .service-side-card, .content-card, .chat-shell, .chat-history-panel { padding: 24px; }
.chat-shell,
.chat-history-panel {
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
}
.chat-shell {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 190px);
    min-width: 0;
}
.chat-shell-full {
    min-height: calc(100vh - 158px);
    max-height: calc(100vh - 158px);
    overflow: hidden;
}
.chat-history-panel {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 190px);
}
.chat-shell-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 18px;
}
.chat-shell-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}
.chat-shell-copy {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.chat-shell-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
}
.chat-shell-brand h2 {
    margin: 0;
    font-size: 1.7rem;
    line-height: 1.08;
}
.chat-shell-brand p {
    margin: 0;
    color: var(--muted);
}
.chat-new-session-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    text-decoration: none;
}
.chat-shell-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}
.agency-summary-pill {
    display: none;
}
.agency-pill {
    display: inline-flex;
}
.chat-conversation {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 16px;
    min-height: 0;
    flex: 1;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 6px 6px 12px 0;
    scrollbar-gutter: stable;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
}

/* Spacer — push mesej ke bawah bila belum penuh, hilang bila dah overflow */
.chat-spacer {
    flex: 1;
    min-height: 0;
}
.chat-conversation::-webkit-scrollbar {
    width: 10px;
}
.chat-conversation::-webkit-scrollbar-track {
    background: rgba(223, 233, 255, 0.55);
    border-radius: 999px;
}
.chat-conversation::-webkit-scrollbar-thumb {
    background: rgba(19, 58, 152, 0.32);
    border-radius: 999px;
}
.chat-conversation::-webkit-scrollbar-thumb:hover {
    background: rgba(19, 58, 152, 0.48);
}
.chat-empty-state {
    flex: 1 0 auto;
    min-height: 0;
    display: grid;
    place-items: center;
    text-align: center;
    gap: 12px;
    padding: 28px;
    color: var(--muted);
}
.has-chat-started .chat-conversation {
    padding-top: 12px;
}
.chat-empty-state strong {
    font-size: 1.15rem;
    color: var(--navy);
}
.chat-empty-state p {
    margin: 0;
    max-width: 420px;
    line-height: 1.7;
}
.chat-empty-icon {
    width: 84px;
    height: 84px;
    border-radius: 26px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #eef3ff 0%, #dfe9ff 100%);
    color: var(--blue);
}
.empty-chat-icon {
    display: inline-flex;
    width: 34px;
    height: 34px;
}
.empty-chat-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.chat-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
.chat-row.user {
    justify-content: flex-end;
}
.chat-row.assistant {
    justify-content: flex-start;
}
.chat-message-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: min(720px, 78%);
}
.hero-top, .panel-heading.split, .history-toolbar, .feedback-row, .chat-input-row, .doc-layout, .dashboard-grid, .stats-grid, .top-status-group {
    display: flex;
    gap: 14px;
}
.hero-top, .panel-heading.split { justify-content: space-between; align-items: flex-start; }
.hero-brand {
    display: flex;
    gap: 16px;
    align-items: center;
}
.hero-brand h2, .dashboard-header h2 { margin: 0 0 8px; font-size: 2rem; }
.hero-brand p, .panel-heading p, .disclaimer-text, .notification-item p, .more-card p {
    margin: 0;
    color: var(--muted);
}
.quick-actions {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
    margin: 24px 0 20px;
}
.quick-actions button {
    border: 1px solid var(--border);
    background: #f9fbff;
    border-radius: 14px;
    padding: 12px 14px;
    text-align: center;
    color: var(--text);
    font-size: 0.93rem;
    font-weight: 600;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.quick-actions button:hover {
    background: #eef4ff;
    border-color: #c8d8fb;
    transform: translateY(-1px);
}
.chat-bubble {
    border-radius: 18px;
    padding: 14px 16px;
    position: relative;
    animation: chatPopIn 0.24s ease-out;
}
.chat-bubble.user {
    background: linear-gradient(135deg, #dce7ff 0%, #cddcff 100%);
    border-bottom-right-radius: 6px;
}
.chat-bubble.assistant {
    background: #fff;
    border: 1px solid var(--border);
    border-bottom-left-radius: 6px;
}
.chat-bubble.user::after,
.chat-bubble.assistant::after {
    content: "";
    position: absolute;
    top: 15px;
    width: 14px;
    height: 14px;
    transform: rotate(45deg);
}
.chat-bubble.user::after {
    right: -6px;
    background: #cddcff;
}
.chat-bubble.assistant::after {
    left: -8px;
    background: #fff;
    border-left: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.chat-bubble p { margin: 0; line-height: 1.6; }
.chat-reply-text.is-streaming::after {
    content: "";
    display: inline-block;
    width: 2px;
    height: 1em;
    margin-left: 3px;
    vertical-align: -0.12em;
    background: rgba(24, 49, 110, 0.72);
    animation: chatCaretBlink 0.85s steps(1) infinite;
}
.chat-meta {
    color: var(--muted);
    font-size: 0.82rem;
}
.chat-row.user .chat-meta {
    text-align: right;
}
.chat-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    overflow: hidden;
}
.user-avatar {
    background: linear-gradient(135deg, #1b4bc6 0%, #356eff 100%);
    color: #fff;
    font-weight: 800;
}
.ai-avatar {
    background: #fff;
    border: 1px solid var(--border);
}
.ai-avatar img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}
.typing-bubble {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 82px;
    min-height: 56px;
}
.typing-preview-bubble {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 74px;
    min-height: 48px;
    padding: 12px 14px;
}
.typing-preview-row.is-user-activity .typing-preview-bubble {
    animation: userComposerPulse 0.9s ease-in-out infinite;
}
@keyframes userComposerPulse {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}
.typing-bubble::after {
    left: -8px;
    background: #fff;
    border-left: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.typing-preview-bubble::after {
    right: -6px;
    left: auto;
    background: #cddcff;
    border: 0;
}
.typing-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #9fb0d9;
    animation: typingPulse 1.1s infinite ease-in-out;
}
.typing-dot:nth-child(2) {
    animation-delay: 0.15s;
}
.typing-dot:nth-child(3) {
    animation-delay: 0.3s;
}
.typing-preview-bubble {
    transition: opacity 0.26s ease, transform 0.26s ease;
}
.typing-preview-row .typing-preview-bubble .typing-dot {
    animation: none;
}
.typing-preview-row.is-user-activity .typing-preview-bubble .typing-dot {
    animation: typingPulse 1.1s infinite ease-in-out;
}
.typing-preview-row.is-user-activity-fading .typing-preview-bubble {
    opacity: 0;
    transform: translateY(2px) scale(0.98);
    pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
    .typing-preview-row.is-user-activity .typing-preview-bubble,
    .typing-preview-row.is-user-activity .typing-preview-bubble .typing-dot {
        animation: none;
    }
}
.source-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.source-list strong {
    width: 100%;
    font-size: 0.9rem;
    color: var(--muted);
}
.source-list a {
    color: #2c57da;
    font-size: 0.84rem;
    padding: 6px 10px;
    border-radius: 999px;
    background: #f4f7ff;
    text-decoration: none;
}
.official-source-links a {
    background: #eef6ff;
    border: 1px solid #d8e6ff;
}
.document-citation-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}
.document-citation-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    color: var(--navy);
    font-size: 0.86rem;
    font-weight: 850;
}
.document-citation-heading small {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #eef6ff;
    color: #2456d6;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}
.document-citation-card {
    position: relative;
    overflow: hidden;
    border: 1px solid #dbe7ff;
    border-radius: 18px;
    padding: 12px 13px;
    background:
        linear-gradient(135deg, rgba(239, 246, 255, 0.95), rgba(255, 255, 255, 0.98)),
        radial-gradient(circle at top right, rgba(37, 99, 235, 0.1), transparent 42%);
    box-shadow: 0 12px 28px rgba(15, 42, 100, 0.07);
}
.document-citation-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: linear-gradient(180deg, #2f6bff, #16b887);
}
.document-citation-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
}
.document-citation-title {
    color: #0b2559;
    font-size: 0.88rem;
    font-weight: 850;
    line-height: 1.35;
}
.document-citation-badge {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 4px 8px;
    background: #123684;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 850;
    letter-spacing: 0.02em;
}
.document-citation-meta {
    margin-top: 5px;
    color: #6b7a99;
    font-size: 0.74rem;
    font-weight: 700;
}
.document-citation-card p {
    margin: 9px 0 0;
    color: #30415f;
    font-size: 0.84rem;
    line-height: 1.55;
    overflow-wrap: anywhere;
}

/* AI Learning Studio: scoped admin-only governance workspace. */
.ai-learning-studio { gap: 18px; }
.learning-hero { display:flex; align-items:center; justify-content:space-between; gap:20px; }
.learning-hero h2 { display:flex; align-items:center; gap:10px; }
.learning-beta, .codex-mode-pill, .learning-pending { display:inline-flex; align-items:center; border-radius:999px; padding:5px 9px; font-size:.68rem; letter-spacing:.08em; text-transform:uppercase; background:#eaf1ff; color:#2457c5; }
.learning-connection { display:flex; align-items:center; gap:8px; border:1px solid #cfe0ff; border-radius:999px; padding:10px 14px; color:#2457c5; font-weight:700; font-size:.82rem; white-space:nowrap; }
.learning-connection.is-pending { color:#8a5b00; background:#fff8e8; border-color:#f1d28e; }
.learning-status-dot { width:9px; height:9px; border-radius:50%; background:#d39b20; box-shadow:0 0 0 4px rgba(211,155,32,.12); }
.learning-connection.is-connected .learning-status-dot { background:#2d9b69; box-shadow:0 0 0 4px rgba(45,155,105,.12); }
.learning-flash { padding:12px 16px; border-radius:12px; background:#eef5ff; color:#173b8f; border:1px solid #d5e4ff; }
.learning-flash.success { background:#edf9f2; color:#187044; border-color:#c7ebd5; }.learning-flash.failed { background:#fff1f1; color:#9d2e2e; border-color:#f1cccc; }
.learning-metrics { display:grid; grid-template-columns:repeat(4,1fr); gap:14px; }.learning-metrics article,.learning-side-card,.learning-section-card,.learning-placeholder { background:#fff; border:1px solid #e3eaf5; border-radius:16px; padding:18px; box-shadow:0 5px 18px rgba(20,55,115,.04); }.learning-metrics span,.learning-metrics small { display:block; color:#65748d; font-size:.78rem; }.learning-metrics strong { display:block; margin:8px 0 3px; font-size:1.8rem; color:#173b8f; }
.learning-tabs { display:flex; gap:8px; padding:5px; border-bottom:1px solid #dce6f5; overflow:auto; }.learning-tabs button { border:0; background:transparent; color:#60708b; padding:11px 14px; border-radius:10px; font-weight:700; white-space:nowrap; cursor:pointer; }.learning-tabs button.is-active { color:#173b8f; background:#eaf1ff; box-shadow:inset 0 -2px #2457c5; }.learning-tabs span { font-weight:500; color:#8190a8; }
.learning-tab-panel { display:none; }.learning-tab-panel.is-active { display:block; }
.learning-console-layout { display:grid; grid-template-columns:minmax(0,1.75fr) minmax(280px,1fr); gap:18px; }.codex-console-panel { min-height:520px; display:flex; flex-direction:column; overflow:hidden; background:linear-gradient(145deg,#071d4a,#082b6f); border:1px solid rgba(76,139,255,.32); border-radius:18px; box-shadow:0 12px 30px rgba(6,43,111,.16); color:#fff; }.codex-console-head { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:18px 20px; border-bottom:1px solid rgba(255,255,255,.14); }.codex-console-head strong,.codex-console-head small { display:block; }.codex-console-head small { margin-top:5px; color:rgba(255,255,255,.65); font-family:ui-monospace,SFMono-Regular,Consolas,monospace; font-size:.75rem; }.codex-console-head .codex-mode-pill { color:#fff; background:rgba(255,255,255,.12); border:1px solid rgba(255,255,255,.22); }.codex-transcript { flex:1; padding:22px; font-family:ui-monospace,SFMono-Regular,Consolas,monospace; overflow:auto; }.codex-line { margin-bottom:20px; }.codex-line b { color:#8fc0ff; font-size:.72rem; letter-spacing:.1em; }.codex-line p { margin:7px 0 0; color:rgba(255,255,255,.9); white-space:pre-wrap; }.codex-prompt-form { padding:16px 20px 20px; background:rgba(0,12,43,.28); }.codex-prompt-form textarea { width:100%; resize:vertical; background:rgba(3,20,62,.7); border:1px solid rgba(255,255,255,.32); border-radius:11px; padding:12px; color:#fff; font:inherit; }.codex-prompt-form textarea::placeholder { color:rgba(255,255,255,.58); }.codex-prompt-form textarea:focus { outline:0; border-color:#8fc0ff; box-shadow:0 0 0 3px rgba(94,155,255,.16); }.codex-prompt-form > div { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:10px; }.codex-prompt-form small { color:rgba(255,255,255,.62); }
.learning-side-stack { display:grid; gap:14px; align-content:start; }.learning-side-card h3,.learning-section-card h3 { margin:0 0 8px; color:#173b8f; }.learning-side-card h3 { font-size:1rem; }.learning-control { width:100%; display:block; text-align:left; border:1px solid #dce6f5; border-radius:11px; background:#f8fbff; padding:11px 12px; margin-top:8px; color:#173b8f; cursor:pointer; }.learning-control:hover { background:#edf4ff; }.learning-control span,.learning-control small { display:block; }.learning-control small { margin-top:3px; color:#71809a; }.learning-control.is-disabled,.learning-control:disabled { opacity:.55; cursor:not-allowed; }.learning-side-card dl { display:grid; grid-template-columns:1fr auto; gap:9px 12px; margin:12px 0 16px; }.learning-side-card dt { color:#74839b; }.learning-side-card dd { margin:0; font-weight:700; color:#173b8f; text-align:right; }.learning-safety-list { list-style:none; padding:0; margin:0; display:grid; gap:9px; }.learning-safety-list li { display:flex; justify-content:space-between; gap:10px; color:#60708b; font-size:.82rem; }.learning-safety-list b { color:#237b56; font-size:.68rem; }
.learning-mode-row { display:flex; flex-wrap:wrap; gap:10px; margin-top:16px; }.learning-mode-row label { display:grid; grid-template-columns:auto 1fr; column-gap:8px; align-items:center; padding:12px 14px; border:1px solid #dce6f5; border-radius:12px; background:#fff; color:#173b8f; cursor:pointer; }.learning-mode-row label small { grid-column:2; color:#71809a; }.learning-mode-row label.is-disabled { opacity:.55; cursor:not-allowed; }.learning-bottom-grid,.learning-two-column { display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-top:18px; }.learning-section-heading { display:flex; justify-content:space-between; gap:15px; align-items:start; }.learning-section-heading p,.learning-section-card > p { color:#71809a; margin:0 0 14px; }.learning-section-heading h3 span { font-size:.7rem; color:#a16b00; font-weight:600; }.learning-pending { background:#fff7e6; color:#93630b; border:1px solid #f0d899; }.proposal-grid { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin:18px 0 0; }.proposal-grid dt { color:#71809a; }.proposal-grid dd { margin:0; color:#173b8f; font-weight:700; }.learning-session-list,.learning-history-list,.learning-audit-list { display:grid; gap:10px; max-height:260px; overflow:auto; }.learning-session-list > div,.learning-history-list > div,.learning-audit-list > div { padding:11px 0; border-bottom:1px solid #edf1f7; }.learning-session-list strong,.learning-session-list span,.learning-session-list small,.learning-history-list strong,.learning-history-list span,.learning-history-list small,.learning-audit-list strong,.learning-audit-list span { display:block; }.learning-session-list span,.learning-history-list span,.learning-audit-list span { color:#71809a; font-size:.75rem; margin-top:3px; }.learning-session-list small,.learning-history-list small { color:#4e607b; margin-top:5px; }.learning-empty { color:#71809a; }.learning-placeholder { text-align:center; padding:50px 20px; }.learning-placeholder > span { color:#2457c5; font-weight:800; letter-spacing:.12em; }.learning-placeholder h3 { color:#173b8f; }.learning-placeholder p { color:#71809a; }.learning-form label { display:block; color:#52627b; font-weight:700; font-size:.84rem; }.learning-form textarea,.learning-form input,.learning-form select { width:100%; margin-top:6px; border:1px solid #dce6f5; border-radius:10px; padding:10px 11px; font:inherit; color:#263653; background:#fff; }.learning-form textarea:focus,.learning-form input:focus,.learning-form select:focus { outline:0; border-color:#5d91e8; box-shadow:0 0 0 3px rgba(74,128,224,.12); }.learning-form-grid { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin:14px 0; }
@media (max-width: 900px) { .learning-console-layout,.learning-bottom-grid,.learning-two-column { grid-template-columns:1fr; }.learning-metrics { grid-template-columns:repeat(2,1fr); } }
@media (max-width: 600px) { .learning-hero { align-items:flex-start; flex-direction:column; }.learning-metrics { grid-template-columns:1fr 1fr; gap:9px; }.learning-metrics article { padding:13px; }.learning-metrics strong { font-size:1.4rem; }.learning-tabs { margin-inline:-4px; }.codex-console-panel { min-height:580px; }.learning-form-grid { grid-template-columns:1fr; }.learning-mode-row label { width:100%; }.proposal-grid { grid-template-columns:1fr; } }

.document-citation-evidence-label {
    display: block;
    margin-top: 10px;
    color: #173d83;
    font-size: 0.75rem;
    font-weight: 850;
}
.document-citation-expand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    margin-top: 10px;
    padding: 7px 11px;
    border: 1px solid #c9d9ff;
    border-radius: 999px;
    background: #f5f8ff;
    color: #2456d6;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 800;
    cursor: pointer;
}
.document-citation-expand:hover,
.document-citation-expand:focus-visible {
    background: #eaf1ff;
    border-color: #8eafff;
    outline: 2px solid rgba(36, 86, 214, 0.2);
    outline-offset: 2px;
}
.chat-action-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.chat-action-links strong {
    width: 100%;
    color: var(--muted);
    font-size: 0.9rem;
}
.chat-action-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 13px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), #123684);
    color: #fff;
    font-size: 0.84rem;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(20, 69, 180, 0.18);
}
.confidence-note, .notice-box {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: #f3f6fd;
    color: #36476e;
    line-height: 1.5;
    font-size: 0.9rem;
}
.feedback-row {
    align-items: center;
    margin: 10px 0 4px;
    flex-wrap: wrap;
    font-size: 0.9rem;
}
.feedback-row .ghost-btn {
    padding: 8px 14px;
    font-size: 0.88rem;
}
.rich-content {
    display: grid;
    gap: 12px;
    margin-top: 14px;
}
.rich-block {
    display: grid;
    gap: 10px;
}
.rich-block-title {
    color: var(--navy);
    font-size: 0.86rem;
    font-weight: 800;
}
.rich-stat-grid,
.rich-badge-list,
.rich-facts-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}
.rich-stat-card,
.rich-badge,
.rich-fact-item {
    border: 1px solid #dde7fb;
    border-radius: 16px;
    padding: 12px 14px;
    background: #f8fbff;
}
.rich-stat-card.tone-success,
.rich-badge.tone-success { background: #edf9f2; border-color: #cdeed8; }
.rich-stat-card.tone-danger,
.rich-badge.tone-danger { background: #fff2f3; border-color: #ffd8dc; }
.rich-stat-card.tone-warning,
.rich-badge.tone-warning { background: #fff8e8; border-color: #ffe6a8; }
.rich-stat-card.tone-info,
.rich-badge.tone-info { background: #eef6ff; border-color: #d6e6ff; }
.rich-stat-label,
.rich-badge-label,
.rich-fact-label {
    display: block;
    color: var(--muted);
    font-size: 0.76rem;
    margin-bottom: 4px;
}
.rich-stat-value,
.rich-badge-value,
.rich-fact-value {
    color: var(--navy);
    font-size: 1.12rem;
    font-weight: 800;
}
.rich-fact-value {
    font-size: 0.92rem;
    overflow-wrap: anywhere;
}
.rich-mydigitalid-profile-change-card {
    border: 1px solid #d9e4fb;
    border-radius: 18px;
    padding: 16px;
    background: linear-gradient(145deg, #f8fbff, #ffffff);
}
.rich-mydigitalid-message {
    margin: 0;
    color: #36476e;
    line-height: 1.55;
}
.rich-mydigitalid-fields {
    display: grid;
    gap: 8px;
}
.rich-mydigitalid-field {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 12px;
    border: 1px solid #e3eaf8;
    border-radius: 12px;
    background: #fff;
}
.rich-mydigitalid-field span,
.rich-mydigitalid-secondary {
    color: var(--muted);
    font-size: 0.78rem;
}
.rich-mydigitalid-field strong {
    color: var(--navy);
    font-size: 0.88rem;
    overflow-wrap: anywhere;
    text-align: right;
}
.rich-mydigitalid-action {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--navy);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}
.rich-mydigitalid-action:hover { filter: brightness(1.08); }
.rich-mydigitalid-secondary { line-height: 1.45; }
.rich-protected-record-card {
    border: 1px solid #d9e4fb;
    border-radius: 18px;
    padding: 16px;
    background: linear-gradient(145deg, #f8fbff, #ffffff);
}
.rich-protected-record-type,
.rich-protected-record-note {
    color: var(--muted);
    line-height: 1.45;
}
.rich-protected-record-message { margin: 0; color: #36476e; line-height: 1.55; }
.rich-protected-record-action {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--navy);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}
.rich-protected-record-action:hover { filter: brightness(1.08); }
.rich-agency-booking-guidance-card {
    border: 1px solid #d9e4fb;
    border-radius: 18px;
    padding: 16px;
    background: linear-gradient(145deg, #f8fbff, #ffffff);
}
.rich-booking-request-type,
.rich-booking-note {
    color: var(--muted);
    line-height: 1.45;
}
.rich-booking-message {
    margin: 0;
    color: #36476e;
    line-height: 1.55;
}
.rich-booking-facts {
    display: grid;
    gap: 8px;
}
.rich-booking-fact {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 12px;
    border: 1px solid #e3eaf8;
    border-radius: 12px;
    background: #fff;
}
.rich-booking-fact span,
.rich-booking-fact strong {
    font-size: 0.82rem;
}
.rich-booking-fact span { color: var(--muted); }
.rich-booking-fact strong {
    color: var(--navy);
    text-align: right;
    overflow-wrap: anywhere;
}
.rich-booking-action {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 12px;
    background: var(--navy);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}
.rich-booking-action:hover { filter: brightness(1.08); }
.rich-booking-secondary-action {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 42px;
    padding: 10px 14px;
    border: 1px solid #dbe6fb;
    border-radius: 12px;
    background: #fff;
    color: var(--navy);
    font-weight: 700;
    cursor: pointer;
}
.rich-booking-secondary-action:hover {
    background: #eef4ff;
    border-color: #bfd1f5;
}
.rich-booking-note { line-height: 1.45; }
.rich-agency-report-guidance-card {
    border: 1px solid #d9e4fb;
    border-radius: 18px;
    padding: 16px;
    background: linear-gradient(145deg, #f8fbff, #ffffff);
}
.rich-report-request-type,
.rich-report-note {
    color: var(--muted);
    line-height: 1.45;
}
.rich-report-message {
    margin: 0;
    color: #36476e;
    line-height: 1.55;
}
.rich-report-facts {
    display: grid;
    gap: 8px;
}
.rich-report-fact {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 12px;
    border: 1px solid #e3eaf8;
    border-radius: 12px;
    background: #fff;
}
.rich-report-fact span,
.rich-report-fact strong {
    font-size: 0.82rem;
}
.rich-report-fact span { color: var(--muted); }
.rich-report-fact strong {
    color: var(--navy);
    text-align: right;
    overflow-wrap: anywhere;
}
.rich-report-action,
.rich-report-secondary-action {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    min-height: 42px;
    padding: 10px 14px;
    border-radius: 12px;
    font-weight: 700;
    text-decoration: none;
}
.rich-report-action {
    background: var(--navy);
    color: #fff;
}
.rich-report-secondary-action {
    border: 1px solid #dbe6fb;
    background: #fff;
    color: var(--navy);
    cursor: pointer;
}
.rich-report-action:hover { filter: brightness(1.08); }
.rich-report-secondary-action:hover {
    background: #eef4ff;
    border-color: #bfd1f5;
}
.rich-report-note { line-height: 1.45; }

/* User complaint tracking */
.user-complaints-page {
    display: grid;
    gap: 18px;
}

.complaints-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border-radius: 22px;
    padding: 24px;
    color: #fff;
    background: linear-gradient(135deg, #08245f 0%, #2458f5 100%);
    box-shadow: 0 18px 42px rgba(17, 45, 110, 0.12);
}

.complaints-hero small {
    color: #bed2ff;
    font-size: 0.75rem;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.complaints-hero h2 {
    margin: 6px 0;
    color: #fff;
    font-size: clamp(1.55rem, 2.2vw, 2rem);
    line-height: 1.15;
}

.complaints-hero p {
    max-width: 760px;
    margin: 0;
    color: #dbe8ff;
}

.complaints-hero .primary-btn {
    flex: 0 0 auto;
    background: #fff;
    color: #123a97;
    box-shadow: 0 12px 24px rgba(4, 18, 58, 0.18);
}

.complaints-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.complaint-stat-card {
    display: grid;
    gap: 8px;
    min-height: 130px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(17, 45, 110, 0.06);
}

.complaint-stat-card span {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 14px;
    color: var(--blue);
    background: #eef4ff;
}

.complaint-stat-card svg {
    width: 20px;
    height: 20px;
}

.complaint-stat-card small {
    color: var(--muted);
    font-weight: 800;
}

.complaint-stat-card strong {
    color: var(--navy);
    font-size: 1.85rem;
    line-height: 1;
}

.complaint-stat-card.tone-orange span {
    color: #b66a00;
    background: #fff4dc;
}

.complaint-stat-card.tone-purple span {
    color: #6d28d9;
    background: #f2ecff;
}

.complaint-stat-card.tone-green span {
    color: #10984d;
    background: #eaf9f0;
}

.complaints-shell,
.complaints-toolbar {
    display: grid;
    gap: 16px;
}

.complaints-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 370px;
    gap: 16px;
    align-items: start;
}

.complaints-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(17, 45, 110, 0.06);
}

.complaints-data-table {
    width: 100%;
    min-width: 940px;
    border-collapse: collapse;
}

.complaints-data-table th,
.complaints-data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #eef2f9;
    color: var(--navy);
    text-align: left;
    vertical-align: top;
}

.complaints-data-table th {
    color: #66738f;
    background: #f7faff;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.complaints-data-table tr.is-selected {
    background: #f4f8ff;
}

.complaints-data-table tr:last-child td {
    border-bottom: 0;
}

.complaint-title-cell {
    display: grid;
    gap: 4px;
}

.complaint-title-cell strong {
    color: var(--navy);
}

.complaint-title-cell small {
    color: var(--muted);
    line-height: 1.4;
}

.complaint-status-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 0.78rem;
    font-weight: 900;
    white-space: nowrap;
}

.complaint-status-pill.tone-success {
    color: #10984d;
    background: #eaf9f0;
}

.complaint-status-pill.tone-warning {
    color: #b66a00;
    background: #fff4dc;
}

.complaint-status-pill.tone-info {
    color: #2458f5;
    background: #eaf0ff;
}

.complaint-status-pill.tone-neutral {
    color: #44516d;
    background: #f1f4fa;
}
.complaint-resolution-rating-card {
    border-color: #cfe0ff;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}
.complaint-rating-popup {
    display: grid;
    gap: 14px;
    text-align: left;
}
.complaint-rating-popup p {
    margin: 0;
    color: #334155;
    font-size: .94rem;
    line-height: 1.5;
}
.complaint-rating-stars {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 4px 0;
}
.complaint-rating-star {
    border: 0;
    background: transparent;
    color: #cbd5e1;
    font-size: 2.15rem;
    line-height: 1;
    cursor: pointer;
    transition: color .16s ease, transform .16s ease;
}
.complaint-rating-star:hover,
.complaint-rating-star:focus,
.complaint-rating-star.is-active {
    color: #f59e0b;
    transform: translateY(-1px);
}
.complaint-rating-comment {
    width: 100%;
    min-height: 86px;
    border: 1px solid #dbe6fb;
    border-radius: 12px;
    padding: 11px 12px;
    font: inherit;
    resize: vertical;
}
.complaint-resolution-swal {
    border-radius: 18px;
}
.complaint-resolution-swal-title {
    color: #071c4d;
    font-size: 1.35rem;
}

.complaint-detail-panel {
    position: sticky;
    top: 92px;
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(17, 45, 110, 0.06);
}

.complaint-detail-head {
    display: grid;
    gap: 6px;
}

.complaint-detail-head small {
    color: var(--blue);
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.complaint-detail-head h3 {
    margin: 0;
    color: var(--navy);
    font-size: 1.12rem;
}

.complaint-detail-summary {
    margin: 0;
    color: var(--text);
    line-height: 1.55;
}

.complaint-detail-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.complaint-detail-meta span {
    padding: 10px;
    border: 1px solid #e6eefc;
    border-radius: 14px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.complaint-detail-meta strong {
    display: block;
    margin-top: 4px;
    color: var(--navy);
    font-size: 0.86rem;
}

.complaint-next-action {
    padding: 12px;
    border-left: 4px solid var(--blue);
    border-radius: 14px;
    background: #f4f8ff;
}

.complaint-next-action strong {
    color: var(--navy);
}

.complaint-next-action p {
    margin: 6px 0 0;
    color: var(--text);
    line-height: 1.5;
}

.complaint-timeline {
    display: grid;
    gap: 10px;
}

.complaint-timeline h4 {
    margin: 0;
    color: var(--navy);
}

.complaint-timeline-item {
    display: grid;
    grid-template-columns: 18px 1fr;
    gap: 10px;
}

.complaint-timeline-item i {
    width: 11px;
    height: 11px;
    margin-top: 5px;
    border-radius: 999px;
    background: #2458f5;
    box-shadow: 0 0 0 5px #eaf0ff;
}

.complaint-timeline-item strong {
    color: var(--navy);
}

.complaint-timeline-item small {
    display: block;
    margin: 2px 0 4px;
    color: var(--muted);
}

.complaint-timeline-item p {
    margin: 0;
    color: var(--text);
    line-height: 1.45;
}

.complaint-empty-detail {
    padding: 24px;
    border: 1px dashed #cbd8ef;
    border-radius: 16px;
    color: var(--muted);
    background: #f8fbff;
    text-align: center;
}

.complaint-empty-detail strong {
    display: block;
    margin-bottom: 6px;
    color: var(--navy);
}

.complaint-empty-detail p {
    margin: 0;
}

.complaint-detail-page {
    padding-bottom: 28px;
}

.complaint-detail-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 22px;
    background: linear-gradient(135deg, #ffffff 0%, #f5f9ff 100%);
    box-shadow: 0 14px 32px rgba(17, 45, 110, 0.08);
}

.complaint-back-link {
    display: inline-flex;
    margin-bottom: 12px;
    color: var(--blue);
    font-size: 0.86rem;
    font-weight: 900;
    text-decoration: none;
}

.complaint-detail-hero small {
    color: var(--blue);
    font-weight: 900;
    letter-spacing: 0.08em;
}

.complaint-detail-hero h2 {
    margin: 6px 0;
    color: var(--navy);
    font-size: clamp(1.45rem, 2vw, 2rem);
}

.complaint-detail-hero p {
    margin: 0;
    color: var(--muted);
}

.complaint-detail-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 380px;
    gap: 16px;
    align-items: start;
}

.complaint-detail-main,
.complaint-detail-side {
    display: grid;
    gap: 16px;
}

.complaint-detail-side {
    position: sticky;
    top: 92px;
}

.complaint-detail-card {
    border-radius: 18px;
}

.complaint-readable-text {
    margin: 0;
    color: var(--text);
    font-size: 1rem;
    line-height: 1.7;
}

.complaint-full-timeline {
    display: grid;
    gap: 16px;
}

.complaint-notification-list {
    display: grid;
    gap: 10px;
}

.complaint-notification-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: start;
    padding: 12px;
    border: 1px solid #e6eefc;
    border-radius: 15px;
    background: #f8fbff;
}

.complaint-notification-item > span {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 12px;
    color: var(--blue);
    background: #eaf0ff;
}

.complaint-notification-item svg {
    width: 18px;
    height: 18px;
}

.complaint-notification-item strong {
    color: var(--navy);
}

.complaint-notification-item small {
    display: block;
    margin: 3px 0 6px;
    color: var(--muted);
}

.complaint-notification-item p {
    margin: 0;
    color: var(--text);
    line-height: 1.45;
}

.complaint-notification-item em {
    padding: 5px 8px;
    border-radius: 999px;
    color: #2458f5;
    background: #eaf0ff;
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 900;
}

.detail-page-meta {
    grid-template-columns: 1fr;
}

.complaint-officer-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid #e6eefc;
    border-radius: 15px;
    background: #f8fbff;
}

.complaint-officer-card span {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(135deg, #123a97, #2f66ff);
    font-weight: 900;
}

.complaint-officer-card strong {
    display: block;
    color: var(--navy);
}

.complaint-officer-card small,
.muted-copy {
    color: var(--muted);
}

.complaint-detail-action-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    margin-top: 12px;
}

.complaint-detail-action {
    justify-content: center;
    width: 100%;
    min-height: 44px;
    margin-top: 0;
    white-space: normal;
    text-align: center;
}

.complaint-detail-empty-state {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}

.complaint-detail-empty-state p {
    color: var(--muted);
}

.complaint-form-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 360px;
    gap: 16px;
    align-items: start;
}

.complaint-review-form,
.complaint-form-guide {
    border-radius: 18px;
}

.complaint-review-form {
    display: grid;
    gap: 16px;
}

.complaint-review-form label {
    display: grid;
    gap: 8px;
    color: var(--navy);
    font-weight: 900;
}

.complaint-review-form input,
.complaint-review-form select,
.complaint-review-form textarea {
    width: 100%;
    border: 1px solid #dbe5f6;
    border-radius: 14px;
    padding: 12px 14px;
    color: var(--navy);
    background: #fff;
    font: inherit;
    font-weight: 700;
}

.complaint-review-form textarea {
    resize: vertical;
    line-height: 1.55;
}

.complaint-review-form input:focus,
.complaint-review-form select:focus,
.complaint-review-form textarea:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(47, 102, 255, 0.12);
    outline: 0;
}

.complaint-review-form input[readonly] {
    color: #123a97;
    background: #f4f8ff;
    border-color: #c9d9fb;
    cursor: not-allowed;
}

.complaint-review-form .aria-locked-field {
    font-weight: 900;
    box-shadow: inset 4px 0 0 rgba(37, 87, 245, 0.22);
}

.complaint-form-hint {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
    line-height: 1.4;
}

.complaint-form-two {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.complaint-form-two > label {
    min-width: 0;
}

.complaint-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 4px;
}

.complaint-form-status {
    min-height: 22px;
    margin: 0;
    color: var(--muted);
    font-weight: 800;
}

.complaint-form-status.is-success {
    color: #10984d;
}

.complaint-form-status.is-error {
    color: #d93025;
}

.complaint-form-guide {
    position: sticky;
    top: 92px;
}

.complaint-form-guide p {
    color: var(--muted);
}

.complaint-form-guide ul {
    display: grid;
    gap: 10px;
    margin: 16px 0 0;
    padding-left: 18px;
    color: var(--text);
    line-height: 1.55;
}

@media (max-width: 1200px) {
    .complaints-layout {
        grid-template-columns: 1fr;
    }

    .complaint-detail-panel {
        position: static;
    }

    .complaints-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .complaint-detail-grid {
        grid-template-columns: 1fr;
    }

    .complaint-detail-side,
    .complaint-form-guide {
        position: static;
    }

    .complaint-form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .complaints-hero {
        align-items: flex-start;
        flex-direction: column;
        border-radius: 18px;
        padding: 18px;
    }

    .complaints-hero .primary-btn {
        justify-content: center;
        width: 100%;
    }

    .complaints-stat-grid,
    .complaint-detail-meta {
        grid-template-columns: 1fr;
    }

    .complaint-detail-hero,
    .complaint-notification-item {
        grid-template-columns: 1fr;
    }

    .complaint-detail-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .complaint-form-two,
    .complaint-form-actions {
        grid-template-columns: 1fr;
    }

    .complaint-form-actions {
        display: grid;
    }
}
.rich-donut-card {
    border: 1px solid #dde7fb;
    border-radius: 18px;
    padding: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.rich-donut-body {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 16px;
    align-items: center;
}
.rich-donut-ring {
    width: 112px;
    height: 112px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    box-shadow: inset 0 0 0 1px rgba(8, 28, 75, 0.05), 0 14px 32px rgba(31, 85, 245, 0.12);
}
.rich-donut-center {
    width: 72px;
    height: 72px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    align-content: center;
    background: #ffffff;
    border: 1px solid #e2eafb;
    text-align: center;
}
.rich-donut-center strong {
    color: var(--navy);
    font-size: 1.16rem;
    line-height: 1;
}
.rich-donut-center span {
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
}
.rich-donut-legend {
    display: grid;
    gap: 8px;
}
.rich-donut-legend-row {
    display: grid;
    grid-template-columns: 10px minmax(0, 1fr);
    gap: 9px;
    align-items: center;
}
.rich-donut-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}
.rich-donut-legend-copy {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--muted);
    font-size: 0.8rem;
}
.rich-donut-legend-copy strong {
    color: var(--navy);
}
.rich-donut-caption {
    color: var(--muted);
    font-size: 0.76rem;
    line-height: 1.45;
}
.rich-complaint-card {
    border: 1px solid #dbe6fb;
    border-radius: 18px;
    padding: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
}
.rich-complaint-card.is-submitted {
    border-color: #bcebd0;
    background: linear-gradient(180deg, #ffffff 0%, #f3fbf6 100%);
}
.rich-complaint-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}
.rich-complaint-head > strong {
    color: var(--navy);
    font-size: 0.96rem;
    line-height: 1.35;
}
.rich-complaint-priority {
    border-radius: 999px;
    padding: 5px 9px;
    background: #fff8e8;
    color: #b45309;
    font-size: 0.68rem;
    font-weight: 900;
    white-space: nowrap;
}
.rich-complaint-priority.tone-danger {
    background: #fff1f2;
    color: #be123c;
}
.rich-complaint-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
}
.rich-complaint-meta span {
    border: 1px solid #e3ebfb;
    border-radius: 14px;
    padding: 9px 10px;
    background: #ffffff;
    min-width: 0;
    overflow: hidden;
}
.rich-complaint-meta small,
.rich-complaint-action small {
    display: block;
    color: var(--muted);
    font-size: 0.68rem;
    font-weight: 800;
    margin-bottom: 3px;
}
.rich-complaint-meta strong {
    display: block;
    color: var(--navy);
    font-size: 0.82rem;
    line-height: 1.35;
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
}
.rich-complaint-summary,
.rich-complaint-action p {
    color: var(--text);
    font-size: 0.84rem;
    line-height: 1.5;
    margin: 0;
}
.rich-complaint-action {
    border-left: 3px solid var(--primary);
    padding: 8px 10px;
    background: #f4f8ff;
    border-radius: 12px;
}
.rich-complaint-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.rich-complaint-submit,
.rich-complaint-secondary {
    border: 0;
    border-radius: 999px;
    min-height: 34px;
    padding: 8px 13px;
    font-size: 0.78rem;
    font-weight: 900;
    cursor: pointer;
}
.rich-complaint-submit {
    background: var(--primary);
    color: #ffffff;
}
.rich-complaint-submit.is-submitted,
.rich-complaint-submit:disabled {
    background: #16a34a;
    cursor: default;
}
.rich-complaint-secondary {
    background: #eef4ff;
    color: var(--primary);
}
.rich-complaint-followup-card {
    border: 1px solid #cfe0ff;
    border-radius: 18px;
    padding: 14px;
    background: linear-gradient(180deg, #ffffff 0%, #f5f9ff 100%);
    box-shadow: 0 12px 28px rgba(15, 35, 95, 0.08);
}
.rich-complaint-followup-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}
.rich-complaint-followup-head small {
    display: block;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.rich-complaint-followup-head strong {
    display: block;
    color: #071c4d;
    font-size: 1rem;
    line-height: 1.28;
}
.rich-complaint-followup-head > span {
    border-radius: 999px;
    padding: 6px 10px;
    background: #eaf1ff;
    color: #2457f5;
    font-size: 0.7rem;
    font-weight: 900;
    white-space: nowrap;
}
.rich-complaint-followup-original {
    margin-top: 10px;
    padding: 11px 12px;
    border: 1px solid #dfe9fb;
    border-radius: 14px;
    background: #ffffff;
}
.rich-complaint-followup-original small {
    display: block;
    margin-bottom: 5px;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
}
.rich-complaint-followup-original p {
    margin: 0;
    color: #12213f;
    font-size: 0.84rem;
    line-height: 1.5;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.rich-complaint-followup-steps {
    margin: 10px 0 0;
    padding-left: 20px;
    color: #31456f;
    font-size: 0.8rem;
    line-height: 1.5;
    font-weight: 700;
}
.rich-complaint-followup-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}
.rich-complaint-followup-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border-radius: 10px;
    background: #2458f5;
    color: #ffffff;
    padding: 9px 14px;
    font-size: 0.82rem;
    font-weight: 950;
    text-decoration: none;
}
.rich-complaint-followup-button:hover {
    background: #1d4ed8;
    color: #ffffff;
}
.rich-table-scroll {
    overflow-x: auto;
}
.rich-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 420px;
}
.rich-table th,
.rich-table td {
    text-align: left;
    padding: 9px 10px;
    border-bottom: 1px solid #e8effd;
    font-size: 0.82rem;
    vertical-align: top;
}
.rich-table th {
    color: var(--navy);
    font-weight: 800;
    background: #f8fbff;
}
.rich-table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 7px 11px;
    border-radius: 999px;
    background: #eef4ff;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 900;
    text-decoration: none;
    white-space: nowrap;
}
.rich-table-action:hover {
    background: var(--primary);
    color: #fff;
}

.public-info-gemini {
    gap: 14px;
    background: #f6f9ff;
    padding-bottom: 54px;
    overflow-y: auto;
    scrollbar-gutter: stable;
}
.public-info-gemini .pi-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding: 24px;
    border-radius: 16px;
    border: 1px solid #d9e5ff;
    background: linear-gradient(118deg, #08215f 0%, #153aa8 58%, #2457f5 100%);
    color: #fff;
    box-shadow: 0 16px 34px rgba(22, 50, 135, .16);
}
.public-info-gemini .pi-hero p,
.public-info-gemini .pi-hero h2,
.public-info-gemini .pi-hero span {
    margin: 0;
}
.public-info-gemini .pi-hero p {
    margin-bottom: 5px;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .08em;
    color: rgba(255,255,255,.72);
}
.public-info-gemini .pi-hero h2 {
    font-size: clamp(1.75rem, 3vw, 2.65rem);
    letter-spacing: 0;
}
.public-info-gemini .pi-hero span {
    display: block;
    margin-top: 7px;
    color: rgba(255,255,255,.78);
    line-height: 1.5;
}
.public-info-gemini .pi-hero-actions {
    display: flex;
    gap: 9px;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    min-width: 260px;
}
.public-info-gemini .pi-hero-actions strong,
.public-info-gemini .pi-hero-actions button {
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 900;
}
.public-info-gemini .pi-hero-actions strong {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 8px 12px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.18);
}
.public-info-gemini .pi-hero-actions strong i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
}
.public-info-gemini .pi-hero-actions strong.status-degraded i { background: #f59e0b; }
.public-info-gemini .pi-hero-actions button,
.public-info-gemini .pi-panel button {
    border: 0;
    background: #fff;
    color: #08215f;
    padding: 9px 16px;
    cursor: pointer;
}
.public-info-gemini .pi-hero-actions small {
    flex-basis: 100%;
    color: rgba(255,255,255,.74);
    text-align: right;
}
.public-info-gemini .pi-tabs {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 8px;
}
.public-info-gemini .pi-tabs button {
    border: 1px solid #dce7fb;
    border-radius: 10px;
    min-height: 48px;
    background: #fff;
    color: #061844;
    font-weight: 900;
    font-size: .86rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(15,35,95,.05);
}
.public-info-gemini .pi-tabs button.active {
    background: #2457f5;
    color: #fff;
    border-color: #2457f5;
}
.public-info-gemini .pi-tab-icon,
.public-info-gemini .pi-tab-icon svg {
    width: 14px;
    height: 14px;
}
.public-info-gemini .pi-board {
    display: grid;
    gap: 16px;
    min-height: auto;
    align-content: start;
    padding-bottom: 0;
}
.public-info-gemini .pi-loading,
.public-info-gemini .pi-card,
.public-info-gemini .pi-panel {
    border: 1px solid #dce7fb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(15,35,95,.07);
}
.public-info-gemini .pi-loading {
    padding: 28px;
    color: var(--muted);
}
.public-info-gemini .pi-overview-cards,
.public-info-gemini .pi-four-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.public-info-gemini .pi-weather-grid {
    display: grid;
    grid-template-columns: 1fr 2.2fr 1.25fr;
    gap: 12px;
}
.public-info-gemini .pi-two-col {
    display: grid;
    grid-template-columns: 1fr 1.55fr;
    gap: 12px;
}
.public-info-gemini .pi-two-col.compact {
    grid-template-columns: 1fr 1fr;
}
.public-info-gemini .pi-three-col {
    display: grid;
    grid-template-columns: 1.5fr 1fr .9fr;
    gap: 12px;
}
.public-info-gemini .pi-card,
.public-info-gemini .pi-panel {
    padding: 16px;
    overflow: visible;
}
.public-info-gemini .pi-card,
.public-info-gemini .pi-panel {
    position: relative;
}
.public-info-gemini .pi-ask-aria-btn {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 7px 10px;
    border: 1px solid rgba(36, 87, 245, 0.18);
    border-radius: 999px;
    background: rgba(255,255,255,.94);
    color: #2457f5;
    box-shadow: 0 10px 20px rgba(15,35,95,.08);
    font-size: .72rem;
    font-weight: 900;
    line-height: 1;
    text-decoration: none;
}
.public-info-gemini .pi-ask-aria-btn:hover {
    background: #2457f5;
    color: #fff;
}
.public-info-gemini .pi-table-panel h4 {
    padding-right: 92px;
}
.public-info-gemini .pi-card {
    min-height: 235px;
    display: grid;
    align-content: start;
    gap: 8px;
}
.public-info-gemini .pi-card-top {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: center;
}
.public-info-gemini h3,
.public-info-gemini h4 {
    margin: 0;
    color: #061844;
    letter-spacing: 0;
}
.public-info-gemini .pi-page-title {
    font-size: clamp(1.35rem, 2vw, 2rem);
    margin: 2px 0 0;
}
.public-info-gemini .pi-card h4,
.public-info-gemini .pi-panel h4 {
    font-size: 1rem;
}
.public-info-gemini .pi-card > strong,
.public-info-gemini .pi-panel > strong {
    color: #061844;
    font-size: clamp(1.6rem, 2.4vw, 2.25rem);
    line-height: 1;
}
.public-info-gemini .pi-card small,
.public-info-gemini .pi-panel small,
.public-info-gemini .pi-panel p,
.public-info-gemini .pi-source {
    color: #62708f;
}
.public-info-gemini .pi-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 6px 9px;
    font-size: .68rem;
    font-weight: 900;
    background: #dcfce7;
    color: #047857;
    white-space: nowrap;
}
.public-info-gemini .pi-badge.status-degraded,
.public-info-gemini .pi-badge.status-no_data { background: #fef3c7; color: #b45309; }
.public-info-gemini .pi-spark {
    width: 100%;
    height: 72px;
    margin-top: 4px;
}
.public-info-gemini .pi-chart-shell {
    position: relative;
    width: 100%;
    height: 150px;
    margin-top: 8px;
    padding: 4px 2px 0;
}
.public-info-gemini .pi-panel .pi-chart-shell {
    height: 240px;
}
.public-info-gemini .pi-tall {
    min-height: 340px;
}
.public-info-gemini .pi-analysis {
    display: grid;
    grid-template-columns: minmax(280px, 1.3fr) minmax(260px, .9fr);
    gap: 16px;
    align-items: start;
    padding: 16px 18px;
    border: 1px solid #dce7fb;
    border-radius: 14px;
    background:
        linear-gradient(135deg, rgba(36,87,245,.08), rgba(16,185,129,.06)),
        #fff;
    box-shadow: 0 12px 28px rgba(15,35,95,.07);
}
.public-info-gemini .pi-analysis h3 {
    margin: 0 0 7px;
}
.public-info-gemini .pi-analysis span {
    color: #62708f;
    line-height: 1.55;
}
.public-info-gemini .pi-analysis ul {
    margin: 0;
    padding-left: 18px;
    color: #061844;
    font-weight: 700;
    line-height: 1.7;
}
.public-info-gemini .pi-bars {
    height: 160px;
    display: flex;
    align-items: end;
    gap: 12px;
    padding: 8px 4px 0;
    border-bottom: 1px solid #dce7fb;
}
.public-info-gemini .pi-bars i {
    flex: 1;
    border-radius: 6px 6px 0 0;
    min-width: 8px;
    opacity: .88;
}
.public-info-gemini .pi-kicker {
    margin: 0 0 5px;
    color: #2457f5;
    text-transform: uppercase;
    font-weight: 900;
    font-size: .72rem;
}
.public-info-gemini .pi-pulse {
    display: flex;
    align-items: baseline;
    gap: 10px;
    margin: 14px 0;
}
.public-info-gemini .pi-pulse strong {
    color: #061844;
    font-size: 2.6rem;
    line-height: 1;
}
.public-info-gemini dl {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 9px 16px;
    margin: 0;
}
.public-info-gemini dt { color: #061844; font-weight: 800; }
.public-info-gemini dd { margin: 0; color: #061844; font-weight: 900; }
.public-info-gemini .pi-status-bars {
    display: grid;
    gap: 10px;
    margin: 14px 0;
}
.public-info-gemini .pi-status-bars div {
    display: grid;
    grid-template-columns: 90px 80px 1fr;
    align-items: center;
    gap: 10px;
}
.public-info-gemini .pi-status-bars span,
.public-info-gemini .pi-status-bars b {
    color: #061844;
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}
.public-info-gemini .pi-status-bars b.status-ok { color: #059669; }
.public-info-gemini .pi-status-bars i {
    height: 10px;
    border-radius: 999px;
    background: #eef3fc;
    overflow: hidden;
}
.public-info-gemini .pi-status-bars em {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, #2457f5, #10b981);
}
.public-info-gemini .pi-source {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid #edf2fb;
    font-size: .78rem;
}
.public-info-gemini .pi-source a {
    color: #2457f5;
    font-weight: 900;
    text-decoration: none;
}
.public-info-gemini .pi-current-weather {
    display: grid;
    gap: 8px;
}
.public-info-gemini .pi-sun {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    background: #fbbf24;
    box-shadow: 0 0 0 12px rgba(251,191,36,.18), 0 0 34px rgba(251,191,36,.4);
}
.public-info-gemini .pi-current-weather > strong {
    font-size: 2.5rem;
}
.public-info-gemini .pi-current-weather dl {
    grid-template-columns: repeat(2, 1fr);
}
.public-info-gemini .pi-forecast-row {
    display: grid;
    grid-template-columns: repeat(7, minmax(72px, 1fr));
    gap: 9px;
    margin-top: 14px;
}
.public-info-gemini .pi-forecast-row div {
    border: 1px solid #dce7fb;
    border-radius: 12px;
    padding: 12px 8px;
    display: grid;
    justify-items: center;
    gap: 8px;
    text-align: center;
}
.public-info-gemini .pi-forecast-row span { font-size: 1.7rem; }
.public-info-gemini .pi-forecast-row strong {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.public-info-gemini .pi-weather-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #fbbf24;
    box-shadow: 0 0 0 6px rgba(251,191,36,.14);
}
.public-info-gemini .pi-malaysia-map {
    position: relative;
    height: 315px;
    min-height: 315px;
    margin-top: 12px;
    border: 1px solid #cfe0fb;
    border-radius: 14px;
    overflow: hidden;
    background: #dff6ff;
    z-index: 1;
}
.public-info-gemini .pi-malaysia-map .leaflet-tile,
.public-info-gemini .pi-malaysia-map .leaflet-marker-icon,
.public-info-gemini .pi-malaysia-map .leaflet-marker-shadow {
    max-width: none !important;
    max-height: none !important;
}
.public-info-gemini .pi-malaysia-map .leaflet-control-attribution {
    font-size: 10px;
}
.public-info-gemini .pi-malaysia-map .leaflet-popup-content-wrapper {
    border-radius: 14px;
    box-shadow: 0 14px 30px rgba(15,35,95,.18);
}
.public-info-gemini .pi-malaysia-map .leaflet-popup-content {
    color: #061844;
    font-family: inherit;
    font-size: 12px;
    line-height: 1.45;
}
.public-info-gemini .pi-alert-list {
    display: grid;
    gap: 10px;
    margin-top: 12px;
    max-height: 230px;
    overflow: auto;
}
.public-info-gemini .pi-alert-list div {
    border: 1px solid #fed7aa;
    border-radius: 11px;
    background: #fff7ed;
    padding: 11px;
}
.public-info-gemini .pi-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: .84rem;
    table-layout: fixed;
}
.public-info-gemini .pi-table-panel {
    min-height: auto;
    padding-bottom: 22px;
    overflow: visible;
}
.public-info-gemini .pi-table-panel .pi-table {
    min-width: 0;
}
.public-info-gemini .pi-table th,
.public-info-gemini .pi-table td {
    padding: 10px;
    border-bottom: 1px solid #edf2fb;
    text-align: left;
    overflow-wrap: anywhere;
}
.public-info-gemini .pi-bottom-spacer {
    height: 42px;
}
.public-info-gemini .pi-table th {
    color: #62708f;
    background: #f8fbff;
}
.public-info-gemini input,
.public-info-gemini select,
.public-info-gemini .pi-panel button {
    width: 100%;
    border-radius: 9px;
    border: 1px solid #dce7fb;
    padding: 11px 12px;
    margin: 7px 0 10px;
    background: #fff;
    color: #061844;
}
.public-info-gemini .pi-panel button {
    background: #2457f5;
    color: #fff;
    font-weight: 900;
}
.public-info-gemini .pi-converter label {
    display: block;
    color: #62708f;
    font-size: .78rem;
    font-weight: 900;
}
.public-info-gemini .pi-converter-result {
    display: grid;
    gap: 5px;
    margin: 10px 0 12px;
    padding: 13px;
    border-radius: 12px;
    background: linear-gradient(135deg, #eff6ff, #fff);
    border: 1px solid #dce7fb;
}
.public-info-gemini .pi-converter-result span {
    color: #62708f;
    font-size: .74rem;
    font-weight: 900;
    text-transform: uppercase;
}
.public-info-gemini .pi-converter-result strong {
    color: #061844;
    font-size: 1.6rem;
}
.public-info-gemini .pi-converter-result small {
    color: #2457f5;
    font-weight: 800;
}
@media (max-width: 1180px) {
    .public-info-gemini .pi-overview-cards,
    .public-info-gemini .pi-four-grid,
    .public-info-gemini .pi-weather-grid,
    .public-info-gemini .pi-two-col,
    .public-info-gemini .pi-three-col {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 720px) {
    .public-info-gemini .pi-hero,
    .public-info-gemini .pi-analysis,
    .public-info-gemini .pi-overview-cards,
    .public-info-gemini .pi-four-grid,
    .public-info-gemini .pi-weather-grid,
    .public-info-gemini .pi-two-col,
    .public-info-gemini .pi-three-col,
    .public-info-gemini .pi-tabs {
        grid-template-columns: 1fr;
        flex-direction: column;
    }
    .public-info-gemini .pi-hero-actions,
    .public-info-gemini .pi-hero-actions small {
        justify-content: flex-start;
        text-align: left;
    }
    .public-info-gemini .pi-forecast-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
.rich-timeline-item {
    display: grid;
    grid-template-columns: 12px 1fr;
    gap: 10px;
    align-items: start;
}
.rich-timeline-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-top: 5px;
    background: var(--blue);
    box-shadow: 0 0 0 4px rgba(47, 102, 255, 0.12);
}
.rich-timeline-copy strong {
    display: block;
    margin: 0 0 2px;
    color: var(--navy);
    font-size: 0.85rem;
}
.rich-timeline-copy small {
    color: var(--muted);
    font-size: 0.76rem;
}
.rich-chart-shell {
    height: 220px;
    border: 1px solid #e3ebfb;
    border-radius: 18px;
    background: #fff;
    padding: 12px;
}
.rich-chart-shell canvas {
    width: 100% !important;
    height: 100% !important;
}
.rich-location-card {
    padding: 14px;
    border: 1px solid #dbe6fb;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.rich-location-head {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}
.rich-location-marker {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: #eef4ff;
    color: var(--primary);
    font-size: 1.2rem;
}
.rich-location-title {
    display: grid;
    gap: 3px;
}
.rich-location-title strong {
    color: var(--navy);
    font-size: 0.98rem;
}
.rich-location-title span,
.rich-location-details p,
.rich-location-list li {
    color: var(--muted);
    line-height: 1.5;
}
.rich-location-map-shell {
    position: relative;
    min-height: 170px;
    margin-top: 12px;
    border: 1px solid #dbe6fb;
    border-radius: 16px;
    overflow: hidden;
    background: #eef4ff;
}
.rich-location-map-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    background: #eef4ff;
}
.rich-location-map {
    position: absolute;
    inset: 0;
    min-height: 100%;
    border-radius: 0;
    display: grid;
    place-items: center;
    gap: 4px;
    text-decoration: none;
    color: var(--primary);
    background:
        radial-gradient(circle at 22% 24%, rgba(47,102,255,.2), transparent 18%),
        radial-gradient(circle at 72% 68%, rgba(16,185,129,.18), transparent 20%),
        linear-gradient(135deg, rgba(47,102,255,.12), rgba(16,185,129,.1)),
        repeating-linear-gradient(45deg, rgba(255,255,255,.55) 0 8px, rgba(226,234,252,.55) 8px 16px);
    border: 0;
    text-align: center;
}
.rich-location-map-fallback {
    opacity: 0;
    pointer-events: none;
}
.rich-location-map-shell:not(:has(iframe)) .rich-location-map-fallback,
.rich-location-map-fallback.is-visible {
    opacity: 1;
    pointer-events: auto;
}
.rich-map-pin {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #fff;
    box-shadow: 0 14px 30px rgba(30, 64, 175, 0.18);
    font-size: 1.15rem;
}
.rich-location-map span {
    font-weight: 900;
}
.rich-location-map small {
    color: var(--muted);
    font-weight: 700;
}
.rich-weather-map-card {
    padding: 14px;
    border: 1px solid #dbe6fb;
    border-radius: 18px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.agency-sidebar-context {
    display: grid;
    gap: 3px;
    margin: 4px 4px 10px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
}
.agency-sidebar-context span,
.agency-sidebar-context small {
    color: rgba(255, 255, 255, 0.68);
    font-size: .68rem;
    font-weight: 800;
    text-transform: uppercase;
}
.agency-sidebar-context strong {
    color: #fff;
    font-size: .98rem;
}
.agency-portal {
    display: grid;
    gap: 16px;
}
.agency-hero-card,
.agency-page-head,
.agency-panel,
.agency-case-card,
.agency-task-card {
    border: 1px solid #dce7fb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(17, 45, 110, 0.06);
}
.agency-hero-card {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    padding: 22px;
    background: linear-gradient(135deg, #08245f 0%, #2b5cf5 100%);
    color: #fff;
}
.agency-hero-card small,
.agency-page-head small {
    display: block;
    margin-bottom: 5px;
    color: #2b5cf5;
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}
.agency-hero-card small {
    color: rgba(255, 255, 255, 0.82);
}
.agency-hero-card h2,
.agency-page-head h2,
.agency-panel h3,
.agency-case-card h3,
.agency-task-card h3 {
    margin: 0;
    color: #061844;
}
.agency-hero-card h2 {
    color: #fff;
    font-size: clamp(1.8rem, 2.4vw, 2.55rem);
}
.agency-hero-card p,
.agency-page-head p,
.agency-panel p,
.agency-case-card p,
.agency-task-card p {
    margin: 6px 0 0;
    color: #62708f;
    line-height: 1.55;
}
.agency-hero-card p {
    color: rgba(255, 255, 255, 0.88);
}
.agency-scope-pill,
.agency-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 28px;
    padding: 6px 10px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 900;
    white-space: nowrap;
}
.agency-scope-pill {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
}
.agency-page-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
}
.agency-stat-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.agency-stat-card {
    border: 1px solid #dce7fb;
    border-radius: 14px;
    padding: 16px;
    background: #fff;
}
.agency-stat-card span {
    display: block;
    color: #62708f;
    font-size: .78rem;
    font-weight: 800;
}
.agency-stat-card strong {
    display: block;
    margin: 8px 0 2px;
    color: #061844;
    font-size: clamp(1.7rem, 2.3vw, 2.25rem);
    line-height: 1;
}
.agency-stat-card small {
    color: #7180a0;
    font-weight: 700;
}
.agency-stat-card.tone-warning {
    background: linear-gradient(180deg, #fff 0%, #fff8eb 100%);
    border-color: #ffe0a6;
}
.agency-stat-card.tone-success {
    background: linear-gradient(180deg, #fff 0%, #effbf5 100%);
    border-color: #cbeed9;
}
.agency-dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
    gap: 14px;
}
.agency-dashboard-grid .wide {
    grid-column: span 2;
}
.agency-panel {
    padding: 18px;
}
.agency-chart-panel {
    min-height: 310px;
}
.agency-chart-shell {
    position: relative;
    height: 245px;
}
.agency-chart-shell.compact {
    height: 235px;
}
.agency-panel-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 14px;
}
.agency-panel-head a,
.agency-row-action {
    color: #2458f5;
    font-size: .82rem;
    font-weight: 900;
    text-decoration: none;
}
.agency-case-list,
.agency-topic-list {
    display: grid;
    gap: 10px;
}
.agency-case-row,
.agency-topic-row,
.agency-filter-row {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #e6eefc;
    border-radius: 12px;
    padding: 12px;
    background: #f8fbff;
}
.agency-case-row {
    justify-content: space-between;
}
.agency-case-row strong,
.agency-topic-row span {
    color: #061844;
    font-weight: 900;
}
.agency-case-row p,
.agency-topic-row p {
    margin: 3px 0 0;
    font-size: .9rem;
}
.agency-topic-row span {
    display: inline-flex;
    width: 28px;
    height: 28px;
    align-items: center;
    justify-content: center;
    border-radius: 9px;
    background: #eaf0ff;
    color: #2458f5;
    flex: 0 0 auto;
}
.agency-status-pill.tone-success { background: #eaf9f0; color: #10984d; }
.agency-status-pill.tone-warning { background: #fff4dc; color: #b66a00; }
.agency-status-pill.tone-info { background: #eaf0ff; color: #2458f5; }
.agency-status-pill.tone-neutral { background: #f1f4fa; color: #44516d; }
.agency-admin-notified-pill {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    border-radius: 999px;
    background: #dcfce7;
    color: #15803d;
    padding: 5px 8px;
    margin-top: 6px;
    font-size: .7rem;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.agency-filter-row {
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.agency-filter-row span,
.agency-filter-row a {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #eef4ff;
    padding: 8px 12px;
    color: #061844;
    font-weight: 900;
    text-decoration: none;
}
.agency-inline-form {
    margin-left: auto;
}
.agency-inline-form label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #62708f;
    font-size: .82rem;
    font-weight: 800;
}
.agency-inline-form select {
    min-height: 34px;
    border: 1px solid #dbe6fb;
    border-radius: 10px;
    background: #fff;
    color: #061844;
    font-weight: 800;
    padding: 0 10px;
}
.agency-table-wrap {
    overflow-x: auto;
}
.agency-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 820px;
}
.agency-table th,
.agency-table td {
    padding: 12px;
    border-bottom: 1px solid #edf2fb;
    text-align: left;
    vertical-align: top;
    font-size: .88rem;
}
.agency-table th {
    color: #62708f;
    background: #f8fbff;
    font-size: .74rem;
    text-transform: uppercase;
}
.agency-table td small {
    display: block;
    margin-top: 4px;
    color: #7180a0;
}
.agency-case-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr));
    gap: 14px;
    width: 100%;
}
.agency-case-card,
.agency-task-card {
    min-width: 0;
    width: 100%;
    padding: 16px;
}
.agency-flash {
    border: 1px solid #bcebd0;
    border-radius: 12px;
    background: #ecfbf3;
    color: #0f7f42;
    padding: 12px 14px;
    font-size: .9rem;
    font-weight: 900;
}
.agency-case-card h3,
.agency-task-card h3,
.agency-case-card p,
.agency-task-card p {
    overflow-wrap: anywhere;
}
.agency-case-card-head,
.agency-case-meta,
.agency-case-actions {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.agency-case-card-head {
    justify-content: space-between;
    margin-bottom: 12px;
}
.agency-case-meta {
    margin-top: 14px;
}
.agency-case-meta span {
    border-radius: 999px;
    background: #f1f5fb;
    padding: 6px 9px;
    color: #62708f;
    font-size: .72rem;
    font-weight: 800;
}
.agency-case-actions {
    margin-top: 14px;
}
.agency-case-actions button,
.agency-task-card button {
    border: 0;
    border-radius: 10px;
    background: #2458f5;
    color: #fff;
    padding: 9px 11px;
    font-weight: 900;
    cursor: pointer;
}
.agency-helpdesk-table {
    min-width: 1120px;
}
.agency-ticket-link {
    color: #123b91;
    font-weight: 950;
    text-decoration: none;
    font-variant-numeric: tabular-nums;
}
.agency-row-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.agency-row-actions form {
    margin: 0;
}
.agency-row-actions button {
    border: 0;
    border-radius: 10px;
    background: #2458f5;
    color: #fff;
    padding: 8px 10px;
    font-size: .82rem;
    font-weight: 900;
    cursor: pointer;
}
.agency-cases-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr);
    gap: 14px;
    align-items: start;
}
.agency-cases-main {
    min-width: 0;
}
.agency-helpdesk-table tr.is-selected td {
    background: #eef5ff;
}
.agency-helpdesk-table tr.is-admin-notified td {
    background: #f0fdf4;
}
.agency-helpdesk-table tr.is-admin-notified td:first-child {
    border-left: 4px solid #22c55e;
}
.agency-helpdesk-table tr.is-selected.is-admin-notified td {
    background: #e8f8ef;
}
.agency-case-preview {
    position: sticky;
    top: 88px;
}
.agency-case-preview-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
}
.agency-case-preview-head div {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}
.agency-case-preview-head > a {
    color: #63708d;
    font-size: 1.4rem;
    line-height: 1;
    text-decoration: none;
}
.agency-preview-tabs {
    display: flex;
    gap: 18px;
    margin: 14px 0;
    border-bottom: 1px solid #e5edf8;
}
.agency-preview-tabs span {
    padding: 0 0 9px;
    color: #62708f;
    font-size: .82rem;
    font-weight: 900;
}
.agency-preview-tabs .is-active {
    color: #2458f5;
    border-bottom: 2px solid #2458f5;
}
.agency-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.agency-preview-grid section {
    border: 1px solid #e6eefc;
    border-radius: 12px;
    background: #f8fbff;
    padding: 12px;
}
.agency-preview-grid section:first-child,
.agency-preview-grid section:nth-child(3) {
    grid-column: span 1;
}
.agency-preview-grid h3 {
    margin: 0 0 8px;
    font-size: .9rem;
}
.agency-preview-grid p,
.agency-preview-grid li {
    color: #28395e;
    font-size: .84rem;
    line-height: 1.45;
}
.agency-preview-grid ul {
    margin: 0;
    padding-left: 18px;
}
.agency-sla-ring {
    width: 108px;
    height: 108px;
    border-radius: 999px;
    display: grid;
    place-content: center;
    margin: 4px auto;
    background: conic-gradient(#ef4444 0 22%, #f59e0b 22% 72%, #e9effa 72% 100%);
    color: #061844;
    text-align: center;
}
.agency-sla-ring strong,
.agency-sla-ring span {
    display: block;
    border-radius: 999px;
    background: #fff;
    padding: 2px 12px;
    font-weight: 950;
}
.agency-sla-ring span {
    color: #62708f;
    font-size: .74rem;
}
.agency-preview-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 14px;
}
.agency-preview-actions form {
    flex: 1 1 150px;
    margin: 0;
}
.agency-preview-actions a,
.agency-preview-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 150px;
    min-height: 42px;
    width: 100%;
    border: 0;
    border-radius: 10px;
    background: #2458f5;
    color: #fff;
    padding: 10px 12px;
    font-weight: 900;
    text-decoration: none;
    cursor: pointer;
    text-align: center;
    white-space: normal;
}
.agency-preview-actions .warning { background: #f59e0b; }
.agency-preview-actions .success { background: #16a34a; }
.agency-mini-timeline {
    display: grid;
    gap: 8px;
    margin-top: 16px;
}
.agency-mini-timeline span {
    border-left: 3px solid #dce7fb;
    padding-left: 10px;
    color: #62708f;
    font-size: .84rem;
}
.agency-breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    color: #62708f;
    font-size: .9rem;
    font-weight: 800;
}
.agency-breadcrumb a {
    color: #2458f5;
    text-decoration: none;
}
.agency-reply-layout {
    display: grid;
    grid-template-columns: minmax(260px, .75fr) minmax(0, 1.6fr) minmax(260px, .72fr);
    gap: 14px;
    align-items: start;
}
.agency-reply-side {
    display: grid;
    gap: 14px;
}
.agency-summary-list {
    display: grid;
    gap: 12px;
}
.agency-summary-list span {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: #62708f;
    font-size: .86rem;
}
.agency-summary-list strong {
    color: #061844;
    text-align: right;
}
.agency-summary-list em {
    display: inline-block;
    margin-left: 6px;
    border-radius: 999px;
    background: #eaf9f0;
    color: #10984d;
    padding: 3px 6px;
    font-size: .68rem;
    font-style: normal;
}
.agency-info-note,
.agency-safe-note {
    border-color: #b9d6ff;
    background: #eef6ff;
    color: #16458f;
}
.agency-info-note {
    border: 1px solid #b9d6ff;
    border-radius: 10px;
    padding: 12px;
    font-weight: 800;
    margin: 10px 0 18px;
}
.agency-status-update-card {
    display: grid;
    gap: 14px;
    border: 1px solid #dbe6fb;
    border-radius: 12px;
    background: #fbfdff;
    padding: 14px;
    margin: 0 0 18px;
}
.agency-status-update-card > div:first-child {
    display: grid;
    gap: 4px;
}
.agency-status-update-card strong {
    color: #061844;
    font-size: .96rem;
}
.agency-status-update-card span {
    color: #62708f;
    font-size: .83rem;
    font-weight: 750;
}
.agency-status-update-card label {
    margin-bottom: 0;
}
.agency-status-option-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.agency-status-option-grid span {
    display: grid;
    gap: 4px;
    border: 1px solid #edf2fb;
    border-radius: 10px;
    background: #fff;
    padding: 10px;
    line-height: 1.4;
}
.agency-status-option-grid b {
    color: #2458f5;
    font-size: .78rem;
}
.agency-reply-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.agency-reply-page label {
    display: grid;
    gap: 8px;
    color: #061844;
    font-size: .86rem;
    font-weight: 900;
    margin-bottom: 14px;
}
.agency-reply-page select,
.agency-reply-page input,
.agency-reply-page textarea {
    border: 1px solid #dbe6fb;
    border-radius: 10px;
    background: #fff;
    color: #061844;
    padding: 11px 12px;
    font: inherit;
    font-size: .88rem;
}
.agency-reply-message textarea {
    min-height: 275px;
    border-top-left-radius: 0;
    border-top-right-radius: 0;
    resize: vertical;
}
.agency-editor-toolbar {
    display: flex;
    align-items: center;
    gap: 14px;
    border: 1px solid #dbe6fb;
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    background: #f8fbff;
    padding: 10px 12px;
    color: #3b4b70;
}
.agency-upload-box {
    display: grid;
    gap: 6px;
    place-items: center;
    min-height: 90px;
    border: 1px dashed #b9c9e7;
    border-radius: 12px;
    background: #fbfdff;
    color: #62708f;
    margin: 12px 0;
}
.agency-checkbox {
    display: flex !important;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 8px !important;
}
.agency-reply-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid #edf2fb;
}
.agency-reply-footer a,
.agency-reply-footer button {
    border: 1px solid #cbd8f0;
    border-radius: 10px;
    background: #fff;
    color: #061844;
    padding: 11px 16px;
    font-weight: 950;
    text-decoration: none;
    cursor: pointer;
}
.agency-reply-footer button:last-child {
    border-color: #2458f5;
    background: #2458f5;
    color: #fff;
}
.agency-case-meta.compact {
    margin-top: 8px;
}
.agency-case-detail-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    padding: 18px;
    border: 1px solid #dce7fb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(17, 45, 110, 0.06);
}
.agency-detail-hero {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    padding: 18px;
    border: 1px solid #dce7fb;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(17, 45, 110, 0.06);
}
.agency-detail-hero small {
    display: block;
    margin-bottom: 5px;
    color: #2458f5;
    font-size: .72rem;
    font-weight: 900;
    text-transform: uppercase;
}
.agency-detail-hero h2 {
    margin: 0 0 5px;
    color: #061844;
}
.agency-detail-hero p {
    margin: 0;
    color: #62708f;
}
.agency-case-detail-head h2 {
    margin: 6px 0 2px;
    color: #061844;
}
.agency-case-detail-head p {
    margin: 0;
    color: #62708f;
}
.agency-case-detail-badges {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.agency-case-workspace-grid {
    display: grid;
    grid-template-columns: minmax(210px, .75fr) minmax(0, 1.65fr) minmax(260px, .85fr);
    gap: 14px;
    align-items: start;
}
.agency-detail-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(320px, .65fr);
    gap: 14px;
    align-items: start;
}
.agency-detail-main,
.agency-detail-side {
    display: grid;
    gap: 14px;
    min-width: 0;
}
.agency-detail-side {
    position: sticky;
    top: 88px;
}
.agency-detail-tabs {
    display: flex;
    gap: 20px;
    border-bottom: 1px solid #e5edf8;
    margin-bottom: 14px;
    overflow-x: auto;
}
.agency-detail-tabs span,
.agency-detail-tabs button {
    padding: 0 0 10px;
    border: 0;
    background: transparent;
    white-space: nowrap;
    color: #62708f;
    font-size: .84rem;
    font-weight: 900;
    cursor: pointer;
}
.agency-detail-tabs .is-active,
.agency-detail-tabs button:hover {
    color: #2458f5;
}
.agency-detail-tabs .is-active {
    border-bottom: 2px solid #2458f5;
}
.agency-case-tab-panel[hidden] {
    display: none !important;
}
.agency-detail-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}
.agency-detail-card-grid article {
    border: 1px solid #e6eefc;
    border-radius: 12px;
    background: #f8fbff;
    padding: 14px;
}
.agency-detail-card-grid h3 {
    margin: 0 0 10px;
}
.agency-detail-card-grid p,
.agency-detail-card-grid li {
    color: #28395e;
    line-height: 1.52;
    font-size: .9rem;
}
.agency-detail-card-grid small {
    color: #62708f;
    font-weight: 800;
}
.agency-detail-card-grid ul {
    margin: 0;
    padding-left: 18px;
}
.agency-original-complaint-text {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}
.agency-case-readable-panel,
.agency-case-info-grid span,
.agency-case-document-list span {
    border: 1px solid #e6eefc;
    border-radius: 12px;
    background: #f8fbff;
    padding: 14px;
}
.agency-case-readable-panel h3 {
    margin: 0 0 10px;
}
.agency-case-readable-panel p {
    color: #28395e;
    line-height: 1.55;
}
.agency-case-info-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}
.agency-case-info-grid span,
.agency-case-document-list span {
    display: grid;
    gap: 5px;
    color: #62708f;
    font-size: .78rem;
    font-weight: 900;
}
.agency-case-info-grid strong,
.agency-case-document-list strong {
    color: #071c4d;
    font-size: .9rem;
    overflow-wrap: anywhere;
}
.agency-case-document-list {
    display: grid;
    gap: 10px;
}
.agency-sla-summary {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}
.agency-sla-summary span {
    display: grid;
    gap: 4px;
    color: #62708f;
    font-size: .82rem;
    font-weight: 800;
}
.agency-sla-summary strong {
    color: #061844;
}
.agency-detail-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}
.agency-detail-action-grid button,
.agency-detail-action-grid a {
    border: 0;
    border-radius: 10px;
    background: #2458f5;
    color: #fff;
    padding: 10px;
    font-weight: 950;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}
.agency-detail-action-grid .success {
    background: #16a34a;
}
.agency-detail-action-grid .danger {
    background: #ef4444;
}
.agency-timeline-wide {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.agency-profile-box,
.agency-context-list,
.agency-timeline {
    display: grid;
    gap: 10px;
}
.agency-profile-box,
.agency-context-list span,
.agency-timeline-item {
    border: 1px solid #e6eefc;
    border-radius: 12px;
    background: #f8fbff;
    padding: 11px;
}
.agency-profile-box strong,
.agency-context-list strong,
.agency-timeline-item strong {
    color: #061844;
    font-weight: 950;
}
.agency-profile-box span,
.agency-context-list span {
    color: #62708f;
    font-size: .84rem;
}
.agency-context-list span {
    display: grid;
    gap: 4px;
}
.agency-profile-page {
    display: grid;
    gap: 16px;
}
.agency-profile-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid #dce7fb;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 14px 34px rgba(17, 45, 110, .06);
    padding: 22px;
}
.agency-profile-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
}
.agency-profile-logo {
    width: 78px;
    height: 78px;
    border: 1px solid #e6eefc;
    border-radius: 18px;
    background: #f8fbff;
    display: grid;
    place-items: center;
    padding: 10px;
    flex: 0 0 auto;
}
.agency-profile-logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}
.agency-profile-brand small {
    display: block;
    margin-bottom: 4px;
    color: #2458f5;
    font-size: .72rem;
    font-weight: 950;
    letter-spacing: .02em;
    text-transform: uppercase;
}
.agency-profile-brand h2 {
    margin: 0;
    color: #061844;
    font-size: clamp(1.8rem, 2.5vw, 2.6rem);
    line-height: 1.05;
}
.agency-profile-brand p {
    margin: 5px 0 0;
    color: #62708f;
}
.agency-profile-officer {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #e6eefc;
    border-radius: 14px;
    background: #f8fbff;
    padding: 12px 14px;
}
.agency-profile-officer > span {
    width: 42px;
    height: 42px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #2458f5;
    color: #fff;
    font-weight: 950;
}
.agency-profile-officer strong,
.agency-profile-officer small {
    display: block;
}
.agency-profile-officer strong {
    color: #061844;
}
.agency-profile-officer small {
    color: #62708f;
}
.agency-profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.agency-permission-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.agency-permission-list span {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e6eefc;
    border-radius: 12px;
    background: #f8fbff;
    color: #061844;
    font-weight: 850;
    padding: 10px;
}
.agency-profile-note {
    border: 1px solid #ffe0a7;
    border-radius: 12px;
    background: #fff8e8;
    padding: 12px;
    margin-bottom: 12px;
}
.agency-profile-note strong {
    color: #9a5b00;
}
.agency-profile-note p {
    margin: 6px 0 0;
    color: #5d4b2a;
    line-height: 1.5;
}
.agency-case-section {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #edf2fb;
}
.agency-detail-action-form {
    display: grid;
    gap: 10px;
}
.agency-detail-action-form textarea {
    width: 100%;
    min-height: 130px;
    resize: vertical;
    border: 1px solid #dbe6fb;
    border-radius: 12px;
    background: #f8fbff;
    color: #061844;
    padding: 12px;
    font: inherit;
}
.agency-timeline {
    position: relative;
}
.agency-timeline-item span {
    display: block;
    margin-top: 3px;
    color: #62708f;
    font-size: .78rem;
    font-weight: 800;
}
.agency-timeline-item p {
    margin: 7px 0 0;
    font-size: .84rem;
}
.agency-case-workspace .agency-panel h3 {
    margin-bottom: 10px;
}
.agency-case-actions form {
    margin: 0;
}
.agency-task-card {
    display: grid;
    gap: 10px;
}
.agency-task-card button {
    width: fit-content;
}
.agency-bar-list {
    display: grid;
    gap: 12px;
}
.agency-bar-row {
    display: grid;
    grid-template-columns: 110px minmax(0, 1fr) 40px;
    gap: 12px;
    align-items: center;
}
.agency-bar-row span,
.agency-bar-row strong {
    color: #061844;
    font-weight: 900;
}
.agency-bar-row div {
    height: 12px;
    border-radius: 999px;
    background: #edf2fb;
    overflow: hidden;
}
.agency-bar-row i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2b5cf5, #35c486);
}
.agency-empty {
    padding: 16px;
    border: 1px dashed #cfdcf5;
    border-radius: 12px;
    color: #62708f;
    background: #f8fbff;
}
.agency-welcome-hero {
    min-height: 126px;
    display: flex;
    align-items: center;
    border: 1px solid #2f63ff;
    border-radius: 16px;
    padding: 24px;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(10, 39, 116, .98), rgba(36, 87, 245, .92)),
        radial-gradient(circle at 88% 35%, rgba(255, 255, 255, .22), transparent 28%);
    box-shadow: 0 18px 36px rgba(16, 45, 118, .16);
}
.agency-welcome-hero small,
.agency-welcome-hero span {
    display: block;
    color: rgba(255, 255, 255, .82);
    font-weight: 850;
}
.agency-welcome-hero h2 {
    margin: 6px 0;
    font-size: clamp(1.55rem, 2.4vw, 2.25rem);
}
.agency-welcome-hero p {
    margin: 0 0 9px;
    color: rgba(255, 255, 255, .9);
}
.agency-kpi-grid {
    display: grid;
    gap: 14px;
}
.agency-kpi-grid.five {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}
.agency-kpi-grid.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.agency-kpi-card {
    position: relative;
    min-height: 118px;
    border: 1px solid #dce7fb;
    border-radius: 14px;
    background: #fff;
    padding: 18px 18px 16px 82px;
    box-shadow: 0 14px 30px rgba(17, 45, 110, .06);
    overflow: hidden;
}
.agency-kpi-card i {
    position: absolute;
    left: 18px;
    top: 18px;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    background: #edf4ff;
    color: #2458f5;
}
.agency-kpi-card i svg {
    width: 23px;
    height: 23px;
}
.agency-kpi-card span {
    display: block;
    color: #263b67;
    font-size: .82rem;
    font-weight: 950;
}
.agency-kpi-card strong {
    display: block;
    margin: 6px 0 2px;
    color: #061844;
    font-size: 2rem;
    line-height: 1;
}
.agency-kpi-card small {
    color: #62708f;
    font-weight: 800;
}
.agency-kpi-card.blue { background: linear-gradient(180deg, #fff, #f2f7ff); }
.agency-kpi-card.green { background: linear-gradient(180deg, #fff, #eefbf5); }
.agency-kpi-card.amber { background: linear-gradient(180deg, #fff, #fff6e8); }
.agency-kpi-card.purple { background: linear-gradient(180deg, #fff, #f7f3ff); }
.agency-kpi-card.red { background: linear-gradient(180deg, #fff, #fff1f1); }
.agency-kpi-card.green i { background: #dff8ec; color: #10a15f; }
.agency-kpi-card.amber i { background: #fff0d2; color: #d97706; }
.agency-kpi-card.purple i { background: #f0e8ff; color: #7c3aed; }
.agency-kpi-card.red i { background: #ffe4e4; color: #ef4444; }
.agency-dashboard-pro,
.agency-tasks-page,
.agency-inquiries-page,
.agency-analytics-page {
    display: grid;
    gap: 16px;
}
.agency-dashboard-pro-grid,
.agency-analytics-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr) minmax(280px, .58fr);
    gap: 14px;
}
.agency-dashboard-pro-grid.bottom {
    grid-template-columns: minmax(0, 1fr) 360px;
}
.agency-dashboard-pro-grid .wide,
.agency-analytics-grid .wide {
    grid-column: span 2;
}
.agency-quick-panel,
.agency-highlight-panel {
    display: grid;
    gap: 14px;
    align-content: start;
}
.agency-quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.agency-quick-grid a,
.agency-primary-action,
.agency-page-actions button,
.agency-toolbar-panel button {
    border: 1px solid #cfe0ff;
    border-radius: 10px;
    background: #fff;
    color: #0a3ecf;
    padding: 11px 12px;
    font-weight: 950;
    text-decoration: none;
    text-align: center;
}
.agency-primary-action,
.agency-toolbar-panel button:last-child {
    background: #2458f5;
    color: #fff;
    border-color: #2458f5;
}
.agency-notice-list {
    display: grid;
    gap: 10px;
}
.agency-notice-list span {
    display: block;
    border: 1px solid #e6eefc;
    border-radius: 12px;
    background: #f8fbff;
    padding: 12px;
    color: #263b67;
    font-weight: 850;
}
.agency-toolbar-panel {
    display: grid;
    grid-template-columns: minmax(240px, 1fr) repeat(3, minmax(150px, .6fr)) auto;
    gap: 12px;
    align-items: end;
    border: 1px solid #dce7fb;
    border-radius: 14px;
    background: #fff;
    padding: 16px;
}
.agency-toolbar-panel label,
.agency-reply-side label {
    display: grid;
    gap: 6px;
    color: #263b67;
    font-size: .8rem;
    font-weight: 900;
}
.agency-toolbar-panel input,
.agency-toolbar-panel select,
.agency-page-actions button {
    min-height: 42px;
    border: 1px solid #dbe6fb;
    border-radius: 10px;
    background: #f8fbff;
    color: #061844;
    padding: 0 12px;
    font: inherit;
}
.agency-workbench {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 370px;
    gap: 14px;
    align-items: start;
}
.agency-workbench.enquiries {
    grid-template-columns: minmax(0, 1fr) 420px;
}
.agency-filter-row .is-active {
    border-color: #2458f5;
    background: #2458f5;
    color: #fff;
    box-shadow: 0 8px 20px rgba(36, 88, 245, .18);
}
.agency-task-preview,
.agency-enquiry-preview {
    position: sticky;
    top: 90px;
    display: grid;
    gap: 14px;
}
.agency-sla-hot {
    color: #ef4444;
    font-size: .95rem;
}
.agency-quote {
    border-radius: 12px;
    background: #f4f7ff;
    padding: 12px;
    color: #263b67;
}
.agency-page-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}
.agency-mini-progress {
    height: 9px;
    border-radius: 999px;
    background: #edf2fb;
    overflow: hidden;
}
.agency-mini-progress i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #10b981, #6ee7b7);
}
.agency-ai-case-page {
    display: grid;
    gap: 14px;
}
.agency-case-header-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 1px solid #dce7fb;
    border-radius: 14px;
    background: #fff;
    padding: 18px;
    box-shadow: 0 14px 34px rgba(17, 45, 110, .06);
}
.agency-case-header-card small {
    display: block;
    margin-bottom: 5px;
    color: #2458f5;
    font-size: .72rem;
    font-weight: 950;
    text-transform: uppercase;
}
.agency-case-header-card h2 {
    margin: 0 0 6px;
    color: #061844;
    font-size: clamp(1.4rem, 2vw, 1.9rem);
}
.agency-case-header-card p {
    margin: 0;
    color: #62708f;
}
.agency-ai-case-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 330px 360px;
    gap: 14px;
    align-items: start;
}
.agency-ai-case-main,
.agency-ai-case-side {
    display: grid;
    gap: 14px;
}
.agency-detail-card-grid.ai-layout {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.agency-detail-card-grid.ai-layout article h3 em {
    display: inline-block;
    margin-left: 8px;
    border-radius: 999px;
    background: #f0e8ff;
    color: #7c3aed;
    padding: 3px 7px;
    font-size: .68rem;
    font-style: normal;
    font-weight: 950;
}
.agency-detail-card-grid.ai-layout article button,
.agency-secondary-wide {
    width: fit-content;
    border: 1px solid #cfe0ff;
    border-radius: 10px;
    background: #fff;
    color: #2458f5;
    padding: 9px 12px;
    font-weight: 950;
    cursor: pointer;
}
.agency-secondary-wide {
    width: 100%;
    margin-top: 10px;
}
.agency-sla-ring.ai-ring {
    background: conic-gradient(#10b981 0 72%, #f59e0b 72% 92%, #ef4444 92% 100%);
}
.agency-ai-timeline {
    border: 1px solid #e6eefc;
    border-radius: 14px;
    padding: 12px;
    background: #fbfdff;
}
.agency-ai-next-actions {
    background: linear-gradient(180deg, #fff, #fbf8ff);
}
.agency-ai-next-actions p {
    color: #62708f;
    margin: -6px 0 10px;
}
.agency-ai-next-actions a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    border: 1px solid #d9d1ff;
    border-radius: 10px;
    background: #fff;
    color: #2b41d6;
    padding: 10px 12px;
    text-decoration: none;
    font-weight: 900;
    margin-top: 8px;
}
.agency-ai-next-actions a::after {
    content: "›";
    font-size: 1.2rem;
}
.agency-ai-next-actions button.agency-ai-inline-action {
    width: 100%;
    border: 1px solid #d9d1ff;
    border-radius: 10px;
    background: #fff;
    color: #2b41d6;
    padding: 10px 12px;
    text-align: left;
    font: inherit;
    font-weight: 900;
    margin-top: 8px;
    cursor: pointer;
}
.agency-ai-assistant-panel {
    position: sticky;
    top: 88px;
    min-height: calc(100vh - 132px);
    display: grid;
    grid-template-rows: auto 1fr auto auto;
    overflow: hidden;
    border: 1px solid #d9d1ff;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 18px 40px rgba(37, 25, 110, .12);
}
.agency-ai-assistant-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    background: linear-gradient(90deg, #5b21d7, #3416b8);
    color: #fff;
    padding: 14px 16px;
}
.agency-ai-assistant-head strong {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 950;
}
.agency-ai-assistant-head em {
    border-radius: 999px;
    background: rgba(255, 255, 255, .18);
    padding: 2px 7px;
    font-size: .68rem;
    font-style: normal;
}
.agency-ai-assistant-head span {
    display: flex;
    gap: 8px;
}
.agency-ai-assistant-head svg {
    width: 18px;
    height: 18px;
}
.agency-ai-assistant-body {
    display: grid;
    gap: 14px;
    align-content: start;
    padding: 16px;
    overflow: auto;
}
.agency-ai-greeting,
.agency-ai-message {
    border-radius: 14px;
    background: #f6f8ff;
    color: #243860;
    padding: 13px;
    line-height: 1.5;
}
.agency-ai-prompts {
    display: grid;
    gap: 9px;
}
.agency-ai-prompts button {
    border: 1px solid #dce7fb;
    border-radius: 10px;
    background: #fff;
    color: #0a3ecf;
    padding: 10px 12px;
    text-align: left;
    font-weight: 900;
    cursor: pointer;
}
.agency-ai-message {
    background: #fff;
    border: 1px solid #e4ddff;
    box-shadow: 0 12px 24px rgba(37, 25, 110, .06);
}
.agency-ai-message span {
    display: flex;
    justify-content: space-between;
    color: #5b21d7;
    font-weight: 950;
}
.agency-ai-message small {
    color: #8a95ad;
}
.agency-ai-message ol {
    margin: 10px 0 0 18px;
    padding: 0;
}
.agency-ai-message h4 {
    margin: 12px 0 4px;
    color: #061844;
    font-size: .88rem;
}
.agency-ai-message.is-loading {
    opacity: .82;
}
.agency-ai-draft {
    margin-top: 12px;
    border: 1px solid #dbe6fb;
    border-radius: 12px;
    background: #f8fbff;
    padding: 11px;
}
.agency-ai-draft strong {
    color: #061844;
}
.agency-ai-result-actions {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}
.agency-ai-result-actions a {
    display: inline-flex;
    justify-content: center;
    border-radius: 10px;
    background: #2458f5;
    color: #fff;
    padding: 10px 12px;
    font-weight: 950;
    text-decoration: none;
}
.agency-ai-result-actions small {
    color: #7a87a1;
}
.agency-ai-feedback {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}
.agency-ai-feedback button {
    border: 0;
    background: #f4f7ff;
    border-radius: 8px;
    padding: 7px 9px;
    cursor: pointer;
}
.agency-resolution-feedback-panel {
    border-color: #dbeafe;
}
.agency-resolution-score {
    display: grid;
    gap: 5px;
    border: 1px solid #e5edfb;
    border-radius: 12px;
    background: #fbfdff;
    padding: 12px;
    margin-bottom: 10px;
}
.agency-resolution-score strong {
    color: #f59e0b;
    font-size: 1.35rem;
    letter-spacing: 1px;
}
.agency-resolution-score span,
.agency-muted-copy {
    color: #64748b;
    font-size: .86rem;
    font-weight: 750;
}
.agency-resolution-feedback-item {
    display: grid;
    gap: 4px;
    border-top: 1px solid #edf2fb;
    padding: 10px 0 0;
    margin-top: 10px;
}
.agency-resolution-feedback-item strong {
    color: #071c4d;
}
.agency-resolution-feedback-item span {
    color: #64748b;
    font-size: .78rem;
    font-weight: 800;
}
.agency-resolution-feedback-item p {
    margin: 0;
    color: #334155;
    font-size: .84rem;
    line-height: 1.45;
}
.ops-inline-score {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: #eef6ff;
    color: #2458f5;
    padding: 8px 12px;
    font-size: .86rem;
}
.agency-ai-input {
    display: grid;
    grid-template-columns: 1fr 46px;
    gap: 8px;
    padding: 14px 16px 8px;
}
.agency-ai-input input {
    border: 1px solid #dbe6fb;
    border-radius: 10px;
    padding: 12px;
    font: inherit;
}
.agency-ai-input button {
    border: 0;
    border-radius: 10px;
    background: #2458f5;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}
.agency-ai-assistant-panel > small {
    display: block;
    padding: 0 16px 14px;
    color: #8a95ad;
    text-align: center;
}

@media (max-width: 1100px) {
    .agency-stat-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .agency-profile-grid {
        grid-template-columns: 1fr;
    }
    .agency-case-workspace-grid {
        grid-template-columns: 1fr;
    }
    .agency-cases-shell,
    .agency-reply-layout,
    .agency-detail-layout {
        grid-template-columns: 1fr;
    }
    .agency-case-preview {
        position: static;
    }
    .agency-detail-side {
        position: static;
    }
    .agency-dashboard-grid {
        grid-template-columns: 1fr;
    }
    .agency-kpi-grid.five,
    .agency-kpi-grid.four {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .agency-dashboard-pro-grid,
    .agency-dashboard-pro-grid.bottom,
    .agency-analytics-grid,
    .agency-ai-case-layout,
    .agency-workbench,
    .agency-workbench.enquiries {
        grid-template-columns: 1fr;
    }
    .agency-task-preview,
    .agency-enquiry-preview,
    .agency-ai-assistant-panel {
        position: static;
    }
    .agency-toolbar-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .agency-dashboard-grid .wide {
        grid-column: auto;
    }
}
@media (max-width: 720px) {
    .agency-stat-grid {
        grid-template-columns: 1fr;
    }
    .agency-kpi-grid.five,
    .agency-kpi-grid.four,
    .agency-toolbar-panel,
    .agency-quick-grid {
        grid-template-columns: 1fr;
    }
    .agency-hero-card,
    .agency-page-head,
    .agency-profile-hero,
    .agency-case-header-card,
    .agency-case-detail-head {
        flex-direction: column;
        align-items: flex-start;
    }
    .agency-profile-brand {
        align-items: flex-start;
    }
    .agency-profile-officer {
        width: 100%;
    }
    .agency-case-detail-badges {
        justify-content: flex-start;
    }
    .agency-preview-grid,
    .agency-reply-controls,
    .agency-detail-card-grid,
    .agency-detail-card-grid.ai-layout,
    .agency-permission-list,
    .agency-timeline-wide {
        grid-template-columns: 1fr;
    }
    .agency-detail-hero {
        flex-direction: column;
    }
}
.rich-block-subtitle {
    margin: 4px 0 10px;
    color: var(--muted);
    font-size: 0.86rem;
    line-height: 1.45;
}
.rich-weather-map {
    min-height: 260px;
    border: 1px solid #dbe6fb;
    border-radius: 16px;
    overflow: hidden;
    background: #eaf7ff;
}
.rich-weather-map .leaflet-tile,
.rich-weather-map .leaflet-marker-icon,
.rich-weather-map .leaflet-marker-shadow {
    max-width: none !important;
}
.rich-weather-map .leaflet-popup-content-wrapper {
    border-radius: 12px;
    box-shadow: 0 18px 36px rgba(6, 24, 68, 0.18);
}
.rich-weather-map-meta {
    display: block;
    margin-top: 9px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 700;
}
.rich-location-details {
    display: grid;
    gap: 6px;
    margin-top: 12px;
}
.rich-location-details p {
    margin: 0;
    padding: 9px 10px;
    border-radius: 13px;
    background: #f4f7ff;
    font-size: 0.86rem;
}
.rich-location-phone {
    color: var(--navy) !important;
    font-weight: 800;
}
.rich-location-list {
    display: grid;
    gap: 7px;
    margin-top: 12px;
}
.rich-location-list strong {
    color: var(--navy);
    font-size: 0.84rem;
}
.rich-location-list ul {
    margin: 0;
    padding-left: 18px;
}
.rich-location-list li {
    font-size: 0.84rem;
    margin-bottom: 4px;
}
.rich-location-actions,
.rich-suggested-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}
.rich-location-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 13px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--blue), #123684);
    color: #fff;
    font-size: 0.82rem;
    font-weight: 900;
    text-decoration: none;
}
.rich-suggested-questions {
    padding: 12px;
    border: 1px solid #e3ebfb;
    border-radius: 16px;
    background: #fbfdff;
}
.rich-suggested-chip {
    border: 1px solid #dbe6fb;
    background: #fff;
    color: var(--navy);
    border-radius: 999px;
    min-height: 34px;
    padding: 8px 12px;
    font-weight: 800;
    font-size: 0.82rem;
    cursor: pointer;
}
.rich-suggested-chip:hover {
    background: #eef4ff;
    color: var(--primary);
}
.chat-composer {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}
.mypjeq-assist-panel {
    margin-bottom: 16px;
    padding: 16px 18px;
    border: 1px solid #f5d199;
    border-radius: 22px;
    background: linear-gradient(180deg, #fffaf0 0%, #fffdf8 100%);
    box-shadow: 0 18px 36px rgba(180, 104, 9, 0.08);
}
.mypjeq-assist-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}
.mypjeq-assist-tools {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.mypjeq-assist-head strong {
    display: block;
    color: #8a4d08;
    font-size: 1rem;
}
.mypjeq-assist-head p,
.mypjeq-manual-note {
    margin: 6px 0 0;
    color: #7a6a55;
    line-height: 1.5;
    font-size: 0.88rem;
}
.mypjeq-assist-badge {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(233, 136, 0, 0.12);
    color: #b66000;
    font-size: 0.78rem;
    font-weight: 900;
}
.mypjeq-panel-close {
    width: 32px;
    height: 32px;
    border: 1px solid rgba(138, 77, 8, 0.16);
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.82);
    color: #8a4d08;
    cursor: pointer;
    transition: background 0.16s ease, transform 0.16s ease, border-color 0.16s ease;
}
.mypjeq-panel-close:hover,
.mypjeq-panel-close:focus-visible {
    background: #ffffff;
    border-color: rgba(138, 77, 8, 0.34);
    transform: translateY(-1px);
    outline: none;
}
.mypjeq-panel-close svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 2.5;
    stroke-linecap: round;
}
.mypjeq-collapsed-toggle {
    display: none;
    width: 100%;
    min-height: 38px;
    border: 1px solid rgba(138, 77, 8, 0.16);
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #ffffff;
    color: #8a4d08;
    font-size: 0.86rem;
    font-weight: 900;
    cursor: pointer;
}
.mypjeq-collapsed-toggle span {
    display: inline-flex;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    align-items: center;
    justify-content: center;
    background: rgba(233, 136, 0, 0.14);
    color: #b66000;
}
.mypjeq-collapsed-toggle svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
    stroke-width: 2.4;
    stroke-linecap: round;
}
.mypjeq-collapsed-toggle small {
    color: #8a4d08;
    font-size: 0.82rem;
    font-weight: 900;
}
.mypjeq-assist-panel.is-collapsed {
    padding: 10px;
    border-radius: 18px;
    box-shadow: 0 10px 24px rgba(180, 104, 9, 0.06);
}
.mypjeq-assist-panel.is-collapsed .mypjeq-assist-head,
.mypjeq-assist-panel.is-collapsed .mypjeq-assist-actions,
.mypjeq-assist-panel.is-collapsed .mypjeq-manual-form {
    display: none;
}
.mypjeq-assist-panel.is-collapsed .mypjeq-collapsed-toggle,
.mypjeq-mobile-chat-actions.is-collapsed .mypjeq-collapsed-toggle {
    display: inline-flex;
}
.mypjeq-mobile-chat-actions.is-collapsed {
    padding: 8px;
}
.mypjeq-mobile-chat-actions.is-collapsed .mypjeq-mobile-chat-note,
.mypjeq-mobile-chat-actions.is-collapsed .mypjeq-mobile-chip-row {
    display: none;
}
.mypjeq-assist-panel.is-hidden,
.mypjeq-mobile-chat-actions.is-hidden {
    display: none !important;
}
.mypjeq-assist-actions,
.mypjeq-manual-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}
.mypjeq-location-btn {
    background: linear-gradient(135deg, #f59f0b, #c96a08);
    color: #fff;
    border-color: transparent;
}
.mypjeq-quick-btn.is-location-locked,
.mypjeq-quick-btn:disabled {
    cursor: not-allowed;
    opacity: 0.48;
    filter: grayscale(0.35);
}
.mypjeq-manual-form {
    margin-top: 12px;
}
.mypjeq-manual-label {
    display: block;
    margin-bottom: 8px;
    color: var(--navy);
    font-size: 0.86rem;
    font-weight: 800;
}
.mypjeq-manual-row input {
    flex: 1 1 260px;
    min-width: 0;
    border: 1px solid #e8d7be;
    border-radius: 16px;
    padding: 12px 14px;
    background: rgba(255,255,255,0.92);
}
.mypjeq-manual-submit {
    flex-shrink: 0;
}
.mypjeq-simulation-note {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(245, 159, 11, 0.08);
    color: #9a5b08;
    font-size: 0.82rem;
    font-weight: 700;
}
.mypjeq-mobile-chat-actions {
    display: none;
}
.chat-input-row input { flex: 1; }
.chat-composer-shell {
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid #d7e2f7;
    border-radius: 22px;
    padding: 8px 10px 8px 18px;
    background: #fff;
    box-shadow: 0 10px 24px rgba(12, 33, 79, 0.05);
}
.chat-composer input {
    flex: 1;
    border: 0;
    border-radius: 0;
    padding: 10px 0;
    background: transparent;
    min-width: 0;
}
.chat-composer input:focus {
    outline: none;
}
.chat-composer-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}
.composer-icon-btn {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.composer-icon-btn:hover {
    transform: translateY(-1px);
}
.composer-icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
}
.composer-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.mic-btn {
    border: 1px solid #d7e2f7;
    background: #f8fbff;
    color: var(--navy);
}
.attach-btn {
    border: 1px solid #d7e2f7;
    background: #ffffff;
    color: var(--navy);
}
.send-btn {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: linear-gradient(135deg, #0d2b72 0%, #14388f 100%);
    color: #fff;
    box-shadow: 0 14px 24px rgba(13, 43, 114, 0.2);
}
.send-btn:disabled {
    opacity: 0.78;
}
.chat-disclaimer {
    margin-top: 14px;
}
.inline-voice-dock {
    display: none;
    padding: 0 0 10px;
    border-top: 1px solid rgba(18, 33, 63, 0.08);
}
.inline-voice-dock.active {
    display: block;
}
.inline-voice-session {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 12px 4px 0;
}
.inline-voice-session[hidden] {
    display: none !important;
}
.inline-voice-avatar {
    position: relative;
    width: 66px;
    height: 66px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(145deg, #ffffff 0%, #e8ddff 100%);
    box-shadow: 0 16px 36px rgba(17, 35, 86, 0.16);
    border: 3px solid rgba(255, 255, 255, 0.94);
}
.inline-voice-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.02);
    transition: opacity 0.45s ease, transform 0.45s ease;
}
.inline-voice-media.is-active {
    opacity: 1;
    transform: scale(1);
}

.aria-chat-avatar-security .inline-voice-media.is-active {
    object-fit: cover;
    object-position: center 42%;
    transform: scale(1.32);
}

.inline-voice-copy {
    min-width: 0;
    display: grid;
    gap: 2px;
    justify-items: start;
}
.inline-voice-wave {
    min-height: 20px;
    gap: 5px;
    justify-content: flex-start;
}
.inline-voice-wave .voice-wave-dot {
    width: 8px;
    height: 8px;
}
.inline-voice-wave[data-state="speaking"] .voice-wave-dot,
.inline-voice-wave[data-state="listening"] .voice-wave-dot {
    width: 13px;
}
.inline-voice-status {
    margin: 0;
    font-size: 0.9rem;
    max-width: 100%;
}
.inline-voice-transcript {
    margin: 0;
    min-height: 0;
    max-width: 100%;
    font-size: 0.84rem;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.inline-voice-log {
    display: none !important;
}
.inline-voice-close {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(214, 58, 75, 0.2);
    background: rgba(220, 53, 69, 0.1);
    color: #d63a4b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.inline-voice-close svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.legacy-voice-overlay {
    display: none !important;
}
.voice-mode-overlay {
    position: fixed;
    inset: 0;
    z-index: 120;
    display: none;
    background:
        radial-gradient(circle at top, rgba(47, 102, 255, 0.2) 0%, rgba(237, 243, 255, 0.96) 26%, #f7f9ff 100%);
    color: var(--text);
}
.voice-mode-overlay.active {
    display: block;
}
.voice-mode-screen {
    min-height: 100vh;
    min-height: 100dvh;
    padding: 24px 20px 0;
    position: relative;
    display: flex;
    flex-direction: column;
}
.voice-mode-screen[hidden] {
    display: none !important;
}
.voice-close-btn {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: 1px solid rgba(18, 33, 63, 0.12);
    background: rgba(255, 255, 255, 0.92);
    color: var(--text);
    font-size: 1.6rem;
}
.voice-mode-intro {
    display: grid;
    place-items: center;
}
.voice-mode-card {
    width: min(430px, 100%);
    margin: 0 auto;
}
.voice-mode-card-intro {
    display: grid;
    gap: 18px;
    align-content: center;
    min-height: calc(100vh - 48px);
}
.voice-intro-avatar {
    width: 112px;
    height: 112px;
    margin: 0 auto 4px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(145deg, #ffffff 0%, #e8ddff 100%);
    box-shadow: 0 18px 48px rgba(17, 35, 86, 0.18);
}
.voice-intro-avatar video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.voice-mode-card h2 {
    margin: 0;
    font-size: 2.35rem;
    line-height: 1.08;
    text-align: center;
    font-weight: 800;
}
.voice-mode-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 18px;
    color: var(--text);
}
.voice-mode-list li {
    display: grid;
    gap: 4px;
    padding-left: 36px;
    position: relative;
}
.voice-mode-list li::before {
    content: "";
    position: absolute;
    top: 2px;
    left: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 1.4px solid rgba(47, 102, 255, 0.35);
    box-shadow: inset 0 0 0 4px rgba(47, 102, 255, 0.08);
}
.voice-mode-list strong {
    font-size: 1rem;
}
.voice-mode-list span {
    color: var(--muted);
    line-height: 1.45;
}
.voice-mode-footnote {
    margin: 0;
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.55;
}
.voice-start-btn {
    width: 100%;
    min-height: 56px;
    border: 0;
    border-radius: 999px;
    font-weight: 800;
    font-size: 1rem;
    cursor: pointer;
}
.voice-start-light {
    background: linear-gradient(135deg, #0d2b72 0%, #14388f 100%);
    color: #fff;
}
.voice-mode-ready {
    display: grid;
    place-items: center;
}
.voice-ready-stack {
    width: min(360px, 100%);
    display: grid;
    justify-items: center;
    align-content: center;
    min-height: calc(100vh - 48px);
    gap: 20px;
}
.voice-ready-stack h2 {
    font-size: 2.05rem;
}
.voice-ready-avatar {
    width: 148px;
    height: 148px;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 30%, #e9fbff 0%, #a6d7ff 38%, #3c7fff 68%, #091536 100%);
    display: grid;
    place-items: center;
    box-shadow: 0 22px 60px rgba(60, 127, 255, 0.2);
    overflow: hidden;
}
.voice-ready-avatar img {
    width: 74px;
    height: 74px;
    object-fit: contain;
    filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.18));
}
.voice-ready-copy {
    display: grid;
    gap: 4px;
    text-align: center;
}
.voice-ready-copy strong {
    font-size: 1.45rem;
}
.voice-ready-copy span {
    color: var(--muted);
}
.voice-ready-dots {
    display: flex;
    gap: 7px;
    align-items: center;
}
.voice-ready-dots span {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(18, 33, 63, 0.22);
}
.voice-ready-dots span:first-child {
    background: var(--blue);
}
.voice-mode-session {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    padding-bottom: 0;
}
.voice-session-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: min(620px, 100%);
    margin: 0 auto;
    padding: 8px 2px 12px;
    flex-shrink: 0;
}
.voice-session-title {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
    font-weight: 800;
    font-size: 1.05rem;
}
.voice-session-menu,
.voice-session-more {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(18, 33, 63, 0.08);
    color: var(--navy);
    box-shadow: 0 10px 26px rgba(18, 33, 63, 0.08);
}
.voice-session-menu svg,
.voice-session-more svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-width: 1.9;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.voice-action-circle {
    width: 64px;
    height: 64px;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(47, 102, 255, 0.12);
    color: var(--blue);
    cursor: pointer;
    flex: 0 0 auto;
}
.voice-action-circle svg {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.voice-action-circle.is-active {
    background: var(--blue);
    color: #fff;
}
.hold-to-speak-btn {
    position: relative;
}
.hold-to-speak-btn::after {
    content: "Auto listening";
    position: absolute;
    top: calc(100% + 7px);
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    font-size: 0.78rem;
    letter-spacing: 0.04em;
    color: var(--muted);
}
.hold-to-speak-btn.is-active {
    transform: scale(1.05);
    box-shadow: 0 0 0 12px rgba(47, 102, 255, 0.14);
}
.voice-session-center {
    flex: 1;
    display: grid;
    align-content: stretch;
    justify-items: center;
    gap: 12px;
    text-align: center;
    padding: 4px 0 8px;
    overflow-y: auto;
}
.voice-avatar-stage {
    position: relative;
    width: min(168px, 34vw);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(145deg, #ffffff 0%, #e8ddff 100%);
    box-shadow: 0 28px 70px rgba(17, 35, 86, 0.2);
    align-self: end;
}
.voice-avatar-ring {
    position: absolute;
    inset: -10px;
    border-radius: inherit;
    border: 1px solid rgba(47, 102, 255, 0.18);
    box-shadow: inset 0 0 0 12px rgba(47, 102, 255, 0.06);
    pointer-events: none;
    z-index: 2;
}
.voice-avatar-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.015);
    transition: opacity 0.55s cubic-bezier(0.22, 1, 0.36, 1), transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.voice-avatar-media.is-active {
    opacity: 1;
    transform: scale(1);
}

.aria-chat-avatar-security .voice-avatar-media.is-active {
    object-fit: cover;
    object-position: center 42%;
    transform: scale(1.4);
}

.voice-bubble-wave-under-avatar {
    margin-top: -2px;
}
.voice-bubble-wave {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 42px;
    --voice-scale: 1;
}
.voice-wave-dot {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0d2b72 0%, #2f66ff 100%);
    transform: scaleY(var(--voice-scale));
    transform-origin: center;
    transition: transform 0.16s ease, opacity 0.16s ease, width 0.18s ease, border-radius 0.18s ease;
}
.voice-bubble-wave[data-state="ready"] .voice-wave-dot,
.voice-bubble-wave[data-state="idle"] .voice-wave-dot {
    animation: voiceWaveIdle 1.6s ease-in-out infinite;
}
.voice-bubble-wave[data-state="listening"] .voice-wave-dot {
    animation: voiceWaveListening 0.9s ease-in-out infinite;
}
.voice-bubble-wave[data-state="thinking"] .voice-wave-dot {
    animation: voiceWaveThinking 1.1s ease-in-out infinite;
}
.voice-bubble-wave[data-state="speaking"] .voice-wave-dot {
    animation: voiceWaveSpeaking 0.78s ease-in-out infinite;
}
.voice-bubble-wave[data-state="speaking"] .voice-wave-dot,
.voice-bubble-wave[data-state="listening"] .voice-wave-dot {
    width: 28px;
    border-radius: 16px;
}
.voice-wave-dot:nth-child(2) {
    animation-delay: 0.08s;
}
.voice-wave-dot:nth-child(3) {
    animation-delay: 0.16s;
}
.voice-wave-dot:nth-child(4) {
    animation-delay: 0.24s;
}
.voice-status-text {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    max-width: 420px;
}
.voice-transcript-text {
    margin: 0;
    max-width: 420px;
    color: var(--muted);
    line-height: 1.55;
    min-height: 28px;
}
.voice-debug-text {
    display: none !important;
}
.voice-chat-log {
    width: min(620px, 100%);
    min-height: 190px;
    max-height: min(36vh, 320px);
    overflow-y: auto;
    display: grid;
    gap: 10px;
    align-content: start;
    padding: 8px 4px 10px;
    margin-bottom: auto;
    text-align: left;
}
.voice-chat-empty {
    width: min(420px, 100%);
    justify-self: center;
    align-self: center;
    padding: 16px 18px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(18, 33, 63, 0.08);
    color: var(--muted);
    font-size: 0.92rem;
    line-height: 1.45;
}
.voice-log-item {
    max-width: 92%;
    padding: 12px 14px;
    border-radius: 20px;
    font-size: 0.95rem;
    line-height: 1.45;
    box-shadow: 0 12px 26px rgba(18, 33, 63, 0.06);
}
.voice-log-item.user {
    justify-self: end;
    background: linear-gradient(135deg, #0d2b72 0%, #2f66ff 100%);
    color: #fff;
    border-bottom-right-radius: 8px;
}
.voice-log-item.assistant {
    justify-self: start;
    background: #fff;
    color: var(--text);
    border: 1px solid rgba(18, 33, 63, 0.08);
    border-bottom-left-radius: 8px;
}
.voice-mode-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    align-items: center;
    width: 100%;
}
.voice-mode-actions-bottom {
    width: min(620px, 100%);
    margin-inline: auto;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 18px);
    padding-top: 12px;
    margin-top: 0;
    flex-shrink: 0;
}
.voice-compose-pill {
    min-height: 56px;
    flex: 1 1 auto;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.82);
    border: 1px solid rgba(18, 33, 63, 0.09);
    box-shadow: 0 14px 30px rgba(18, 33, 63, 0.08);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 18px;
    color: var(--muted);
    font-weight: 600;
    min-width: 0;
}
.voice-compose-plus {
    font-size: 1.85rem;
    line-height: 1;
    color: var(--navy);
    font-weight: 400;
}
.voice-close-action {
    background: #fff;
    color: #0d1b3d;
    border: 1px solid rgba(18, 33, 63, 0.09);
    box-shadow: 0 14px 30px rgba(18, 33, 63, 0.08);
}
.inline-voice-dock .voice-bubble-wave {
    min-height: 20px;
    gap: 5px;
    justify-content: flex-start;
}
.inline-voice-dock .voice-wave-dot,
.inline-voice-dock .voice-bubble-wave[data-state="ready"] .voice-wave-dot,
.inline-voice-dock .voice-bubble-wave[data-state="idle"] .voice-wave-dot,
.inline-voice-dock .voice-bubble-wave[data-state="thinking"] .voice-wave-dot {
    width: 8px;
    height: 8px;
}
.inline-voice-dock .voice-bubble-wave[data-state="speaking"] .voice-wave-dot,
.inline-voice-dock .voice-bubble-wave[data-state="listening"] .voice-wave-dot {
    width: 13px;
    height: 8px;
}
.inline-voice-dock .voice-status-text {
    margin: 0;
    font-size: 0.9rem;
    max-width: 100%;
}
.inline-voice-dock .voice-transcript-text {
    margin: 0;
    min-height: 0;
    max-width: 100%;
    font-size: 0.84rem;
    line-height: 1.35;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chat-history-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
    overflow-y: auto;
}
.chat-history-card {
    display: flex;
    gap: 12px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: #fff;
}
.history-card-icon {
    display: inline-flex;
    width: 18px;
    height: 18px;
}
.history-card-icon svg {
    width: 100%;
    height: 100%;
    stroke: currentColor;
    stroke-width: 1.8;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.chat-history-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #eef3ff;
    display: grid;
    place-items: center;
    color: var(--blue);
    flex-shrink: 0;
}
.chat-history-text strong,
.chat-history-text p,
.chat-history-text small {
    display: block;
}
.chat-history-text strong {
    margin-bottom: 6px;
}
.chat-history-text p {
    margin: 0 0 8px;
    color: var(--muted);
    line-height: 1.55;
}
.chat-history-text small {
    color: var(--muted);
}
@keyframes chatPopIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}
@keyframes typingPulse {
    0%, 80%, 100% {
        transform: scale(0.65);
        opacity: 0.55;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}
@keyframes chatCaretBlink {
    0%, 48% { opacity: 1; }
    50%, 100% { opacity: 0; }
}
@keyframes voiceWaveIdle {
    0%, 100% { transform: translateY(0) scale(0.92); opacity: 0.8; }
    50% { transform: translateY(-2px) scale(1); opacity: 1; }
}
@keyframes voiceWaveListening {
    0%, 100% { transform: scaleY(0.9) translateY(0); }
    25% { transform: scaleY(1.5) translateY(-3px); }
    50% { transform: scaleY(0.72) translateY(2px); }
    75% { transform: scaleY(1.32) translateY(-2px); }
}
@keyframes voiceWaveThinking {
    0%, 100% { transform: translateY(0) scale(0.95); opacity: 0.72; }
    35% { transform: translateY(-8px) scale(1.06); opacity: 1; }
    70% { transform: translateY(0) scale(0.92); opacity: 0.82; }
}
@keyframes voiceWaveSpeaking {
    0%, 100% { transform: scaleY(1) translateY(0); }
    20% { transform: scaleY(1.7) translateY(-5px); }
    40% { transform: scaleY(0.62) translateY(2px); }
    60% { transform: scaleY(1.44) translateY(-4px); }
    80% { transform: scaleY(0.86) translateY(1px); }
}
.panel-heading h3, .panel-heading h4 { margin: 0 0 6px; }
.search-box input { min-width: 240px; }
.service-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}
.service-grid.compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
}
.service-card {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 20px 18px;
    background: #fff;
    display: flex;
    flex-direction: column;
    min-height: 210px;
}
.service-card-link {
    color: inherit;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.service-card-link:hover {
    transform: translateY(-2px);
    border-color: #c8d7ff;
    box-shadow: 0 16px 32px rgba(17, 45, 110, 0.08);
}
.service-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    font-size: 1rem;
    margin-bottom: 16px;
    background: #edf2ff;
}
.service-logo-icon {
    overflow: hidden;
}
.service-agency-logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}
.service-icon-svg {
    width: 26px;
    height: 26px;
}
.color-blue .service-icon { background: #edf2ff; color: var(--blue); }
.color-orange .service-icon { background: #fff3e8; color: var(--orange); }
.color-purple .service-icon { background: #f3edff; color: var(--purple); }
.color-green .service-icon { background: #ebf8ea; color: var(--green); }
.color-yellow .service-icon { background: #fff8e2; color: var(--yellow); }
.service-card h4, .notification-item strong, .more-card strong { margin: 0 0 8px; }
.service-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
    font-size: 0.94rem;
}
.service-side-card .panel-heading.split {
    margin-bottom: 18px;
}
.service-side-card .service-card h4 {
    font-size: 1rem;
    line-height: 1.35;
}
.service-side-card .service-card p {
    font-size: 0.98rem;
}
.dashboard-shortcuts,
.dashboard-home-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px;
}
.dashboard-shortcuts {
    margin-top: 22px;
}
.shortcut-card {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 18px;
    background: #fff;
}
.shortcut-card strong {
    display: block;
    margin: 4px 0 8px;
}
.shortcut-card p {
    margin: 0;
    color: var(--muted);
    line-height: 1.55;
}
.dashboard-home-grid {
    margin-top: 18px;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}
.faq-list { display: grid; gap: 12px; }
.faq-list details {
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    background: #fff;
}
.faq-list summary { cursor: pointer; font-weight: 600; }
.faq-list p { margin: 12px 0 0; color: var(--muted); line-height: 1.6; }
.bottom-grid {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 18px;
}
.doc-layout {
    justify-content: space-between;
    align-items: stretch;
    margin-top: 20px;
}
.upload-box, .supported-list, .notification-item, .profile-card, .more-card {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 22px;
    background: #fff;
}
.upload-box {
    flex: 1.1;
    display: grid;
    place-items: center;
    text-align: center;
    gap: 8px;
}
.upload-icon {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #eef3ff;
    font-size: 2rem;
    color: var(--blue);
}
.supported-list { flex: 0.9; }
.supported-list ul {
    margin: 14px 0 0;
    padding-left: 18px;
    color: var(--muted);
    line-height: 1.8;
}
.document-table, .notification-list, .question-ranking, .more-grid {
    display: grid;
    gap: 12px;
    margin-top: 18px;
}
.document-row, .history-item, .ranking-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.more-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.status-badge, .agency-pill {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 700;
    background: #edf2ff;
    color: var(--blue);
}
.status-badge.dalam-semakan { background: #fff6df; color: #bb8b06; }
.status-badge.selesai { background: #eaf8ea; color: #2d8a33; }
.history-toolbar { margin-top: 18px; }
.history-toolbar input { flex: 1; }
.history-list { display: grid; gap: 8px; margin-top: 16px; }
.history-item { align-items: flex-start; }
.history-link-item {
    text-decoration: none;
    color: inherit;
    border-radius: 16px;
    padding: 16px 0;
}
.history-link-item:hover {
    background: rgba(37, 84, 215, 0.04);
}
.history-text { flex: 1; }
.history-text strong, .ranking-row strong {
    display: block;
    margin-bottom: 6px;
}
.history-text p {
    margin: 0 0 6px;
    color: var(--muted);
    line-height: 1.5;
}
.history-session-state {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}
.history-session-state.is-active {
    background: rgba(29, 191, 115, 0.12);
    color: #11814f;
}
.history-session-state.is-archived {
    background: rgba(104, 120, 154, 0.12);
    color: #61718f;
}
.history-empty-item {
    padding: 18px 0;
}

.history-table-card {
    display: grid;
    gap: 18px;
}

.history-total-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: #edf2ff;
    color: var(--blue);
    font-size: 0.84rem;
    font-weight: 800;
    white-space: nowrap;
}

.history-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #f8fbff;
}

.history-page-size-control,
.history-search-control {
    display: flex;
    align-items: center;
    gap: 10px;
}

.history-page-size-control {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.history-page-size-control select,
.history-search-control input {
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    color: var(--text);
}

.history-page-size-control select {
    min-width: 78px;
    padding: 10px 12px;
    font-weight: 800;
}

.history-search-control {
    margin-left: auto;
}

.history-search-control input {
    width: min(360px, 38vw);
    padding: 11px 14px;
}

.history-search-btn,
.history-reset-btn {
    min-height: 42px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.history-table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: #fff;
}

.history-data-table {
    width: 100%;
    min-width: 880px;
    border-collapse: collapse;
}

.history-data-table th,
.history-data-table td {
    padding: 14px 16px;
    border-bottom: 1px solid #edf2fc;
    text-align: left;
    vertical-align: middle;
}

.history-data-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f8fbff;
    color: var(--navy);
    font-size: 0.78rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.history-data-table tbody tr:hover {
    background: rgba(47, 102, 255, 0.035);
}

.history-data-table tbody tr:last-child td {
    border-bottom: 0;
}

.history-table-conversation {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.history-table-conversation strong {
    color: var(--navy);
    font-size: 0.96rem;
}

.history-table-conversation span {
    max-width: 560px;
    color: var(--muted);
    font-size: 0.88rem;
    line-height: 1.45;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.history-action-col {
    text-align: right !important;
    white-space: nowrap;
}

.history-open-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: #eef4ff;
    color: var(--blue);
    font-weight: 800;
    font-size: 0.84rem;
}

.history-open-btn:hover {
    background: #dfe9ff;
}

.history-table-empty {
    padding: 34px 18px !important;
    text-align: center !important;
}

.history-table-empty strong,
.history-table-empty span {
    display: block;
}

.history-table-empty strong {
    margin-bottom: 8px;
    color: var(--navy);
}

.history-table-empty span {
    color: var(--muted);
}

.history-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.history-page-summary {
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 700;
}

.history-page-nav {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.history-page-nav a {
    min-width: 38px;
    min-height: 38px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: #fff;
    color: var(--navy);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.86rem;
}

.history-page-nav a.is-current {
    background: linear-gradient(135deg, #0e2c77 0%, #1b4bc6 100%);
    color: #fff;
    border-color: transparent;
}

.history-page-nav a.is-disabled {
    pointer-events: none;
    opacity: 0.42;
}

.ghost-btn.disabled {
    pointer-events: none;
    opacity: 0.45;
}

.usage-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: end;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.04);
}

.usage-filter-bar label {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.usage-filter-bar select,
.usage-filter-bar input[type="checkbox"] {
    accent-color: var(--blue);
}

.usage-filter-bar select {
    min-height: 42px;
    min-width: 130px;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0 12px;
    background: #fff;
    color: var(--navy);
    font-weight: 800;
}

.usage-filter-bar .usage-check {
    display: inline-flex;
    grid-template-columns: auto 1fr;
    align-items: center;
    min-height: 42px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #f8fbff;
}

.usage-monitor-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
    gap: 16px;
    align-items: start;
    min-width: 0;
}

.usage-monitor-main,
.usage-monitor-side {
    display: grid;
    gap: 16px;
    min-width: 0;
}

.usage-chart-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 14px;
    min-width: 0;
}

.usage-hardware-grid .ops-stat-card {
    min-height: 104px;
}

.usage-hardware-detail-strip {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.usage-hardware-detail-strip span {
    display: grid;
    gap: 4px;
    padding: 11px 13px;
    border: 1px solid #e1e9fb;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.86);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.usage-hardware-detail-strip strong {
    color: var(--navy);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.usage-thermal-sensor-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
}

.usage-thermal-sensor-grid article {
    position: relative;
    overflow: hidden;
    min-width: 0;
    padding: 12px 14px;
    border: 1px solid #dce7fb;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(36, 87, 245, 0.06), rgba(255, 255, 255, 0.94));
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
}

.usage-thermal-sensor-grid article::after {
    content: "";
    position: absolute;
    inset: auto 12px 0 12px;
    height: 3px;
    border-radius: 999px 999px 0 0;
    background: linear-gradient(90deg, #2457f5, #10b981);
}

.usage-thermal-sensor-grid span,
.usage-thermal-sensor-grid small {
    display: block;
    overflow: hidden;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.usage-thermal-sensor-grid strong {
    display: block;
    margin: 4px 0;
    color: var(--navy);
    font-size: 1.12rem;
    font-weight: 950;
}

.usage-sensor-availability {
    display: grid;
    grid-template-columns: minmax(220px, 1.35fr) minmax(90px, 0.45fr) minmax(100px, 0.45fr) minmax(260px, 1.75fr);
    gap: 10px;
    margin-top: 10px;
    padding: 10px;
    border: 1px solid #dce7fb;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.76);
}

.usage-sensor-availability div,
.usage-sensor-availability p {
    min-width: 0;
    margin: 0;
    padding: 9px 11px;
    border-radius: 12px;
    background: #f7faff;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 800;
}

.usage-sensor-availability span {
    display: block;
    color: #6d7a99;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.usage-sensor-availability strong {
    display: block;
    overflow: hidden;
    color: var(--navy);
    font-size: 0.82rem;
    font-weight: 950;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.usage-sensor-availability p {
    line-height: 1.45;
}

.usage-map-monitor-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
    gap: 14px;
    align-items: stretch;
}

.usage-world-map-card {
    position: relative;
    min-height: 560px;
    overflow: hidden;
    border: 1px solid #e1e9fb;
    border-radius: 18px;
    background:
        radial-gradient(circle at 28% 36%, rgba(36, 87, 245, 0.18), transparent 8%),
        radial-gradient(circle at 58% 44%, rgba(16, 185, 129, 0.18), transparent 9%),
        radial-gradient(circle at 74% 32%, rgba(139, 92, 246, 0.16), transparent 8%),
        linear-gradient(135deg, #f7faff 0%, #eef4ff 100%);
}

.usage-leaflet-map {
    position: absolute;
    inset: 0;
    z-index: 2;
    opacity: 0.92;
}

.usage-world-map-card:has(.usage-leaflet-map:not(:empty)) .usage-world-map-bg,
.usage-world-map-card:has(.usage-leaflet-map:not(:empty)) .usage-world-silhouette {
    opacity: 0;
}

.usage-leaflet-map .leaflet-tile {
    filter: saturate(0.75) contrast(0.94) brightness(1.04);
}

.usage-leaflet-map .leaflet-popup-content-wrapper {
    border-radius: 14px;
    box-shadow: 0 16px 30px rgba(15, 23, 42, 0.14);
}

.usage-leaflet-map .leaflet-control-zoom {
    border: 0;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}

.usage-leaflet-map .leaflet-control-zoom a {
    width: 32px;
    height: 32px;
    line-height: 30px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    color: #071c4d;
    font-weight: 800;
}

.aria-command-center .ops-header-card {
    margin-bottom: 18px;
}

.command-center-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 16px;
    align-items: start;
}

.command-phone {
    align-self: start;
    order: 2;
    position: relative;
    top: auto;
    padding: 10px;
}

.command-phone-shell {
    width: 100%;
    height: 600px;
    min-height: 0;
    max-height: calc(100vh - 142px);
    border: 8px solid #111827;
    border-radius: 36px;
    padding: 15px;
    background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
    box-shadow: 0 24px 54px rgba(15, 23, 42, 0.18);
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow: hidden;
}

.command-phone-scroll {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 2px 4px 4px 0;
    scrollbar-width: thin;
    scrollbar-color: rgba(36, 87, 245, 0.34) transparent;
}

.command-phone-scroll::-webkit-scrollbar {
    width: 4px;
}

.command-phone-scroll::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(36, 87, 245, 0.34);
}

.command-phone-statusbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 22px;
    padding: 0 8px;
    color: #020617;
    font-size: 0.78rem;
    font-weight: 900;
}

.command-phone-statusbar span {
    width: 54px;
    height: 13px;
    border-radius: 999px;
    background:
        radial-gradient(circle at 9px 50%, #020617 0 2px, transparent 2.5px),
        radial-gradient(circle at 22px 50%, #020617 0 2px, transparent 2.5px),
        linear-gradient(#020617, #020617) 36px 3px / 16px 7px no-repeat;
}

.command-phone-head {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 30px;
    align-items: center;
    gap: 10px;
    padding: 5px 2px 8px;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.command-phone-head img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.command-phone-head strong {
    display: block;
    color: #071c4d;
    font-size: 0.9rem;
}

.command-phone-head span {
    color: var(--muted);
    font-size: 0.74rem;
}

.command-phone-head b {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: #f4f7ff;
    color: #071c4d;
    display: grid;
    place-items: center;
    font-size: 1rem;
}

.command-chat-bubble {
    border-radius: 18px;
    box-sizing: border-box;
    max-width: 86%;
    padding: 12px 13px;
    font-size: 0.72rem;
    line-height: 1.5;
    max-height: none;
    overflow: visible;
    overflow-wrap: anywhere;
    word-break: normal;
}

.command-chat-bubble.user {
    align-self: flex-end;
    margin-left: 0;
    background: #2457f5;
    color: #fff;
    border-bottom-right-radius: 7px;
}

.command-chat-bubble.ai {
    align-self: flex-start;
    margin-right: 0;
    max-width: 90%;
    background: #f1f5fb;
    color: #071c4d;
    border: 1px solid #e1e9fb;
    max-height: none;
    border-bottom-left-radius: 7px;
}

.command-result-card {
    padding: 12px;
    border: 1px solid #e1e9fb;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.06);
}

.command-result-card > strong {
    display: block;
    margin-bottom: 8px;
    color: #071c4d;
    font-size: 0.78rem;
    font-weight: 900;
}

.command-result-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 36px;
    margin-bottom: 9px;
    padding: 0 10px;
    border-radius: 12px;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #059669;
    font-size: 0.76rem;
    font-weight: 900;
}

.command-result-status span {
    font-size: 1rem;
}

.command-result-card dl {
    display: grid;
    grid-template-columns: 82px 1fr;
    gap: 6px 8px;
    margin: 0;
}

.command-result-card dt,
.command-result-card dd {
    margin: 0;
    font-size: 0.66rem;
    line-height: 1.35;
}

.command-result-card dt {
    color: var(--muted);
}

.command-result-card dd {
    color: #071c4d;
    font-weight: 800;
}

.command-result-card-generic {
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.command-result-card-generic > strong {
    color: #2457f5;
}

.command-result-card-generic dd {
    word-break: break-word;
}

.command-phone-actions {
    display: grid;
    gap: 7px;
}

.command-phone-actions button {
    min-height: 36px;
    border: 1px solid #e1e9fb;
    border-radius: 14px;
    padding: 0 12px;
    background: #fff;
    color: #071c4d;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 0.68rem;
    font-weight: 800;
}

.command-input-row {
    margin-top: auto;
    min-height: 42px;
    border: 1px solid #e1e9fb;
    border-radius: 16px;
    padding: 0 11px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #94a3b8;
    font-size: 0.78rem;
    background: #fff;
    gap: 8px;
}

.command-input-row span {
    min-width: 0;
    flex: 1 1 auto;
}

.command-input-row i {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background:
        radial-gradient(circle at 50% 34%, #071c4d 0 4px, transparent 4.5px),
        linear-gradient(#071c4d, #071c4d) 15px 14px / 4px 10px no-repeat,
        linear-gradient(#071c4d, #071c4d) 12px 25px / 10px 2px no-repeat,
        #eef3ff;
    flex: 0 0 34px;
}

.command-input-row b {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background:
        linear-gradient(135deg, #2457f5, #7449f5);
    position: relative;
    flex: 0 0 34px;
}

.command-input-row b::before {
    content: "";
    position: absolute;
    left: 11px;
    top: 9px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 13px solid #fff;
}

.command-orchestration {
    overflow: hidden;
    order: 1;
}

.command-flow-stage {
    position: relative;
    min-height: 500px;
    border-radius: 22px;
    overflow: hidden;
    background:
        radial-gradient(circle at 50% 50%, rgba(36, 87, 245, 0.10), transparent 27%),
        linear-gradient(135deg, #f8fbff 0%, #ffffff 60%, #f4f8ff 100%);
}

.aria-command-center .command-flow-stage {
    min-height: 590px;
    display: grid;
    grid-template-columns: 120px 170px 150px 270px 170px minmax(220px, 1fr);
    align-items: center;
    justify-content: center;
    gap: 72px;
    padding: 54px 34px 50px 54px;
}

.command-flow-lines {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.flow-line {
    fill: none;
    stroke-width: 4;
    stroke-linecap: round;
    stroke-dasharray: 14 16;
    animation: commandFlow 1.35s linear infinite;
    opacity: 0.9;
}

.aria-command-center .flow-line {
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-dasharray: none;
    animation: none;
    fill: none;
}

.aria-command-center #commandArrow path {
    fill: #2457f5;
}

.aria-command-center .flow-idle {
    stroke: #8ea3c8;
    opacity: 0.12;
}

.aria-command-center .flow-idle.is-selected {
    opacity: 0.34;
}

.aria-command-center .flow-active {
    stroke: #2457f5;
    stroke-width: 5;
    stroke-dasharray: none;
    fill: none;
    opacity: 1;
    filter: drop-shadow(0 4px 10px rgba(36, 87, 245, 0.2));
    animation: none;
}

.aria-command-center .flow-return {
    stroke: #f59e0b;
    stroke-width: 3;
    stroke-dasharray: 10 10;
    fill: none;
    opacity: 0.86;
    filter: drop-shadow(0 4px 10px rgba(245, 158, 11, 0.16));
}

.aria-command-center .flow-pulse {
    fill: #7449f5;
    stroke: #ffffff;
    stroke-width: 2;
    filter: drop-shadow(0 0 8px rgba(116, 73, 245, 0.58));
}

.aria-command-center .pulse-one {
    fill: #2457f5;
}

.aria-command-center .pulse-three,
.aria-command-center .pulse-four,
.aria-command-center .pulse-five {
    fill: #22c55e;
}

.aria-command-center .pulse-six,
.aria-command-center .pulse-seven {
    fill: #f59e0b;
}

.aria-command-center .command-flow-stage.is-identity-only .pulse-four {
    display: none;
}

.aria-command-center .active-to-agent,
.aria-command-center .active-to-data,
.aria-command-center .active-to-phone {
    stroke: url(#ariaFlowGradient);
    animation-delay: calc(var(--flow-duration, 4.2s) * -0.22);
}

.aria-command-center .active-to-data {
    animation-delay: calc(var(--flow-duration, 4.2s) * -0.42);
}

.aria-command-center .active-return {
    stroke: #f59e0b;
    opacity: 0;
    animation-delay: calc(var(--flow-duration, 4.2s) * -0.68);
}

.command-intent-card {
    position: absolute;
    z-index: 3;
    left: 252px;
    top: 28px;
    width: 230px;
    min-height: 78px;
    display: grid;
    grid-template-columns: 40px 1fr;
    align-items: center;
    gap: 10px;
    padding: 13px 15px;
    border: 1px solid #cfe0ff;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 42px rgba(36, 87, 245, 0.10);
}

.command-intent-card > span {
    width: 34px;
    height: 34px;
    border-radius: 12px;
    display: grid;
    place-items: center;
    background: #eef2ff;
    color: #7449f5;
    font-size: 1.35rem;
    font-weight: 900;
}

.command-intent-card strong,
.command-intent-card small,
.command-intent-card em {
    display: block;
}

.command-intent-card strong {
    color: #071c4d;
    font-size: 0.78rem;
}

.command-intent-card small {
    color: #52627d;
    font-size: 0.68rem;
    line-height: 1.35;
}

.command-intent-card em {
    margin-top: 4px;
    color: #2457f5;
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 900;
}

.flow-one { stroke: #2457f5; }
.flow-two { stroke: #10b981; animation-delay: -0.25s; }
.flow-three { stroke: #8b5cf6; animation-delay: -0.5s; }
.flow-four { stroke: #f59e0b; animation-delay: -0.75s; }
.flow-active-agent {
    stroke: #ef4444;
    stroke-width: 3;
    opacity: 0.45;
    animation-delay: -0.35s;
}

@keyframes commandFlow {
    to { stroke-dashoffset: -260; }
}

.command-node {
    position: absolute;
    z-index: 2;
    width: 180px;
    min-height: 116px;
    padding: 16px;
    border: 1px solid #dbe7fb;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.10);
    display: flex;
    flex-direction: column;
    gap: 7px;
    animation: commandPulse 2.4s ease-in-out infinite;
}

.aria-command-center .command-node {
    position: relative;
    inset: auto;
    transform: none;
    width: 100%;
    z-index: 2;
}

.aria-command-center .user-node {
    min-height: 142px;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.aria-command-center .identity-node {
    min-height: 138px;
    align-items: center;
    justify-content: center;
    text-align: center;
    border-color: #cfe0ff;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 42px rgba(36, 87, 245, 0.12);
}

.aria-command-center .identity-node img {
    width: 48px;
    height: 48px;
}

.aria-command-center .identity-node em {
    padding: 5px 9px;
    border-radius: 999px;
    background: #dcfce7;
    color: #059669;
}

.command-node strong {
    color: #071c4d;
    font-size: 0.82rem;
}

.command-node small {
    color: var(--muted);
    line-height: 1.35;
    font-size: 0.72rem;
}

.aria-command-center .command-node em {
    color: #2457f5;
    font-size: 0.72rem;
    font-style: normal;
    font-weight: 800;
}

.command-node span,
.command-node img {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.command-agency-node {
    position: absolute;
    z-index: 3;
    left: var(--x);
    top: var(--y);
    width: 142px;
    min-height: 96px;
    transform: translate(-50%, -50%);
    padding: 12px;
    border: 1px solid #dbe7fb;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    display: grid;
    grid-template-columns: 34px 1fr;
    gap: 4px 9px;
    align-items: center;
}

.aria-command-center .command-agency-stack {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr;
    gap: 13px;
    align-self: stretch;
    align-content: center;
    justify-self: center;
    width: 300px;
    max-width: 100%;
}

.aria-command-center .command-agency-node {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: 100%;
    min-height: 68px;
    padding: 8px 94px 8px 10px;
    opacity: 0.62;
    transition: opacity 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.command-side {
    order: 3;
    grid-column: 1 / -1;
}

.aria-command-center .command-agency-node.is-active {
    opacity: 1;
    transform: translateY(-2px);
}

.command-agency-node img {
    width: 32px;
    height: 32px;
    object-fit: contain;
    grid-row: span 2;
}

.command-agency-node strong {
    color: #071c4d;
    font-size: 0.76rem;
    line-height: 1.1;
}

.command-agency-node small {
    color: var(--muted);
    font-size: 0.68rem;
    line-height: 1.25;
}

.command-agency-node em {
    grid-column: 2;
    justify-self: start;
    margin-top: 2px;
    padding-top: 5px;
    border-top: 1px solid #e6eefb;
    color: #d97706;
    font-style: normal;
    font-size: 0.66rem;
    font-weight: 800;
}

.command-agent-status {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    min-height: 28px;
    padding: 0 12px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    background: #eaf1ff;
    color: #2457f5;
    font-size: 0.68rem;
    font-weight: 900;
}

.command-agency-node.is-active {
    border-color: #2457f5;
    background: #ffffff;
    box-shadow: 0 18px 42px rgba(36, 87, 245, 0.20);
    animation: commandPulse 1.5s ease-in-out infinite;
}

.command-agency-node.is-active .command-agent-status {
    background: #dcfce7;
    color: #059669;
}

.user-node { left: 24px; top: 190px; }
.orchestrator-node {
    left: 50%;
    top: 50%;
    width: 200px;
    min-height: 150px;
    transform: translate(-50%, -50%);
    align-items: center;
    text-align: center;
}
.data-node { right: 24px; bottom: 32px; }
.response-node { left: 24px; bottom: 58px; }

.aria-command-center .user-node,
.aria-command-center .orchestrator-node,
.aria-command-center .data-node {
    left: auto;
    right: auto;
    top: auto;
    bottom: auto;
}

.aria-command-center .orchestrator-node {
    width: 100%;
    min-height: 205px;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: visible;
}

.aria-command-center .orchestrator-node::before,
.aria-command-center .orchestrator-node::after {
    content: "";
    position: absolute;
    inset: -44px;
    border-radius: 50%;
    border: 1px solid rgba(36, 87, 245, 0.18);
    animation: commandRing 2.8s ease-in-out infinite;
    z-index: -1;
}

.aria-command-center .orchestrator-node::after {
    inset: -72px;
    animation-delay: -1.2s;
}

@keyframes commandRing {
    0%, 100% { transform: scale(0.94); opacity: 0.44; }
    50% { transform: scale(1.04); opacity: 0.16; }
}

.aria-command-center .data-node {
    align-items: center;
    text-align: center;
    min-height: 250px;
    justify-content: center;
}

.aria-command-center .data-node ul {
    width: 100%;
    margin: 8px 0 2px;
    padding: 9px 10px;
    list-style: none;
    border-radius: 14px;
    background: #f8fbff;
    display: grid;
    gap: 7px;
    text-align: left;
}

.aria-command-center .data-node li {
    position: relative;
    padding-left: 20px;
    color: #071c4d;
    font-size: 0.7rem;
    font-weight: 800;
}

.aria-command-center .data-node li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 2px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #dcfce7;
    border: 1px solid #22c55e;
}

.command-response-label {
    position: absolute;
    left: 50%;
    bottom: 74px;
    transform: translateX(-50%);
    z-index: 2;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #d97706;
    font-size: 0.78rem;
    font-weight: 900;
    display: none;
}

.command-orb {
    width: 86px;
    height: 86px;
    border-radius: 24px;
    background: linear-gradient(135deg, #2457f5 0%, #8b5cf6 100%);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 2rem;
    font-weight: 900;
    box-shadow: 0 20px 44px rgba(36, 87, 245, 0.24), 0 0 0 18px rgba(36, 87, 245, 0.08);
    overflow: hidden;
}

.command-orb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@keyframes commandPulse {
    0%, 100% { box-shadow: 0 18px 40px rgba(15, 23, 42, 0.10); }
    50% { box-shadow: 0 22px 52px rgba(36, 87, 245, 0.18); }
}

.command-side {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.8fr) minmax(0, 1.05fr);
    gap: 16px;
}

.command-performance-card {
    min-width: 0;
}

.command-performance-chart {
    width: 100%;
    min-height: 180px;
    display: block;
}

.command-performance-chart .chart-grid path {
    fill: none;
    stroke: #e6eefb;
    stroke-width: 1;
}

.command-performance-chart .chart-axis text {
    fill: #6f7a93;
    font-size: 11px;
    font-weight: 700;
}

.command-performance-chart .chart-area {
    fill: rgba(36, 87, 245, 0.12);
    stroke: none;
}

.command-performance-chart .chart-line {
    fill: none;
    stroke: #2457f5;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.command-performance-chart .chart-dot {
    fill: #fff;
    stroke: #2457f5;
    stroke-width: 2;
}

.command-workflow {
    display: grid;
    gap: 10px;
}

.command-workflow-step {
    display: grid;
    grid-template-columns: 28px 1fr auto;
    gap: 10px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #eef3fb;
}

.command-workflow-step b {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #eaf1ff;
    color: #2457f5;
    font-size: 0.74rem;
}

.command-workflow-step span {
    color: #071c4d;
    font-weight: 700;
    font-size: 0.8rem;
}

.command-workflow-step small {
    color: var(--muted);
    font-size: 0.7rem;
    text-transform: capitalize;
}

.command-workflow-step.complete b {
    background: #dcfce7;
    color: #059669;
}

.command-workflow-step.active b {
    background: #dbeafe;
    animation: commandStep 1s ease-in-out infinite;
}

@keyframes commandStep {
    50% { transform: scale(1.15); }
}

.command-activity-card {
    margin-top: 16px;
}

.command-session-page .ops-header-card {
    margin-bottom: 16px;
}

.command-session-stats {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    margin-bottom: 16px;
}

.command-session-table td {
    vertical-align: top;
}

.command-session-table small {
    color: var(--muted);
    font-size: 0.72rem;
}

.citizen-insights-page {
    display: grid;
    gap: 16px;
}

.citizen-insights-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
    border: 1px solid #dfe8f7;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(255,255,255,0.98), rgba(247,250,255,0.96));
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
}

.citizen-insights-hero h2 {
    margin: 4px 0 6px;
    color: var(--navy);
    font-size: 1.75rem;
    letter-spacing: -0.03em;
}

.citizen-insights-hero p {
    margin: 0;
    color: var(--muted);
    font-weight: 600;
}

.citizen-insights-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.citizen-insights-actions span,
.citizen-insights-actions a {
    min-height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 14px;
    border: 1px solid #d7e3f7;
    border-radius: 12px;
    background: #fff;
    color: #0b2d71;
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
}

.citizen-insights-actions a {
    color: #2457f5;
    box-shadow: 0 10px 24px rgba(36, 87, 245, 0.10);
}

.citizen-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.citizen-kpi-card {
    position: relative;
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 18px;
    border: 1px solid #dfe8f7;
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
    overflow: hidden;
}

.citizen-kpi-card::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: #2457f5;
}

.citizen-kpi-card > span {
    width: 54px;
    height: 54px;
    border-radius: 18px;
    display: grid;
    place-items: center;
    color: #2457f5;
    background: #eaf1ff;
}

.citizen-kpi-card > span svg {
    width: 23px;
    height: 23px;
}

.citizen-kpi-card small,
.citizen-kpi-card p {
    color: var(--muted);
    font-weight: 700;
}

.citizen-kpi-card strong {
    display: block;
    color: var(--navy);
    font-size: 1.55rem;
    line-height: 1.1;
    letter-spacing: -0.04em;
}

.citizen-kpi-card p {
    margin: 4px 0 0;
    font-size: 0.78rem;
}

.citizen-kpi-card em {
    color: #059669;
    font-size: 0.82rem;
    font-style: normal;
    font-weight: 900;
}

.citizen-kpi-card.tone-purple::before { background: #7c3aed; }
.citizen-kpi-card.tone-orange::before { background: #f59e0b; }
.citizen-kpi-card.tone-green::before { background: #10b981; }
.citizen-kpi-card.tone-purple > span { color: #7c3aed; background: #f1eaff; }
.citizen-kpi-card.tone-orange > span { color: #d97706; background: #fff4dd; }
.citizen-kpi-card.tone-green > span { color: #059669; background: #e7fff4; }

.citizen-insights-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(340px, 0.95fr);
    gap: 14px;
    align-items: stretch;
}

.citizen-insights-grid.lower {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(340px, 0.9fr);
}

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

.citizen-chart-card {
    min-width: 0;
}

.citizen-chart-card.citizen-chart-wide {
    grid-column: span 2;
}

.citizen-chart-canvas {
    position: relative;
    height: 300px;
    min-width: 0;
}

.citizen-chart-canvas.citizen-chart-bar {
    height: 270px;
}

.citizen-chart-canvas.citizen-chart-line {
    height: 250px;
}

.citizen-card {
    min-width: 0;
    padding: 18px;
    border: 1px solid #dfe8f7;
    border-radius: 18px;
    background: rgba(255,255,255,0.98);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.07);
}

.citizen-card-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.citizen-card-head h3 {
    margin: 0 0 4px;
    color: var(--navy);
    font-size: 1.05rem;
    letter-spacing: -0.02em;
}

.citizen-card-head p {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 600;
}

.user-lens-card {
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 34%),
        linear-gradient(135deg, rgba(255,255,255,0.98), rgba(248,251,255,0.98));
}

.user-lens-entry-card {
    border-color: rgba(37, 99, 235, 0.22);
}

.user-lens-head {
    align-items: flex-start;
}

.user-lens-open-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 16px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, #123d9d, #2457f5);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
    font-size: 0.82rem;
    font-weight: 900;
    white-space: nowrap;
}

.user-lens-toolbar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.user-lens-toolbar select,
.user-lens-toolbar button {
    height: 38px;
    border-radius: 13px;
    border: 1px solid #d9e5fb;
    background: #fff;
    color: #071c4d;
    font: inherit;
    font-size: 0.82rem;
    font-weight: 800;
}

.user-lens-toolbar select {
    min-width: 260px;
    padding: 0 36px 0 12px;
}

.user-lens-toolbar button {
    padding: 0 16px;
    color: #fff;
    border-color: transparent;
    background: linear-gradient(135deg, #123d9d, #2457f5);
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.18);
}

.user-lens-empty {
    padding: 18px;
    border: 1px dashed #c9d8f1;
    border-radius: 16px;
    color: var(--muted);
    font-weight: 800;
    background: rgba(255,255,255,0.7);
}

.user-lens-grid {
    display: grid;
    grid-template-columns: minmax(220px, 0.72fr) minmax(320px, 1.25fr) minmax(280px, 1fr);
    gap: 14px;
}

.user-lens-profile,
.user-lens-bars,
.user-lens-recos {
    min-width: 0;
    padding: 16px;
    border: 1px solid #dce8fb;
    border-radius: 16px;
    background: rgba(255,255,255,0.86);
}

.user-lens-profile {
    display: grid;
    gap: 8px;
}

.user-lens-avatar {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    color: #2457f5;
    background: #eaf1ff;
}

.user-lens-avatar svg {
    width: 22px;
    height: 22px;
}

.user-lens-profile small,
.user-lens-bars h4,
.user-lens-recos h4 {
    margin: 0;
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.user-lens-profile strong {
    color: #071c4d;
    font-size: 1.05rem;
}

.user-lens-profile p,
.user-lens-recos p,
.user-lens-recos em {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.user-lens-profile div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding-top: 8px;
    border-top: 1px solid #edf3fb;
}

.user-lens-profile div b {
    color: #2457f5;
    font-size: 1.25rem;
}

.user-lens-profile div span {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 800;
    text-align: right;
}

.user-lens-bars,
.user-lens-recos {
    display: grid;
    align-content: start;
    gap: 12px;
}

.user-lens-reco-row {
    display: grid;
    grid-template-columns: 32px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 11px;
    border: 1px solid #e3ecfb;
    border-radius: 14px;
    background: #f8fbff;
}

.user-lens-reco-row span {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: #2457f5;
    background: #eaf1ff;
}

.user-agency-radar-card {
    margin-top: 14px;
    padding: 16px;
    border: 1px solid #dce8fb;
    border-radius: 16px;
    background: rgba(255,255,255,0.9);
}

.user-agency-radar-layout {
    display: grid;
    grid-template-columns: minmax(280px, 1.15fr) minmax(220px, 0.85fr);
    gap: 14px;
    align-items: center;
}

.user-agency-radar-canvas {
    position: relative;
    min-height: 310px;
}

.user-agency-radar-canvas canvas {
    width: 100% !important;
    height: 310px !important;
}

.user-agency-radar-list {
    display: grid;
    gap: 9px;
}

.user-agency-radar-list div {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto;
    gap: 9px;
    align-items: center;
    padding: 10px 11px;
    border: 1px solid #e3ecfb;
    border-radius: 12px;
    background: #f8fbff;
}

.user-agency-radar-list i {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

.user-agency-radar-list b {
    min-width: 0;
    color: #071c4d;
    font-size: 0.82rem;
    font-weight: 900;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-agency-radar-list span {
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 900;
    white-space: nowrap;
}

.user-lens-reco-row svg {
    width: 16px;
    height: 16px;
}

.user-lens-reco-row b {
    color: #071c4d;
    font-size: 0.82rem;
}

.user-lens-mini-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 2px;
}

.user-lens-mini-stats span {
    min-width: 0;
    padding: 10px;
    border: 1px solid #e3ecfb;
    border-radius: 13px;
    background: #f8fbff;
}

.user-lens-mini-stats b,
.user-lens-mini-stats small {
    display: block;
}

.user-lens-mini-stats b {
    color: #071c4d;
    font-size: 0.9rem;
}

.user-lens-mini-stats small {
    margin-top: 3px;
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
}

.user-lens-live-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 14px;
    margin-top: 14px;
}

.user-lens-topic-card {
    min-width: 0;
    padding: 16px;
    border: 1px solid #dce8fb;
    border-radius: 16px;
    background: rgba(255,255,255,0.86);
}

.user-lens-topic-card h4 {
    margin: 0 0 12px;
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 900;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.user-lens-topic-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 700;
}

.user-lens-topic-card div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 10px 0;
    border-top: 1px solid #edf3fb;
}

.user-lens-topic-card div:first-of-type {
    border-top: 0;
    padding-top: 0;
}

.user-lens-topic-card b {
    color: #071c4d;
    font-size: 0.82rem;
    overflow-wrap: anywhere;
}

.user-lens-topic-card span {
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 900;
    white-space: nowrap;
}

.relevance-engine-card {
    border-color: rgba(37, 99, 235, 0.2);
    background:
        radial-gradient(circle at 8% 20%, rgba(37, 99, 235, 0.1), transparent 26%),
        radial-gradient(circle at 90% 10%, rgba(20, 184, 166, 0.1), transparent 26%),
        rgba(255,255,255,0.98);
}

.relevance-signal-grid,
.interest-aware-advice {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.relevance-signal-card,
.interest-aware-advice article {
    min-width: 0;
    padding: 15px;
    border: 1px solid #dce8fb;
    border-radius: 17px;
    background: rgba(255,255,255,0.86);
}

.relevance-signal-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
}

.relevance-signal-card > div {
    display: block;
    min-width: 0;
    color: #071c4d;
}

.relevance-signal-card small,
.interest-aware-advice small {
    display: block;
    color: #2563eb;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.relevance-signal-card h4,
.interest-aware-advice h4 {
    margin: 4px 0 7px;
    color: #071c4d;
    font-size: 0.92rem;
}

.relevance-signal-card p,
.interest-aware-advice p {
    margin: 0;
    color: #64748b;
    font-size: 0.8rem;
    line-height: 1.45;
    font-weight: 700;
}

.relevance-signal-card b {
    display: block;
    margin-top: 10px;
    color: #0f3aa7;
    font-size: 0.8rem;
    line-height: 1.45;
}

.interest-aware-advice {
    margin-top: 14px;
}

.interest-aware-advice article {
    background: linear-gradient(135deg, #ffffff, #f7fbff);
}

.aria-user-analysis-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.35fr);
    gap: 14px;
    margin-top: 14px;
    padding: 16px;
    border: 1px solid rgba(37, 99, 235, 0.22);
    border-radius: 18px;
    background:
        radial-gradient(circle at 8% 0%, rgba(37, 99, 235, 0.12), transparent 30%),
        radial-gradient(circle at 96% 12%, rgba(20, 184, 166, 0.11), transparent 28%),
        linear-gradient(135deg, rgba(255,255,255,0.98), rgba(247,251,255,0.96));
    box-shadow: 0 16px 36px rgba(15, 23, 42, 0.08);
}

.aria-user-analysis-main {
    display: grid;
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}

.aria-analysis-orb {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(135deg, #123d9d, #2457f5);
    box-shadow: 0 12px 22px rgba(37, 99, 235, 0.22);
}

.aria-analysis-orb svg {
    width: 22px;
    height: 22px;
}

.aria-user-analysis-main small,
.aria-user-analysis-side small,
.aria-user-next-move-grid small {
    display: block;
    color: #2563eb;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.aria-user-analysis-main h3 {
    margin: 4px 0 8px;
    color: #071c4d;
    font-size: 1.08rem;
    line-height: 1.25;
}

.aria-user-analysis-main p,
.aria-user-next-move-grid p {
    margin: 0;
    color: #52637e;
    font-size: 0.84rem;
    line-height: 1.5;
    font-weight: 700;
}

.aria-user-analysis-main blockquote {
    margin: 14px 0 0;
    padding: 12px 14px;
    border-left: 4px solid #2457f5;
    border-radius: 14px;
    background: rgba(239, 246, 255, 0.9);
}

.aria-user-analysis-main blockquote b,
.aria-user-analysis-main blockquote span {
    display: block;
}

.aria-user-analysis-main blockquote b {
    color: #0f3aa7;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.aria-user-analysis-main blockquote span {
    margin-top: 4px;
    color: #071c4d;
    font-size: 0.86rem;
    font-weight: 800;
}

.aria-user-analysis-side {
    display: grid;
    gap: 10px;
}

.aria-user-analysis-side article {
    padding: 14px;
    border: 1px solid #dce8fb;
    border-radius: 16px;
    background: rgba(255,255,255,0.88);
}

.aria-user-analysis-side strong {
    display: block;
    margin-top: 5px;
    color: #071c4d;
    font-size: 1.45rem;
    line-height: 1;
}

.aria-user-analysis-side span {
    display: block;
    margin-top: 5px;
    color: #64748b;
    font-size: 0.74rem;
    font-weight: 800;
}

.aria-user-next-move-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 14px;
}

.aria-user-next-move-grid article {
    min-width: 0;
    padding: 14px;
    border: 1px solid #dce8fb;
    border-radius: 16px;
    background: rgba(255,255,255,0.9);
}

.aria-user-next-move-grid article.guardrail {
    border-color: rgba(16, 185, 129, 0.3);
    background: linear-gradient(135deg, #ffffff, #f0fdf4);
}

.interest-bars {
    display: grid;
    gap: 13px;
}

.interest-bar-row {
    display: grid;
    grid-template-columns: 34px minmax(140px, 1fr) minmax(120px, 180px) 42px;
    gap: 10px;
    align-items: center;
}

.interest-bar-row b {
    color: #071c4d;
    font-size: 0.82rem;
}

.interest-bar-row > div {
    height: 11px;
    border-radius: 999px;
    background: #edf3fb;
    overflow: hidden;
}

.interest-bar-row > div i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2457f5, #3b82f6);
}

.interest-bar-row strong {
    color: #071c4d;
    font-size: 0.78rem;
    text-align: right;
}

.interest-icon {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: #2457f5;
    background: #eaf1ff;
}

.interest-icon svg {
    width: 17px;
    height: 17px;
}

.interest-icon.tone-green { color: #059669; background: #dcfce7; }
.interest-icon.tone-blue { color: #2563eb; background: #eaf1ff; }
.interest-icon.tone-purple { color: #7c3aed; background: #f1eaff; }
.interest-icon.tone-red { color: #ef4444; background: #fee2e2; }
.interest-icon.tone-orange { color: #d97706; background: #fff4dd; }
.interest-icon.tone-cyan { color: #0891b2; background: #e0f7ff; }
.interest-icon.tone-indigo { color: #4f46e5; background: #eef2ff; }

.emerging-need-list {
    display: grid;
    overflow: hidden;
    border: 1px solid #e0e9fb;
    border-radius: 16px;
}

.emerging-need-row {
    display: grid;
    grid-template-columns: 62px 42px minmax(0, 1fr) 20px;
    gap: 10px;
    align-items: center;
    padding: 13px;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid #e9eff9;
}

.emerging-need-row:last-child {
    border-bottom: 0;
}

.emerging-need-row span {
    color: #059669;
    font-weight: 900;
    text-align: center;
}

.emerging-need-row i {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: #2457f5;
    background: #eaf1ff;
    font-style: normal;
}

.emerging-need-row i svg {
    width: 18px;
    height: 18px;
}

.emerging-need-row b {
    color: #071c4d;
    font-size: 0.82rem;
}

.emerging-need-row small {
    display: block;
    color: var(--muted);
    margin-top: 3px;
    font-weight: 700;
}

.emerging-need-row em {
    color: #2457f5;
    font-size: 1.2rem;
    font-style: normal;
    font-weight: 900;
}

.journey-panel {
    display: grid;
    align-content: start;
    gap: 12px;
}

.citizen-journey-card {
    padding: 14px;
    border: 1px solid #d9e5fb;
    border-radius: 16px;
    background: linear-gradient(135deg, #f8fbff, #eef5ff);
}

.citizen-journey-card.tone-green {
    border-color: #bbf7d0;
    background: linear-gradient(135deg, #f8fffb, #ecfdf5);
}

.citizen-journey-card h4 {
    margin: 0 0 12px;
    color: #2457f5;
    font-size: 0.86rem;
    text-transform: uppercase;
}

.citizen-journey-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    align-items: start;
}

.citizen-journey-steps span {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 6px;
    color: #071c4d;
    text-align: center;
    font-size: 0.68rem;
    font-weight: 800;
}

.citizen-journey-steps span::after {
    content: "\2192";
    position: absolute;
    right: -9px;
    top: 12px;
    color: #2457f5;
    font-weight: 900;
}

.citizen-journey-steps span:last-child::after {
    display: none;
}

.citizen-journey-steps .icon-svg {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 1px solid #d7e3f7;
    border-radius: 50%;
    color: #2457f5;
    background: #fff;
}

.citizen-journey-steps svg {
    width: 16px;
    height: 16px;
}

.citizen-journey-card p {
    margin: 12px 0 0;
    color: #596783;
    font-size: 0.76rem;
    font-weight: 800;
}

.citizen-table-wrap {
    overflow-x: auto;
}

.citizen-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 480px;
}

.citizen-table th,
.citizen-table td {
    padding: 11px 10px;
    border-bottom: 1px solid #e9eff9;
    text-align: left;
    color: #071c4d;
    font-size: 0.8rem;
}

.citizen-table th {
    color: #31456f;
    font-size: 0.72rem;
    text-transform: uppercase;
}

.trend-card svg {
    width: 100%;
    min-height: 205px;
}

.trend-card {
    position: relative;
}

.trend-grid path {
    fill: none;
    stroke: #e7eefb;
    stroke-width: 1;
}

.trend-card polyline {
    fill: none;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.trend-card circle {
    fill: #fff;
    stroke-width: 2;
    cursor: pointer;
    outline: none;
    transition: fill .16s ease, r .16s ease, stroke-width .16s ease;
}

.trend-card circle:hover,
.trend-card circle:focus {
    fill: #eff6ff;
    r: 6;
    stroke-width: 3;
}

.trend-axis-labels text {
    fill: #8a97ad;
    font-size: 9px;
    font-weight: 800;
    text-anchor: start;
}

.trend-labels text {
    fill: #687792;
    font-size: 10px;
    font-weight: 700;
    text-anchor: middle;
}

.trend-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    color: #53627f;
    font-size: 0.74rem;
    font-weight: 800;
}

.trend-legend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.trend-legend i {
    width: 18px;
    height: 4px;
    border-radius: 999px;
}

.trend-note {
    margin: 10px 0 0;
    color: #687792;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.45;
}

.trend-tooltip {
    position: absolute;
    z-index: 6;
    max-width: min(260px, calc(100% - 28px));
    padding: 9px 11px;
    border: 1px solid rgba(15, 23, 42, 0.10);
    border-left: 4px solid var(--trend-tooltip-color, #2457f5);
    border-radius: 10px;
    background: rgba(7, 18, 45, 0.96);
    color: #fff;
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18);
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1.35;
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, -10px);
    transition: opacity .14s ease, transform .14s ease;
}

.trend-tooltip.visible {
    opacity: 1;
    transform: translate(-50%, -16px);
}

.privacy-list {
    display: grid;
    gap: 10px;
}

.privacy-list div {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    color: #071c4d;
    font-size: 0.82rem;
    font-weight: 800;
}

.privacy-list span {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #059669;
    background: #dcfce7;
}

.privacy-list em {
    color: #059669;
    font-style: normal;
}

.privacy-cta {
    margin-top: 16px;
    min-height: 40px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border: 1px solid #d7e3f7;
    border-radius: 12px;
    color: #2457f5;
    font-weight: 900;
    text-decoration: none;
}

.my-aria-pattern-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.9fr);
    align-items: center;
    gap: 18px;
    background:
        radial-gradient(circle at 80% 20%, rgba(36, 87, 245, 0.13), transparent 34%),
        linear-gradient(135deg, #ffffff, #f7fbff);
}

.my-aria-pattern-copy small {
    color: #2457f5;
    font-weight: 900;
    letter-spacing: 0.08em;
}

.my-aria-pattern-copy h3 {
    margin: 6px 0;
    color: var(--navy);
    font-size: 1.35rem;
}

.my-aria-pattern-copy p {
    margin: 0;
    color: var(--muted);
    font-weight: 650;
    line-height: 1.55;
}

.my-aria-pattern-flow {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.my-aria-pattern-flow span,
.my-aria-pattern-flow strong {
    padding: 12px 14px;
    border-radius: 999px;
    color: #0b2d71;
    background: #fff;
    border: 1px solid #d7e3f7;
    font-size: 0.8rem;
    font-weight: 900;
    box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
}

.my-aria-pattern-flow strong {
    color: #fff;
    background: linear-gradient(135deg, #2457f5, #7c3aed);
}

.my-aria-pattern-flow b,
.my-aria-pattern-flow em {
    color: #2457f5;
    font-size: 1rem;
    font-style: normal;
    font-weight: 900;
}

.citizen-privacy-note {
    margin: 0;
    color: #53627f;
    font-size: 0.82rem;
    font-weight: 700;
}

.complaint-command-page {
    display: grid;
    gap: 16px;
}

.complaint-command-stats {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.complaint-workflow-card {
    overflow: hidden;
}

.complaint-stage-track {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
    margin: 6px 0 18px;
}

.complaint-stage {
    position: relative;
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid #e0e9fb;
    border-radius: 16px;
    background: #f8fbff;
}

.complaint-stage::after {
    content: "";
    position: absolute;
    top: 24px;
    right: -10px;
    width: 10px;
    height: 2px;
    background: #cbdaf6;
}

.complaint-stage:last-child::after {
    display: none;
}

.complaint-stage b {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    background: #eef4ff;
    font-size: 0.78rem;
}

.complaint-stage strong {
    color: var(--navy);
    font-size: 0.82rem;
}

.complaint-stage small {
    color: var(--muted);
    font-size: 0.7rem;
}

.complaint-stage.complete {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.complaint-stage.complete b {
    color: #047857;
    background: #dcfce7;
}

.complaint-stage.active {
    border-color: #bcd0ff;
    box-shadow: 0 12px 28px rgba(36, 88, 245, 0.12);
}

.complaint-stage.active b {
    color: #fff;
    background: #2458f5;
    animation: commandStep 1s ease-in-out infinite;
}

.complaint-flow-grid {
    display: grid;
    grid-template-columns: 1fr 1.05fr 1.15fr 1.05fr 1fr;
    gap: 14px;
    align-items: stretch;
}

.complaint-flow-node {
    position: relative;
    display: grid;
    align-content: start;
    gap: 9px;
    min-height: 230px;
    padding: 16px;
    border-radius: 20px;
    border: 1px solid #e0e9fb;
    background: linear-gradient(180deg, #fff 0%, #f8fbff 100%);
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.05);
}

.complaint-flow-node::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -14px;
    width: 14px;
    height: 3px;
    background: #2458f5;
    opacity: 0.5;
}

.complaint-flow-node:last-child::after {
    display: none;
}

.complaint-flow-node > span {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: #eef4ff;
    border: 1px solid #dbe6fb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.complaint-flow-node > span img {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    object-fit: cover;
}

.complaint-flow-node small {
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.complaint-flow-node h4 {
    margin: 0;
    color: var(--navy);
    font-size: 0.98rem;
}

.complaint-flow-node p,
.complaint-flow-node em {
    margin: 0;
    color: var(--muted);
    font-size: 0.8rem;
    line-height: 1.45;
    font-style: normal;
}

.complaint-agency-list {
    display: grid;
    gap: 7px;
}

.complaint-agency-list div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid #e0e9fb;
    background: #fff;
}

.complaint-agency-list div.is-active {
    border-color: #2458f5;
    background: #eff5ff;
    box-shadow: inset 3px 0 0 #2458f5;
}

.complaint-agency-list strong {
    color: var(--navy);
    font-size: 0.8rem;
}

.complaint-agency-list small {
    color: #2458f5;
    font-size: 0.66rem;
}

.complaint-command-bottom {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(280px, 0.8fr) minmax(280px, 0.8fr);
    gap: 16px;
}

.complaint-timeline {
    display: grid;
    gap: 10px;
}

.complaint-timeline div {
    position: relative;
    display: grid;
    gap: 3px;
    padding: 10px 12px 10px 34px;
    border-radius: 14px;
    background: #f8fbff;
    border: 1px solid #e0e9fb;
}

.complaint-timeline b {
    position: absolute;
    left: 12px;
    top: 14px;
    width: 10px;
    height: 10px;
    border-radius: 999px;
    background: #2458f5;
    box-shadow: 0 0 0 4px #e8efff;
}

.complaint-timeline strong,
.complaint-audit-list strong {
    color: var(--navy);
    font-size: 0.84rem;
}

.complaint-timeline small,
.complaint-audit-list span {
    color: var(--muted);
    font-size: 0.74rem;
}

.complaint-phone-preview {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 8px solid #0b1d4d;
    border-radius: 30px;
    background: #f8fbff;
    min-height: 270px;
}

.complaint-phone-top {
    color: var(--navy);
    font-weight: 950;
    text-align: center;
}

.complaint-phone-bubble {
    padding: 12px;
    border-radius: 16px;
    font-size: 0.82rem;
    line-height: 1.45;
}

.complaint-phone-bubble.user {
    justify-self: end;
    max-width: 85%;
    color: #fff;
    background: #2458f5;
}

.complaint-phone-bubble.ai {
    display: grid;
    gap: 5px;
    color: var(--navy);
    background: #fff;
    border: 1px solid #dbe6fb;
}

.complaint-audit-list {
    display: grid;
    gap: 10px;
}

.complaint-audit-list div {
    display: grid;
    gap: 4px;
    padding: 11px 12px;
    border-radius: 14px;
    border: 1px solid #e0e9fb;
    background: #f8fbff;
}

.complaint-empty-state {
    display: grid;
    justify-items: start;
    gap: 10px;
}

.complaint-empty-state h3,
.complaint-empty-state p {
    margin: 0;
}

.complaint-command-page {
    gap: 14px;
}

.complaint-command-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 20px 22px;
    border-radius: 20px;
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(221,230,248,0.95);
    box-shadow: 0 14px 32px rgba(15,23,42,0.06);
}

.complaint-hero-title {
    display: flex;
    align-items: center;
    gap: 16px;
}

.complaint-hero-icon {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2458f5;
    background: linear-gradient(135deg, #edf4ff 0%, #ffffff 100%);
    border: 1px solid #dbe6fb;
    box-shadow: 0 12px 26px rgba(36,88,245,0.12);
}

.complaint-hero-title h2,
.complaint-board-head h3,
.complaint-preview-panel h3 {
    margin: 0;
    color: var(--navy);
}

.complaint-hero-title p,
.complaint-board-head p {
    margin: 3px 0 0;
    color: var(--muted);
}

.complaint-hero-pills,
.complaint-stage-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.complaint-hero-pills span,
.complaint-stage-chips span {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 0 14px;
    border-radius: 999px;
    border: 1px solid #dbe6fb;
    background: #f8fbff;
    color: var(--navy);
    font-weight: 850;
    font-size: 0.8rem;
}
.complaint-command-back-link {
    min-height: 34px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid #b9c9e7;
    background: #fff;
    color: #2458f5;
    padding: 0 14px;
    font-size: 0.8rem;
    font-weight: 900;
    text-decoration: none;
}

.complaint-hero-pills i,
.complaint-stage-chips i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34,197,94,0.12);
}

.complaint-stage-chips .pending i { background: #94a3b8; box-shadow: none; }
.complaint-stage-chips .active.blue i,
.complaint-stage-chips .complete.blue i { background: #2563eb; }
.complaint-stage-chips .active.purple i,
.complaint-stage-chips .complete.purple i { background: #7c3aed; }
.complaint-stage-chips .active.orange i,
.complaint-stage-chips .complete.orange i { background: #f59e0b; }
.complaint-stage-chips .active.teal i,
.complaint-stage-chips .complete.teal i { background: #14b8a6; }
.complaint-stage-chips .active.green i,
.complaint-stage-chips .complete.green i { background: #22c55e; }

.complaint-command-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 14px;
    align-items: stretch;
}

.complaint-workflow-card {
    padding: 18px;
}
.complaint-user-rating-summary {
    display: grid;
    grid-template-columns: minmax(210px, .32fr) minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 16px;
    padding: 14px;
    border: 1px solid #dbeafe;
    border-radius: 16px;
    background: linear-gradient(135deg, #fbfdff 0%, #eef6ff 100%);
}
.complaint-user-rating-summary > div {
    display: grid;
    gap: 5px;
}
.complaint-user-rating-summary small {
    color: #64748b;
    font-size: .72rem;
    font-weight: 950;
    letter-spacing: .05em;
}
.complaint-user-rating-summary strong {
    color: #f59e0b;
    font-size: 1.8rem;
    line-height: 1;
}
.complaint-user-rating-summary span,
.complaint-user-rating-summary p {
    margin: 0;
    color: #334155;
    font-size: .86rem;
    font-weight: 750;
    line-height: 1.45;
}
.complaint-user-rating-pill {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    padding: 6px 10px;
    font-size: .78rem;
    font-weight: 950;
}
.complaint-user-rating-pill.has-rating {
    background: #fff7ed;
    color: #b45309;
}
.command-notify-form {
    display: inline-flex;
    margin: 0;
}
.command-notify-button {
    border: 1px solid #bbf7d0 !important;
    background: #ecfdf5 !important;
    color: #15803d !important;
    cursor: pointer;
}
.command-notify-done {
    display: inline-flex;
    align-items: center;
    min-height: 32px;
    border-radius: 10px;
    background: #dcfce7;
    color: #15803d;
    padding: 0 10px;
    font-size: .82rem;
    font-weight: 950;
}

.complaint-board-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.complaint-workflow-canvas {
    position: relative;
    display: grid;
    grid-template-columns: repeat(6, minmax(150px, 1fr));
    gap: 28px;
    align-items: stretch;
    min-height: 410px;
    padding: 26px 0 84px;
}

.complaint-command-node {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 10px;
    align-content: start;
    min-height: 330px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid #dfe8fb;
    background: linear-gradient(180deg, #fff 0%, #f9fbff 100%);
    box-shadow: 0 18px 34px rgba(15,23,42,0.06);
}

.complaint-command-node::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -26px;
    width: 24px;
    height: 3px;
    background: #2458f5;
    box-shadow: 10px 0 0 #2458f5;
}

.complaint-command-node::before {
    content: "";
    position: absolute;
    top: calc(50% - 5px);
    right: -31px;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    background: #2458f5;
    box-shadow: 0 0 0 5px #edf4ff;
}

.complaint-command-node.resolution::after,
.complaint-command-node.resolution::before {
    display: none;
}

.complaint-command-node h4 {
    margin: 0;
    color: var(--navy);
    font-size: 0.9rem;
    line-height: 1.35;
    text-align: center;
}

.complaint-command-node p,
.complaint-command-node small,
.complaint-command-node li,
.complaint-command-node em {
    margin: 0;
    color: var(--muted);
    font-size: 0.73rem;
    line-height: 1.45;
    font-style: normal;
}

.complaint-command-node b {
    justify-self: center;
    padding: 7px 12px;
    border-radius: 999px;
    background: #eef4ff;
    color: #2458f5;
    font-size: 0.72rem;
}

.complaint-person-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.complaint-person-row > span {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 950;
    background: #2458f5;
}

.complaint-person-row strong,
.complaint-command-node strong {
    color: var(--navy);
    font-size: 0.78rem;
}

.complaint-avatar {
    justify-self: center;
    width: 82px;
    height: 82px;
    border-radius: 999px;
    padding: 5px;
    background: linear-gradient(135deg, #eef4ff 0%, #fff 100%);
    border: 1px solid #dbe6fb;
}

.complaint-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: inherit;
}

.complaint-route-stack {
    display: grid;
    gap: 8px;
}

.complaint-route-stack div {
    display: grid;
    grid-template-columns: 34px 1fr auto;
    align-items: center;
    gap: 8px;
    padding: 8px;
    border-radius: 12px;
    border: 1px solid #e1eaf9;
    background: #fff;
}

.complaint-route-stack div.active {
    border-color: #7aa2ff;
    box-shadow: inset 3px 0 0 #2458f5;
}

.complaint-route-stack span,
.complaint-officer-avatar,
.complaint-mail-icon,
.complaint-check-icon {
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    color: #2458f5;
    background: #eef4ff;
}

.complaint-route-stack span img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    display: block;
}

.complaint-route-stack small {
    padding: 5px 8px;
    border-radius: 999px;
    background: #eef4ff;
    color: #2458f5;
    font-weight: 850;
}

.complaint-officer-avatar,
.complaint-mail-icon,
.complaint-check-icon {
    justify-self: center;
    width: 78px;
    height: 78px;
    border-radius: 999px;
    color: #2458f5;
    background: radial-gradient(circle, #fff 0%, #eaf1ff 100%);
    border: 1px solid #dbe6fb;
}

.complaint-command-node ul {
    display: grid;
    gap: 8px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.complaint-command-node li::before {
    content: "";
    width: 10px;
    height: 10px;
    margin-right: 8px;
    border-radius: 999px;
    display: inline-block;
    border: 2px solid #2458f5;
}

.complaint-escalation-card {
    position: absolute;
    left: 36%;
    bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 16px;
    border: 1px solid #fed7aa;
    background: #fff7ed;
    color: #9a3412;
    box-shadow: 0 14px 28px rgba(245,158,11,0.12);
}

.complaint-escalation-card::before,
.complaint-escalation-card::after {
    content: "";
    position: absolute;
    top: -34px;
    height: 34px;
    border-left: 2px dashed #f59e0b;
}

.complaint-escalation-card::before { left: 20%; }
.complaint-escalation-card::after { right: 20%; }

.complaint-preview-panel {
    padding: 16px;
}

.complaint-preview-panel h3 {
    margin-bottom: 12px;
}

.complaint-phone-preview {
    min-height: 520px;
    padding: 22px 14px 16px;
    border: 8px solid #081846;
    border-radius: 34px;
    background: #f8fbff;
}

.complaint-phone-bar {
    justify-self: center;
    width: 90px;
    height: 14px;
    border-radius: 999px;
    background: #06133a;
    margin-bottom: 10px;
}

.complaint-phone-top {
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
}

.complaint-phone-top span {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    overflow: hidden;
}

.complaint-phone-top img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.complaint-phone-top small {
    display: block;
    color: #22c55e;
}

.complaint-phone-bubble.muted {
    justify-self: start;
    max-width: 86%;
    color: var(--navy);
    background: #fff;
    border: 1px solid #e1eaf9;
}

.complaint-command-bottom {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.complaint-sla-grid {
    display: grid;
    gap: 10px;
}

.complaint-sla-grid div {
    position: relative;
    display: grid;
    gap: 5px;
    padding: 12px;
    border: 1px solid #e1eaf9;
    border-radius: 14px;
    background: #f8fbff;
}

.complaint-sla-grid span,
.complaint-sla-grid small {
    color: var(--muted);
    font-size: 0.72rem;
}

.complaint-sla-grid strong {
    color: var(--navy);
}

.complaint-sla-grid i {
    width: var(--progress, 0%);
    height: 8px;
    border-radius: 999px;
    background: #22c55e;
}

.complaint-note-box {
    padding: 14px;
    border-radius: 14px;
    border: 1px solid #fde68a;
    background: #fffbeb;
    color: #713f12;
    line-height: 1.5;
    margin-bottom: 12px;
}

@media (max-width: 1400px) {
    .complaint-command-layout,
    .complaint-command-bottom {
        grid-template-columns: 1fr;
    }

    .complaint-workflow-canvas {
        overflow-x: auto;
        grid-template-columns: repeat(6, 180px);
    }
}

@media (max-width: 767px) {
    .complaint-command-hero,
    .complaint-board-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .complaint-hero-pills,
    .complaint-stage-chips {
        justify-content: flex-start;
    }
}

.command-activity-log {
    display: grid;
    gap: 10px;
}

.command-activity-log div {
    display: grid;
    grid-template-columns: 160px 1fr 90px 54px;
    gap: 12px;
    align-items: center;
    padding: 11px 12px;
    border: 1px solid #e6eefb;
    border-radius: 14px;
    background: #fbfdff;
}

.command-activity-log strong {
    color: #071c4d;
    font-size: 0.8rem;
}

.command-activity-log span,
.command-activity-log small {
    color: var(--muted);
    font-size: 0.78rem;
}

.command-activity-log b {
    justify-self: start;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 0.64rem;
}

.command-activity-log b.success {
    background: #dcfce7;
    color: #059669;
}

.command-activity-log b.review {
    background: #fef3c7;
    color: #b45309;
}

@media (max-width: 1200px) {
    .command-center-grid {
        grid-template-columns: 1fr;
    }

    .command-phone {
        justify-self: center;
        width: min(340px, 100%);
    }

    .command-phone-shell {
        height: 520px;
        min-height: 520px;
    }

    .command-side {
        grid-template-columns: 1fr 1fr;
        grid-column: auto;
    }
}

@media (max-width: 760px) {
    .aria-command-center .command-flow-stage {
        grid-template-columns: 1fr;
        padding: 18px 14px 54px;
        gap: 12px;
    }

    .aria-command-center .command-agency-stack {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .aria-command-center .command-flow-lines {
        display: none;
    }

    .command-node {
        width: 150px;
    }

    .data-node {
        right: 12px;
    }

    .user-node,
    .response-node {
        left: 12px;
    }

    .command-activity-log div {
        grid-template-columns: 1fr;
    }
}

.usage-world-map-bg {
    position: absolute;
    inset: 0;
    opacity: 0.68;
    background-image:
        linear-gradient(rgba(36, 87, 245, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(36, 87, 245, 0.08) 1px, transparent 1px),
        radial-gradient(ellipse at 50% 52%, transparent 35%, rgba(15, 23, 42, 0.03) 36%, transparent 37%);
    background-size: 32px 32px, 32px 32px, 100% 100%;
}

.usage-world-map-card::before {
    content: "";
    position: absolute;
    inset: 34px 48px;
    border-radius: 46% 54% 48% 52%;
    border: 1px solid rgba(36, 87, 245, 0.18);
    background:
        radial-gradient(circle at 62% 48%, rgba(36, 87, 245, 0.20), transparent 4%),
        radial-gradient(circle at 58% 50%, rgba(16, 185, 129, 0.18), transparent 7%),
        rgba(255, 255, 255, 0.46);
    filter: drop-shadow(0 16px 30px rgba(36, 87, 245, 0.08));
    pointer-events: none;
}

.usage-world-silhouette {
    position: absolute;
    inset: 38px 48px 30px;
    z-index: 1;
    opacity: 0.86;
}

.usage-world-silhouette .continent {
    position: absolute;
    display: block;
    background: linear-gradient(135deg, rgba(36, 87, 245, 0.22), rgba(16, 185, 129, 0.12));
    border: 1px solid rgba(36, 87, 245, 0.18);
    box-shadow: inset 0 0 24px rgba(255, 255, 255, 0.58);
}

.usage-world-silhouette .north-america {
    left: 7%;
    top: 18%;
    width: 22%;
    height: 28%;
    border-radius: 52% 48% 44% 56% / 44% 40% 60% 56%;
    transform: rotate(-13deg);
}

.usage-world-silhouette .south-america {
    left: 26%;
    top: 48%;
    width: 12%;
    height: 31%;
    border-radius: 42% 58% 56% 44% / 38% 45% 55% 62%;
    transform: rotate(18deg);
}

.usage-world-silhouette .europe {
    left: 46%;
    top: 22%;
    width: 12%;
    height: 14%;
    border-radius: 46% 54% 42% 58%;
}

.usage-world-silhouette .africa {
    left: 48%;
    top: 38%;
    width: 15%;
    height: 29%;
    border-radius: 48% 52% 44% 56% / 36% 44% 56% 64%;
    transform: rotate(-4deg);
}

.usage-world-silhouette .asia {
    left: 60%;
    top: 21%;
    width: 28%;
    height: 33%;
    border-radius: 42% 58% 48% 52% / 45% 38% 62% 55%;
    transform: rotate(5deg);
}

.usage-world-silhouette .australia {
    left: 75%;
    top: 63%;
    width: 12%;
    height: 11%;
    border-radius: 52% 48% 58% 42%;
    transform: rotate(8deg);
}

.usage-world-map-copy {
    position: relative;
    z-index: 4;
    max-width: 360px;
    padding: 28px;
    pointer-events: none;
}

.usage-map-kicker {
    display: inline-flex;
    min-height: 28px;
    align-items: center;
    padding: 0 10px;
    border-radius: 999px;
    background: #dbeafe;
    color: #2457f5;
    font-size: 0.76rem;
    font-weight: 900;
    text-transform: uppercase;
}

.usage-world-map-copy strong {
    display: block;
    margin-top: 12px;
    color: var(--navy);
    font-size: 1.55rem;
}

.usage-world-map-copy p {
    margin: 6px 0 0;
    color: var(--muted);
    font-weight: 700;
}

.usage-world-map-copy em {
    display: block;
    max-width: 320px;
    margin-top: 12px;
    color: #52627d;
    font-size: 0.84rem;
    font-style: normal;
    line-height: 1.45;
}

.usage-chart-with-caption {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 8px;
}

.usage-chart-with-caption > span {
    color: var(--navy);
    font-size: 0.88rem;
    font-weight: 900;
    letter-spacing: -0.01em;
}

.usage-chart-with-caption > span small {
    display: block;
    margin-top: 2px;
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 700;
}

.usage-chart-with-caption canvas {
    min-height: 0;
    max-height: 250px;
}

.usage-map-points span {
    position: absolute;
    left: var(--x);
    top: var(--y);
    z-index: 3;
    width: 14px;
    height: 14px;
    border-radius: 999px;
    background: #2457f5;
    border: 3px solid #fff;
    box-shadow: 0 0 0 8px rgba(36, 87, 245, 0.14), 0 12px 24px rgba(36, 87, 245, 0.28);
}

.usage-map-points span.is-malaysia {
    background: #10b981;
    box-shadow: 0 0 0 10px rgba(16, 185, 129, 0.16), 0 14px 28px rgba(16, 185, 129, 0.30);
}

.usage-map-label {
    position: absolute;
    left: 70%;
    top: 59%;
    z-index: 4;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid #dbe6fb;
    color: var(--navy);
    font-size: 0.78rem;
    font-weight: 900;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.usage-thermal-charts {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.usage-thermal-charts .ops-chart-shell.compact {
    height: 273px;
    min-height: 273px;
    overflow: hidden;
}

.admin-usage-monitor .ops-section-card,
.admin-usage-monitor .ops-stat-card,
.admin-usage-monitor .ops-chart-shell {
    min-width: 0;
}

.admin-usage-monitor .ops-data-table {
    min-width: 980px;
}

.admin-usage-monitor .is-live-updated {
    animation: usageLivePulse 0.7s ease;
}

@keyframes usageLivePulse {
    0% {
        box-shadow: 0 0 0 rgba(36, 87, 245, 0);
        transform: translateY(0);
    }
    35% {
        box-shadow: 0 12px 30px rgba(36, 87, 245, 0.16);
        transform: translateY(-1px);
    }
    100% {
        box-shadow: 0 0 0 rgba(36, 87, 245, 0);
        transform: translateY(0);
    }
}

.usage-request-table tbody tr {
    cursor: pointer;
}

.usage-request-table tbody tr:hover,
.usage-request-table tbody tr.is-selected {
    background: rgba(36, 87, 245, 0.055);
}

.usage-table-toolbar {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 12px;
    padding: 12px;
    border: 1px solid #e2eaf5;
    border-radius: 14px;
    background: #f8fbff;
}

.usage-table-toolbar label {
    display: grid;
    gap: 6px;
    color: #63708f;
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.usage-table-search {
    flex: 1;
    min-width: 260px;
}

.usage-table-toolbar input,
.usage-table-toolbar select {
    width: 100%;
    height: 40px;
    border: 1px solid #d9e3f5;
    border-radius: 10px;
    padding: 0 12px;
    color: var(--navy);
    background: #fff;
    font: inherit;
    font-size: 0.86rem;
    font-weight: 700;
    text-transform: none;
    letter-spacing: 0;
    outline: none;
}

.usage-table-toolbar input:focus,
.usage-table-toolbar select:focus {
    border-color: #2f66ff;
    box-shadow: 0 0 0 3px rgba(47, 102, 255, 0.12);
}

.usage-table-page-size {
    width: 110px;
}

.usage-table-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 12px;
    color: #64708f;
    font-size: 0.82rem;
    font-weight: 800;
}

.usage-table-pagination > div {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.usage-table-pagination button {
    min-height: 36px;
    border: 1px solid #d9e3f5;
    border-radius: 10px;
    padding: 0 12px;
    color: #0b4dff;
    background: #fff;
    font-weight: 900;
    cursor: pointer;
}

.usage-table-pagination button:hover:not(:disabled) {
    border-color: #2f66ff;
    background: #eef4ff;
}

.usage-table-pagination button:disabled {
    color: #9aa8c2;
    background: #f4f7fb;
    cursor: not-allowed;
}

.usage-table-pagination strong {
    min-width: 58px;
    text-align: center;
    color: var(--navy);
}

.usage-status-pill {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
}

.usage-status-pill.success {
    color: #047857;
    background: #dcfce7;
}

.usage-status-pill.failed {
    color: #b91c1c;
    background: #fee2e2;
}

.usage-inspector {
    position: sticky;
    top: 88px;
}

.usage-inspector-empty {
    padding: 28px 16px;
    border: 1px dashed #cbd9fb;
    border-radius: 16px;
    text-align: center;
    color: var(--muted);
    background: #f8fbff;
    font-weight: 700;
}

.usage-inspector-body {
    display: grid;
    gap: 14px;
}

.usage-inspector dl {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 8px 12px;
    margin: 0;
}

.usage-inspector dt {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.usage-inspector dd {
    margin: 0;
    color: var(--navy);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.usage-inspector-tabs {
    display: flex;
    gap: 8px;
    padding: 5px;
    border-radius: 999px;
    background: #eef4ff;
}

.usage-inspector-tabs button {
    flex: 1;
    min-height: 34px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--muted);
    font-weight: 900;
    cursor: pointer;
}

.usage-inspector-tabs button.active {
    background: #fff;
    color: var(--blue);
    box-shadow: 0 8px 18px rgba(36, 87, 245, 0.12);
}

.usage-inspector-pre {
    max-height: 260px;
    overflow: auto;
    white-space: pre-wrap;
    word-break: break-word;
    margin: 0;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid #e1e9fb;
    background: #07152f;
    color: #dbeafe;
    font-size: 0.82rem;
    line-height: 1.55;
}

.usage-connection-list {
    display: grid;
    gap: 10px;
}

.usage-connection-list div {
    display: grid;
    gap: 4px;
    padding: 10px 12px;
    border: 1px solid #e1e9fb;
    border-radius: 14px;
    background: #f8fbff;
}

.usage-connection-list span {
    color: var(--muted);
    font-size: 0.74rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.usage-connection-list strong {
    color: var(--navy);
    font-size: 0.86rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

@media (max-width: 1360px) {
    .usage-monitor-layout {
        grid-template-columns: 1fr;
    }

    .citizen-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .citizen-insights-grid,
    .citizen-insights-grid.lower,
    .user-lens-grid,
    .user-agency-radar-layout,
    .user-lens-live-grid,
    .relevance-signal-grid,
    .interest-aware-advice,
    .aria-user-analysis-card,
    .aria-user-next-move-grid,
    .my-aria-pattern-card {
        grid-template-columns: 1fr;
    }

    .user-lens-toolbar {
        justify-content: flex-start;
    }

    .my-aria-pattern-flow {
        justify-content: flex-start;
    }

    .usage-hardware-detail-strip {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .usage-thermal-sensor-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .usage-sensor-availability {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .usage-map-monitor-grid {
        grid-template-columns: 1fr;
    }

    .usage-chart-grid {
        grid-template-columns: repeat(2, minmax(220px, 1fr));
    }

    .usage-inspector {
        position: static;
    }
}

@media (max-width: 1080px) {
    .usage-chart-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .usage-filter-bar {
        align-items: stretch;
    }

    .usage-hardware-detail-strip {
        grid-template-columns: 1fr;
    }

    .usage-thermal-sensor-grid,
    .usage-sensor-availability {
        grid-template-columns: 1fr;
    }

    .usage-world-map-card {
        min-height: 300px;
    }

    .usage-world-map-copy {
        padding: 20px;
    }

    .usage-filter-bar label,
    .usage-filter-bar select,
    .usage-filter-bar .history-search-btn,
    .usage-filter-bar .ghost-btn {
        width: 100%;
    }

    .usage-table-toolbar,
    .usage-table-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .usage-table-search,
    .usage-table-page-size {
        width: 100%;
        min-width: 0;
    }

    .usage-table-pagination > div {
        justify-content: space-between;
        width: 100%;
    }

    .admin-usage-monitor .ops-data-table {
        min-width: 860px;
    }

    .citizen-insights-hero {
        flex-direction: column;
        align-items: flex-start;
        padding: 16px;
    }

    .citizen-insights-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .citizen-kpi-grid {
        grid-template-columns: 1fr;
    }

    .citizen-analytics-grid {
        grid-template-columns: 1fr;
    }

    .citizen-chart-card.citizen-chart-wide {
        grid-column: auto;
    }

    .citizen-chart-canvas,
    .citizen-chart-canvas.citizen-chart-bar,
    .citizen-chart-canvas.citizen-chart-line {
        height: 260px;
    }

    .citizen-kpi-card {
        grid-template-columns: 48px minmax(0, 1fr) auto;
        padding: 14px;
    }

    .citizen-kpi-card > span {
        width: 44px;
        height: 44px;
    }

    .user-lens-head,
    .user-lens-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .user-lens-toolbar select,
    .user-lens-toolbar button {
        width: 100%;
        min-width: 0;
    }

    .user-agency-radar-canvas,
    .user-agency-radar-canvas canvas {
        min-height: 280px;
        height: 280px !important;
    }

    .user-agency-radar-list div {
        grid-template-columns: 12px minmax(0, 1fr);
    }

    .user-agency-radar-list span {
        grid-column: 2;
        white-space: normal;
    }

    .user-lens-profile div {
        align-items: flex-start;
        flex-direction: column;
    }

    .user-lens-profile div span {
        text-align: left;
    }

    .user-lens-mini-stats,
    .user-lens-topic-card div {
        grid-template-columns: 1fr;
    }

    .user-lens-topic-card span {
        white-space: normal;
    }

    .relevance-signal-card {
        grid-template-columns: 1fr;
    }

    .aria-user-analysis-main {
        grid-template-columns: 1fr;
    }

    .interest-bar-row {
        grid-template-columns: 30px minmax(0, 1fr) 42px;
    }

    .interest-bar-row > div {
        grid-column: 2 / -1;
    }

    .emerging-need-row {
        grid-template-columns: 52px 38px minmax(0, 1fr) 16px;
        padding: 11px;
    }

    .citizen-journey-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        row-gap: 14px;
    }

    .citizen-journey-steps span:nth-child(2)::after {
        display: none;
    }

    .my-aria-pattern-flow {
        display: grid;
        grid-template-columns: 1fr;
        justify-items: stretch;
    }

    .my-aria-pattern-flow b,
    .my-aria-pattern-flow em {
        text-align: center;
    }
}
.inline-link {
    display: inline-block;
    margin-top: 16px;
    color: #2854d7;
    font-weight: 600;
}
.stats-grid {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.stat-card { padding: 22px; }
.stat-card span, .stat-card small { color: var(--muted); }
.stat-card strong {
    display: block;
    margin: 10px 0 8px;
    font-size: 2rem;
}
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    margin-top: 18px;
}
.user-dashboard-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}
.chart-card {
    min-height: 360px;
    background:
        radial-gradient(circle at top right, rgba(79, 118, 255, 0.12), transparent 34%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(247, 250, 255, 0.98) 100%);
    border: 1px solid rgba(207, 220, 255, 0.9);
    box-shadow: 0 18px 40px rgba(17, 45, 110, 0.08);
}
.chart-card .panel-heading {
    margin-bottom: 14px;
}
.chart-card .panel-heading h3 {
    letter-spacing: -0.02em;
}
.service-detail-shell {
    display: grid;
    gap: 18px;
}
.service-detail-hero {
    background:
        radial-gradient(circle at 72% 28%, rgba(114, 135, 255, 0.14), transparent 24%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.99) 0%, rgba(248, 251, 255, 0.99) 100%);
    border: 1px solid rgba(219, 229, 252, 0.92);
    overflow: hidden;
}
.service-detail-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr) minmax(280px, 0.9fr);
    gap: 18px;
    align-items: center;
}
.service-detail-brand {
    display: flex;
    gap: 18px;
    align-items: center;
}
.service-detail-logo {
    width: 86px;
    height: 86px;
    object-fit: contain;
    flex-shrink: 0;
}
.service-detail-brand h2 {
    margin: 0 0 6px;
    font-size: 2rem;
    color: var(--navy);
}
.service-detail-brand h3 {
    margin: 0;
    font-size: 1.28rem;
    color: var(--navy);
}
.service-detail-intro {
    margin: 20px 0 18px;
    max-width: 56ch;
    color: var(--muted);
    line-height: 1.7;
    font-size: 1rem;
}
.service-detail-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 22px;
}
.service-detail-links a {
    color: #2954c6;
    font-weight: 700;
    font-size: 0.92rem;
}
.service-detail-hero-visual {
    display: flex;
    justify-content: center;
}
.service-detail-illustration,
.service-support-visual {
    position: relative;
    min-height: 220px;
    border-radius: 28px;
    background:
        radial-gradient(circle at 50% 30%, rgba(255,255,255,0.94), rgba(255,255,255,0) 38%),
        linear-gradient(145deg, #f0f3ff 0%, #dfe5ff 45%, #c9d5ff 100%);
    display: grid;
    place-items: center;
    overflow: hidden;
}
.service-detail-illustration::before,
.service-support-visual::before {
    content: "";
    position: absolute;
    inset: 18px;
    border-radius: 24px;
    border: 1px dashed rgba(93, 114, 194, 0.18);
}
.service-detail-illustration img,
.service-support-visual img {
    position: relative;
    z-index: 1;
    width: 130px;
    height: 130px;
    object-fit: contain;
    filter: drop-shadow(0 16px 30px rgba(64, 88, 187, 0.24));
}
.service-detail-about {
    display: grid;
    align-content: space-between;
    gap: 16px;
}
.service-detail-back {
    justify-self: end;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 16px;
    border: 1px solid #e2eafc;
    background: #fff;
    color: #2854d7;
    font-weight: 700;
}
.service-detail-back::before {
    content: "←";
}
.service-detail-about-card {
    border: 1px solid #dfe7fb;
    border-radius: 22px;
    background: #fff;
    padding: 20px;
    box-shadow: 0 14px 30px rgba(17, 45, 110, 0.05);
}
.service-detail-about-card strong {
    display: block;
    margin-bottom: 10px;
    color: var(--navy);
    font-size: 1.02rem;
}
.service-detail-about-card p {
    margin: 0 0 16px;
    color: var(--muted);
    line-height: 1.7;
}
.service-detail-about-card a {
    color: #2954c6;
    font-weight: 800;
}
.service-live-summary {
    border: 1px solid rgba(219, 229, 252, 0.92);
}
.service-section-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}
.service-section-head-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.service-section-head-left strong {
    color: var(--navy);
    font-size: 1.1rem;
}
.service-section-head-left span {
    color: var(--muted);
    font-size: 0.92rem;
}
.service-live-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.service-live-card {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
    padding: 16px 18px;
    border-radius: 20px;
    border: 1px solid #e2eafc;
    background: #fff;
}
.service-live-icon,
.service-info-icon,
.service-support-icon {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: #eef3ff;
    color: var(--blue);
}
.service-live-card.tone-green .service-live-icon { background: #e8f8ee; color: #14a15a; }
.service-live-card.tone-purple .service-live-icon { background: #f1ebff; color: #7d5df2; }
.service-live-card.tone-orange .service-live-icon { background: #fff3e6; color: #e48b1b; }
.service-live-copy span,
.service-live-copy small {
    display: block;
    color: var(--muted);
}
.service-live-copy strong {
    display: block;
    margin: 4px 0;
    color: var(--navy);
    font-size: 2rem;
    line-height: 1;
}
.service-live-change {
    align-self: start;
    padding: 6px 10px;
    border-radius: 999px;
    background: #eaf9ef;
    color: #15a05a;
    font-size: 0.82rem;
    font-weight: 800;
}
.service-office-section {
    display: grid;
    gap: 16px;
}
.service-office-all-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: #f8fbff;
    border: 1px solid #dbe6fb;
    color: var(--primary);
    font-size: 0.84rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}
.service-office-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.service-office-card {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 10px;
    align-items: center;
    padding: 12px;
    border: 1px solid #dfe8fb;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,251,255,0.98));
}
.service-office-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: #f2f6ff;
    border: 1px solid #dfe8fb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.service-office-icon img {
    width: 34px;
    height: 24px;
    border-radius: 5px;
    object-fit: cover;
    box-shadow: 0 2px 6px rgba(17, 35, 86, 0.12);
}
.service-office-copy {
    display: grid;
    min-width: 0;
    gap: 3px;
}
.service-office-copy strong {
    color: var(--navy);
    font-size: 0.9rem;
}
.service-office-copy span {
    color: var(--muted);
    font-size: 0.76rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.service-office-card a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 999px;
    background: #eef4ff;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 800;
    text-decoration: none;
}
.service-office-note {
    margin: 0;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f7faff;
    color: var(--muted);
    font-size: 0.84rem;
    line-height: 1.55;
}
.service-detail-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, 0.8fr);
    gap: 18px;
}
.service-support-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.85fr);
    gap: 20px;
    align-items: stretch;
}
.service-support-list {
    display: grid;
    gap: 16px;
}
.service-support-item {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}
.service-support-item strong,
.service-info-item strong {
    display: block;
    margin-bottom: 4px;
    color: #2954c6;
}
.service-support-item p,
.service-info-item p {
    margin: 0;
    color: var(--muted);
    line-height: 1.6;
}
.service-support-note {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
    margin-top: 6px;
    padding: 16px 18px;
    border-radius: 18px;
    background: #f3f6fd;
}
.service-question-list {
    display: grid;
    gap: 10px;
}
.service-question-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 18px;
    border: 1px solid #e3ebfb;
    background: #fff;
    color: var(--navy);
    font-weight: 700;
}
.service-question-arrow {
    color: #7b8fca;
    font-size: 1.25rem;
}
.service-question-cta {
    display: flex;
    align-items: center;
    min-height: 50px;
    margin-top: 16px;
    width: 100%;
    justify-content: center;
    position: relative;
    z-index: 1;
}
.service-info-strip {
    border: 1px solid rgba(219, 229, 252, 0.92);
}
.service-info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}
.service-info-item {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 14px;
    align-items: start;
}
.service-accent-blue .service-detail-hero,
.service-accent-blue .service-live-summary,
.service-accent-blue .service-office-section,
.service-accent-blue .service-info-strip { box-shadow: 0 18px 38px rgba(41, 84, 198, 0.06); }
.service-accent-purple .service-detail-hero,
.service-accent-purple .service-live-summary,
.service-accent-purple .service-office-section,
.service-accent-purple .service-info-strip { box-shadow: 0 18px 38px rgba(125, 93, 242, 0.06); }
.service-accent-green .service-detail-hero,
.service-accent-green .service-live-summary,
.service-accent-green .service-office-section,
.service-accent-green .service-info-strip { box-shadow: 0 18px 38px rgba(20, 161, 90, 0.06); }
.service-accent-orange .service-detail-hero,
.service-accent-orange .service-live-summary,
.service-accent-orange .service-office-section,
.service-accent-orange .service-info-strip { box-shadow: 0 18px 38px rgba(228, 139, 27, 0.06); }
.chart-card .panel-heading p {
    max-width: 34ch;
}
.chart-card canvas {
    width: 100% !important;
    height: 250px !important;
}
.ranking-row span {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: #edf2ff;
    color: var(--blue);
    font-weight: 700;
}
.profile-card {
    display: flex;
    gap: 18px;
    align-items: center;
}
.avatar-circle {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #0e2c77 0%, #3169ff 100%);
    color: #fff;
    font-size: 1.4rem;
    font-weight: 800;
}

.profile-detail-shell .service-detail-about-card span {
    color: var(--muted);
}

.profile-identity-visual {
    gap: 18px;
}

.profile-identity-avatar {
    width: 86px;
    height: 86px;
    display: grid;
    place-items: center;
    border-radius: 28px;
    background: linear-gradient(135deg, #0d2b72 0%, #2f66ff 100%);
    color: #fff;
    font-size: 2.1rem;
    font-weight: 800;
    box-shadow: 0 18px 44px rgba(47, 102, 255, 0.2);
}

.profile-access-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    margin-left: 8px;
    padding: 0 8px;
    border-radius: 999px;
    background: #eef4ff;
    color: var(--blue);
    font-size: 0.78rem;
}

.profile-detail-list {
    display: grid;
    gap: 10px;
    margin-top: 14px;
}

.profile-detail-list div {
    display: grid;
    gap: 4px;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
}

.profile-detail-list span {
    color: var(--muted);
    font-size: 0.8rem;
    font-weight: 700;
}

.profile-detail-list strong {
    color: var(--navy);
    overflow-wrap: anywhere;
}

.site-footer {
    margin: 0;
    padding: 18px 22px;
    border-radius: 0;
    background: rgba(255, 255, 255, 0.92);
    border-top: 1px solid var(--border);
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}
.site-footer p { margin: 0; color: var(--muted); }
.footer-links {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
}
.footer-links a { color: var(--navy-soft); font-weight: 600; }
.mobile-nav,
.agency-mobile-footer-spacer,
.admin-mobile-footer-spacer { display: none; }
.chat-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}
.chat-mobile-close-btn {
    display: none;
}

.aria-mobile-assistant-hero {
    display: none;
}

.aria-swal {
    border-radius: 24px;
    box-shadow: 0 24px 60px rgba(7, 29, 79, 0.18);
}
.aria-swal-title { color: var(--navy); font-weight: 800; }
.aria-swal-text { color: var(--muted); line-height: 1.7; }
.aria-swal-confirm, .aria-swal-cancel {
    border: 0;
    border-radius: 12px;
    padding: 12px 18px;
    font-weight: 700;
}
.aria-swal-confirm {
    background: linear-gradient(135deg, #0e2c77 0%, #1b4bc6 100%);
    color: #fff;
}
.aria-swal-cancel {
    background: #eef3ff;
    color: var(--text);
}

body.sidebar-collapsed .app-shell { grid-template-columns: 98px minmax(0, 1fr); }
body.sidebar-collapsed .brand-copy,
body.sidebar-collapsed .nav-item .nav-label,
body.sidebar-collapsed .language-card,
body.sidebar-collapsed .privacy-card,
body.sidebar-collapsed .ethics-card { display: none; }
body.sidebar-collapsed .brand-block,
body.sidebar-collapsed .nav-item { justify-content: center; }
body.sidebar-collapsed .brand-logo {
    width: 58px;
    flex: 0 0 auto;
}
body.sidebar-collapsed .nav-item .nav-icon {
    display: grid;
    min-width: 38px;
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
}

@media (min-width: 1024px) {
    :root {
        --desktop-app-scale: 0.75;
        --desktop-app-scale-size: 133.333333%;
        --desktop-app-scale-vh: 133.333333vh;
    }

    .app-shell {
        width: var(--desktop-app-scale-size);
        height: var(--desktop-app-scale-vh);
        transform: scale(var(--desktop-app-scale));
        transform-origin: top left;
    }

    .app-main {
        height: var(--desktop-app-scale-vh);
    }
}

@media (max-width: 1280px) {
    .main-content, .bottom-grid, .dashboard-grid, .stats-grid, .service-grid, .quick-actions, .login-shell, .more-grid, .dashboard-shortcuts, .dashboard-home-grid, .chat-layout {
        grid-template-columns: 1fr;
    }
    .service-detail-hero-grid,
    .service-detail-main-grid,
    .service-support-grid,
    .service-info-grid,
    .service-live-grid {
        grid-template-columns: 1fr;
    }
    .service-office-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .service-detail-about {
        order: -1;
    }
    .service-detail-back {
        justify-self: start;
    }
    .user-dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .login-unified-card {
        grid-template-columns: 1fr;
    }
    .login-brand,
    .login-form-card {
        padding: 30px 28px;
    }
    .login-feature-list {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        width: 100%;
    }
    .service-grid.compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .chat-quick-actions {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 860px) {
    .user-dashboard-grid {
        grid-template-columns: 1fr;
    }
    .chart-card {
        min-height: 320px;
    }
    .chart-card canvas {
        height: 240px !important;
    }
}

@media (max-width: 900px) {
    body {
        overflow: auto;
    }
    .login-body {
        padding: 14px 18px;
    }
    .login-feature-list {
        grid-template-columns: 1fr;
    }
    .login-connected-grid {
        gap: 8px;
    }
    .app-shell {
        grid-template-columns: 1fr;
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }
    .app-main {
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: 100vh;
        overflow: visible;
    }
    .sidebar { display: none; }
    .topbar {
        position: sticky;
        top: 0;
        padding: 12px 14px;
    }
    .topbar-actions .topbar-logout,
    .topbar-status { display: none; }
    .header-language-switch {
        display: inline-flex;
        margin-left: auto;
    }
    .topbar-logout-mobile {
        display: inline-flex;
    }
    .service-detail-brand {
        flex-direction: column;
        align-items: flex-start;
    }
    .service-detail-brand h2 {
        font-size: 1.7rem;
    }
    .service-detail-brand h3 {
        font-size: 1.08rem;
    }
    .service-detail-links {
        gap: 12px 16px;
    }
    .service-live-card {
        grid-template-columns: 48px minmax(0, 1fr);
    }
    .service-live-change {
        grid-column: 2;
        justify-self: start;
        margin-top: 6px;
    }
.service-question-item {
    padding: 14px 16px;
    font-size: 0.92rem;
}

.service-question-list a.service-question-item {
    color: inherit;
    text-decoration: none;
}
    .main-content {
        padding: 14px;
        padding-bottom: calc(172px + env(safe-area-inset-bottom, 0px));
        grid-template-columns: 1fr;
        min-height: auto;
        overflow: visible;
    }
    .main-content.single-column,
    .dashboard-shell,
    .chat-shell-full,
    .content-card:last-child,
    .dashboard-section:last-child {
        margin-bottom: calc(22px + env(safe-area-inset-bottom, 0px));
    }
    .chat-shell,
    .chat-history-panel {
        min-height: 0;
    }
    .chat-shell-full {
        min-height: calc(100vh - 116px);
        max-height: calc(100vh - 116px);
    }
    .site-footer { display: none; }
    .mobile-nav {
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: 12px;
        z-index: 40;
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
        padding: 10px;
        border-radius: 24px;
        background: rgba(8, 29, 80, 0.96);
        box-shadow: 0 24px 40px rgba(8, 29, 80, 0.25);
    }
    .mobile-nav-item {
        color: rgba(255, 255, 255, 0.82);
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 6px;
        font-size: 0.76rem;
    }
    .mobile-nav-item span {
        width: 38px;
        height: 38px;
        border-radius: 12px;
        display: grid;
        place-items: center;
        background: rgba(255, 255, 255, 0.08);
        font-weight: 800;
    }
    .mobile-nav-icon-svg {
        display: inline-flex;
        width: 18px;
        height: 18px;
    }
    .mobile-nav-icon-svg svg {
        width: 100%;
        height: 100%;
        stroke: currentColor;
        stroke-width: 1.9;
        fill: none;
        stroke-linecap: round;
        stroke-linejoin: round;
    }
    .mobile-nav-item.active span, .mobile-nav-item.active small { color: #fff; }
    .mobile-nav-item.active span { background: linear-gradient(135deg, #2f66ff 0%, #4b82ff 100%); }
    .mobile-nav-ai { transform: translateY(-18px); }
    .mobile-nav-ai img {
        width: 54px;
        height: 54px;
        object-fit: contain;
        border-radius: 50%;
        padding: 8px;
        background: #fff;
        box-shadow: 0 16px 26px rgba(8, 29, 80, 0.3);
    }
    .mobile-nav-ai span { display: none; }
    .sidebar-toggle { display: none; }

    body:has(.agency-portal) .main-content,
    .agency-portal.main-content,
    .agency-portal {
        padding-bottom: calc(190px + env(safe-area-inset-bottom, 0px));
    }

    body:has(.agency-portal) .agency-mobile-footer-spacer {
        display: block;
        height: calc(120px + env(safe-area-inset-bottom, 0px));
        flex: 0 0 auto;
    }

    body:has(.aria-ops-dashboard) .main-content,
    .aria-ops-dashboard.main-content,
    .aria-ops-dashboard {
        padding-bottom: calc(190px + env(safe-area-inset-bottom, 0px));
    }

    .admin-mobile-footer-spacer,
    body:has(.aria-ops-dashboard) .admin-mobile-footer-spacer {
        display: block;
        height: calc(120px + env(safe-area-inset-bottom, 0px));
        flex: 0 0 auto;
    }
}

@media (max-width: 768px) {
    .aria-chat-v2-page[data-launch-mode="mypjeq"] .mypjeq-assist-panel {
        display: none;
    }
    .aria-chat-v2-page[data-launch-mode="mypjeq"] .mypjeq-mobile-chat-actions {
        display: grid;
        gap: 10px;
        margin: 4px 0 12px;
        padding: 12px;
        border: 1px solid #f5d199;
        border-radius: 18px;
        background: linear-gradient(180deg, #fffaf0 0%, #fffdf8 100%);
        position: sticky;
        top: 0;
        z-index: 8;
        box-shadow: 0 10px 24px rgba(180, 104, 9, 0.10);
    }
    .mypjeq-mobile-chat-note {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 10px;
    }
    .mypjeq-mobile-chat-note > div {
        display: grid;
        gap: 4px;
        min-width: 0;
    }
    .mypjeq-mobile-chat-note strong {
        color: #8a4d08;
        font-size: 0.94rem;
    }
    .mypjeq-mobile-chat-note span {
        color: #7a6a55;
        font-size: 0.78rem;
        line-height: 1.35;
    }
    .mypjeq-mobile-chip-row {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 2px;
        scrollbar-width: none;
    }
    .mypjeq-mobile-chip-row::-webkit-scrollbar {
        display: none;
    }
    .mypjeq-mobile-chip {
        min-height: 40px;
        padding: 10px 14px;
        border-radius: 999px;
        white-space: nowrap;
        flex: 0 0 auto;
        border: 1px solid #e5ecfb;
        background: #f4f7ff;
        color: var(--navy);
        font-weight: 800;
    }
    .mypjeq-mobile-chip.mypjeq-location-btn {
        background: linear-gradient(135deg, #f59f0b, #c96a08);
        color: #fff;
        border-color: transparent;
    }
    .aria-chat-v2-page[data-launch-mode="mypjeq"] .chat-conversation {
        scroll-padding-top: 110px;
    }
    .mypjeq-assist-head {
        flex-direction: row;
        gap: 10px;
    }
    .mypjeq-assist-tools {
        align-items: flex-start;
    }
    .mypjeq-assist-badge {
        align-self: flex-start;
        min-height: 28px;
        padding: 5px 10px;
        font-size: 0.72rem;
    }
    .mypjeq-assist-panel {
        margin-bottom: 12px;
        padding: 12px 12px 10px;
        border-radius: 18px;
    }
    .mypjeq-assist-head strong {
        font-size: 0.96rem;
    }
    .mypjeq-assist-head p {
        font-size: 0.8rem;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    .mypjeq-assist-actions {
        flex-wrap: nowrap;
        overflow-x: auto;
        overflow-y: hidden;
        margin-top: 12px;
        padding-bottom: 2px;
        scrollbar-width: none;
    }
    .mypjeq-assist-actions::-webkit-scrollbar {
        display: none;
    }
    .mypjeq-location-btn,
    .mypjeq-quick-btn {
        min-height: 42px;
        padding: 10px 14px;
        border-radius: 999px;
        white-space: nowrap;
        flex: 0 0 auto;
    }
    .mypjeq-location-btn {
        min-width: 150px;
    }
    .mypjeq-manual-form {
        margin-top: 10px;
    }
    .mypjeq-manual-label {
        margin-bottom: 6px;
        font-size: 0.8rem;
    }
    .mypjeq-manual-row {
        gap: 8px;
        align-items: stretch;
    }
    .mypjeq-manual-row input {
        flex: 1 1 100%;
        padding: 11px 12px;
        border-radius: 14px;
        font-size: 0.92rem;
    }
    .mypjeq-manual-submit {
        width: 100%;
        min-height: 42px;
        border-radius: 999px;
    }
    .mypjeq-manual-note {
        margin-top: 8px;
        font-size: 0.76rem;
        line-height: 1.35;
    }
    .login-body {
        padding: 16px;
        padding-bottom: 28px;
        overflow-y: auto;
        background:
            linear-gradient(180deg, rgba(7, 22, 58, 0.78), rgba(13, 47, 126, 0.54)),
            url('../img/bg.png') center center / cover no-repeat fixed;
    }
    .login-shell {
        max-height: none;
    }
    .login-brand,
    .login-form-card {
        padding: 20px 20px;
    }
    .login-brand .lang-grid {
        align-self: stretch;
        justify-content: flex-end;
        display: flex;
    }
    .login-brand h1 {
        font-size: 2.35rem;
    }
    .login-feature-list {
        margin-top: 22px;
        width: 100%;
    }
    .feature-chip {
        text-align: left;
    }
    .login-connected-grid {
        gap: 8px;
    }
    .login-connected-chip {
        font-size: 0.88rem;
        padding: 9px 12px;
    }
    .hero-top, .panel-heading.split, .doc-layout, .history-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }
    .chat-shell-header,
    .chat-composer {
        flex-direction: column;
        align-items: stretch;
    }
    .chat-page-fullscreen {
        padding: 8px 8px 148px;
    }
    .chat-conversation {
        padding-right: 0;
    }
    .chat-shell {
        padding: 14px;
        border-radius: 22px;
    }
    .chat-shell-header {
        gap: 14px;
        margin-bottom: 14px;
    }
    .chat-shell-meta {
        gap: 8px;
        overflow-x: auto;
        overflow-y: hidden;
        flex-wrap: nowrap;
        padding-bottom: 2px;
        scrollbar-width: none;
    }
    .chat-shell-meta::-webkit-scrollbar {
        display: none;
    }
    .chat-shell-brand h2 {
        font-size: 1.55rem;
    }
    .chat-shell-logo {
        width: 52px;
        height: 52px;
    }
    .agency-summary-pill {
        display: inline-flex;
    }
    .agency-pill {
        display: none;
    }
    .chat-composer-shell {
        padding: 8px;
        gap: 8px;
        border-radius: 20px;
    }
    .chat-composer input {
        padding-left: 8px;
        font-size: 0.96rem;
    }
    .chat-composer-actions {
        gap: 8px;
    }
    .composer-icon-btn,
    .attach-btn,
    .send-btn,
    .mic-btn {
        width: 44px;
        height: 44px;
        border-radius: 14px;
    }
    .chat-row {
        align-items: flex-start;
    }
    .chat-row.user,
    .chat-row.assistant {
        gap: 10px;
    }
    .chat-row.user .chat-message-stack {
        align-items: flex-end;
        max-width: calc(100% - 54px);
    }
    .chat-row.assistant {
        align-items: flex-start;
    }
    .chat-row.assistant .chat-message-stack {
        align-items: flex-start;
        max-width: calc(100% - 54px);
    }
    .chat-avatar {
        width: 36px;
        height: 36px;
    }
    .ai-avatar img {
        width: 24px;
        height: 24px;
    }
    .chat-bubble {
        padding: 13px 14px;
    }
    .chat-meta {
        margin-top: 2px;
        font-size: 0.78rem;
    }
    .source-list {
        gap: 8px;
    }
    .source-list a,
    .confidence-note {
        font-size: 0.95rem;
    }
    .rich-location-map-shell {
        min-height: 150px;
    }
    .feedback-row {
        flex-direction: row;
        align-items: center;
        flex-wrap: wrap;
        gap: 8px;
    }
    .feedback-row span {
        width: 100%;
        margin-bottom: 2px;
    }
    .feedback-row .ghost-btn {
        padding: 8px 16px;
        min-width: 0;
    }
    .history-link-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    .rich-table {
        min-width: 320px;
    }
    .rich-chart-shell {
        height: 190px;
        padding: 10px;
    }
    .topbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
    }
    .topbar-main {
        width: 100%;
        gap: 10px;
        align-items: center;
    }
    .topbar-actions {
        width: auto;
        flex-shrink: 0;
        justify-content: flex-end;
        gap: 8px;
    }
    .topbar-mobile-logo {
        display: block;
    }
    .topbar-kicker,
    .topbar-brand p,
    .sidebar-toggle {
        display: none;
    }
    .topbar-user {
        display: none;
    }
    .header-language-switch {
        display: inline-flex;
        padding: 3px;
        gap: 3px;
    }
    .header-lang-btn {
        min-width: 42px;
        padding: 7px 12px;
        font-size: 0.8rem;
    }
    .topbar-logout-mobile {
        width: 40px;
        height: 40px;
        border-radius: 12px;
    }
    .topbar-brand strong {
        font-size: 1.5rem;
        line-height: 1.1;
    }
    .login-brand {
        align-items: center;
        text-align: center;
    }
    .login-brand .lang-grid {
        align-self: center;
        margin-bottom: 20px;
    }
    .login-logo {
        margin-left: auto;
        margin-right: auto;
    }
    .search-box input, .chat-bubble {
        max-width: 100%;
        min-width: 0;
    }
    .service-side-card .panel-heading.split {
        gap: 12px;
    }
    .service-side-card .search-box {
        width: 100%;
    }
    .service-side-card .search-box input {
        width: 100%;
        min-width: 0;
    }
    .service-grid.compact {
        grid-template-columns: 1fr;
    }
    .service-card {
        min-height: 0;
    }
    .digitalid-logo { font-size: 3.2rem; }
    .digitalid-panel p { font-size: 1.1rem; }
    .digitalid-timer { font-size: 1rem; }
    .qr-frame {
        width: min(280px, 100%);
        height: min(280px, calc(100vw - 72px));
    }
    .digitalid-shape {
        opacity: 0.6;
        transform: scale(0.7);
    }
    .circle-left,
    .circle-right {
        transform: scale(0.72);
    }
    .voice-mode-screen {
        padding: 14px 14px 0;
    }
    .voice-mode-card h2,
    .voice-ready-stack h2 {
        font-size: 1.9rem;
    }
    .voice-mode-card-intro,
    .voice-ready-stack {
        min-height: calc(100vh - 40px);
    }
    .voice-ready-avatar {
        width: 132px;
        height: 132px;
    }
    .voice-avatar-stage {
        width: min(148px, 38vw);
    }
    .voice-wave-dot {
        width: 16px;
        height: 16px;
    }
    .voice-status-text {
        font-size: 1.05rem;
    }
    .voice-transcript-text {
        font-size: 0.92rem;
    }
    .voice-session-header {
        padding-top: 2px;
        padding-bottom: 8px;
    }
    .voice-session-title {
        font-size: 0.98rem;
    }
    .voice-session-menu,
    .voice-session-more {
        width: 44px;
        height: 44px;
    }
    .voice-chat-log {
        min-height: 230px;
        max-height: 42vh;
    }
    .voice-action-circle {
        width: 58px;
        height: 58px;
    }
    .voice-compose-pill {
        min-height: 54px;
        padding-inline: 14px;
    }
    .voice-end-pill {
        min-width: 132px;
    }
}

/* ── Voice mode mobile button fix ── */
/* Pastikan butang mic & close tidak terpotong pada mobile.
   Strategi: overlay penuh viewport, session guna flex column,
   actions kekal di bawah dengan safe-area padding yang mencukupi. */
.voice-mode-screen {
    /* Override min-height: 100dvh — screen perlu ikut overlay (position:fixed; inset:0)
       bukan extend beyond it. Overflow:hidden pastikan kandungan tak overflow. */
    height: 100%;
    min-height: unset;
    overflow: hidden;
}
.voice-mode-session {
    height: 100%;
    overflow: hidden;
}
.voice-session-center {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    min-height: 0; /* allow flex shrink */
}
.voice-mode-actions.voice-mode-actions-bottom {
    /* Extra safe-area + enough room above phone navigation bar */
    padding-bottom: max(env(safe-area-inset-bottom, 0px), 14px);
    padding-bottom: max(env(safe-area-inset-bottom, 14px), 14px);
    padding-top: 10px;
    flex-shrink: 0;
    /* Ensure buttons always visible above browser chrome */
    position: relative;
    bottom: 0;
}

/* Dashboard v2 */
.dashboard-shell {
    --primary: #2457F5;
    --primary-dark: #0B1F5B;
    --purple: #7C3AED;
    --cyan: #06B6D4;
    --green: #10B981;
    --orange: #F59E0B;
    --red: #EF4444;
    --bg: #F5F7FB;
    --card: rgba(255, 255, 255, 0.94);
    --text: #0F172A;
    --muted: #64748B;
    --border: rgba(226, 232, 240, 0.9);
}

.dashboard-shell-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 20px;
    align-items: start;
}

.dashboard-main {
    display: grid;
    gap: 18px;
}

.hero-section,
.action-card,
.summary-card,
.premium-chart-card,
.notification-card,
.quick-action-card,
.aria-recommendation-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 24px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
}

.hero-section {
    position: relative;
    overflow: hidden;
    padding: 26px 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    min-height: 138px;
}

.hero-section::after {
    content: "";
    position: absolute;
    inset: auto -20% -36px auto;
    width: 420px;
    height: 160px;
    background:
        radial-gradient(circle at 20% 50%, rgba(124, 58, 237, 0.12), transparent 38%),
        radial-gradient(circle at 70% 50%, rgba(36, 87, 245, 0.12), transparent 42%);
    pointer-events: none;
}

.hero-kicker {
    margin: 0 0 8px;
    color: var(--primary);
    font-size: 0.82rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.hero-section-copy h2 {
    margin: 0;
    font-size: clamp(2rem, 2.8vw, 2.55rem);
    line-height: 1.08;
    color: var(--text);
}

.dashboard-weather-icon {
    position: relative;
    display: inline-flex;
    transform: translateY(-1px);
    cursor: help;
    outline: none;
}

.dashboard-weather-icon::after {
    content: attr(data-tooltip);
    position: absolute;
    left: 50%;
    top: calc(100% + 10px);
    z-index: 12;
    width: max-content;
    min-width: min(280px, 78vw);
    max-width: min(360px, 84vw);
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(7, 24, 69, .96);
    border: 1px solid rgba(255,255,255,.18);
    box-shadow: 0 18px 36px rgba(3, 14, 42, .32);
    color: #fff;
    font-size: .78rem;
    font-weight: 600;
    line-height: 1.35;
    white-space: normal;
    opacity: 0;
    transform: translate(-50%, -4px);
    pointer-events: none;
    transition: opacity .18s ease, transform .18s ease;
}

.dashboard-weather-icon:hover::after,
.dashboard-weather-icon:focus-visible::after,
.dashboard-weather-icon.is-tooltip-open::after {
    opacity: 1;
    transform: translate(-50%, 0);
}

.dashboard-weather-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    color: #fff;
    font-size: .76rem;
    font-weight: 600;
}

.dashboard-trend-chart-wrap {
    padding-bottom: 8px;
}

.dashboard-radar-chart-wrap {
    padding: 4px 8px 10px;
}

.hero-section-copy p:last-child {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 1rem;
}

.hero-section-skyline {
    width: 38%;
    min-width: 280px;
    height: 100px;
    opacity: 0.72;
    background:
        linear-gradient(180deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.4) 100%),
        url("data:image/svg+xml,%3Csvg width='520' height='150' viewBox='0 0 520 150' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M15 125H505M42 125L58 28M82 125L66 28M62 28V8M118 125V48L112 36M148 125V48L154 36M112 36H154M204 125V58L218 40M232 125V58L218 40M218 40V20M252 125V58L268 40M284 125V58L268 40M268 40V20M232 85H252M330 125V62M330 41V18M375 125V78M400 125V55M425 125V88M450 125V45M475 125V70M498 125V35' stroke='rgba(255,255,255,0.62)' stroke-width='5' stroke-linecap='round'/%3E%3Ccircle cx='330' cy='52' r='11' stroke='rgba(255,255,255,0.62)' stroke-width='5'/%3E%3Cpath d='M50 90H74M55 62H70M204 100H232M252 100H284M236 85L242 96L248 85' stroke='rgba(255,255,255,0.5)' stroke-width='4' stroke-linecap='round'/%3E%3C/svg%3E")
        center/contain no-repeat;
    position: relative;
    z-index: 1;
}

.dashboard-action-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
}

.action-card {
    padding: 18px;
    display: grid;
    gap: 14px;
    transition: transform 0.22s ease, box-shadow 0.22s ease;
}

.action-card:hover,
.summary-card:hover,
.premium-chart-card:hover,
.notification-card:hover,
.quick-action-card:hover,
.aria-recommendation-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 22px 48px rgba(15, 23, 42, 0.11);
}

.action-card.tone-red { background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,241,243,0.98)); }
.action-card.tone-orange { background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(255,248,235,0.98)); }
.action-card.tone-purple { background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(246,241,255,0.98)); }
.action-card.tone-green { background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(237,252,246,0.98)); }

.action-card-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.82);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.7);
}

.action-card.tone-red .action-card-icon { color: var(--red); }
.action-card.tone-orange .action-card-icon { color: var(--orange); }
.action-card.tone-purple .action-card-icon { color: var(--purple); }
.action-card.tone-green .action-card-icon { color: var(--green); }

.action-card-copy span {
    display: block;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
}

.action-card-copy strong {
    display: block;
    margin-top: 8px;
    font-size: 3rem;
    line-height: 1;
    color: var(--text);
}

.action-card-copy p {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 0.95rem;
}

.action-card-link,
.primary-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    border-radius: 999px;
    padding: 0 18px;
    font-weight: 700;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.action-card-link {
    width: fit-content;
    background: #fff;
    border: 1px solid rgba(188, 201, 235, 0.85);
    color: var(--primary);
}

.action-card-link:hover,
.primary-action-btn:hover {
    transform: translateY(-1px);
}

.dashboard-section {
    display: grid;
    gap: 16px;
}

.dashboard-section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.dashboard-section-heading h3,
.chart-card-head h4,
.summary-card-head h4 {
    margin: 0;
    color: var(--text);
    font-size: 1.4rem;
}

.dashboard-section-heading p,
.chart-card-head p,
.summary-card-head p {
    margin: 4px 0 0;
    color: var(--muted);
}

.dashboard-filter-pill,
.summary-status-pill,
.chart-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 0.84rem;
    font-weight: 700;
}

.dashboard-filter-pill {
    border: 1px solid rgba(206, 216, 241, 0.9);
    background: rgba(255,255,255,0.92);
    color: var(--primary-dark);
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.summary-card,
.premium-chart-card,
.right-panel .content-card {
    padding: 18px;
}

.summary-card {
    display: grid;
    gap: 14px;
    min-height: 280px;
}

.summary-card-chart-wrap {
    display: grid;
    grid-template-columns: minmax(0, 160px) minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.summary-card-legend {
    display: grid;
    gap: 10px;
}

.summary-card-legend div {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 0.92rem;
}

.summary-card-legend strong {
    margin-left: auto;
    color: var(--text);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-dot.blue { background: #2457F5; }
.legend-dot.purple { background: #8B5CF6; }
.legend-dot.teal { background: #14B8A6; }
.legend-dot.orange { background: #F59E0B; }

.summary-link,
.right-panel-footer-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    color: var(--primary);
}

.summary-link::after,
.right-panel-footer-link::after {
    content: "›";
    font-size: 1rem;
}

.passport-card-body,
.vehicle-card-body,
.police-card-body,
.aria-recommendation-body {
    display: flex;
    gap: 16px;
    align-items: center;
}

.passport-icon-shell,
.vehicle-icon-shell,
.police-icon-shell {
    width: 78px;
    height: 78px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(160deg, rgba(240, 245, 255, 0.98), rgba(229, 236, 255, 0.98));
    color: var(--primary);
}

.passport-card-body span,
.vehicle-card-stats span {
    display: block;
    color: var(--muted);
    font-size: 0.9rem;
}

.passport-card-body strong,
.vehicle-card-stats strong,
.police-card-body strong {
    display: block;
    margin-top: 4px;
    color: var(--text);
    font-size: 2rem;
    line-height: 1.05;
}

.passport-card-body p,
.police-card-body p {
    margin: 6px 0 0;
    color: var(--green);
    font-weight: 700;
}

.vehicle-card-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
}

.vehicle-card-stats div {
    min-width: 0;
}

.vehicle-card-stats strong {
    font-size: 1.8rem;
}

.summary-status-pill.is-success {
    background: rgba(16, 185, 129, 0.12);
    color: var(--green);
}

.summary-status-pill.is-warning {
    background: rgba(245, 158, 11, 0.12);
    color: var(--orange);
}

.chart-section-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.premium-chart-card {
    display: grid;
    gap: 14px;
    min-height: 340px;
}

.chart-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.chart-badge.positive {
    background: rgba(16, 185, 129, 0.12);
    color: var(--green);
}

.premium-chart-card canvas,
.summary-card canvas {
    width: 100% !important;
    height: 220px !important;
}

.right-panel {
    display: grid;
    gap: 16px;
    position: sticky;
    top: 22px;
}

.notification-stream {
    display: grid;
    gap: 14px;
}

.notification-stream-item {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) 10px;
    gap: 12px;
    align-items: center;
}

.notification-stream-icon {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 800;
}

.notification-stream-icon.tone-red, .notification-ping.tone-red { background: var(--red); }
.notification-stream-icon.tone-blue, .notification-ping.tone-blue { background: var(--primary); }
.notification-stream-icon.tone-green, .notification-ping.tone-green { background: var(--green); }
.notification-stream-icon.tone-purple, .notification-ping.tone-purple { background: var(--purple); }

.notification-stream-body strong {
    display: block;
    color: var(--text);
}

.notification-stream-body p {
    margin: 4px 0;
    color: var(--text);
    font-size: 0.94rem;
    line-height: 1.45;
}

.notification-stream-body small {
    color: var(--muted);
}

.notification-ping {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.aria-recommendation-body {
    justify-content: space-between;
    align-items: flex-end;
}

.aria-recommendation-body p {
    margin: 0 0 16px;
    color: var(--text);
    line-height: 1.6;
}

.aria-recommendation-body img {
    width: 104px;
    height: 104px;
    object-fit: cover;
    border-radius: 20px;
}

.primary-action-btn {
    background: linear-gradient(135deg, #5B6DFF, #7C3AED);
    color: #fff;
    box-shadow: 0 16px 24px rgba(92, 89, 255, 0.24);
}

.quick-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.quick-action-tile {
    min-height: 98px;
    border-radius: 18px;
    border: 1px solid rgba(225, 231, 246, 0.92);
    background: linear-gradient(180deg, #ffffff, #f9fbff);
    display: grid;
    place-items: center;
    gap: 6px;
    padding: 12px 8px;
    text-align: center;
    color: var(--text);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.2;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.quick-action-icon {
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(36, 87, 245, 0.08);
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 1320px) {
    .dashboard-shell-grid {
        grid-template-columns: 1fr;
    }

    .right-panel {
        position: static;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1080px) {
    .dashboard-action-grid,
    .summary-grid,
    .chart-section-grid,
    .right-panel {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-section {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-section-skyline {
        width: 100%;
        min-width: 0;
        height: 120px;
    }
}

@media (max-width: 768px) {
    .dashboard-action-grid,
    .summary-grid,
    .chart-section-grid,
    .right-panel,
    .quick-action-grid,
    .vehicle-card-stats,
    .summary-card-chart-wrap {
        grid-template-columns: 1fr;
    }

    .hero-section,
    .summary-card,
    .premium-chart-card,
    .right-panel .content-card,
    .action-card {
        border-radius: 22px;
        padding: 16px;
    }

    .dashboard-section-heading,
    .chart-card-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-section-copy h2 {
        font-size: 1.8rem;
    }

    .dashboard-trend-chart-wrap {
        height: 200px !important;
        padding-bottom: 12px;
    }

    .dashboard-radar-chart-wrap {
        height: 215px !important;
        padding: 4px 10px 14px;
    }

    .dashboard-weather-icon::after {
        left: auto;
        right: 0;
        transform: translateY(4px);
    }

    .dashboard-weather-icon:hover::after,
    .dashboard-weather-icon:focus-visible::after,
    .dashboard-weather-icon.is-tooltip-open::after {
        transform: translateY(0);
    }

    .action-card-copy strong {
        font-size: 2.2rem;
    }

    .premium-chart-card,
    .summary-card {
        min-height: 0;
    }

    .premium-chart-card canvas,
    .summary-card canvas {
        height: 200px !important;
    }
}

@media (max-width: 768px) {
    .service-office-grid {
        grid-template-columns: 1fr;
    }
    .service-office-section .service-section-head {
        align-items: stretch;
        flex-direction: column;
    }
    .service-office-all-link {
        width: 100%;
    }
    .login-unified-card {
        display: block;
        margin-bottom: 18px;
    }
    .login-brand {
        padding: 16px 18px 18px;
        gap: 10px;
        min-height: auto;
    }
    .login-brand .lang-grid {
        align-self: flex-end;
        justify-content: flex-end;
        display: flex;
        margin-bottom: 8px;
    }
    .login-brand .lang-btn {
        min-width: 42px;
        padding: 8px 0;
    }
    .login-logo {
        width: 62px;
        margin: 2px auto 0;
    }
    .eyebrow {
        margin-top: 6px;
        margin-bottom: 10px;
        padding: 7px 12px;
        font-size: 0.76rem;
    }
    .login-brand h1 {
        font-size: 2rem;
        margin-bottom: 8px;
    }
    .login-brand p {
        font-size: 0.95rem;
        line-height: 1.55;
        max-width: 100%;
    }
    .login-feature-list {
        display: none;
    }
    .login-form-card {
        padding: 18px 18px;
    }
    .login-form {
        gap: 14px;
        margin-top: 18px;
    }
    .digitalid-register-copy {
        margin-top: 22px;
        margin-bottom: 14px;
    }
    .login-card-note {
        padding: 15px 15px 14px;
    }
.login-connected-panel {
        margin-top: 14px;
        padding-top: 14px;
    }
}

/* Dashboard Phase 3 */
.aria-ops-dashboard {
    padding-bottom: 32px;
}

.ops-dashboard {
    display: grid;
    gap: 16px;
}

.ops-header-card,
.ops-section-card,
.ops-stat-card,
.ops-agency-card {
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(221, 230, 248, 0.95);
    border-radius: 20px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.06);
}

.ops-header-card {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    padding: 18px 20px;
}

.ops-header-copy h2,
.ops-section-head h3,
.ops-agency-title h3 {
    margin: 0;
    color: var(--navy);
    font-size: 1.18rem;
}

.ops-header-copy p,
.ops-section-head p,
.ops-agency-title p,
.ops-ai-summary p,
.ops-map-copy span,
.ops-notice-body p,
.ops-data-table td,
.ops-data-table th,
.ops-detail-block summary,
.ops-quick-link,
.ops-mini-metric span,
.ops-stat-copy span,
.ops-stat-copy small {
    color: var(--muted);
}

.ops-header-copy p,
.ops-section-head p,
.ops-agency-title p {
    margin: 4px 0 0;
}

.ops-header-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}

.ops-meta-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 12px;
    border-radius: 999px;
    background: #f7faff;
    border: 1px solid #dbe6fb;
    color: var(--navy);
    font-size: 0.82rem;
    font-weight: 700;
}

.ops-stat-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}

.users-stat-grid {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.users-stat-link {
    color: inherit;
    text-decoration: none;
    transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.users-stat-link:hover,
.users-stat-link:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px rgba(15, 32, 68, 0.12);
    border-color: #b8cbf2;
    outline: none;
}

.ops-stat-card {
    padding: 14px;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.ops-stat-card.tone-blue { border-top: 3px solid #2457F5; }
.ops-stat-card.tone-green { border-top: 3px solid #10B981; }
.ops-stat-card.tone-orange { border-top: 3px solid #F59E0B; }
.ops-stat-card.tone-yellow { border-top: 3px solid #EAB308; }
.ops-stat-card.tone-purple { border-top: 3px solid #7C3AED; }
.ops-stat-card.tone-neutral { border-top: 3px solid #64748B; }

.ops-stat-icon {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #f7faff;
    border: 1px solid #dbe6fb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ops-stat-copy {
    display: grid;
    gap: 4px;
}

.ops-stat-copy span {
    font-size: 0.8rem;
    font-weight: 700;
}

.ops-stat-copy strong,
.ops-mini-metric strong {
    color: var(--navy);
    font-size: 1.24rem;
    line-height: 1.15;
}

.ops-main-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 16px;
    align-items: start;
}

.ops-main-column,
.ops-side-column,
.ops-agency-grid {
    display: grid;
    gap: 16px;
}

.ops-section-card,
.ops-agency-card {
    padding: 16px 18px;
}

.ops-section-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.ops-inline-action {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    border: 1px solid #dbe6fb;
    color: var(--primary);
    font-size: 0.84rem;
    font-weight: 700;
    background: #f8fbff;
}

.ops-inline-action.is-active {
    background: linear-gradient(135deg, #1f4fd8 0%, #2458f5 100%);
    border-color: #2458f5;
    color: #fff;
    box-shadow: 0 10px 22px rgba(36, 88, 245, 0.18);
}

.ops-ai-summary {
    display: grid;
    gap: 10px;
}

.ops-ai-summary p {
    margin: 0;
    padding: 12px 14px;
    border-radius: 14px;
    background: #f7faff;
    border: 1px solid #e0e9fb;
    line-height: 1.55;
}

.ops-map-placeholder {
    position: relative;
    min-height: 220px;
    border-radius: 18px;
    overflow: hidden;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.75), rgba(255,255,255,0.92)),
        radial-gradient(circle at 20% 20%, rgba(36,87,245,0.12), transparent 28%),
        radial-gradient(circle at 78% 30%, rgba(124,58,237,0.12), transparent 24%),
        linear-gradient(135deg, #eef4ff, #f8fbff);
    border: 1px dashed #cbd9fb;
}

.ops-map-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(36, 87, 245, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(36, 87, 245, 0.08) 1px, transparent 1px);
    background-size: 28px 28px;
}

.ops-map-copy {
    position: relative;
    z-index: 1;
    height: 100%;
    min-height: 220px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    padding: 24px;
}

.ops-map-copy strong {
    color: var(--navy);
    font-size: 1rem;
}

.ops-agency-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.ops-agency-head {
    margin-bottom: 14px;
}

.ops-agency-title {
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.ops-agency-logo {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #f7faff;
    border: 1px solid #dbe6fb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ops-agency-logo img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.ops-data-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.ops-card-grid.cols-2 {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 14px;
    align-items: stretch;
}

.ops-metric-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.ops-metric-card,
.ops-mini-metric {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid #e1e9fb;
    background: #f8fbff;
    display: grid;
    gap: 4px;
}

.ops-metric-card span,
.ops-mini-metric span {
    font-size: 0.8rem;
    font-weight: 700;
}

.ops-metric-card strong {
    color: var(--navy);
    font-size: 1.05rem;
}

.ops-mini-metrics {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.ops-chart-shell {
    min-height: 220px;
    border-radius: 16px;
    border: 1px solid #e1e9fb;
    background: #fff;
    padding: 10px;
}

.ops-chart-shell.compact {
    min-height: 180px;
}

.ops-chart-shell canvas {
    width: 100% !important;
    height: 100% !important;
}

.agency-analytics-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    gap: 16px;
}

.agency-map-shell {
    min-height: 240px;
    height: 240px;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e1e9fb;
    background: #f8fbff;
}

.agency-analytics-grid .ops-chart-shell,
.agency-analytics-grid .ops-chart-shell.compact {
    min-height: 240px;
    height: 240px;
    padding: 8px;
}

.agency-log-controls {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.agency-log-controls label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--muted);
}

.agency-log-controls select {
    min-height: 34px;
    border-radius: 10px;
    border: 1px solid #dbe6fb;
    background: #fff;
    color: var(--navy);
    font-weight: 700;
    padding: 0 10px;
}

.agency-pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.agency-pagination span {
    color: var(--muted);
    font-size: 0.84rem;
    font-weight: 700;
}

.agency-pagination .disabled {
    pointer-events: none;
    opacity: .45;
}

.aria-ops-dashboard,
.aria-ops-dashboard * {
    box-sizing: border-box;
}

.aria-ops-dashboard .ops-main-grid {
    grid-template-columns: minmax(0, 1fr) minmax(260px, 300px);
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.aria-ops-dashboard .ops-main-column,
.aria-ops-dashboard .ops-side-column,
.aria-ops-dashboard .ops-section-card,
.aria-ops-dashboard .dashboard-grid {
    min-width: 0;
}

.aria-ops-dashboard .dashboard-grid {
    grid-template-columns: minmax(300px, 1.25fr) minmax(210px, 0.7fr) minmax(210px, 0.7fr);
    gap: 10px;
}

.aria-ops-dashboard .ops-side-column .ops-section-card {
    padding: 14px;
}

.aria-ops-dashboard .ops-notice-item {
    min-width: 0;
}

.aria-ops-dashboard .ops-notice-body {
    min-width: 0;
}

.aria-ops-dashboard .ops-notice-body p {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.35;
}

.aria-ops-dashboard .ops-side-column .ops-data-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
}

.aria-ops-dashboard .ops-side-column .ops-data-table td {
    white-space: normal;
    overflow-wrap: anywhere;
    vertical-align: top;
}

.aria-ops-dashboard .ops-side-column .ops-data-table td:last-child {
    width: 96px;
    text-align: right;
}

.ops-detail-block {
    margin-top: 14px;
    border-top: 1px solid #e6edf9;
    padding-top: 14px;
}

.ops-detail-block summary {
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 700;
    list-style: none;
}

.ops-detail-block summary::-webkit-details-marker {
    display: none;
}

.ops-detail-block summary::after {
    content: "+";
    float: right;
    color: var(--primary);
    font-size: 1rem;
}

.ops-detail-block[open] summary::after {
    content: "−";
}

.ops-data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
    font-size: 0.88rem;
}

.ops-data-table th,
.ops-data-table td {
    padding: 10px 8px;
    text-align: left;
    border-bottom: 1px solid #edf2fc;
    vertical-align: top;
}

.ops-data-table th {
    color: var(--navy);
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.table-sort-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.table-sort-link span {
    color: var(--blue);
    font-size: 0.78rem;
    line-height: 1;
}

.table-sort-link:hover {
    color: var(--blue);
}

.ops-notice-list {
    display: grid;
    gap: 12px;
}

.ops-notice-item {
    display: grid;
    grid-template-columns: 36px 1fr;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 0;
    border-bottom: 1px solid #edf2fc;
}

.ops-notice-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.ops-notice-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: #f7faff;
    border: 1px solid #dbe6fb;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ops-notice-body strong {
    display: block;
    color: var(--navy);
    margin-bottom: 4px;
}

.ops-notice-body p {
    margin: 0;
    line-height: 1.5;
}

.ops-quick-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.ops-quick-link {
    min-height: 88px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid #e1e9fb;
    background: #f8fbff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 700;
}

@media (max-width: 1360px) {
    .ops-stat-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .ops-main-grid {
        grid-template-columns: 1fr;
    }

    .ops-side-column {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .aria-ops-dashboard .dashboard-grid {
        grid-template-columns: repeat(3, minmax(220px, 1fr));
    }
}

@media (max-width: 1180px) {
    .command-center-grid {
        grid-template-columns: 1fr;
    }

    .complaint-stage-track {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .complaint-stage::after,
    .complaint-flow-node::after {
        display: none;
    }

    .complaint-flow-grid,
    .complaint-command-bottom {
        grid-template-columns: 1fr;
    }

    .complaint-flow-node {
        min-height: 0;
    }

    .aria-command-center .command-flow-stage {
        grid-template-columns: 120px 170px 150px 270px 170px 220px;
        justify-content: start;
        overflow-x: auto;
    }

    .command-phone-shell {
        height: 520px;
        min-height: 520px;
    }

    .agency-analytics-grid {
        grid-template-columns: 1fr;
    }

    .aria-ops-dashboard .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 980px) {
    .ops-agency-grid,
    .ops-stat-grid,
    .ops-side-column,
    .ops-metric-row {
        grid-template-columns: 1fr 1fr;
    }

    .ops-card-grid.cols-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .ops-header-card,
    .ops-section-card,
    .ops-agency-card,
    .ops-stat-card {
        border-radius: 18px;
    }

    .ops-header-card,
    .ops-section-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .ops-header-meta,
    .ops-stat-grid,
    .ops-agency-grid,
    .ops-side-column,
    .ops-quick-grid,
    .ops-metric-row,
    .ops-mini-metrics {
        grid-template-columns: 1fr;
    }

    .ops-chart-shell {
        min-height: 200px;
    }

    .command-phone-shell {
        height: 500px;
        min-height: 500px;
    }

    .aria-command-center .command-agency-stack {
        width: 100%;
    }

    .command-side {
        grid-template-columns: 1fr;
    }

    .complaint-stage-track {
        grid-template-columns: 1fr;
    }

    .complaint-flow-node {
        padding: 14px;
    }

    .complaint-phone-preview {
        border-width: 6px;
        border-radius: 24px;
    }
}

@media (max-width: 900px) {
    body:has(.aria-ops-dashboard) .app-shell {
        grid-template-columns: 1fr;
    }

    body:has(.aria-ops-dashboard) .sidebar {
        display: none;
    }

    body:has(.aria-ops-dashboard) .app-main,
    .aria-ops-dashboard.main-content,
    .aria-ops-dashboard {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }

    body:has(.aria-ops-dashboard) .topbar {
        position: sticky;
        top: 0;
        z-index: 30;
        gap: 10px;
        padding: 10px 12px;
    }

    body:has(.aria-ops-dashboard) .topbar-brand,
    body:has(.aria-ops-dashboard) .topbar-main {
        min-width: 0;
    }

    body:has(.aria-ops-dashboard) .topbar-brand strong {
        display: block;
        max-width: 42vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        font-size: 1rem;
        line-height: 1.15;
    }

    body:has(.aria-ops-dashboard) .topbar-brand p,
    body:has(.aria-ops-dashboard) .topbar-brand small,
    body:has(.aria-ops-dashboard) .topbar-user div,
    body:has(.aria-ops-dashboard) .status-pill {
        display: none;
    }

    body:has(.aria-ops-dashboard) .topbar-actions {
        gap: 6px;
        margin-left: auto;
    }

    body:has(.aria-ops-dashboard) .header-language-switch,
    body:has(.aria-ops-dashboard) .user-chip {
        transform: scale(.9);
        transform-origin: right center;
    }

    .aria-ops-dashboard.main-content,
    .aria-ops-dashboard {
        padding: 12px;
        gap: 12px;
    }

    .aria-ops-dashboard .ops-header-card,
    .aria-ops-dashboard .ops-section-card,
    .aria-ops-dashboard .ops-agency-card,
    .aria-ops-dashboard .ops-stat-card {
        min-width: 0;
        overflow: hidden;
        border-radius: 16px;
        padding: 14px;
    }

    .aria-ops-dashboard .ops-header-card,
    .aria-ops-dashboard .ops-section-head,
    .aria-ops-dashboard .ops-header-meta,
    .aria-ops-dashboard .panel-heading.split,
    .aria-ops-dashboard .history-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .aria-ops-dashboard .ops-main-grid,
    .aria-ops-dashboard .dashboard-grid,
    .aria-ops-dashboard .ops-stat-grid,
    .aria-ops-dashboard .ops-agency-grid,
    .aria-ops-dashboard .ops-side-column,
    .aria-ops-dashboard .ops-card-grid,
    .aria-ops-dashboard .ops-metric-row,
    .aria-ops-dashboard .ops-mini-metrics,
    .aria-ops-dashboard .usage-monitor-layout,
    .aria-ops-dashboard .usage-map-monitor-grid,
    .aria-ops-dashboard .usage-thermal-charts,
    .aria-ops-dashboard .usage-hardware-grid,
    .aria-ops-dashboard .usage-thermal-sensor-grid,
    .aria-ops-dashboard .usage-filter-bar,
    .aria-ops-dashboard .usage-table-toolbar {
        grid-template-columns: 1fr !important;
    }

    .aria-ops-dashboard .ops-data-table-wrap,
    .aria-ops-dashboard .table-responsive,
    .aria-ops-dashboard .history-table-wrap,
    .aria-ops-dashboard .usage-table-toolbar,
    .aria-ops-dashboard .usage-table-pagination {
        width: 100%;
        min-width: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .aria-ops-dashboard .ops-data-table,
    .aria-ops-dashboard .history-data-table,
    .aria-ops-dashboard .usage-request-table {
        min-width: 760px;
    }

    .aria-ops-dashboard .ops-data-table th,
    .aria-ops-dashboard .ops-data-table td {
        padding: 9px 10px;
        font-size: .78rem;
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .aria-ops-dashboard .ops-chart-shell,
    .aria-ops-dashboard .usage-leaflet-map {
        min-height: 220px;
    }

    .aria-ops-dashboard .command-flow-stage {
        overflow-x: auto;
        justify-content: start;
    }
}

/* Mobile compact density */
@media (max-width: 900px) {
    body {
        font-size: 14px;
    }

    .topbar {
        padding: 8px 10px;
        gap: 8px;
        min-height: 58px;
    }

    .topbar-main {
        gap: 8px;
    }

    .topbar-mobile-logo {
        width: 32px;
        height: 32px;
    }

    .topbar-brand strong {
        font-size: 1.22rem;
    }

    .header-language-switch {
        padding: 2px;
        gap: 2px;
    }

    .header-lang-btn {
        min-width: 36px;
        padding: 6px 9px;
        font-size: 0.74rem;
    }

    .topbar-logout-mobile {
        width: 36px;
        height: 36px;
        border-radius: 11px;
    }

    .main-content {
        padding: 10px;
        padding-bottom: calc(118px + env(safe-area-inset-bottom, 0px));
        gap: 12px;
    }

    .hero-panel,
    .service-side-card,
    .content-card,
    .chat-shell,
    .chat-history-panel,
    .dashboard-section,
    .dashboard-shell {
        border-radius: 18px;
    }

    .hero-panel,
    .service-side-card,
    .content-card,
    .chat-shell,
    .chat-history-panel {
        padding: 14px;
    }

    .chat-page-fullscreen {
        padding: 6px 6px 104px;
    }

    .chat-shell-full {
        min-height: calc(100vh - 100px);
        max-height: calc(100vh - 100px);
    }

    .chat-shell-header {
        gap: 10px;
        margin-bottom: 10px;
    }

    .chat-shell-brand {
        gap: 10px;
    }

    .chat-shell-logo {
        width: 40px;
        height: 40px;
    }

    .chat-shell-brand h2 {
        font-size: 1.28rem;
    }

    .chat-shell-meta {
        gap: 6px;
    }

    .status-pill {
        gap: 6px;
        padding: 6px 9px;
        font-size: 0.76rem;
    }

    .chat-conversation {
        gap: 12px;
    }

    .chat-row.user,
    .chat-row.assistant {
        gap: 8px;
    }

    .chat-avatar {
        width: 30px;
        height: 30px;
    }

    .ai-avatar img {
        width: 21px;
        height: 21px;
    }

    .chat-row.user .chat-message-stack,
    .chat-row.assistant .chat-message-stack {
        max-width: calc(100% - 42px);
    }

    .chat-message-stack {
        gap: 6px;
    }

    .chat-bubble {
        padding: 10px 12px;
        border-radius: 15px;
        font-size: 0.9rem;
    }

    .chat-bubble p {
        line-height: 1.45;
    }

    .chat-bubble.user::after,
    .chat-bubble.assistant::after {
        top: 13px;
        width: 11px;
        height: 11px;
    }

    .chat-meta {
        font-size: 0.72rem;
    }

    .chat-composer-shell {
        padding: 6px;
        gap: 6px;
        border-radius: 16px;
    }

    .chat-composer input {
        font-size: 0.9rem;
    }

    .chat-composer-actions {
        gap: 6px;
    }

    .composer-icon-btn,
    .attach-btn,
    .send-btn,
    .mic-btn {
        width: 38px;
        height: 38px;
        border-radius: 12px;
    }

    .composer-icon {
        width: 17px;
        height: 17px;
    }

    .chat-disclaimer,
    .disclaimer-text {
        font-size: 0.78rem;
        line-height: 1.4;
    }

    .mobile-nav {
        left: 10px;
        right: 10px;
        bottom: max(4px, env(safe-area-inset-bottom, 0px));
        gap: 6px;
        padding: 8px;
        border-radius: 20px;
    }

    .mobile-nav-item {
        gap: 4px;
        font-size: 0.68rem;
    }

    .mobile-nav-item span {
        width: 34px;
        height: 34px;
        border-radius: 10px;
    }

    .mobile-nav-icon-svg {
        width: 16px;
        height: 16px;
    }

    .mobile-nav-ai {
        transform: translateY(-14px);
    }

    .mobile-nav-ai img {
        width: 48px;
        height: 48px;
        padding: 7px;
    }

    .history-table-toolbar {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
        padding: 10px;
        border-radius: 16px;
    }

    .history-page-size-control,
    .history-search-control {
        width: 100%;
    }

    .history-page-size-control {
        justify-content: space-between;
        font-size: 0.82rem;
    }

    .history-search-control {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto auto;
        gap: 8px;
        margin-left: 0;
    }

    .history-search-control input {
        width: 100%;
        min-width: 0;
    }

    .history-search-btn,
    .history-reset-btn {
        min-height: 38px;
        padding: 0 12px;
    }

    .history-data-table {
        min-width: 780px;
    }

    .history-data-table th,
    .history-data-table td {
        padding: 11px 12px;
    }

    .history-pagination {
        align-items: stretch;
        flex-direction: column;
    }

    .history-page-nav {
        justify-content: center;
    }

    .dashboard-action-grid,
    .summary-grid,
    .chart-grid,
    .service-grid,
    .more-grid {
        gap: 10px;
    }

    .action-card,
    .summary-card,
    .premium-chart-card,
    .notification-card,
    .quick-action-card,
    .aria-recommendation-card {
        border-radius: 18px;
        padding: 14px;
    }

    .chat-page-fullscreen.main-content {
        padding-bottom: calc(106px + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 420px) {
    .main-content {
        padding-left: 8px;
        padding-right: 8px;
    }

    .chat-shell-brand h2 {
        font-size: 1.18rem;
    }

    .chat-shell-logo {
        width: 36px;
        height: 36px;
    }

    .mobile-nav {
        left: 8px;
        right: 8px;
    }
}

/* Chat V2 mobile focus mode keeps the chat usable like a dedicated app screen. */
@media (max-width: 768px) {
    body:has(.aria-chat-v2-page) {
        overflow: hidden;
        width: 100%;
        max-width: 100%;
        touch-action: pan-y;
    }

    body:has(.aria-chat-v2-page) .app-main {
        width: 100%;
        max-width: 100%;
        height: 100dvh;
        min-height: 0;
        overflow: hidden;
        padding: 0 !important;
    }

    body:has(.aria-chat-v2-page) .topbar {
        display: none !important;
    }

    body:has(.aria-chat-v2-page) .site-footer {
        display: none !important;
    }

    body:has(.aria-chat-v2-page) .mobile-nav {
        display: none !important;
    }

    .aria-chat-v2-page.chat-page-fullscreen {
        display: flex !important;
        position: fixed;
        inset: 0;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        height: 100svh;
        height: 100dvh;
        min-height: 0;
        overflow: hidden !important;
        padding: 6px !important;
        padding-bottom: max(6px, env(safe-area-inset-bottom, 0px)) !important;
    }

    .aria-chat-v2-page .aria-chat-v2-layout {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        height: 100%;
        min-height: 0;
        overflow: hidden;
    }

    .aria-chat-v2-page .aria-chat-v2-shell {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        height: 100%;
        max-height: none !important;
        min-height: 0 !important;
        padding: 0;
        border: 0;
        border-radius: 0;
        background: linear-gradient(180deg, rgba(248, 250, 255, 0.98) 0%, rgba(255, 255, 255, 0.98) 38%);
        overflow: hidden;
        box-sizing: border-box;
    }

    .aria-chat-v2-page .aria-chat-v2-header {
        display: flex !important;
        flex-direction: row !important;
        flex-shrink: 0;
        gap: 8px;
        margin: 0;
        padding: max(10px, env(safe-area-inset-top, 0px)) 12px 10px;
        align-items: center;
        justify-content: space-between;
        background: rgba(255, 255, 255, 0.94);
        border-bottom: 1px solid rgba(211, 220, 240, 0.72);
        box-shadow: 0 10px 26px rgba(15, 23, 42, 0.07);
        backdrop-filter: blur(14px);
        z-index: 8;
    }

    .aria-chat-v2-page .chat-shell-brand {
        display: flex !important;
        flex-direction: row !important;
        min-width: 0;
        gap: 8px;
        flex: 1 1 auto;
        align-items: center;
        justify-content: flex-start;
        text-align: left;
    }

    .aria-chat-v2-page .chat-shell-copy {
        min-width: 0;
        text-align: left;
    }

    .aria-chat-v2-page .chat-shell-logo {
        display: none !important;
    }

    .aria-chat-v2-page .chat-shell-brand h2 {
        font-size: 1.05rem;
        line-height: 1.1;
        white-space: nowrap;
    }

    .aria-chat-v2-page .chat-shell-meta {
        margin-top: 4px;
        gap: 6px;
        justify-content: flex-start;
        text-align: left;
    }

    .aria-chat-v2-page .agency-pill,
    .aria-chat-v2-page .agency-summary-pill {
        display: none !important;
    }

    .aria-chat-v2-page .chat-new-session-btn {
        align-self: center;
        min-height: 34px;
        padding: 0 12px;
        font-size: 0.82rem;
        white-space: nowrap;
        flex: 0 0 auto;
    }

    .aria-chat-v2-page .chat-header-actions {
        display: flex;
        align-items: center;
        gap: 7px;
        flex: 0 0 auto;
    }

    .aria-chat-v2-page .chat-mobile-close-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        border-radius: 999px;
        border: 1px solid rgba(255, 72, 94, 0.22);
        background: rgba(255, 239, 242, 0.96);
        color: #c62846;
        box-shadow: 0 12px 24px rgba(198, 40, 70, 0.12);
        text-decoration: none;
    }

    .aria-chat-v2-page .chat-mobile-close-btn svg {
        width: 17px;
        height: 17px;
        stroke: currentColor;
        stroke-width: 2.4;
        stroke-linecap: round;
    }

    .aria-chat-v2-page .aria-mobile-assistant-hero {
        display: flex;
        flex: 0 0 auto;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        padding: 12px 14px 10px;
        background:
            radial-gradient(circle at 50% 8%, rgba(90, 120, 255, 0.16), transparent 42%),
            linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 250, 255, 0.86));
        border-bottom: 1px solid rgba(213, 223, 245, 0.72);
        transition: padding 220ms ease, gap 220ms ease;
    }

    .aria-chat-v2-page .aria-mobile-avatar-frame {
        position: relative;
        width: clamp(116px, 34vw, 142px);
        aspect-ratio: 1;
        border-radius: 999px;
        padding: 5px;
        background: linear-gradient(145deg, #ffffff, #edf3ff);
        box-shadow: 0 18px 42px rgba(35, 70, 150, 0.18), 0 0 0 1px rgba(97, 124, 255, 0.16), 0 0 32px rgba(102, 91, 255, 0.18);
        overflow: visible;
        transition: width 220ms ease, box-shadow 220ms ease;
    }

    .aria-chat-v2-page .aria-mobile-avatar-frame::after {
        content: "";
        position: absolute;
        inset: -7px;
        border-radius: inherit;
        border: 1px solid rgba(86, 118, 255, 0.16);
        pointer-events: none;
    }

    .aria-chat-v2-page .aria-mobile-avatar-media {
        display: none;
        width: 100%;
        height: 100%;
        border-radius: inherit;
        object-fit: cover;
        background: #eef4ff;
    }

    .aria-chat-v2-page .aria-mobile-avatar-media.is-active {
        display: block;
    }

    .aria-chat-v2-page .aria-mobile-avatar-dot {
        position: absolute;
        right: 12px;
        bottom: 12px;
        width: 14px;
        height: 14px;
        border-radius: 999px;
        background: #16c784;
        border: 3px solid #fff;
        box-shadow: 0 0 0 4px rgba(22, 199, 132, 0.16);
    }

    .aria-chat-avatar-listening .aria-mobile-avatar-frame,
    .aria-chat-avatar-speaking .aria-mobile-avatar-frame {
        box-shadow: 0 18px 42px rgba(35, 70, 150, 0.2), 0 0 0 1px rgba(97, 124, 255, 0.2), 0 0 38px rgba(109, 87, 255, 0.28);
    }

    .aria-chat-avatar-thinking .aria-mobile-avatar-dot {
        background: #7c5cff;
        box-shadow: 0 0 0 4px rgba(124, 92, 255, 0.16);
    }

    .aria-chat-v2-page .aria-mobile-hero-copy {
        display: grid;
        gap: 2px;
        text-align: center;
    }

    .aria-chat-v2-page .aria-mobile-hero-copy strong {
        color: #172554;
        font-size: 1.05rem;
        line-height: 1.2;
    }

    .aria-chat-v2-page .aria-mobile-hero-copy span {
        color: #52627d;
        font-size: 0.86rem;
        line-height: 1.25;
    }

    .aria-chat-v2-page .aria-mobile-hero-copy small {
        color: #4568d7;
        font-size: 0.75rem;
        font-weight: 800;
        letter-spacing: 0;
    }

    .aria-chat-v2-page .aria-mobile-quick-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: min(100%, 390px);
        margin-top: 4px;
    }

    .aria-chat-v2-page .aria-mobile-quick-action {
        min-height: 42px;
        padding: 9px 10px;
        border-radius: 14px;
        border: 1px solid rgba(91, 122, 255, 0.16);
        background: rgba(255, 255, 255, 0.92);
        color: #1d2d5c;
        font: inherit;
        font-size: 0.78rem;
        font-weight: 800;
        line-height: 1.2;
        text-align: left;
        box-shadow: 0 10px 24px rgba(42, 71, 138, 0.08);
    }

    .aria-chat-v2-page.has-chat-started .aria-mobile-assistant-hero {
        flex-direction: row;
        justify-content: center;
        padding: 6px 14px;
        gap: 9px;
        background: rgba(255, 255, 255, 0.9);
    }

    .aria-chat-v2-page.has-chat-started .aria-mobile-avatar-frame {
        width: 58px;
        padding: 3px;
        box-shadow: 0 8px 22px rgba(35, 70, 150, 0.14), 0 0 0 1px rgba(97, 124, 255, 0.14);
    }

    .aria-chat-v2-page.has-chat-started .aria-mobile-avatar-frame::after {
        inset: -4px;
    }

    .aria-chat-v2-page.has-chat-started .aria-mobile-avatar-dot {
        right: 3px;
        bottom: 3px;
        width: 10px;
        height: 10px;
        border-width: 2px;
    }

    .aria-chat-v2-page.has-chat-started .aria-mobile-hero-copy {
        align-content: center;
        text-align: left;
    }

    .aria-chat-v2-page.has-chat-started .aria-mobile-hero-copy strong,
    .aria-chat-v2-page.has-chat-started .aria-mobile-hero-copy span,
    .aria-chat-v2-page.has-chat-started .aria-mobile-quick-actions {
        display: none;
    }

    .aria-chat-v2-page.has-chat-started .aria-mobile-hero-copy small {
        display: inline-flex;
        align-items: center;
        min-height: 24px;
        padding: 0 10px;
        border-radius: 999px;
        background: #eef4ff;
        border: 1px solid rgba(87, 116, 255, 0.16);
        color: #3154c9;
    }

    .aria-chat-v2-page .aria-chat-v2-conversation {
        flex: 1 1 0;
        height: auto;
        min-height: 0;
        max-height: none;
        overflow-y: scroll !important;
        overflow-x: hidden;
        padding: 12px 12px 12px;
        gap: 12px;
        background: linear-gradient(180deg, rgba(248, 250, 255, 0.68), #fff 42%);
        overscroll-behavior: contain;
        touch-action: pan-y;
        -webkit-overflow-scrolling: touch;
    }

    .aria-chat-v2-page .chat-spacer {
        display: block;
        flex: 1 1 auto;
        min-height: 8px;
    }

    .aria-chat-v2-page .chat-row,
    .aria-chat-v2-page .chat-message-stack,
    .aria-chat-v2-page .chat-bubble {
        max-width: 100%;
        min-width: 0;
    }

    .aria-chat-v2-page .chat-row {
        gap: 7px;
    }

    .aria-chat-v2-page .chat-row.user {
        justify-content: flex-end;
    }

    .aria-chat-v2-page .chat-row.user .chat-avatar {
        display: none;
    }

    .aria-chat-v2-page .chat-row.assistant .chat-avatar {
        width: 28px;
        height: 28px;
        flex: 0 0 28px;
    }

    .aria-chat-v2-page .chat-bubble {
        border-radius: 18px;
        padding: 11px 12px;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.07);
    }

    .aria-chat-v2-page .chat-bubble.user {
        border-radius: 18px 18px 6px 18px;
        background: linear-gradient(135deg, #dfe8ff 0%, #eef2ff 100%);
        color: #12204a;
    }

    .aria-chat-v2-page .chat-bubble.assistant {
        border-radius: 18px 18px 18px 6px;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid rgba(213, 223, 245, 0.86);
    }

    .aria-chat-v2-page .chat-bubble .rich-block,
    .aria-chat-v2-page .chat-bubble table,
    .aria-chat-v2-page .rich-card {
        max-width: 100%;
        overflow-x: auto;
    }

    .aria-chat-v2-page .aria-chat-v2-composer {
        flex-shrink: 0;
        width: 100%;
        max-width: 100%;
        margin-top: 0;
        padding: 9px 12px max(8px, env(safe-area-inset-bottom, 0px));
        border-top: 1px solid var(--border);
        overflow: hidden;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: 0 -12px 28px rgba(15, 23, 42, 0.07);
    }

    .aria-chat-v2-page .chat-composer-shell {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        min-height: 52px;
        padding: 6px 7px 6px 13px;
        gap: 7px;
        border-radius: 999px;
        overflow: hidden;
        background: #fff;
        border: 1px solid rgba(203, 213, 235, 0.95);
        box-shadow: 0 12px 28px rgba(28, 48, 99, 0.1);
    }

    .aria-chat-v2-page .chat-composer input {
        min-width: 0;
        font-size: 16px !important;
        line-height: 1.3;
        transform: translateZ(0);
    }

    .aria-chat-v2-page .chat-composer-actions {
        gap: 6px;
    }

    .aria-chat-v2-page .composer-icon-btn,
    .aria-chat-v2-page .attach-btn,
    .aria-chat-v2-page .send-btn,
    .aria-chat-v2-page .mic-btn {
        display: inline-flex !important;
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
        border-radius: 999px;
    }

    .aria-chat-v2-page .send-btn {
        background: linear-gradient(135deg, #2f66ff, #6d5cff);
        color: #fff;
    }

    .aria-chat-v2-page #chatMicButton {
        display: inline-flex !important;
        visibility: visible !important;
    }

    .aria-chat-v2-page .attach-btn.is-disabled {
        opacity: 0.42;
        cursor: not-allowed;
        pointer-events: none;
    }

    .aria-chat-v2-page .chat-disclaimer {
        margin: 0;
        padding: 0 12px 7px;
        font-size: 0.78rem;
        line-height: 1.35;
        text-align: center;
        background: rgba(255, 255, 255, 0.96);
    }
}

@media (max-width: 360px) {
    .aria-chat-v2-page .aria-mobile-quick-actions {
        grid-template-columns: 1fr;
    }

    .aria-chat-v2-page .chat-shell-brand h2 {
        font-size: 0.96rem;
    }

    .aria-chat-v2-page .chat-new-session-btn {
        padding-inline: 9px;
    }
}

@supports not (height: 100dvh) {
    @media (max-width: 768px) {
        body:has(.aria-chat-v2-page) .app-main {
            height: 100svh;
        }

        .aria-chat-v2-page.chat-page-fullscreen {
            height: 100svh;
        }
    }
}

/* Agency Portal blueprint alignment */
.agency-portal {
    gap: 14px;
}

.agency-portal .agency-panel,
.agency-portal .agency-stat-card,
.agency-portal .agency-kpi-card,
.agency-portal .agency-toolbar-panel,
.agency-portal .agency-case-header-card,
.agency-portal .agency-detail-hero {
    border-color: #e2eaf5;
    border-radius: 10px;
    box-shadow: 0 6px 18px rgba(17, 45, 110, 0.045);
}

.agency-portal .agency-panel {
    padding: 16px;
}

.agency-welcome-hero {
    min-height: 126px;
    max-height: none;
    align-items: center;
    border-radius: 10px;
    padding: 22px 24px;
    box-shadow: none;
}

.agency-welcome-hero h2 {
    margin: 4px 0 6px;
    line-height: 1.08;
}

.agency-welcome-hero p {
    margin: 0 0 8px;
    line-height: 1.35;
}

.agency-welcome-hero span {
    line-height: 1.2;
}

.agency-kpi-grid.five,
.agency-kpi-grid.four {
    gap: 12px;
}

.agency-kpi-card {
    min-height: 112px;
    padding: 14px 14px 12px 70px;
    border-radius: 10px;
}

.agency-kpi-card i {
    width: 42px;
    height: 42px;
    left: 14px;
    top: 14px;
    border-radius: 12px;
}

.agency-kpi-card strong {
    font-size: 1.75rem;
}

.agency-kpi-card::after {
    content: "";
    position: absolute;
    left: 70px;
    right: 14px;
    bottom: 10px;
    height: 26px;
    color: rgba(36, 88, 245, 0.35);
    opacity: 0.85;
    background:
        linear-gradient(135deg, transparent 0 12%, currentColor 12% 14%, transparent 14% 28%, currentColor 28% 30%, transparent 30% 48%, currentColor 48% 50%, transparent 50% 65%, currentColor 65% 67%, transparent 67%) bottom / 100% 70% no-repeat;
    pointer-events: none;
}

.agency-kpi-card.green::after {
    color: rgba(16, 185, 129, 0.34);
}

.agency-kpi-card.amber::after {
    color: rgba(245, 158, 11, 0.34);
}

.agency-kpi-card.purple::after {
    color: rgba(124, 58, 237, 0.32);
}

.agency-kpi-card.red::after {
    color: rgba(239, 68, 68, 0.32);
}

.agency-dashboard-pro-grid {
    grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr) minmax(260px, 1fr);
}

.agency-dashboard-pro-grid .wide,
.agency-analytics-grid .wide {
    grid-column: auto;
}

.agency-dashboard-pro-grid.bottom,
.agency-workbench,
.agency-workbench.enquiries,
.agency-cases-shell {
    grid-template-columns: minmax(0, 2.15fr) minmax(320px, 0.85fr);
}

.agency-analytics-grid {
    grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.9fr) minmax(260px, 0.6fr);
}

.agency-ai-case-layout {
    grid-template-columns: minmax(0, 1.8fr) minmax(260px, 0.65fr) minmax(330px, 0.8fr);
}

.agency-chart-shell {
    height: 210px;
}

.agency-chart-shell.compact {
    height: 205px;
}

.agency-table th {
    height: 38px;
    padding: 9px 12px;
    font-size: 0.76rem;
}

.agency-table td {
    min-height: 52px;
    padding: 10px 12px;
    font-size: 0.8rem;
}

.agency-table th:first-child,
.agency-table td:first-child,
.agency-table .agency-ticket-link {
    white-space: nowrap;
}

.agency-table td p,
.agency-table td strong {
    display: -webkit-box;
    overflow: hidden;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.agency-status-pill {
    min-height: 22px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
}

.agency-row-action,
.agency-primary-action,
.agency-preview-actions a,
.agency-detail-action-grid button,
.agency-detail-action-grid a,
.agency-quick-grid a,
.agency-toolbar-panel button {
    min-height: 34px;
    padding: 8px 12px;
    border-radius: 8px;
}

@media (max-width: 1100px) {
    .agency-dashboard-pro-grid,
    .agency-dashboard-pro-grid.bottom,
    .agency-analytics-grid,
    .agency-ai-case-layout,
    .agency-workbench,
    .agency-workbench.enquiries,
    .agency-cases-shell {
        grid-template-columns: 1fr;
    }
}

/* Agency case SLA donut refinement */
.agency-cases-shell .agency-sla-ring,
.agency-case-detail-page .agency-sla-ring {
    position: relative;
    width: 116px;
    height: 116px;
    display: grid;
    place-items: center;
    padding: 0;
    border-radius: 999px;
    background: conic-gradient(#10b981 0 62%, #f59e0b 62% 86%, #ef4444 86% 100%);
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04), 0 12px 26px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.agency-cases-shell .agency-sla-ring::before,
.agency-case-detail-page .agency-sla-ring::before {
    content: "";
    position: absolute;
    inset: 18px;
    border-radius: 999px;
    background: #fff;
    box-shadow: inset 0 0 0 1px #edf2fb;
}

.agency-cases-shell .agency-sla-ring strong,
.agency-cases-shell .agency-sla-ring span,
.agency-case-detail-page .agency-sla-ring strong,
.agency-case-detail-page .agency-sla-ring span {
    position: relative;
    z-index: 1;
    display: block;
    padding: 0;
    border-radius: 0;
    background: transparent;
    line-height: 1.05;
}

.agency-cases-shell .agency-sla-ring strong,
.agency-case-detail-page .agency-sla-ring strong {
    font-size: 1.02rem;
}

.agency-cases-shell .agency-sla-ring span,
.agency-case-detail-page .agency-sla-ring span {
    margin-top: 4px;
    color: #62708f;
    font-size: 0.72rem;
    font-weight: 900;
}

.agency-case-detail-page .agency-sla-ring.ai-ring {
    background: conic-gradient(#10b981 0 70%, #f59e0b 70% 92%, #ef4444 92% 100%);
}

/* Agency portal mobile responsiveness */
@media (max-width: 900px) {
    body:has(.agency-portal) .app-shell {
        grid-template-columns: 1fr;
    }

    body:has(.agency-portal) .sidebar {
        display: none;
    }

    body:has(.agency-portal) .app-main {
        min-width: 0;
        width: 100%;
    }

    body:has(.agency-portal) .topbar {
        position: sticky;
        top: 0;
        z-index: 30;
        gap: 10px;
        padding: 10px 12px;
        align-items: center;
    }

    body:has(.agency-portal) .topbar-brand,
    body:has(.agency-portal) .topbar-main {
        min-width: 0;
    }

    body:has(.agency-portal) .topbar-brand strong {
        display: block;
        font-size: 1rem;
        line-height: 1.15;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    body:has(.agency-portal) .topbar-brand p,
    body:has(.agency-portal) .topbar-brand small,
    body:has(.agency-portal) .topbar-user div,
    body:has(.agency-portal) .status-pill {
        display: none;
    }

    body:has(.agency-portal) .topbar-actions {
        gap: 6px;
        margin-left: auto;
    }

    body:has(.agency-portal) .header-language-switch,
    body:has(.agency-portal) .user-chip {
        transform: scale(.9);
        transform-origin: right center;
    }

    body:has(.agency-portal) .topbar-logout-mobile {
        display: inline-flex;
    }

    body:has(.agency-portal) .topbar-logout {
        display: none;
    }

    body:has(.agency-portal) .topbar-logout-mobile,
    body:has(.agency-portal) .topbar-logout {
        min-height: 36px;
        padding: 8px 10px;
        font-size: .78rem;
    }

    .agency-portal.main-content,
    .agency-portal {
        width: 100%;
        min-width: 0;
        padding: 12px;
        gap: 12px;
    }

    .agency-hero-card,
    .agency-page-head,
    .agency-detail-hero,
    .agency-case-detail-head,
    .agency-welcome-hero {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        padding: 16px;
    }

    .agency-hero-card h2,
    .agency-page-head h2,
    .agency-detail-hero h2,
    .agency-case-detail-head h2,
    .agency-welcome-hero h2 {
        font-size: 1.35rem;
        line-height: 1.16;
    }

    .agency-case-detail-badges {
        justify-content: flex-start;
    }

    .agency-stat-grid,
    .agency-kpi-grid.five,
    .agency-kpi-grid.four,
    .agency-dashboard-grid,
    .agency-dashboard-pro-grid,
    .agency-dashboard-pro-grid.bottom,
    .agency-analytics-grid,
    .agency-ai-case-layout,
    .agency-workbench,
    .agency-workbench.enquiries,
    .agency-cases-shell,
    .agency-reply-layout,
    .agency-case-workspace-grid,
    .agency-detail-layout,
    .agency-detail-card-grid,
    .agency-preview-grid,
    .agency-timeline-wide,
    .agency-reply-controls,
    .agency-status-option-grid,
    .agency-detail-action-grid {
        grid-template-columns: 1fr !important;
    }

    .agency-dashboard-grid .wide,
    .agency-dashboard-pro-grid .wide,
    .agency-analytics-grid .wide,
    .agency-preview-grid section:first-child,
    .agency-preview-grid section:nth-child(3) {
        grid-column: auto;
    }

    .agency-kpi-card {
        min-height: 96px;
        padding: 14px 14px 12px 62px;
    }

    .agency-kpi-card i {
        width: 38px;
        height: 38px;
    }

    .agency-kpi-card::after {
        left: 62px;
    }

    .agency-stat-card strong,
    .agency-kpi-card strong {
        font-size: 1.45rem;
    }

    .agency-panel,
    .agency-case-card,
    .agency-task-card,
    .agency-toolbar-panel,
    .agency-case-header-card {
        padding: 14px;
        min-width: 0;
    }

    .agency-panel-head,
    .agency-case-preview-head,
    .agency-filter-row,
    .agency-toolbar-row {
        flex-direction: column;
        align-items: stretch;
    }

    .agency-inline-form {
        margin-left: 0;
        width: 100%;
    }

    .agency-inline-form label,
    .agency-inline-form select,
    .agency-filter-row input,
    .agency-filter-row select,
    .agency-toolbar-panel input,
    .agency-toolbar-panel select,
    .agency-toolbar-panel button {
        width: 100%;
    }

    .agency-table-wrap {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -4px;
        padding: 0 4px 8px;
    }

    .agency-table {
        min-width: 760px;
    }

    .agency-helpdesk-table {
        min-width: 980px;
    }

    .agency-table th,
    .agency-table td {
        padding: 9px 10px;
        font-size: .78rem;
    }

    .agency-case-preview,
    .agency-detail-side {
        position: static;
        top: auto;
    }

    .agency-preview-actions,
    .agency-detail-action-grid,
    .agency-quick-grid,
    .agency-reply-footer {
        display: grid;
        grid-template-columns: 1fr;
    }

    .agency-preview-actions a,
    .agency-preview-actions button,
    .agency-detail-action-grid a,
    .agency-detail-action-grid button,
    .agency-quick-grid a,
    .agency-reply-footer a,
    .agency-reply-footer button {
        width: 100%;
        text-align: center;
    }

    .agency-detail-tabs,
    .agency-preview-tabs {
        gap: 14px;
        overflow-x: auto;
        padding-bottom: 2px;
    }

    .agency-case-info-grid {
        grid-template-columns: 1fr;
    }

    .agency-chart-shell,
    .agency-chart-shell.compact {
        height: 220px;
    }

    .agency-reply-message textarea {
        min-height: 220px;
    }

    .agency-editor-toolbar {
        flex-wrap: wrap;
        gap: 0;
    }
}

@media (max-width: 520px) {
    body:has(.agency-portal) .topbar {
        grid-template-columns: auto minmax(0, 1fr) auto;
    }

    body:has(.agency-portal) .header-language-switch {
        display: none;
    }

    .agency-portal.main-content,
    .agency-portal {
        padding: 10px;
    }

    .agency-hero-card,
    .agency-page-head,
    .agency-detail-hero,
    .agency-case-detail-head,
    .agency-welcome-hero {
        border-radius: 12px;
        padding: 14px;
    }

    .agency-case-row,
    .agency-topic-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .agency-row-actions {
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }

    .agency-row-actions a,
    .agency-row-actions button,
    .agency-row-actions form {
        width: 100%;
    }

    .agency-more-page .more-grid,
    .agency-more-page .ops-section-card {
        min-width: 0;
        width: 100%;
    }

    .agency-more-page .more-card {
        min-width: 0;
        overflow-wrap: anywhere;
    }

    .agency-summary-list span {
        display: grid;
        gap: 4px;
    }

    .agency-summary-list strong {
        text-align: left;
    }

    .agency-sla-summary {
        grid-template-columns: 1fr;
        justify-items: start;
    }

    .agency-table {
        min-width: 680px;
    }

    .agency-helpdesk-table {
        min-width: 900px;
    }
}

/* MyJPJeQ service data: dark navy ARIA Gov treatment, scoped to this module only. */
.mypjeq-assist-panel,
.mypjeq-mobile-chat-actions {
    border: 1px solid rgba(72, 137, 255, 0.35);
    border-radius: 16px;
    background: linear-gradient(135deg, #082B6F 0%, #063A91 100%);
    box-shadow: 0 8px 28px rgba(6, 43, 111, 0.16);
    color: #FFFFFF;
}

.mypjeq-assist-panel {
    padding: 20px 22px;
}

.mypjeq-assist-head strong,
.mypjeq-mobile-chat-note strong {
    color: #FFFFFF;
    font-weight: 700;
}

.mypjeq-assist-head p {
    color: rgba(255, 255, 255, 0.88);
}

.mypjeq-assist-badge {
    background: rgba(255, 255, 255, 0.10);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.22);
    font-weight: 700;
}

.mypjeq-panel-close,
.mypjeq-collapsed-toggle {
    background: rgba(255, 255, 255, 0.06);
    color: #FFFFFF;
    border-color: rgba(255, 255, 255, 0.30);
}

.mypjeq-panel-close:hover,
.mypjeq-panel-close:focus-visible,
.mypjeq-collapsed-toggle:hover,
.mypjeq-collapsed-toggle:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.45);
}

.mypjeq-collapsed-toggle span {
    background: #2F7CF6;
    color: #FFFFFF;
}

.mypjeq-collapsed-toggle small {
    color: rgba(255, 255, 255, 0.82);
}

.mypjeq-assist-panel.is-collapsed {
    box-shadow: 0 8px 24px rgba(6, 43, 111, 0.12);
}

.mypjeq-location-btn,
.mypjeq-mobile-chat-actions .mypjeq-location-btn,
.mypjeq-manual-submit {
    background: #FFFFFF;
    color: #123B86;
    border: 1px solid #FFFFFF;
    border-radius: 12px;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.10);
}

.mypjeq-location-btn:hover,
.mypjeq-mobile-chat-actions .mypjeq-location-btn:hover,
.mypjeq-manual-submit:hover {
    background: #EEF4FF;
    border-color: #EEF4FF;
}

.mypjeq-quick-btn,
.mypjeq-mobile-chip:not(.mypjeq-location-btn) {
    background: rgba(255, 255, 255, 0.04);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.60);
    border-radius: 12px;
    font-weight: 600;
}

.mypjeq-quick-btn:hover:not(:disabled),
.mypjeq-mobile-chip:not(.mypjeq-location-btn):hover {
    background: rgba(255, 255, 255, 0.10);
    border-color: rgba(255, 255, 255, 0.75);
}

/* The application marks the selected branch mode with is-active. */
.mypjeq-quick-btn.is-active {
    background: #FFFFFF;
    color: #123B86;
    border-color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.10);
}

.mypjeq-quick-btn.is-active:hover {
    background: #EEF4FF;
    border-color: #EEF4FF;
}

.mypjeq-manual-label {
    color: #FFFFFF;
    font-weight: 600;
}

.mypjeq-manual-row input {
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 12px;
    background: rgba(3, 31, 85, 0.45);
    color: #FFFFFF;
}

.mypjeq-manual-row input:focus {
    border-color: #7DB2FF;
    box-shadow: 0 0 0 3px rgba(70, 135, 255, 0.15);
    outline: none;
}

.users-stat-link.is-active {
    background: linear-gradient(135deg, #173b8f 0%, #2457c5 100%);
    border-color: #173b8f;
    box-shadow: 0 16px 32px rgba(23, 59, 143, 0.22);
    color: #fff;
}

.users-stat-link.is-active .ops-stat-icon {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.28);
    color: #fff;
}

.users-stat-link.is-active .ops-stat-copy span,
.users-stat-link.is-active .ops-stat-copy small,
.users-stat-link.is-active .ops-stat-copy strong {
    color: #fff;
}

.mypjeq-manual-row input::placeholder {
    color: rgba(255, 255, 255, 0.72);
}

.mypjeq-manual-note,
.mypjeq-mobile-chat-note span {
    color: rgba(255, 255, 255, 0.82);
}

.mypjeq-simulation-note {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.82);
}

@media (max-width: 768px) {
    .mypjeq-mobile-chat-actions {
        padding: 14px;
        border-radius: 16px;
        box-shadow: 0 8px 24px rgba(6, 43, 111, 0.14);
    }

    .mypjeq-assist-panel {
        padding: 14px;
        border-radius: 16px;
    }

    .mypjeq-mobile-chip:not(.mypjeq-location-btn),
    .mypjeq-location-btn,
    .mypjeq-quick-btn,
    .mypjeq-manual-submit {
        min-height: 42px;
    }

    .mypjeq-manual-row {
        width: 100%;
    }
}
