.portal-shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 280px 1fr;
    background:
        radial-gradient(circle at top, rgba(17, 82, 212, 0.08), transparent 28%),
        linear-gradient(180deg, #f5f7fb 0%, #eef2f7 100%);
}

.portal-sidebar {
    border-right: 1px solid rgba(30, 41, 59, 0.12);
    background: linear-gradient(180deg, #0f172a 0%, #111827 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
}

.portal-user-card {
    padding: 1rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(10px);
}

.portal-nav-link {
    display: block;
    border-radius: 0.85rem;
    padding: 0.7rem 0.9rem;
    color: #cbd5e1;
    transition: all 0.15s ease;
    background: transparent;
}

.portal-nav-link:hover,
.portal-nav-link.is-active {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    box-shadow: inset 3px 0 0 #1152d4;
}

.portal-nav-link-inner {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
}

.portal-nav-icon {
    width: 1.15rem;
    height: 1.15rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #cbd5e1;
    flex: 0 0 1.15rem;
}

.portal-nav-link:hover .portal-nav-icon,
.portal-nav-link.is-active .portal-nav-icon {
    color: #fff;
}

.portal-nav-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

.portal-main {
    padding: 2rem 2.5rem;
    overflow: auto;
}

body.portal-dialog-scroll-lock {
    overflow: hidden;
}

body.portal-dialog-scroll-lock .portal-main,
body.portal-dialog-scroll-lock .portal-sidebar {
    overflow: hidden;
}

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

.portal-panel {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(226, 232, 240, 0.85);
    border-radius: 1.25rem;
    padding: 1.25rem;
    box-shadow: 0 18px 40px -28px rgba(15, 23, 42, 0.3);
}

.portal-stat-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.portal-stat-card {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 1.25rem;
    padding: 1.25rem;
    box-shadow: 0 14px 30px -26px rgba(15, 23, 42, 0.3);
}

.portal-eyebrow {
    font-size: 0.72rem;
    line-height: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.22em;
    color: #64748b;
}

.portal-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border-radius: 0.85rem;
    padding: 0.72rem 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.15s ease;
    border: 1px solid transparent;
}

.portal-button-primary {
    background: #0f172a;
    color: #fff;
}

.portal-button-primary:hover {
    background: #1e293b;
}

.portal-button-secondary {
    background: #fff;
    border-color: #cbd5e1;
    color: #0f172a;
}

.portal-button-secondary:hover {
    background: #f8fafc;
}

.portal-button-danger {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #9f1239;
}

.portal-button-danger:hover {
    background: #ffe4e6;
}

.portal-toolbar-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.portal-toolbar-actions {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.portal-field-label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #334155;
}

.portal-input,
.portal-static-field {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 0.9rem;
    padding: 0.8rem 0.9rem;
    background: #fff;
    color: #0f172a;
}

.portal-static-field {
    background: #f8fafc;
}

.portal-input-multi {
    min-height: 11rem;
}

.portal-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.portal-list-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 1rem 0;
    border-bottom: 1px solid rgba(226, 232, 240, 0.85);
}

.portal-list-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.portal-list-main {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex: 1 1 720px;
    flex-wrap: wrap;
}

.portal-list-actions {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.portal-inline-kv {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    min-width: min(100%, 420px);
}

.portal-inline-kv dt {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #94a3b8;
}

.portal-inline-kv dd {
    margin-top: 0.25rem;
    font-size: 0.88rem;
    color: #0f172a;
}

.portal-chip-list {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.portal-chip {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    background: #eff6ff;
    color: #1d4ed8;
    padding: 0.35rem 0.7rem;
    gap: 0.45rem;
    font-size: 0.76rem;
    font-weight: 600;
}

.portal-chip-link {
    text-decoration: none;
}

.portal-chip-link:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.portal-filter-summary {
    border: 1px dashed #cbd5e1;
    border-radius: 1rem;
    padding: 1rem;
    background: #f8fafc;
}

.portal-chip-muted {
    background: #f1f5f9;
    color: #64748b;
}

.portal-chip-warning {
    background: #fff7ed;
    color: #b45309;
}

.portal-chip-success {
    background: #ecfdf5;
    color: #047857;
}

.portal-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 9999px;
    padding: 0.3rem 0.7rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

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

.portal-badge-danger {
    background: #ffe4e6;
    color: #be123c;
}

.portal-badge-muted {
    background: #e2e8f0;
    color: #475569;
}

.portal-badge-info {
    background: #dbeafe;
    color: #1d4ed8;
}

.portal-empty-state {
    padding: 2rem;
    border: 1px dashed #cbd5e1;
    border-radius: 1rem;
    color: #64748b;
    text-align: center;
    background: #f8fafc;
}

.portal-doc-link {
    display: block;
    border-radius: 1rem;
    padding: 0.9rem;
    color: #334155;
    transition: all 0.15s ease;
    background: #fff;
    border: 1px solid rgba(226, 232, 240, 0.85);
}

.portal-doc-link:hover {
    background: #f8fafc;
    color: #0f172a;
}

.prose {
    color: #334155;
}

.prose p,
.prose ul,
.prose ol {
    line-height: 1.75;
}

.prose ul,
.prose ol {
    margin: 0 0 1rem 0;
    padding-left: 1.5rem;
}

.prose li + li {
    margin-top: 0.45rem;
}

.prose code {
    color: #0f172a;
}

.prose pre {
    margin: 1.5rem 0;
    overflow-x: auto;
    border: 1px solid #0f172a;
    border-radius: 1rem;
    background: #020617;
    color: #e2e8f0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.prose pre code {
    display: block;
    padding: 0;
    background: transparent;
    color: inherit;
}

.prose :not(pre) > code {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    color: #0f172a;
}

.markdown-code-block {
    background: #020617 !important;
    color: #e2e8f0 !important;
    border: 1px solid #0f172a !important;
}

.markdown-code-block,
.markdown-code-block * {
    color: #e2e8f0 !important;
}

.markdown-code-content {
    display: block;
    background: transparent !important;
    color: inherit !important;
}

.markdown-inline-code {
    border: 1px solid #e2e8f0;
    background: #f8fafc !important;
    color: #0f172a !important;
}

.portal-dialog {
    display: none;
    border: none;
    padding: 0;
    background: transparent;
    max-width: none;
    overflow: hidden;
}

.portal-dialog[open] {
    display: block;
}

.portal-dialog::backdrop {
    background: rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(4px);
}

.portal-dialog-modal {
    width: min(820px, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
}

.portal-dialog-drawer {
    width: min(720px, 100vw);
    height: 100vh;
    margin: 0 0 0 auto;
}

.portal-dialog-modal,
.portal-dialog-drawer {
    background: #fff;
    border-radius: 1.25rem;
    box-shadow: 0 30px 80px -40px rgba(15, 23, 42, 0.65);
    overflow: hidden;
}

.portal-dialog-modal[open],
.portal-dialog-drawer[open] {
    display: flex;
    flex-direction: column;
}

.portal-dialog-drawer {
    border-radius: 1.25rem 0 0 1.25rem;
    max-height: 100vh;
}

.portal-dialog.is-fullscreen {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    max-height: 100vh !important;
    margin: 0 !important;
    border-radius: 0 !important;
}

.portal-dialog.is-fullscreen.portal-dialog-drawer,
.portal-dialog.is-fullscreen.portal-dialog-modal {
    border-radius: 0 !important;
}

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

.portal-dialog-header-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.portal-icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e1;
    background: #fff;
    border-radius: 0.85rem;
    padding: 0.65rem 0.85rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: #0f172a;
}

.portal-form-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    padding: 1.25rem;
}

.portal-dialog > .portal-form-grid {
    overflow: auto;
    flex: 1 1 auto;
    max-height: calc(100vh - 96px);
}

.portal-form-span-full {
    grid-column: 1 / -1;
}

.portal-form-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    padding-top: 0.25rem;
}

.portal-filter-details {
    grid-column: 1 / -1;
    border: 1px dashed #cbd5e1;
    border-radius: 1rem;
    padding: 1rem;
    background: #f8fafc;
}

.portal-filter-details summary {
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #475569;
}

.portal-drawer-body {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-height: calc(100vh - 90px);
    overflow: auto;
}

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

.portal-detail-grid dt {
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.14em;
    color: #94a3b8;
}

.portal-detail-grid dd {
    margin-top: 0.3rem;
    font-size: 0.9rem;
    color: #0f172a;
}

.portal-code-panel {
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: #f8fafc;
    padding: 1rem;
}

.portal-code-panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.portal-code-panel-actions {
    display: none;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.portal-dialog.is-fullscreen .portal-code-panel-actions {
    display: inline-flex;
}

.portal-code-panel-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #cbd5e1;
    background: #fff;
    color: #0f172a;
    border-radius: 999px;
    padding: 0.4rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
}

.portal-code-panel-action:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.portal-code-panel pre {
    margin-top: 0.75rem;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: JetBrains Mono, SFMono-Regular, monospace;
    font-size: 0.78rem;
    color: #0f172a;
}

.portal-audit-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.portal-audit-card {
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: #fff;
    padding: 1rem;
}

.portal-audit-log-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.portal-audit-log-row {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.9rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    background: #f8fafc;
}

.portal-audit-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.portal-policy-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 0 1.25rem 1.25rem 1.25rem;
    max-height: calc(100vh - 90px);
    overflow: auto;
}

.portal-rule-groups {
    display: grid;
    gap: 1rem;
}

.portal-rule-group {
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    overflow: hidden;
    background: #fff;
}

.portal-rule-group-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 1rem;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}

.portal-rule-group-header h3 {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: #475569;
}

.portal-rule-items {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
}

.portal-rule-item {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    padding: 0.85rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    background: #fff;
}

.portal-rule-item strong {
    display: block;
    font-size: 0.9rem;
    color: #0f172a;
}

.portal-rule-item small {
    display: block;
    margin-top: 0.25rem;
    font-family: JetBrains Mono, SFMono-Regular, monospace;
    font-size: 0.74rem;
    color: #64748b;
}

.portal-text-button {
    background: transparent;
    color: #2563eb;
    font-size: 0.8rem;
    font-weight: 700;
}

.portal-toggle-row {
    display: inline-flex;
    align-items: center;
    gap: 0.7rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    padding: 0.85rem 1rem;
    background: #f8fafc;
    color: #0f172a;
    font-size: 0.88rem;
    font-weight: 600;
}

.portal-inline-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.portal-status-switch {
    position: relative;
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.9rem;
    align-items: center;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    padding: 1rem 1.05rem;
    background: #f8fafc;
    cursor: pointer;
}

.portal-status-switch input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.portal-status-switch-track {
    position: relative;
    width: 3.35rem;
    height: 1.9rem;
    border-radius: 999px;
    background: #cbd5e1;
    transition: background 0.15s ease;
}

.portal-status-switch-track::after {
    content: "";
    position: absolute;
    top: 0.2rem;
    left: 0.2rem;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 999px;
    background: #fff;
    box-shadow: 0 6px 18px -12px rgba(15, 23, 42, 0.35);
    transition: transform 0.15s ease;
}

.portal-status-switch input:checked + .portal-status-switch-track {
    background: #2563eb;
}

.portal-status-switch input:checked + .portal-status-switch-track::after {
    transform: translateX(1.45rem);
}

.portal-status-switch-copy {
    display: grid;
    gap: 0.2rem;
}

.portal-status-switch-copy strong {
    font-size: 0.92rem;
    color: #0f172a;
}

.portal-status-switch-copy small {
    font-size: 0.78rem;
    line-height: 1.55;
    color: #64748b;
}

.portal-collapse-group {
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    background: #fff;
    overflow: hidden;
}

.portal-collapse-summary {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.1rem;
    background: #f8fafc;
    cursor: pointer;
}

.portal-collapse-summary::-webkit-details-marker {
    display: none;
}

.portal-collapse-group[open] .portal-collapse-summary {
    border-bottom: 1px solid #e2e8f0;
}

.portal-collapse-group .portal-list {
    padding: 0 1.1rem 1rem 1.1rem;
}

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

.portal-day-option {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.9rem;
    background: #fff;
    padding: 0.85rem 1rem;
    color: #0f172a;
    font-size: 0.88rem;
    font-weight: 600;
}

.portal-login-shell {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1.2fr) minmax(360px, 440px);
    align-items: stretch;
}

.portal-login-hero {
    position: relative;
    overflow: hidden;
    border-radius: 1.75rem;
    padding: 2rem;
    background:
        radial-gradient(circle at top right, rgba(56, 189, 248, 0.32), transparent 26%),
        linear-gradient(135deg, #0f172a 0%, #111827 52%, #1e3a8a 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    min-height: 560px;
}

.portal-login-hero-copy {
    max-width: 42rem;
}

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

.portal-login-feature {
    border: 1px solid rgba(226, 232, 240, 0.16);
    border-radius: 1.35rem;
    padding: 1.25rem 1.2rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
}

.portal-login-card {
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 1.75rem;
    padding: 2rem;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 24px 48px -34px rgba(15, 23, 42, 0.32);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.portal-login-input {
    min-height: 3.2rem;
    border-radius: 1rem;
    background: #fff;
}

.portal-login-submit {
    min-height: 3.25rem;
    border-radius: 1rem;
}

.portal-login-footnote {
    margin-top: 1.5rem;
    border-top: 1px solid #e2e8f0;
    padding-top: 1rem;
    font-size: 0.82rem;
    line-height: 1.5;
    color: #64748b;
}

.guest-body {
    min-height: 100vh;
    margin: 0;
    display: flex;
    flex-direction: column;
    background: #f7f9fb;
    color: #191c1e;
    font-family: 'Inter', sans-serif;
}

.guest-header {
    border-bottom: 1px solid rgba(198, 198, 205, 0.35);
    background: rgba(247, 249, 251, 0.92);
    backdrop-filter: blur(16px);
}

.guest-header-inner,
.guest-footer-inner {
    width: min(1280px, calc(100% - 2rem));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
}

.guest-brand {
    color: #191c1e;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    text-transform: uppercase;
}

.guest-nav,
.guest-footer-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.guest-nav-link,
.guest-footer-links a {
    color: #505f76;
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.guest-nav-link:hover,
.guest-footer-links a:hover {
    color: #191c1e;
}

.guest-main {
    width: 100%;
    flex: 1 1 auto;
}

.guest-main-login {
    display: flex;
    align-items: stretch;
}

.guest-main-page {
    width: min(1180px, calc(100% - 2rem));
    margin: 0 auto;
    padding: 3rem 0 4rem;
}

.guest-flash {
    width: min(1180px, calc(100% - 2rem));
    margin: 1.25rem auto 0;
    border-radius: 0.75rem;
    padding: 0.95rem 1rem;
    border: 1px solid transparent;
    font-size: 0.9rem;
}

.guest-flash-error {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #9f1239;
}

.guest-flash-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.guest-footer {
    border-top: 1px solid rgba(198, 198, 205, 0.35);
    background: #f8fafc;
}

.guest-footer-copy {
    color: #64748b;
    font-size: 0.78rem;
    letter-spacing: 0.01em;
}

.aa-login-stage {
    width: 100%;
    min-height: calc(100vh - 138px);
}

.aa-login-grid {
    min-height: calc(100vh - 138px);
    display: grid;
    grid-template-columns: 1.2fr 1fr;
}

.aa-brand-panel {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 6rem;
    background: #001453;
    color: #dde1ff;
}

.aa-brand-grid {
    position: absolute;
    inset: 0;
    opacity: 0.1;
    background-image:
        linear-gradient(to right, currentColor 1px, transparent 1px),
        linear-gradient(to bottom, currentColor 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.aa-brand-top,
.aa-brand-content,
.aa-brand-bottom {
    position: relative;
    z-index: 1;
}

.aa-brand-name {
    margin: 0 0 0.75rem;
    font-size: 1.9rem;
    font-weight: 900;
    letter-spacing: -0.06em;
    text-transform: uppercase;
}

.aa-brand-divider {
    width: 3rem;
    height: 0.25rem;
    background: #3980f4;
}

.aa-brand-heading {
    margin: 0;
    font-size: clamp(3.6rem, 6vw, 5.5rem);
    line-height: 0.95;
    font-weight: 900;
    letter-spacing: -0.08em;
    color: #dde1ff;
}

.aa-brand-heading span {
    display: block;
    color: #607cec;
}

.aa-brand-intro {
    max-width: 34rem;
    margin: 2rem 0 3rem;
    font-size: 1.05rem;
    line-height: 1.8;
    color: rgba(221, 225, 255, 0.82);
}

.aa-feature-stack {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    max-width: 30rem;
}

.aa-feature-block {
    padding-right: 1rem;
}

.aa-feature-label {
    display: block;
    margin-bottom: 0.65rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: #3980f4;
}

.aa-feature-copy {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(221, 225, 255, 0.72);
}

.aa-brand-bottom {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: rgba(221, 225, 255, 0.64);
}

.aa-brand-bottom-line {
    flex: 1 1 auto;
    height: 1px;
    background: rgba(221, 225, 255, 0.18);
}

.aa-form-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5rem 2rem;
    background: #f7f9fb;
}

.aa-form-wrap {
    width: min(100%, 24rem);
}

.aa-mobile-brand {
    display: none;
    margin-bottom: 3rem;
}

.aa-mobile-brand h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: #000;
}

.aa-form-heading h3 {
    margin: 0;
    font-size: 2rem;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.06em;
    color: #191c1e;
}

.aa-form-heading p {
    margin: 0.65rem 0 0;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #45464d;
}

.aa-login-flash {
    margin-top: 1.5rem;
    border-radius: 0.75rem;
    padding: 0.95rem 1rem;
    border: 1px solid transparent;
    font-size: 0.9rem;
    line-height: 1.6;
}

.aa-login-flash-error {
    border-color: #fecdd3;
    background: #fff1f2;
    color: #9f1239;
}

.aa-login-flash-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
    color: #166534;
}

.aa-login-form {
    margin-top: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.aa-field {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
}

.aa-field-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.24em;
    text-transform: uppercase;
    color: #45464d;
}

.aa-field-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.aa-field-meta a,
.aa-form-links a {
    color: #3980f4;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
}

.aa-field-meta a:hover,
.aa-form-links a:hover {
    text-decoration: underline;
}

.aa-field-input {
    width: 100%;
    height: 3.25rem;
    padding: 0 1rem;
    border-radius: 0.5rem;
    border: 1px solid rgba(118, 119, 125, 0.2);
    background: #fff;
    color: #191c1e;
    font-size: 0.95rem;
    font-weight: 600;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.aa-field-input:focus {
    border-color: #3755c3;
    box-shadow: 0 0 0 3px rgba(55, 85, 195, 0.14);
}

.aa-submit-wrap {
    padding-top: 0.5rem;
}

.aa-submit-button {
    width: 100%;
    height: 3.5rem;
    border: none;
    border-radius: 0.375rem;
    background: #000;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    font-size: 0.95rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    cursor: pointer;
    transition: transform 0.15s ease, background 0.15s ease;
}

.aa-submit-button:hover {
    background: #3755c3;
}

.aa-submit-button:active {
    transform: scale(0.985);
}

.aa-form-links {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(198, 198, 205, 0.24);
}

.aa-form-links p {
    margin: 0 0 1rem;
    color: rgba(69, 70, 77, 0.56);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.24em;
    text-transform: uppercase;
}

.aa-form-links div {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.guest-page-shell {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.guest-page-hero {
    border: 1px solid #dde1e5;
    border-radius: 1.25rem;
    padding: 2rem;
    background: linear-gradient(180deg, #ffffff 0%, #f2f4f6 100%);
    box-shadow: 0 18px 40px -32px rgba(15, 23, 42, 0.35);
}

.guest-page-hero h1 {
    margin: 0.75rem 0 0;
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.06em;
    color: #191c1e;
}

.guest-page-hero p {
    max-width: 48rem;
    margin: 1rem 0 0;
    font-size: 1rem;
    line-height: 1.8;
    color: #505f76;
}

.guest-page-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.guest-page-card {
    border: 1px solid #dde1e5;
    border-radius: 1rem;
    padding: 1.4rem;
    background: #fff;
    box-shadow: 0 18px 40px -34px rgba(15, 23, 42, 0.22);
}

.guest-page-card h2 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #191c1e;
}

.guest-page-card p {
    margin: 0.9rem 0 0;
    font-size: 0.92rem;
    line-height: 1.75;
    color: #505f76;
}

.guest-page-list {
    margin: 1rem 0 0;
    padding-left: 1.1rem;
    color: #505f76;
    display: grid;
    gap: 0.65rem;
    font-size: 0.9rem;
    line-height: 1.7;
}

.guest-status-shell {
    display: grid;
    gap: 1.25rem;
}

.guest-status-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.guest-status-toolbar h2 {
    margin: 0.45rem 0 0;
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: -0.05em;
    color: #191c1e;
}

.guest-status-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.guest-status-last-run {
    font-size: 0.82rem;
    color: #64748b;
}

.guest-status-button {
    border: none;
    border-radius: 0.5rem;
    background: #000;
    color: #fff;
    padding: 0.9rem 1.15rem;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, opacity 0.15s ease;
}

.guest-status-button:hover {
    background: #3755c3;
}

.guest-status-button:disabled {
    opacity: 0.65;
    cursor: progress;
}

.guest-status-note-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.guest-status-list {
    display: grid;
    gap: 1rem;
}

.guest-status-item {
    border: 1px solid #dde1e5;
    border-radius: 1rem;
    background: #fff;
    padding: 1.25rem;
    box-shadow: 0 18px 40px -34px rgba(15, 23, 42, 0.22);
}

.guest-status-item-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.guest-status-item h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: #191c1e;
}

.guest-status-summary {
    margin: 0.5rem 0 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #191c1e;
}

.guest-status-detail {
    margin: 0.9rem 0 0;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #505f76;
}

.guest-status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    white-space: nowrap;
}

.guest-status-pill.is-pending {
    background: #e2e8f0;
    color: #475569;
}

.guest-status-pill.is-okay {
    background: #dcfce7;
    color: #166534;
}

.guest-status-pill.is-needs-review {
    background: #ffedd5;
    color: #9a3412;
}

.guest-status-item.is-okay {
    border-color: #bbf7d0;
}

.guest-status-item.is-needs-review {
    border-color: #fdba74;
}

@media (max-width: 1023px) {
    .portal-shell {
        grid-template-columns: 1fr;
    }

    .portal-sidebar {
        border-right: none;
        border-bottom: 1px solid rgba(30, 41, 59, 0.12);
    }

    .portal-main {
        padding: 1.25rem;
    }

    .portal-dialog-drawer {
        width: 100vw;
        border-radius: 0;
    }

    .portal-dialog-modal {
        width: 100vw;
        max-height: 100vh;
        border-radius: 0;
    }

    .guest-main-page {
        width: min(100%, calc(100% - 1.5rem));
        padding: 2rem 0 3rem;
    }

    .aa-login-grid {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .aa-brand-panel {
        display: none;
    }

    .aa-form-panel {
        padding: 3rem 1.25rem;
    }

    .aa-mobile-brand {
        display: block;
    }

    .guest-header-inner,
    .guest-footer-inner {
        width: min(100%, calc(100% - 1.5rem));
    }

    .guest-status-toolbar {
        align-items: stretch;
    }
}

@media (max-width: 767px) {
    .guest-header-inner,
    .guest-footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }
}
