body.portal-body {
    background:
        radial-gradient(circle at top right, rgba(77, 215, 255, 0.15), transparent 28%),
        radial-gradient(circle at top left, rgba(97, 132, 255, 0.14), transparent 26%),
        linear-gradient(180deg, #071221 0%, #0b1729 18%, #eef4f9 18%, #eef4f9 100%);
    color: #0f2236;
}

.portal-header {
    background: rgba(6, 17, 31, 0.72);
    backdrop-filter: blur(18px);
}

.portal-main {
    padding: clamp(28px, 4vw, 44px) 0 clamp(64px, 8vw, 88px);
}

.portal-main .container {
    display: grid;
    gap: var(--stack-gap);
}

.portal-eyebrow {
    margin: 0 0 14px;
    color: #61d6ff;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.portal-hero,
.portal-panel,
.portal-stat-card,
.portal-summary-card,
.portal-demo-card,
.portal-alert {
    border: 1px solid rgba(143, 180, 214, 0.18);
    box-shadow: 0 22px 54px rgba(6, 20, 34, 0.1);
}

.portal-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.82fr);
    gap: clamp(18px, 3vw, 24px);
    padding: var(--panel-pad-lg);
    border-radius: 32px;
    background: linear-gradient(145deg, rgba(7, 21, 37, 0.96), rgba(18, 43, 70, 0.82));
    color: #eef7ff;
}

.portal-hero h1,
.portal-panel h2,
.portal-section-head h2,
.portal-job-card h3 {
    margin: 0;
    font-family: "Sora", sans-serif;
    letter-spacing: -0.04em;
}

.portal-hero h1 {
    font-size: clamp(2.2rem, 4vw, 3.6rem);
    line-height: 1.05;
    max-width: 13ch;
}

.portal-hero p,
.portal-panel p,
.portal-list-card p,
.portal-job-note,
.portal-message p,
.portal-timeline-item p {
    line-height: 1.8;
}

.portal-hero-copy > p:not(.portal-eyebrow) {
    margin: 18px 0 0;
    color: rgba(231, 244, 255, 0.78);
    max-width: 62ch;
}

.portal-summary-card,
.portal-demo-card {
    align-self: stretch;
    padding: var(--panel-pad);
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
    color: #eef7ff;
    display: grid;
    align-content: start;
    gap: 10px;
}

.portal-summary-card strong,
.portal-demo-card strong {
    font-family: "Sora", sans-serif;
    font-size: 1.3rem;
    line-height: 1.35;
}

.portal-demo-label,
.portal-card-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #5a7794;
}

.portal-demo-label {
    color: #8ce7ff;
}

.portal-demo-card code {
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    font-family: inherit;
}

.portal-hero-actions,
.portal-chip-row,
.portal-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.portal-hero-actions {
    margin-top: 28px;
}

.portal-chip {
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #eaf6ff;
    font-size: 0.88rem;
    font-weight: 700;
    border: 1px solid rgba(168, 214, 255, 0.16);
}

.button-ghost-dark {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(202, 228, 255, 0.16);
    color: #eff8ff;
}

.portal-alert {
    padding: 16px 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.88);
    color: #15304a;
}

.portal-alert-success {
    border-color: rgba(39, 184, 115, 0.28);
    background: rgba(232, 249, 240, 0.95);
}

.portal-alert-error {
    border-color: rgba(220, 72, 72, 0.26);
    background: rgba(255, 239, 239, 0.96);
}

.portal-auth-grid,
.portal-board,
.customer-tracking-grid {
    display: grid;
    gap: var(--stack-gap);
}

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

.portal-panel {
    padding: var(--panel-pad);
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.86);
}

.portal-auth-panel h2,
.portal-copy-panel h2 {
    font-size: 1.8rem;
    margin-top: 8px;
}

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

.portal-check-list li {
    position: relative;
    padding-left: 26px;
}

.portal-check-list li::before {
    content: "";
    position: absolute;
    top: 11px;
    left: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1da4ff, #4dd7ff);
    box-shadow: 0 0 0 6px rgba(29, 164, 255, 0.08);
}

.portal-form-stack,
.portal-mini-form {
    display: grid;
    gap: 14px;
    margin-top: 20px;
}

.portal-form-meta {
    display: flex;
    justify-content: flex-end;
}

.portal-text-link {
    color: #177dcf;
    font-weight: 700;
    font-size: 0.92rem;
}

.portal-text-link:hover,
.portal-text-link:focus-visible {
    color: #0f6cb9;
}

.portal-form-stack label,
.portal-mini-form label {
    display: grid;
    gap: 8px;
    font-weight: 700;
    color: #193751;
}

.portal-form-stack span,
.portal-mini-form span {
    font-size: 0.92rem;
}

.portal-form-stack input,
.portal-form-stack textarea,
.portal-form-stack select,
.portal-mini-form input,
.portal-mini-form textarea,
.portal-mini-form select {
    width: 100%;
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(132, 168, 201, 0.26);
    background: #f7fbff;
    color: #12324c;
}

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

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

.portal-stats-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: clamp(14px, 2vw, 18px);
}

.portal-stat-card {
    padding: clamp(18px, 3vw, 22px);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(243, 248, 253, 0.98));
}

.portal-stat-card span {
    display: block;
    color: #5b7691;
    font-size: 0.9rem;
}

.portal-stat-card strong {
    display: block;
    margin-top: 10px;
    font-family: "Sora", sans-serif;
    font-size: 1.75rem;
    line-height: 1;
}

.portal-board {
    grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.82fr);
    align-items: start;
}

.portal-board-main,
.portal-board-side,
.portal-card-stack,
.portal-job-stack,
.portal-timeline {
    display: grid;
    gap: clamp(16px, 2.5vw, 18px);
}

.portal-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.portal-section-head.compact h2 {
    font-size: 1.55rem;
}

.portal-job-card {
    display: grid;
    gap: clamp(14px, 2.5vw, 18px);
}

.portal-job-card-new-request {
    border-color: rgba(217, 65, 92, 0.24);
    background: linear-gradient(180deg, rgba(255, 246, 248, 0.98), rgba(255, 255, 255, 0.96));
    box-shadow: 0 24px 56px rgba(168, 48, 79, 0.14);
}

.portal-job-card-new-request .portal-kpi-grid article {
    background: rgba(255, 239, 243, 0.78);
}

.portal-job-head,
.portal-thread-preview,
.portal-message,
.portal-list-card {
    display: grid;
    gap: 10px;
}

.portal-job-head {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
}

.portal-job-head h3 {
    font-size: 1.5rem;
    margin-top: 4px;
}

.portal-job-head p,
.portal-job-note {
    margin: 0;
    color: #5d788f;
}

.portal-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(12px, 2vw, 14px);
}

.portal-kpi-grid article {
    padding: 14px 16px;
    border-radius: 20px;
    background: #f5f9fd;
}

.portal-kpi-grid span {
    display: block;
    color: #68839b;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.portal-kpi-grid strong {
    display: block;
    margin-top: 8px;
    font-family: "Sora", sans-serif;
    font-size: 1.08rem;
}

.portal-kpi-grid small {
    display: block;
    margin-top: 6px;
    color: #6a8297;
}

.portal-status {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.portal-status-new {
    background: rgba(217, 65, 92, 0.14);
    color: #c33a50;
}

.portal-status-pending,
.portal-status-confirmed,
.portal-status-assigned,
.portal-status-accepted {
    background: rgba(255, 191, 71, 0.14);
    color: #ad6a00;
}

.portal-status-en-route,
.portal-status-in-progress,
.portal-status-working {
    background: rgba(29, 164, 255, 0.12);
    color: #177dcf;
}

.portal-status-arrived {
    background: rgba(77, 215, 255, 0.14);
    color: #007a9a;
}

.portal-status-completed {
    background: rgba(40, 181, 115, 0.14);
    color: #187b4d;
}

.portal-status-cancelled {
    background: rgba(220, 72, 72, 0.14);
    color: #b64545;
}

.portal-card-label-new-request {
    color: #c33a50;
}

.portal-new-booking-flag {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(217, 65, 92, 0.12);
    color: #c33a50;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.portal-job-note-alert {
    color: #a23749;
    font-weight: 700;
}

.portal-progress-bar {
    position: relative;
    height: 12px;
    border-radius: 999px;
    background: #dfeaf3;
    overflow: hidden;
}

.portal-progress-bar span {
    display: block;
    width: var(--progress, 0%);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1da4ff, #4dd7ff);
}

.portal-thread-preview {
    grid-template-columns: minmax(0, 1fr) minmax(240px, 0.82fr);
    gap: clamp(16px, 2.5vw, 18px);
    align-items: start;
}

.portal-thread-preview p {
    margin: 0;
}

.portal-list-card {
    padding: 16px 18px;
    border-radius: 20px;
    background: #f7fbff;
}

.portal-list-card strong {
    font-family: "Sora", sans-serif;
}

.portal-list-card span {
    color: #68839b;
}

.portal-inline-form {
    margin: 0;
}

.portal-tracking-panel p {
    margin: 0;
    color: #627c93;
}

.portal-radar-card {
    position: relative;
    margin: 4px 0 16px;
    height: 250px;
    border-radius: 30px;
    background: linear-gradient(180deg, #07182b, #0f2742);
    overflow: hidden;
}

.portal-radar-ring,
.portal-radar-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

.portal-radar-ring {
    width: 120px;
    height: 120px;
    border: 1px solid rgba(131, 214, 255, 0.24);
}

.portal-radar-ring-mid {
    width: 200px;
    height: 200px;
}

.portal-radar-ring-outer {
    width: 280px;
    height: 280px;
}

.portal-radar-dot {
    width: 18px;
    height: 18px;
    background: #61d6ff;
    box-shadow: 0 0 0 0 rgba(97, 214, 255, 0.45);
    animation: portalPulse 2s infinite;
}

.portal-timeline {
    padding-top: 4px;
}

.portal-timeline-item {
    padding-left: 18px;
    border-left: 2px solid rgba(29, 164, 255, 0.14);
}

.portal-timeline-item strong,
.portal-message strong {
    display: block;
    font-family: "Sora", sans-serif;
}

.portal-timeline-item span,
.portal-message span,
.portal-action-text,
.portal-refresh-indicator {
    color: #68839b;
    font-size: 0.88rem;
}

.portal-timeline-item p,
.portal-message p {
    margin: 6px 0 0;
}

.portal-action-row {
    align-items: center;
    justify-content: space-between;
}

.portal-live-card,
.portal-map-card {
    position: relative;
    min-height: 190px;
    padding: 20px;
    border-radius: 24px;
    overflow: hidden;
}

.portal-live-card {
    background: linear-gradient(160deg, #07182b, #123357);
    color: #edf7ff;
}

.portal-live-card strong {
    display: block;
    margin-top: 14px;
    font-family: "Sora", sans-serif;
    font-size: 1.18rem;
    line-height: 1.45;
}

.portal-live-card p {
    margin-top: 12px;
    color: rgba(233, 246, 255, 0.76);
}

.portal-map-card {
    background: linear-gradient(180deg, #ecf5fb, #dfeaf4);
}

.portal-map-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(91, 138, 179, 0.12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(91, 138, 179, 0.12) 1px, transparent 1px);
    background-size: 46px 46px;
}

.portal-map-pin {
    position: absolute;
    top: 32%;
    left: 62%;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #1da4ff;
    box-shadow: 0 0 0 10px rgba(29, 164, 255, 0.16);
}

.portal-map-info {
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 18px;
    padding: 12px 14px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(14px);
}

.portal-map-info strong,
.portal-map-info span {
    display: block;
}

.portal-map-info strong {
    font-family: "Sora", sans-serif;
}

.portal-tracking-lane {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.portal-lane-step {
    padding: 10px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.portal-lane-step-done {
    background: rgba(40, 181, 115, 0.14);
    color: #187b4d;
}

.portal-lane-step-live {
    background: rgba(29, 164, 255, 0.12);
    color: #177dcf;
}

.portal-lane-step-pending {
    background: rgba(108, 138, 166, 0.12);
    color: #668099;
}

.portal-message {
    padding: 12px 14px;
    border-radius: 18px;
    background: #f7fbff;
}

.portal-message-admin {
    border-left: 4px solid #1da4ff;
}

.portal-message-customer {
    border-left: 4px solid #2dbb7f;
}

.portal-message-engineer {
    border-left: 4px solid #ffb037;
}

.portal-refresh-indicator {
    display: inline-flex;
    padding: 10px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #ebf6ff;
}

@keyframes portalPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(97, 214, 255, 0.5);
    }
    70% {
        box-shadow: 0 0 0 26px rgba(97, 214, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(97, 214, 255, 0);
    }
}

@media (max-width: 1120px) {
    .portal-hero,
    .portal-board,
    .portal-auth-grid,
    .customer-auth-grid,
    .customer-tracking-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 920px) {
    .portal-kpi-grid,
    .portal-thread-preview,
    .portal-inline-grid {
        grid-template-columns: 1fr;
    }

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

@media (max-width: 700px) {
    .portal-main {
        padding-top: 26px;
    }

    .portal-hero,
    .portal-panel {
        padding: 22px;
    }

    .portal-summary-card,
    .portal-demo-card,
    .portal-live-card,
    .portal-map-card {
        padding: 18px;
    }

    .portal-map-info {
        left: 16px;
        right: 16px;
        bottom: 16px;
    }

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

    .portal-action-row {
        align-items: flex-start;
        flex-direction: column;
    }
}
