:root {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #0f172a;
    background: #f8fafc;
}

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    min-height: 100vh;
}

.shell {
    width: min(100%, 820px);
    margin: 0 auto;
    padding: 20px;
}

.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.page-title {
    min-width: 0;
}

h1 {
    margin: 0;
    font-size: 30px;
    line-height: 1.1;
}

h2 {
    margin: 0;
    font-size: 21px;
}

.label {
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
}

.secondary {
    margin-top: 5px;
    color: #64748b;
    font-size: 13px;
}

button {
    padding: 11px 16px;
    border: 0;
    border-radius: 12px;
    font: inherit;
    font-weight: 600;
    color: white;
    background: #0f172a;
    cursor: pointer;
}

    button:disabled {
        cursor: default;
        opacity: 0.6;
    }

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.refresh-button {
    min-width: 118px;
}

.account-menu {
    position: relative;
}

    .account-menu summary {
        display: grid;
        width: 44px;
        height: 44px;
        place-items: center;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
        color: #334155;
        background: white;
        font-size: 25px;
        font-weight: 700;
        line-height: 1;
        cursor: pointer;
        list-style: none;
        user-select: none;
    }

        .account-menu summary::-webkit-details-marker {
            display: none;
        }

    .account-menu[open] summary {
        background: #f1f5f9;
    }

.account-menu-panel {
    position: absolute;
    z-index: 20;
    top: calc(100% + 8px);
    right: 0;
    width: 190px;
    padding: 10px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.14);
}

.account-name {
    overflow: hidden;
    padding: 7px 8px 10px;
    color: #64748b;
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.menu-button {
    width: 100%;
    color: #0f172a;
    background: #f1f5f9;
}

.summary-card,
.application-card {
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: white;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.summary-card {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    padding: 20px 22px;
    margin-bottom: 16px;
}

.summary-value {
    margin-top: 4px;
    font-size: 32px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.applications-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

.application-card {
    padding: 20px 22px;
}

    .application-card header {
        margin-bottom: 12px;
    }

.metrics {
    display: grid;
    gap: 2px;
}

.metric-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px;
    margin: 0 -8px;
    padding: 7px 8px;
    border-radius: 9px;
}

.metric-label {
    color: #64748b;
}

.metric-value {
    text-align: right;
    font-variant-numeric: tabular-nums;
}





.report-age {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.freshness-dot {
    display: inline-block;
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: #94a3b8;
}

.freshness-fresh {
    background: #16a34a;
}

.freshness-aging {
    background: #eab308;
}

.freshness-stale {
    background: #f97316;
}

.freshness-old {
    background: #dc2626;
}

.freshness-missing {
    background: #94a3b8;
}

.error {
    padding: 12px 14px;
    border-radius: 12px;
    color: #991b1b;
    background: #fee2e2;
}

.empty {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: #64748b;
}

.loading {
    padding: 12px 0;
    color: #64748b;
}

.loading-card,
.login-card {
    width: min(100%, 420px);
    margin: 10vh auto 0;
    padding: 28px;
    border: 1px solid #e2e8f0;
    border-radius: 18px;
    background: white;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
}

.login-description {
    margin: 12px 0 22px;
    color: #64748b;
}

.form-field {
    display: grid;
    gap: 7px;
    margin-bottom: 16px;
    color: #334155;
    font-size: 14px;
    font-weight: 600;
}

    .form-field input {
        width: 100%;
        padding: 12px 13px;
        border: 1px solid #cbd5e1;
        border-radius: 10px;
        font: inherit;
        font-weight: 400;
        color: #0f172a;
        background: white;
    }

        .form-field input:focus {
            border-color: #475569;
            outline: 2px solid rgba(71, 85, 105, 0.18);
        }

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 4px 0 20px;
    color: #475569;
    font-size: 14px;
}

.login-card button[type="submit"] {
    width: 100%;
}

#blazor-error-ui {
    display: none;
}

@media (max-width: 520px) {
    .shell {
        padding: 14px;
    }

    h1 {
        font-size: 27px;
    }

    .refresh-button {
        min-width: 108px;
        padding-inline: 13px;
    }

    .summary-card,
    .application-card {
        border-radius: 15px;
        padding: 18px;
    }
}
