/* Portal do Servidor - app shell */
.portal-app-kicker {
    margin: 0 0 0.15rem;
    color: var(--public-green);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.portal-app-body {
    background: #eef5f2;
}

.portal-app-body main {
    padding-bottom: 0;
}

.portal-app-body footer {
    display: none;
}

.portal-app-main {
    min-width: 0;
    display: grid;
    gap: 1rem;
}

.portal-app-hero {
    min-height: 208px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding: clamp(1.1rem, 3vw, 1.65rem);
    border: 1px solid rgba(219, 228, 236, 0.92);
    border-radius: 8px;
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.16)),
        url("/assets/prefeitura-quixaba.webp") right center / cover no-repeat;
    box-shadow: 0 18px 42px rgba(16, 32, 51, 0.08);
}

.portal-app-hero h1,
.portal-section-heading h2,
.portal-panel-header h2,
.portal-login-panel h2 {
    margin: 0.35rem 0 0;
    color: var(--public-ink);
    font-size: clamp(1.75rem, 3.2vw, 2.65rem);
    line-height: 1.08;
    font-weight: 800;
    letter-spacing: 0;
}

.portal-app-hero p,
.portal-section-heading p,
.portal-panel-header p,
.portal-login-panel p {
    max-width: 650px;
    margin: 0.55rem 0 0;
    color: #43566d;
    line-height: 1.65;
}

.portal-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    min-width: max-content;
    padding: 0.65rem 0.8rem;
    border: 1px solid rgba(20, 122, 75, 0.22);
    border-radius: 8px;
    background: rgba(244, 251, 247, 0.94);
    color: var(--public-green);
    font-weight: 800;
}

.portal-screen {
    min-width: 0;
    display: grid;
    gap: 1rem;
    align-content: start;
}

.portal-screen:not(.is-current),
.portal-screen[hidden] {
    display: none !important;
}

.portal-section-heading,
.portal-panel-header,
.portal-login-panel,
.portal-form-card,
.portal-profile-card,
.portal-flow-line,
.portal-empty-state,
.portal-request-result {
    border: 1px solid rgba(219, 228, 236, 0.95);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(16, 32, 51, 0.06);
}

.portal-section-heading,
.portal-panel-header,
.portal-login-panel,
.portal-profile-card {
    padding: clamp(1rem, 2.4vw, 1.35rem);
}

.portal-overview-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
}

.portal-action-card {
    min-height: 168px;
    display: grid;
    align-content: start;
    gap: 0.65rem;
    padding: 1rem;
    border: 1px solid var(--public-line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--public-ink);
    cursor: pointer;
    text-align: left;
    font: inherit;
    box-shadow: 0 10px 24px rgba(16, 32, 51, 0.05);
}

.portal-action-card:hover {
    border-color: rgba(24, 90, 189, 0.28);
    box-shadow: 0 16px 32px rgba(16, 32, 51, 0.08);
}

.portal-action-card .material-symbols-outlined,
.portal-flow-line .material-symbols-outlined {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #e9f8ef;
    color: var(--public-green);
}

.portal-action-card strong,
.portal-action-card small {
    display: block;
}

.portal-action-card strong {
    color: var(--public-ink);
    font-size: 1rem;
}

.portal-action-card small,
.portal-flow-line small {
    color: var(--public-muted);
    line-height: 1.48;
}

.portal-flow-line {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 0.95rem;
}

.portal-flow-line div {
    display: grid;
    gap: 0.4rem;
}

.portal-flow-line strong {
    color: var(--public-ink);
}

.portal-login-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    min-height: 250px;
}

.portal-primary-action,
.portal-secondary-action {
    min-height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    border: 1px solid transparent;
    cursor: pointer;
    font-family: inherit;
}

.portal-primary-action {
    background: var(--public-green);
    color: #ffffff;
    box-shadow: 0 12px 28px rgba(20, 122, 75, 0.18);
}

.portal-primary-action:hover {
    background: #0e5f38;
    color: #ffffff;
}

.portal-secondary-action {
    background: #ffffff;
    color: var(--public-ink);
    border-color: var(--public-line);
}

.portal-secondary-action:hover {
    background: #eef5ff;
    color: var(--public-blue);
}

.portal-form-card {
    display: grid;
    gap: 1rem;
    padding: clamp(1rem, 2.4vw, 1.35rem);
}

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

.portal-form-card label {
    display: block;
    margin-bottom: 0.35rem;
    color: var(--public-ink);
    font-size: 0.84rem;
    font-weight: 800;
}

.portal-form-card input,
.portal-form-card select,
.portal-form-card textarea {
    width: 100%;
    min-height: 42px;
    padding: 0.65rem 0.72rem;
    border: 1px solid var(--public-line);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--public-ink);
    font: inherit;
}

.portal-form-card textarea {
    resize: vertical;
}

.portal-form-card input:focus,
.portal-form-card select:focus,
.portal-form-card textarea:focus {
    outline: none;
    border-color: var(--public-blue);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(24, 90, 189, 0.12);
}

.portal-form-card input[readonly] {
    background: #eef5f2;
}

.portal-form-card small {
    display: block;
    margin-top: 0.35rem;
    color: var(--public-muted);
}

.portal-context-box,
.portal-attachments-box {
    padding: 1rem;
    border: 1px solid rgba(24, 90, 189, 0.14);
    border-radius: 8px;
    background: #f2f7ff;
}

.portal-context-box h3 {
    margin: 0 0 0.25rem;
    color: var(--public-ink);
    font-size: 1rem;
}

.portal-context-box p {
    margin: 0;
    color: #43566d;
}

.portal-attachments-box {
    background: #f8fafc;
    border-color: var(--public-line);
}

.portal-attachments-box ul {
    margin: 0.5rem 0 0.9rem;
    padding-left: 1.2rem;
    color: var(--public-muted);
}

.portal-attachment-control {
    display: grid;
    gap: 0.75rem;
}

.portal-attachment-input,
.portal-scan-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.portal-attachment-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
}

.portal-attachment-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    min-height: 44px;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--public-line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--public-blue);
    font: inherit;
    font-size: 0.9rem;
    font-weight: 900;
    cursor: pointer;
}

.portal-attachment-button.primary {
    border-color: var(--public-blue);
    background: var(--public-blue);
    color: #ffffff;
}

.portal-attachment-button:disabled {
    cursor: wait;
    opacity: 0.65;
}

.portal-attachment-button .material-symbols-outlined {
    font-size: 1.2rem;
}

.portal-attachment-preview {
    display: grid;
    gap: 0.45rem;
    min-height: 32px;
}

.portal-attachment-preview > span {
    color: var(--public-muted);
    font-size: 0.84rem;
    font-weight: 700;
}

.portal-attachment-chip {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.55rem;
    padding: 0.55rem 0.65rem;
    border: 1px solid var(--public-line);
    border-radius: 8px;
    background: #ffffff;
}

.portal-attachment-chip > .material-symbols-outlined {
    color: var(--public-blue);
    font-size: 1.25rem;
}

.portal-attachment-chip strong,
.portal-attachment-chip small {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-attachment-chip strong {
    color: var(--public-ink);
    font-size: 0.84rem;
}

.portal-attachment-chip small {
    margin: 0;
    color: var(--public-muted);
    font-size: 0.74rem;
}

.portal-attachment-chip button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 0;
    border-radius: 8px;
    background: #eef2f7;
    color: #475569;
    cursor: pointer;
}

.portal-scan-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: rgba(15, 23, 42, 0.82);
}

.portal-scan-modal[hidden] {
    display: none;
}

.portal-scan-panel {
    display: grid;
    align-content: start;
    gap: 0.9rem;
    width: min(760px, 100%);
    max-height: min(94vh, 900px);
    overflow: auto;
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
}

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

.portal-scan-header span {
    color: var(--public-blue);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0;
}

.portal-scan-header h3 {
    margin: 0.15rem 0 0;
    color: var(--public-ink);
    font-size: 1.25rem;
}

.portal-scan-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid var(--public-line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--public-muted);
    cursor: pointer;
}

.portal-scan-help {
    margin: 0;
    color: var(--public-muted);
    font-size: 0.9rem;
    line-height: 1.5;
}

.portal-scan-stage {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: min(60vh, 620px);
    min-height: 280px;
    overflow: hidden;
    border-radius: 8px;
    background: #020617;
    touch-action: none;
}

.portal-scan-document {
    position: relative;
    flex: 0 0 auto;
    overflow: visible;
}

.portal-scan-document img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: fill;
    user-select: none;
}

.portal-scan-loading {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #e2e8f0;
    font-size: 0.9rem;
    font-weight: 800;
}

.portal-scan-loading[hidden] {
    display: none;
}

.portal-scan-polygon {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.portal-scan-polygon polygon {
    fill: rgba(24, 90, 189, 0.18);
    stroke: #38bdf8;
    stroke-width: 0.75;
}

.portal-scan-corner {
    position: absolute;
    width: 34px;
    height: 34px;
    transform: translate(-50%, -50%);
    border: 4px solid #ffffff;
    border-radius: 999px;
    background: #16a34a;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.42);
    cursor: grab;
    touch-action: none;
}

.portal-scan-corner:active {
    cursor: grabbing;
}

.portal-scan-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 0.65rem;
}

.portal-scan-message {
    min-height: 1.2rem;
    color: var(--public-blue);
    font-size: 0.84rem;
    font-weight: 800;
}

.portal-scan-message.is-error {
    color: #b91c1c;
}

.portal-scan-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.portal-scan-options > span {
    color: var(--public-ink);
    font-size: 0.82rem;
    font-weight: 900;
}

.portal-scan-mode {
    display: inline-grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid var(--public-line);
    border-radius: 8px;
    background: #f8fafc;
}

.portal-scan-mode button {
    min-height: 36px;
    padding: 0.4rem 0.7rem;
    border: 0;
    border-right: 1px solid var(--public-line);
    background: transparent;
    color: #475569;
    font: inherit;
    font-size: 0.76rem;
    font-weight: 850;
    cursor: pointer;
}

.portal-scan-mode button:last-child {
    border-right: 0;
}

.portal-scan-mode button.is-active {
    background: var(--public-blue);
    color: #ffffff;
}

.portal-scan-modal.is-processing .portal-scan-stage,
.portal-scan-modal.is-processing [data-scan-reset],
.portal-scan-modal.is-processing [data-scan-confirm] {
    pointer-events: none;
    opacity: 0.68;
}

.portal-remote-scan-panel {
    width: min(700px, 100%);
}

.portal-remote-scan-content {
    display: grid;
    grid-template-columns: minmax(220px, 0.85fr) minmax(240px, 1fr);
    align-items: center;
    gap: 1.25rem;
}

.portal-remote-scan-content[hidden] {
    display: none;
}

.portal-remote-qr-wrap {
    display: grid;
    place-items: center;
    padding: 0.75rem;
    border: 1px solid var(--public-line);
    border-radius: 8px;
    background: #ffffff;
}

.portal-remote-qr-wrap img {
    display: block;
    width: min(100%, 320px);
    aspect-ratio: 1;
}

.portal-remote-scan-steps {
    display: grid;
    gap: 0.8rem;
}

.portal-remote-scan-steps div {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 0.7rem;
}

.portal-remote-scan-steps span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: #e8f0fb;
    color: var(--public-blue);
    font-size: 0.82rem;
    font-weight: 900;
}

.portal-remote-scan-steps p {
    margin: 0;
    color: #43566d;
    font-size: 0.9rem;
    font-weight: 700;
}

.portal-remote-scan-status {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 0.75rem;
    min-height: 66px;
    padding: 0.75rem 0.9rem;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
}

.portal-remote-status-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #2563eb;
    box-shadow: 0 0 0 5px rgba(37, 99, 235, 0.14);
}

.portal-remote-scan-status strong,
.portal-remote-scan-status small {
    display: block;
}

.portal-remote-scan-status strong {
    color: var(--public-ink);
    font-size: 0.9rem;
}

.portal-remote-scan-status small {
    margin-top: 0.12rem;
    color: #52657b;
    font-size: 0.76rem;
}

.portal-remote-scan-status.is-connected {
    border-color: #86efac;
    background: #f0fdf4;
}

.portal-remote-scan-status.is-connected .portal-remote-status-dot,
.portal-remote-scan-status.is-ready .portal-remote-status-dot {
    background: #16a34a;
    box-shadow: 0 0 0 5px rgba(22, 163, 74, 0.14);
}

.portal-remote-scan-status.is-processing .portal-remote-status-dot {
    border: 2px solid #bfdbfe;
    border-top-color: #2563eb;
    background: transparent;
    box-shadow: none;
    animation: portal-scanner-spin 0.8s linear infinite;
}

.portal-remote-mobile-handoff {
    display: grid;
    justify-items: center;
    gap: 0.7rem;
    min-height: 230px;
    padding: 2rem 1rem;
    text-align: center;
}

.portal-remote-mobile-handoff[hidden] {
    display: none;
}

.portal-remote-mobile-handoff strong {
    color: var(--public-ink);
    font-size: 1.05rem;
}

.portal-remote-mobile-handoff p {
    max-width: 420px;
    margin: 0;
    color: var(--public-muted);
    line-height: 1.5;
}

.portal-remote-loader,
.portal-mobile-sending-spinner {
    width: 42px;
    height: 42px;
    border: 4px solid #dbeafe;
    border-top-color: #185abd;
    border-radius: 50%;
    animation: portal-scanner-spin 0.8s linear infinite;
}

@keyframes portal-scanner-spin {
    to { transform: rotate(360deg); }
}

.portal-remote-scan-status.is-error {
    border-color: #fecaca;
    background: #fef2f2;
}

.portal-remote-scan-status.is-error .portal-remote-status-dot {
    background: #dc2626;
    box-shadow: 0 0 0 5px rgba(220, 38, 38, 0.14);
}

.portal-remote-scan-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.65rem;
}

.portal-remote-scan-actions [hidden] {
    display: none;
}

@media (max-width: 640px) {
    .portal-attachment-actions,
    .portal-scan-actions {
        grid-template-columns: 1fr;
    }

    .portal-scan-modal {
        align-items: stretch;
        padding: 0;
    }

    .portal-scan-panel {
        grid-template-rows: auto auto minmax(220px, 1fr) auto auto auto;
        align-content: stretch;
        width: 100%;
        height: 100dvh;
        max-height: 100dvh;
        overflow: hidden;
        border-radius: 0;
    }

    .portal-scan-stage {
        height: auto;
        min-height: 0;
    }

    .portal-scan-options {
        align-items: stretch;
        flex-direction: column;
    }

    .portal-scan-mode {
        width: 100%;
    }

    .portal-scan-mode button {
        padding-inline: 0.35rem;
        font-size: 0.7rem;
    }

    .portal-remote-scan-panel {
        grid-template-rows: auto auto minmax(0, 1fr) auto auto;
    }

    .portal-remote-scan-content {
        grid-template-columns: 1fr;
        align-content: start;
        overflow: auto;
    }

    .portal-remote-qr-wrap img {
        width: min(64vw, 270px);
    }

    .portal-remote-scan-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

.portal-mobile-scanner-body {
    min-height: 100dvh;
    margin: 0;
    background: #edf2f7;
    color: var(--public-ink);
}

.portal-mobile-scanner {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    width: min(100%, 620px);
    min-height: 100dvh;
    margin: 0 auto;
    background: #ffffff;
}

.portal-mobile-scanner-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-height: 72px;
    padding: max(0.8rem, env(safe-area-inset-top)) 1rem 0.8rem;
    border-bottom: 1px solid var(--public-line);
}

.portal-mobile-scanner-brand img {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
}

.portal-mobile-scanner-brand span,
.portal-mobile-scanner-brand strong {
    display: block;
}

.portal-mobile-scanner-brand span {
    color: var(--public-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.portal-mobile-scanner-brand strong {
    margin-top: 0.1rem;
    font-size: 1rem;
}

.portal-mobile-scanner-content {
    display: grid;
    align-content: start;
    justify-items: stretch;
    gap: 1rem;
    padding: 1.5rem 1rem;
}

.portal-mobile-scanner-heading {
    display: grid;
    grid-template-columns: 68px minmax(0, 1fr);
    align-items: center;
    gap: 0.9rem;
}

.portal-mobile-scanner-icon {
    display: grid;
    place-items: center;
    width: 68px;
    height: 68px;
    border-radius: 50%;
    background: #e8f0fb;
    color: var(--public-blue);
}

.portal-mobile-scanner-icon .material-symbols-outlined {
    font-size: 2.15rem;
}

.portal-mobile-scanner-content h1,
.portal-mobile-scanner-content p {
    margin: 0;
}

.portal-mobile-scanner-content h1 {
    font-size: 1.65rem;
}

.portal-mobile-scanner-heading p {
    margin-top: 0.35rem;
    color: var(--public-muted);
    line-height: 1.55;
}

.portal-mobile-scanner-status {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    min-height: 48px;
    padding: 0.65rem 0.8rem;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 0.84rem;
    font-weight: 800;
}

.portal-mobile-status-dot {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #2563eb;
}

.portal-mobile-scanner-status.is-connected {
    border-color: #86efac;
    background: #f0fdf4;
    color: #166534;
}

.portal-mobile-scanner-status.is-connected .portal-mobile-status-dot {
    background: #16a34a;
}

.portal-mobile-scanner-status.is-error {
    border-color: #fecaca;
    background: #fef2f2;
    color: #991b1b;
}

.portal-mobile-scanner-status.is-error .portal-mobile-status-dot {
    background: #dc2626;
}

.portal-mobile-camera-button {
    width: 100%;
    min-height: 52px;
}

.portal-mobile-camera-button[hidden] {
    display: none;
}

.portal-mobile-pages {
    display: grid;
    gap: 0.85rem;
}

.portal-mobile-pages[hidden] {
    display: none;
}

.portal-mobile-pages > header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.portal-mobile-pages h2 {
    margin: 0.15rem 0 0;
    font-size: 1rem;
}

.portal-mobile-page-list {
    display: grid;
    gap: 0.65rem;
}

.portal-mobile-page-item {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr) 42px;
    align-items: center;
    gap: 0.75rem;
    min-height: 88px;
    padding: 0.5rem;
    border: 1px solid var(--public-line);
    border-radius: 8px;
    background: #f8fafc;
}

.portal-mobile-page-preview {
    position: relative;
    width: 72px;
    height: 72px;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
}

.portal-mobile-page-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.portal-mobile-page-preview span {
    position: absolute;
    top: 4px;
    left: 4px;
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #10213b;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 900;
}

.portal-mobile-page-item strong,
.portal-mobile-page-item small {
    display: block;
}

.portal-mobile-page-item strong {
    font-size: 0.9rem;
}

.portal-mobile-page-item small {
    margin-top: 0.2rem;
    color: var(--public-muted);
    font-size: 0.74rem;
}

.portal-mobile-page-item > button {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #b42318;
    cursor: pointer;
}

.portal-mobile-page-item > button:hover,
.portal-mobile-page-item > button:focus-visible {
    background: #fee2e2;
}

.portal-mobile-send-button {
    width: 100%;
    min-height: 52px;
}

.portal-mobile-scanner-result {
    width: 100%;
    padding: 1rem;
    border: 1px solid #86efac;
    border-radius: 8px;
    background: #f0fdf4;
    color: #166534;
}

.portal-mobile-scanner-result[hidden] {
    display: none;
}

.portal-mobile-scanner-result .material-symbols-outlined,
.portal-mobile-scanner-result strong,
.portal-mobile-scanner-result p {
    display: block;
}

.portal-mobile-scanner-result .material-symbols-outlined {
    margin-bottom: 0.35rem;
    font-size: 2rem;
}

.portal-mobile-scanner-result p {
    margin: 0.35rem 0 0;
    font-size: 0.84rem;
}

.portal-mobile-scanner-result .portal-attachment-button {
    display: inline-flex;
    margin-top: 0.85rem;
    color: #166534;
    text-decoration: none;
}

.portal-mobile-sending {
    position: fixed;
    z-index: 4000;
    inset: 0;
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 0.75rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.96);
    color: var(--public-ink);
    text-align: center;
}

.portal-mobile-sending[hidden] {
    display: none;
}

.portal-mobile-sending strong {
    font-size: 1.15rem;
}

.portal-mobile-sending p {
    max-width: 360px;
    margin: 0;
    color: var(--public-muted);
    line-height: 1.5;
}

@media (max-width: 430px) {
    .portal-mobile-scanner-heading {
        grid-template-columns: 54px minmax(0, 1fr);
    }

    .portal-mobile-scanner-icon {
        width: 54px;
        height: 54px;
    }

    .portal-mobile-scanner-content h1 {
        font-size: 1.35rem;
    }

    .portal-mobile-page-item {
        grid-template-columns: 62px minmax(0, 1fr) 38px;
    }

    .portal-mobile-page-preview {
        width: 62px;
        height: 70px;
    }
}

.portal-mobile-scanner > footer {
    padding: 0.9rem 1rem max(0.9rem, env(safe-area-inset-bottom));
    border-top: 1px solid var(--public-line);
    color: var(--public-muted);
    font-size: 0.72rem;
    line-height: 1.45;
    text-align: center;
}

.portal-submit-action {
    width: 100%;
}

.portal-consult-form {
    grid-template-columns: minmax(190px, 0.9fr) minmax(220px, 1fr) auto;
    align-items: end;
}

.portal-results {
    display: grid;
    gap: 0.9rem;
}

.portal-warning-box {
    padding: 0.9rem 1rem;
    border: 1px solid #fde68a;
    border-radius: 8px;
    background: #fffbeb;
    color: #854d0e;
    font-weight: 700;
}

.portal-empty-state {
    display: grid;
    justify-items: center;
    gap: 0.45rem;
    padding: 2rem 1rem;
    text-align: center;
}

.portal-empty-state .material-symbols-outlined {
    color: var(--public-muted);
    font-size: 2.5rem;
}

.portal-empty-state h3,
.portal-empty-state p {
    margin: 0;
}

.portal-empty-state h3 {
    color: var(--public-ink);
}

.portal-empty-state p {
    color: var(--public-muted);
}

.portal-request-result {
    display: grid;
    gap: 0.9rem;
    padding: 1rem;
}

.portal-result-top,
.portal-result-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.portal-protocol {
    color: var(--public-blue);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-weight: 800;
}

.portal-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 26px;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 900;
}

.portal-status-pill.success {
    background: #dcfce7;
    color: #166534;
}

.portal-status-pill.warning {
    background: #fef9c3;
    color: #854d0e;
}

.portal-status-pill.danger {
    background: #fee2e2;
    color: #991b1b;
}

.portal-request-result h3 {
    margin: 0;
    color: var(--public-ink);
}

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

.portal-result-grid div {
    padding: 0.75rem;
    border: 1px solid var(--public-line);
    border-radius: 8px;
    background: #f8fafc;
}

.portal-result-grid dt {
    color: var(--public-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0;
}

.portal-result-grid dd {
    margin: 0.18rem 0 0;
    color: var(--public-ink);
    font-weight: 700;
}

.portal-result-note {
    padding: 0.85rem;
    border-top: 1px solid var(--public-line);
}

.portal-result-note strong,
.portal-result-note p {
    display: block;
    margin: 0;
}

.portal-result-note strong {
    color: var(--public-ink);
}

.portal-result-note p {
    margin-top: 0.25rem;
    color: var(--public-muted);
}

.portal-correction-form {
    display: grid;
    gap: 0.75rem;
    padding: 0.9rem;
    border: 1px solid #f0c66a;
    border-radius: 8px;
    background: #fff8e6;
}

.portal-correction-form strong {
    color: #854d0e;
}

.portal-correction-form label,
.portal-correction-field {
    display: grid;
    gap: 0.35rem;
    color: var(--public-ink);
    font-size: 0.86rem;
    font-weight: 800;
}

.portal-correction-field label {
    margin: 0;
}

.portal-correction-form textarea,
.portal-correction-form input[type="file"] {
    width: 100%;
    border: 1px solid var(--public-line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--public-ink);
    font: inherit;
}

.portal-correction-form textarea {
    min-height: 96px;
    padding: 0.7rem 0.8rem;
    resize: vertical;
}

.portal-correction-form input[type="file"] {
    padding: 0.65rem;
}

.portal-correction-form small {
    color: var(--public-muted);
    font-weight: 600;
}

.portal-result-actions {
    justify-content: flex-start;
    padding-top: 0.25rem;
}

.portal-result-actions a,
.portal-result-actions button,
.portal-result-actions span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 34px;
    padding: 0.35rem 0.65rem;
    border: 1px solid var(--public-line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--public-blue);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 800;
    text-decoration: none;
}

.portal-result-actions button {
    cursor: pointer;
}

.portal-result-actions span {
    color: var(--public-muted);
}

.portal-profile-card {
    display: grid;
    gap: 1rem;
}

.portal-profile-main {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.portal-profile-main .material-symbols-outlined {
    width: 52px;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #e9f8ef;
    color: var(--public-green);
    font-size: 1.8rem;
}

.portal-profile-main strong,
.portal-profile-main small {
    display: block;
}

.portal-profile-main strong {
    color: var(--public-ink);
    font-size: 1.1rem;
}

.portal-profile-main small {
    color: var(--public-muted);
}

.portal-profile-card dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin: 0;
}

.portal-profile-card dl div {
    padding: 0.85rem;
    border: 1px solid var(--public-line);
    border-radius: 8px;
    background: #f8fafc;
}

.portal-profile-card dt {
    color: var(--public-muted);
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
}

.portal-profile-card dd {
    margin: 0.2rem 0 0;
    color: var(--public-ink);
    font-weight: 700;
}

@media (max-width: 1024px) {
.portal-overview-grid,
    .portal-flow-line,
    .portal-profile-card dl {
        grid-template-columns: 1fr;
    }

    .portal-consult-form {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
.portal-app-hero {
        min-height: 220px;
        align-items: flex-end;
        flex-direction: column;
        justify-content: flex-end;
        background:
            linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.76)),
            url("/assets/prefeitura-quixaba.webp") center top / cover no-repeat;
    }

    .portal-hero-badge {
        align-self: flex-start;
        min-width: 0;
    }

    .portal-screen {
        margin-top: 1rem;
    }

    .portal-login-panel {
        grid-template-columns: 1fr;
    }

    .portal-form-grid,
    .portal-result-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .portal-app-frame {
        padding: 0.7rem;
    }

    .portal-app-hero h1,
    .portal-section-heading h2,
    .portal-panel-header h2,
    .portal-login-panel h2 {
        font-size: 1.65rem;
    }

    .portal-overview-grid {
        grid-template-columns: 1fr;
    }
}

.portal-app-frame {
    width: min(100%, 1180px);
    min-height: calc(100vh - 4rem);
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    margin: 0 auto;
    padding: 1rem;
    color: var(--public-ink);
}
.portal-header-notification-button {
    position: relative;
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #dbe4ec;
    border-radius: 8px;
    background: #ffffff;
    color: #31465e;
    cursor: pointer;
}

.portal-header-notification-button:hover,
.portal-header-notification-button[aria-expanded="true"] {
    border-color: #185abd;
    background: #eef5ff;
    color: #185abd;
}

.portal-header-notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 19px;
    height: 19px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    border: 2px solid #ffffff;
    border-radius: 999px;
    background: #c62828;
    color: #ffffff;
    font-size: 0.66rem;
    font-weight: 800;
}

.portal-header-notification-panel {
    position: fixed;
    top: 4.35rem;
    right: max(1rem, calc((100vw - 1280px) / 2));
    z-index: 90;
    width: min(92vw, 390px);
    max-height: min(70vh, 540px);
    overflow-y: auto;
    border: 1px solid #dbe4ec;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 20px 50px rgba(16, 32, 51, 0.2);
}

.portal-header-notification-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #e7edf2;
}

.portal-header-notification-title span {
    color: #5b6b7c;
    font-size: 0.78rem;
}

.portal-header-notification-panel > a {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.9rem 1rem;
    border-bottom: 1px solid #eef2f6;
    color: #172033;
    text-decoration: none;
}

.portal-header-notification-panel > a:hover {
    background: #f4fbf7;
}

.portal-header-notification-panel > a > .material-symbols-outlined {
    color: #b45309;
}

.portal-header-notification-panel strong,
.portal-header-notification-panel small {
    display: block;
}

.portal-header-notification-panel small {
    margin-top: 0.2rem;
    color: #5b6b7c;
    line-height: 1.4;
}

.portal-header-notification-empty {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1.1rem;
    color: #5b6b7c;
}

.portal-correction-alerts,
.portal-correction-reason,
.portal-correction-callout,
.portal-existing-attachments {
    border: 1px solid #f0c36d;
    border-radius: 8px;
    background: #fffbeb;
}

.portal-correction-alerts {
    padding: 1rem;
}

.portal-correction-alert-title,
.portal-correction-reason,
.portal-correction-callout {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.portal-correction-alert-title > .material-symbols-outlined,
.portal-correction-reason > .material-symbols-outlined,
.portal-correction-callout > .material-symbols-outlined {
    color: #b45309;
}

.portal-correction-alert-title strong,
.portal-correction-alert-title small {
    display: block;
}

.portal-correction-alert-title small {
    margin-top: 0.2rem;
    color: #6b5a35;
}

.portal-correction-alert-list {
    display: grid;
    gap: 0.55rem;
    margin-top: 0.85rem;
}

.portal-correction-alert-list > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.8rem;
    border: 1px solid #efd79b;
    border-radius: 8px;
    background: #ffffff;
    color: #172033;
    text-decoration: none;
}

.portal-correction-alert-list strong,
.portal-correction-alert-list small {
    display: block;
}

.portal-correction-alert-list small {
    margin-top: 0.2rem;
    color: #5b6b7c;
}

.portal-correction-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    color: #185abd;
    font-weight: 800;
    white-space: nowrap;
}

.portal-correction-cta .material-symbols-outlined {
    font-size: 1.1rem;
}

.portal-correction-callout {
    align-items: center;
    margin-top: 1rem;
    padding: 0.85rem;
}

.portal-correction-callout > div {
    flex: 1;
}

.portal-correction-callout p {
    margin: 0.2rem 0 0;
    color: #6b5a35;
}

.portal-correction-page {
    width: min(100% - 2rem, 1040px);
    margin: 0 auto;
    padding-top: 1rem;
}

.portal-correction-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.2rem;
    border: 1px solid #dbe4ec;
    border-radius: 8px;
    background: #ffffff;
}

.portal-correction-header h1 {
    margin: 0.3rem 0 0;
    color: #172033;
    font-size: 2rem;
}

.portal-correction-header p,
.portal-correction-reason p {
    margin: 0.45rem 0 0;
    color: #53667c;
    line-height: 1.55;
}

.portal-correction-reason {
    margin-top: 1rem;
    padding: 1rem;
}

.portal-correction-edit-form {
    margin-top: 1rem;
}

.portal-existing-attachments {
    padding: 1rem;
    border-color: #dbe4ec;
    background: #f8fafc;
}

.portal-existing-attachments > div:first-child strong,
.portal-existing-attachments > div:first-child small {
    display: block;
}

.portal-existing-attachments > div:first-child small,
.portal-muted-copy {
    margin-top: 0.2rem;
    color: #5b6b7c;
}

.portal-existing-attachment-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    margin-top: 0.85rem;
}

.portal-existing-attachment-list label {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: 0.55rem;
    padding: 0.75rem;
    border: 1px solid #dbe4ec;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
}

.portal-existing-attachment-list label:has(input:checked) {
    border-color: #ef9a9a;
    background: #fff5f5;
}

.portal-existing-attachment-list strong,
.portal-existing-attachment-list small {
    display: block;
    overflow-wrap: anywhere;
}

.portal-existing-attachment-list small {
    color: #b91c1c;
}

.portal-submit-spinner {
    width: 18px;
    height: 18px;
    display: inline-block;
    flex: 0 0 18px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: portal-submit-spin 0.75s linear infinite;
}

.portal-guided-form.is-submitting {
    cursor: wait;
}

@keyframes portal-submit-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 720px) {
    .portal-correction-header,
    .portal-correction-callout,
    .portal-correction-alert-list > a {
        align-items: stretch;
        flex-direction: column;
    }

    .portal-existing-attachment-list {
        grid-template-columns: 1fr;
    }

    .portal-header-notification-panel {
        top: 4.1rem;
        right: 0.7rem;
    }
}

/* Portal do Servidor: navegacao por servicos e acabamento responsivo. */
.portal-app-body {
    overflow-x: hidden;
    background: #f1f6f4;
}

.portal-app-body main,
.portal-correction-page {
    min-width: 0;
    padding-bottom: 0;
}

.portal-app-body .public-topbar > div {
    gap: 0.75rem;
}

.portal-app-body .public-brand,
.portal-app-body .public-brand > div {
    min-width: 0;
}

.portal-app-body .public-brand span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-header-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 0.5rem;
}

.portal-header-notification-button,
.portal-header-logout-button {
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    border: 1px solid #d6e0e8;
    border-radius: 8px;
    background: #ffffff;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 800;
    text-decoration: none;
}

.portal-header-notification-button {
    color: #31465e;
}

.portal-header-logout-button {
    padding: 0 0.75rem;
    border-color: #efc8c8;
    color: #a61b1b;
}

.portal-header-logout-button:hover {
    border-color: #dc2626;
    background: #fff1f1;
    color: #8f1515;
}

.portal-header-notification-button > .material-symbols-outlined,
.portal-header-logout-button > .material-symbols-outlined {
    font-size: 1.25rem;
}

.portal-app-frame,
.portal-app-main,
.portal-screen,
.portal-form-card,
.portal-form-grid,
.portal-form-grid > *,
.portal-context-box,
.portal-attachments-box,
.portal-results,
.portal-request-result,
.portal-profile-card {
    min-width: 0;
    max-width: 100%;
}

.portal-app-frame {
    width: min(100%, 1080px);
    min-height: calc(100vh - 4rem);
    padding: 1.25rem;
}

.portal-app-main {
    gap: 1.25rem;
}

.portal-screen {
    gap: 1rem;
    margin-top: 0;
}

.portal-home-heading,
.portal-standalone-heading {
    padding: 0.35rem 0 0.15rem;
}

.portal-home-heading h1,
.portal-standalone-heading h1 {
    margin: 0.25rem 0 0;
    color: var(--public-ink);
    font-size: 2rem;
    font-weight: 850;
    line-height: 1.15;
    letter-spacing: 0;
}

.portal-home-heading p,
.portal-standalone-heading p {
    max-width: 650px;
    margin: 0.4rem 0 0;
    color: var(--public-muted);
    line-height: 1.55;
}

.portal-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.85rem;
}

.portal-action-card {
    min-width: 0;
    min-height: 104px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    align-content: center;
    gap: 0.85rem;
    padding: 1rem;
    text-decoration: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.portal-action-card:hover {
    transform: translateY(-1px);
}

.portal-action-icon {
    width: 46px;
    height: 46px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #e9f8ef;
    color: var(--public-green);
}

.portal-action-icon.blue {
    background: #eaf2ff;
    color: var(--public-blue);
}

.portal-action-icon.amber {
    background: #fff4d8;
    color: #98680b;
}

.portal-action-icon.slate {
    background: #edf2f7;
    color: #43566d;
}

.portal-action-icon > .material-symbols-outlined {
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font-size: 1.45rem;
}

.portal-action-card .portal-action-arrow {
    width: auto;
    height: auto;
    border-radius: 0;
    background: transparent;
    color: #7890a5;
    font-size: 1.35rem;
}

.portal-action-copy {
    min-width: 0;
}

.portal-action-copy strong,
.portal-action-copy small {
    overflow-wrap: anywhere;
}

.portal-action-copy strong {
    font-size: 1rem;
}

.portal-action-copy small {
    margin-top: 0.2rem;
    font-size: 0.82rem;
}

.portal-login-panel {
    min-height: 230px;
    grid-template-columns: minmax(0, 1fr) minmax(220px, auto);
}

.portal-login-panel h1 {
    max-width: 650px;
    margin: 0.35rem 0 0;
    color: var(--public-ink);
    font-size: 2rem;
    font-weight: 850;
    line-height: 1.15;
}

.portal-login-actions {
    display: grid;
    gap: 0.65rem;
}

.portal-panel-header {
    padding: 0.2rem 0 0.25rem;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.portal-panel-header h2 {
    font-size: 1.75rem;
}

.portal-back-button {
    width: fit-content;
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.5rem 0.7rem;
    border: 1px solid #d6e0e8;
    border-radius: 8px;
    background: #ffffff;
    color: #31465e;
    cursor: pointer;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 800;
    text-decoration: none;
}

.portal-back-button:hover {
    border-color: #9bb4ca;
    background: #f6f9fc;
    color: var(--public-blue);
}

.portal-back-button .material-symbols-outlined {
    font-size: 1.15rem;
}

.portal-form-card {
    overflow: hidden;
}

.portal-form-card input,
.portal-form-card select,
.portal-form-card textarea,
.portal-attachment-control,
.portal-attachment-preview {
    min-width: 0;
    max-width: 100%;
}

.portal-request-result {
    gap: 1rem;
    padding: 1.1rem;
    overflow: hidden;
}

.portal-request-result h3,
.portal-protocol,
.portal-result-grid dd,
.portal-result-note p {
    overflow-wrap: anywhere;
}

.portal-result-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    overflow: hidden;
    border: 1px solid var(--public-line);
    border-radius: 8px;
}

.portal-result-grid div {
    min-width: 0;
    padding: 0.8rem;
    border: 0;
    border-right: 1px solid var(--public-line);
    border-radius: 0;
    background: #f8fafc;
}

.portal-result-grid div:last-child {
    border-right: 0;
}

.portal-result-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, max-content));
    justify-content: start;
    gap: 0.6rem;
    padding-top: 0;
}

.portal-result-actions > .portal-result-action,
.portal-result-actions > .portal-result-unavailable {
    min-width: 0;
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.6rem 0.75rem;
    border: 1px solid #cad7e2;
    border-radius: 8px;
    background: #ffffff;
    color: var(--public-blue);
    font: inherit;
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.25;
    text-align: center;
    text-decoration: none;
}

.portal-result-actions > .portal-result-action {
    cursor: pointer;
}

.portal-result-actions > .portal-result-action:hover {
    border-color: var(--public-blue);
    background: #eef5ff;
}

.portal-result-actions > .portal-result-action.is-success {
    border-color: #addbc2;
    color: #0f6a3e;
}

.portal-result-actions > .portal-result-action.is-success:hover {
    background: #edf9f2;
}

.portal-result-actions > .portal-result-action.is-warning {
    border-color: #e5c674;
    color: #855c0b;
}

.portal-result-actions > .portal-result-unavailable {
    justify-content: flex-start;
    border-style: dashed;
    color: #65798d;
    font-weight: 650;
}

.portal-result-actions .material-symbols-outlined {
    width: auto;
    height: auto;
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: currentColor;
    font-family: "Material Symbols Outlined";
    font-size: 1.15rem;
    font-weight: normal;
}

.portal-standalone-page {
    width: min(100% - 2rem, 920px);
    min-width: 0;
    display: grid;
    gap: 1rem;
    margin: 0 auto;
    padding: 1.25rem 0 2rem;
}

.portal-development-state {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 1rem;
    padding: 1.2rem;
    border: 1px solid #d6e0e8;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 12px 30px rgba(16, 32, 51, 0.06);
}

.portal-development-icon {
    width: 50px;
    height: 50px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    background: #fff4d8;
    color: #98680b;
}

.portal-development-badge {
    display: inline-flex;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    background: #fff4d8;
    color: #805708;
    font-size: 0.72rem;
    font-weight: 850;
    text-transform: uppercase;
}

.portal-development-state h2 {
    margin: 0.55rem 0 0;
    color: var(--public-ink);
    font-size: 1.25rem;
}

.portal-development-state p {
    margin: 0.4rem 0 0;
    color: var(--public-muted);
    line-height: 1.55;
}

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

    .portal-result-grid div:nth-child(2) {
        border-right: 0;
    }

    .portal-result-grid div:nth-child(-n + 2) {
        border-bottom: 1px solid var(--public-line);
    }
}

@media (max-width: 620px) {
    .portal-app-body .public-topbar > div {
        height: 60px;
        padding-right: 0.65rem;
        padding-left: 0.65rem;
    }

    .portal-app-body .public-brand {
        gap: 0.5rem;
    }

    .portal-app-body .public-brand-logo {
        width: 36px;
        height: 36px;
    }

    .portal-app-body .public-brand span:first-child {
        display: none;
    }

    .portal-app-body .public-brand span:last-child {
        max-width: 145px;
        font-size: 0.82rem;
    }

    .portal-header-logout-button {
        width: 42px;
        padding: 0;
    }

    .portal-header-logout-button > span:last-child {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    .portal-header-notification-panel {
        top: 4rem;
        right: 0.6rem;
        width: calc(100vw - 1.2rem);
    }

    .portal-app-frame {
        width: 100%;
        padding: 0.8rem;
    }

    .portal-home-heading h1,
    .portal-login-panel h1,
    .portal-standalone-heading h1 {
        font-size: 1.6rem;
    }

    .portal-panel-header h2 {
        font-size: 1.5rem;
    }

    .portal-overview-grid,
    .portal-form-grid,
    .portal-consult-form {
        grid-template-columns: minmax(0, 1fr);
    }

    .portal-action-card {
        min-height: 88px;
        padding: 0.85rem;
    }

    .portal-action-icon {
        width: 42px;
        height: 42px;
    }

    .portal-login-panel {
        min-height: 0;
        grid-template-columns: minmax(0, 1fr);
    }

    .portal-primary-action,
    .portal-secondary-action,
    .portal-submit-action,
    .portal-attachment-button {
        width: 100%;
        white-space: normal;
        text-align: center;
    }

    .portal-attachment-actions {
        grid-template-columns: minmax(0, 1fr);
    }

    .portal-result-top {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .portal-result-grid dt {
        font-size: 0.65rem;
    }

    .portal-result-grid dd {
        font-size: 0.84rem;
    }

    .portal-result-actions {
        grid-template-columns: minmax(0, 1fr);
    }

    .portal-result-actions > .portal-result-action,
    .portal-result-actions > .portal-result-unavailable {
        width: 100%;
        justify-content: flex-start;
        text-align: left;
    }

    .portal-correction-callout,
    .portal-correction-alert-list > a {
        align-items: stretch;
        flex-direction: column;
    }

    .portal-standalone-page {
        width: calc(100% - 1.6rem);
        padding-top: 0.8rem;
    }

    .portal-development-state {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 380px) {
    .portal-app-body .public-brand span:last-child {
        max-width: 115px;
    }

    .portal-app-frame {
        padding-right: 0.65rem;
        padding-left: 0.65rem;
    }

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

    .portal-result-grid div,
    .portal-result-grid div:nth-child(2) {
        border-right: 0;
        border-bottom: 1px solid var(--public-line);
    }

    .portal-result-grid div:last-child {
        border-bottom: 0;
    }
}
