:root {
    color-scheme: dark;
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    color: #f7f9fc;
    background:
        radial-gradient(circle at top left, #182b4a, transparent 38%),
        linear-gradient(145deg, #07101d 0%, #0c1727 55%, #09111e 100%);
}

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

.panel {
    width: min(760px, 100%);
    padding: 54px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 22px;
    background: rgba(10, 21, 37, 0.86);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(18px);
}

.brand-mark {
    width: 58px;
    height: 58px;
    display: grid;
    place-items: center;
    border-radius: 16px;
    font-size: 28px;
    font-weight: 750;
    background: #3478f6;
    box-shadow: 0 14px 34px rgba(52, 120, 246, 0.28);
}

.eyebrow {
    margin: 34px 0 10px;
    color: #7ea8ec;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.18em;
}

h1 {
    margin: 0;
    font-size: clamp(44px, 7vw, 72px);
    line-height: 1;
    letter-spacing: -0.05em;
}

.subtitle {
    margin: 18px 0 38px;
    color: #9ba9bc;
    font-size: 18px;
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

.status-card {
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
}

.status-card span,
.status-card strong {
    display: block;
}

.status-card span {
    margin-bottom: 8px;
    color: #8d9cb0;
    font-size: 13px;
}

.status-card strong {
    font-size: 15px;
}

.online {
    color: #56d394;
}

.pending {
    color: #f0b95f;
}

footer {
    margin-top: 34px;
    color: #66758a;
    font-size: 13px;
}

@media (max-width: 650px) {
    .panel {
        padding: 34px 24px;
    }

    .status-grid {
        grid-template-columns: 1fr;
    }
}

.content-section {
    margin-top: 36px;
}

.content-section h2 {
    margin: 0 0 16px;
    font-size: 20px;
}

.device-list,
.audit-list {
    display: grid;
    gap: 10px;
}

.device-row,
.audit-row {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 18px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
}

.device-row > div,
.audit-row > div {
    display: grid;
    gap: 5px;
}

.device-row > div:last-child {
    text-align: right;
}

.device-row span,
.audit-row span,
.audit-row time {
    color: #8d9cb0;
    font-size: 13px;
}

.offline {
    color: #f17878;
}

.empty-state {
    padding: 18px;
    border: 1px dashed rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    color: #8d9cb0;
}

@media (max-width: 650px) {
    .device-row,
    .audit-row {
        flex-direction: column;
    }

    .device-row > div:last-child {
        text-align: left;
    }
}
.device-primary {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.device-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.35rem;
    text-align: right;
}

.dashboard-account-bar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

.dashboard-user-context,
.account-context {
    display: grid;
    gap: 3px;
    margin: 0;
    text-align: right;
}

.dashboard-user-context span,
.account-context span {
    color: #8d9cb0;
    font-size: 13px;
}

.header-account {
    display: grid;
    justify-items: end;
    gap: 10px;
}

.logout-form {
    margin: 0;
}

.link-button {
    padding: 0;
    border: 0;
    color: #8fb6ff;
    background: transparent;
    font: inherit;
    cursor: pointer;
    text-decoration: underline;
}

.auth-shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
}

.auth-card {
    width: min(100%, 480px);
    margin-inline: auto;
    padding: 34px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.04);
}

.auth-card h1 {
    margin-top: 8px;
}

.auth-form {
    display: grid;
    gap: 10px;
    margin-top: 24px;
}

.auth-form input:not([type="hidden"]) {
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 8px;
    padding: 12px 14px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    color: #f7f9fc;
    background: #101d30;
    font: inherit;
}

.auth-form input:focus-visible,
.link-button:focus-visible,
.primary-button:focus-visible {
    outline: 3px solid #8fb6ff;
    outline-offset: 2px;
}

.primary-button {
    margin-top: 8px;
    padding: 12px 18px;
    border: 0;
    border-radius: 8px;
    color: #07111f;
    background: #8fb6ff;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.form-error {
    padding: 12px 14px;
    border: 1px solid rgba(241, 120, 120, 0.45);
    border-radius: 8px;
    color: #ffd1d1;
    background: rgba(241, 120, 120, 0.12);
}

.device-health-link {
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 0.45rem;
    width: fit-content;
}

.device-health-link span {
    color: inherit;
}

@media (max-width: 650px) {
    .device-status {
        align-items: flex-start;
    }

    .device-health-link {
        justify-content: flex-start;
    }
}

.site-header,
.site-footer,
.page-container {
    width: min(1100px, calc(100% - 48px));
    margin-inline: auto;
}

.site-header-inner,
.device-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-header-inner {
    padding-block: 24px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: inherit;
    text-decoration: none;
}

.brand .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 20px;
}

.brand-text,
.inventory-item {
    display: grid;
    gap: 4px;
}

.brand-text small,
.inventory-item span,
.detail-card dt,
.page-subtitle {
    color: #8d9cb0;
}

.main-navigation {
    display: flex;
    gap: 18px;
    color: #8d9cb0;
    font-size: 14px;
}

.main-navigation a,
.back-link a,
.device-row a {
    color: #8fb6ff;
}

.page-container {
    padding-block: 30px 60px;
}

.device-header h1 {
    font-size: clamp(36px, 6vw, 64px);
}

.status-badge {
    padding: 10px 14px;
    border: 1px solid currentColor;
    border-radius: 999px;
    font-weight: 700;
}

.detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 32px;
}

.detail-card {
    padding: 22px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
}

.detail-card h2 {
    margin-top: 0;
}

.detail-card dl,
.inventory-list {
    display: grid;
    gap: 12px;
}

.detail-card dl > div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
}

.detail-card dd {
    margin: 0;
    text-align: right;
}

.inventory-item {
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.assessment-card {
    grid-column: 1 / -1;
}

.assessment-card > h2 {
    margin: 0 0 18px;
}

.assessment-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.assessment-summary h3,
.assessment-label {
    margin: 0;
}

.assessment-summary h3 {
    font-size: 24px;
}

.assessment-label,
.finding-category {
    color: #8d9cb0;
    font-size: 13px;
}

.assessment-label {
    margin-bottom: 6px;
}

.assessment-score {
    display: flex;
    align-items: baseline;
    gap: 5px;
    min-width: 112px;
    justify-content: flex-end;
}

.assessment-score-group {
    text-align: right;
}

.assessment-copy {
    margin: 18px 0 0;
    color: #c5cfdd;
    line-height: 1.6;
}

.assessment-score strong {
    font-size: 38px;
    line-height: 1;
}

.assessment-score span {
    color: #8d9cb0;
}

.health-good,
.severity-good {
    color: #56d394;
}

.health-fair,
.severity-information {
    color: #8fb6ff;
}

.health-poor,
.severity-warning,
.severity-medium {
    color: #f0b95f;
}

.health-critical,
.severity-high {
    color: #f17878;
}

.finding-list {
    display: grid;
    gap: 0;
}

.finding-list > h3 {
    margin: 22px 0 0;
}

.finding-row {
    padding: 18px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.finding-row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.finding-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.severity-label {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.finding-row h3 {
    margin: 8px 0 4px;
    color: #f7f9fc;
    font-size: 16px;
}

.finding-row p {
    margin: 0;
    color: #aeb9c9;
    line-height: 1.5;
}

.finding-row p.finding-recommendation {
    margin-top: 10px;
    color: #dbe4f1;
}

.back-link {
    margin-top: 28px;
}

@media (max-width: 760px) {
    .main-navigation {
        justify-content: flex-end;
    }

    .main-navigation > a,
    .main-navigation > .nav-placeholder {
        display: none;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .assessment-summary {
        align-items: flex-start;
    }

    .finding-heading {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .site-header,
    .site-footer,
    .page-container {
        width: min(100% - 28px, 1100px);
    }

    .device-header,
    .assessment-summary {
        align-items: flex-start;
        flex-direction: column;
    }

    .assessment-score-group {
        text-align: left;
    }

    .assessment-score {
        justify-content: flex-start;
    }
}

.download-panel {
    padding: 24px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.035);
}

.download-panel > p:first-child {
    margin-top: 0;
    color: #9ba9bc;
}

.download-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin: 22px 0;
}

.download-button {
    display: inline-block;
    padding: 13px 20px;
    border-radius: 10px;
    background: #3478f6;
    color: #ffffff;
    font-weight: 700;
    text-decoration: none;
}

.download-button:hover {
    opacity: 0.92;
}

.download-button.secondary {
    background: #364152;
}

.installation-steps {
    margin: 20px 0;
    padding-left: 22px;
    color: #c1cad7;
}

.installation-steps li {
    margin: 8px 0;
}

.download-note {
    margin: 18px 0 0;
    color: #8d9cb0;
    font-size: 13px;
}

@media (max-width: 650px) {
    .download-button {
        width: 100%;
        text-align: center;
    }
}

.report-link {
    margin: 22px 0 0;
}

.report-link a {
    color: #8fb6ff;
    font-weight: 700;
}

.estate-report {
    display: grid;
    gap: 40px;
}

.report-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.report-header h1 {
    font-size: 42px;
    letter-spacing: 0;
}

.report-header time,
.report-empty {
    color: #8d9cb0;
}

.report-section h2 {
    margin: 0 0 18px;
    font-size: 22px;
}

.report-metrics {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
}

.report-metrics > div {
    display: grid;
    gap: 7px;
    min-width: 0;
    padding: 16px;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.report-metrics span {
    color: #8d9cb0;
    font-size: 12px;
}

.report-metrics strong {
    font-size: 24px;
}

.executive-summary p {
    max-width: 820px;
    margin: 0;
    color: #c5cfdd;
    font-size: 17px;
    line-height: 1.65;
}

.report-table-wrap {
    max-width: 100%;
    overflow-x: auto;
}

.report-table {
    width: 100%;
    min-width: 940px;
    border-collapse: collapse;
    font-size: 13px;
}

.report-table th,
.report-table td {
    padding: 12px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.09);
    text-align: left;
    vertical-align: top;
}

.report-table th {
    color: #8d9cb0;
    font-size: 11px;
    text-transform: uppercase;
}

.report-table a,
.report-finding a,
.action-group a {
    color: #8fb6ff;
}

.report-finding-group {
    margin-top: 24px;
}

.report-finding-group h3,
.action-group h3 {
    margin: 0 0 10px;
    font-size: 16px;
}

.report-finding-group h3 span {
    color: #8d9cb0;
    font-weight: 400;
}

.report-finding {
    display: grid;
    grid-template-columns: minmax(180px, 0.8fr) minmax(180px, 1fr) 2fr;
    gap: 18px;
    padding: 13px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.report-finding > div {
    display: grid;
    gap: 4px;
}

.report-finding span,
.report-finding p {
    color: #9eabba;
    font-size: 13px;
}

.report-finding p {
    margin: 0;
}

.report-finding-group.severity-critical h3,
.report-finding-group.severity-high h3 {
    color: #f17878;
}

.report-finding-group.severity-medium h3,
.report-finding-group.severity-warning h3 {
    color: #f0b95f;
}

.report-finding-group.severity-information h3 {
    color: #8fb6ff;
}

.action-group {
    margin-top: 22px;
}

.action-group ol {
    display: grid;
    gap: 9px;
    margin: 0;
    padding-left: 24px;
    color: #c5cfdd;
}

@media (max-width: 800px) {
    .report-header {
        align-items: flex-start;
        flex-direction: column;
    }

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

    .report-finding {
        grid-template-columns: 1fr;
        gap: 7px;
    }
}

@media (max-width: 480px) {
    .report-metrics {
        grid-template-columns: 1fr;
    }
}

.dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 24px 0;
}

.customer-report-action {
    display: grid;
    gap: 4px;
    padding: 10px 14px;
    border: 1px solid rgba(143, 182, 255, 0.3);
    border-radius: 8px;
}

.customer-report-action span {
    color: #8d9cb0;
    font-size: 12px;
}

.customer-report-action a {
    color: #c9dcff;
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    text-decoration: none;
}

.secondary-button {
    padding: 12px 18px;
    border: 1px solid rgba(143, 182, 255, 0.45);
    border-radius: 8px;
    color: #c9dcff;
    background: rgba(70, 115, 190, 0.12);
}

.welcome-state,
.onboarding-card {
    margin-top: 28px;
    padding: clamp(24px, 5vw, 44px);
    border: 1px solid rgba(143, 182, 255, 0.24);
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(43, 78, 135, 0.2), rgba(17, 27, 43, 0.95));
}

.welcome-state {
    display: grid;
    gap: 12px;
    text-align: center;
    justify-items: center;
}

.welcome-state h2,
.onboarding-card h1 {
    margin: 0;
}

.welcome-state p,
.onboarding-card > p,
.pilot-registration-note p,
.pilot-registration-note li,
.password-guidance {
    color: #c5cfdd;
    line-height: 1.6;
}

.customer-context {
    padding: 12px 16px;
    border-left: 3px solid #8fb6ff;
    background: rgba(143, 182, 255, 0.08);
}

.customer-choice-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-top: 24px;
}

.customer-choice {
    display: grid;
    gap: 5px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    color: #eef4ff;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.035);
}

.customer-choice span {
    color: #8d9cb0;
}

.pilot-registration-note {
    margin-top: 30px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.pilot-registration-note summary {
    color: #c9dcff;
    cursor: pointer;
    font-weight: 600;
}

.pilot-registration-note a,
.provisioning-progress a {
    color: #8fb6ff;
}

.provisioning-progress {
    margin-top: 28px;
    padding: 20px;
    border: 1px solid rgba(143, 182, 255, 0.3);
    border-radius: 10px;
    background: rgba(143, 182, 255, 0.07);
}

.provisioning-progress h2 {
    margin-top: 0;
    font-size: 20px;
}

.pilot-registration-note h2 {
    font-size: 18px;
}

.error-card {
    text-align: center;
}

.error-card .brand-mark,
.error-card .primary-button {
    margin-inline: auto;
}

.error-status {
    margin: 18px 0 0;
    color: #8fb6ff;
    font-size: 48px;
    font-weight: 700;
}

@media (max-width: 520px) {
    .dashboard-actions > a {
        width: 100%;
    }
}

@media print {
    :root {
        color-scheme: light;
    }

    body {
        color: #111111;
        background: #ffffff;
    }

    .site-header,
    .site-footer,
    .report-back {
        display: none;
    }

    .page-container {
        width: 100%;
        padding: 0;
    }

    .estate-report {
        gap: 24px;
    }

    .report-header,
    .report-metrics,
    .report-metrics > div,
    .report-table th,
    .report-table td,
    .report-finding {
        border-color: #cccccc;
    }

    .report-header time,
    .report-empty,
    .report-metrics span,
    .executive-summary p,
    .report-finding span,
    .report-finding p,
    .action-group ol {
        color: #333333;
    }

    .report-table-wrap {
        overflow: visible;
    }

    .report-table {
        min-width: 0;
        font-size: 9px;
    }

    .report-section,
    .report-finding,
    .action-group {
        break-inside: avoid;
    }

    a {
        color: #111111 !important;
        text-decoration: none;
    }
}
