.ae-cert {
    --ae-cert-ink: #172433;
    --ae-cert-muted: #667085;
    --ae-cert-line: #d9e0e8;
    --ae-cert-bg: #f5f7fa;
    --ae-cert-card: #ffffff;
    max-width: 1120px;
    margin: 0 auto;
    padding: 24px;
    background: var(--ae-cert-bg);
    color: var(--ae-cert-ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.ae-cert * {
    box-sizing: border-box;
    letter-spacing: 0;
}

.ae-cert-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px 16px;
    margin-bottom: 18px;
}

.ae-cert-head p {
    margin: 0 0 4px;
    color: var(--ae-cert-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.ae-cert-head h1 {
    grid-column: 1;
    margin: 0;
    font-size: 34px;
    line-height: 1.15;
}

.ae-cert-actions {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.ae-cert-main-menu {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    border-radius: 6px;
    padding: 8px 14px;
    background: #2271b1;
    color: #fff;
    font-weight: 850;
    text-decoration: none;
}

.ae-cert-logout {
    background: #1f2d3d;
}

.ae-cert-password {
    background: #2f80c0;
}

.ae-cert-profile,
.ae-cert-profile-form,
.ae-cert-card,
.ae-cert-empty,
.ae-cert-notice,
.ae-cert-alert {
    background: var(--ae-cert-card);
    border: 1px solid var(--ae-cert-line);
    border-radius: 8px;
}

.ae-cert-profile {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    padding: 16px;
    margin-bottom: 16px;
}

.ae-cert-profile-form {
    padding: 16px;
    margin-bottom: 16px;
}

.ae-cert-profile-form h2 {
    margin: 0 0 14px;
    font-size: 20px;
}

.ae-cert-profile-form form {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.ae-cert-profile-form label {
    display: grid;
    gap: 6px;
}

.ae-cert-profile-form label span {
    color: var(--ae-cert-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.ae-cert-profile-form input {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--ae-cert-line);
    border-radius: 6px;
    padding: 8px 10px;
    background: #fff;
    color: var(--ae-cert-ink);
    font: inherit;
}

.ae-cert-profile-form input[readonly] {
    background: #f0f4f8;
    color: var(--ae-cert-muted);
}

.ae-cert-form-actions {
    grid-column: 1 / -1;
}

.ae-cert-form-actions button {
    min-height: 40px;
    border: 0;
    border-radius: 6px;
    padding: 9px 14px;
    background: #2271b1;
    color: #fff;
    cursor: pointer;
    font-weight: 850;
}

.ae-cert-alert {
    padding: 13px 15px;
    margin-bottom: 16px;
    font-weight: 800;
}

.ae-cert-alert-ok {
    background: #e9f8ef;
    color: #128a4a;
}

.ae-cert-alert-error {
    background: #fdecee;
    color: #c6283d;
}

.ae-cert-profile span,
.ae-cert-card span,
.ae-cert-card dt {
    display: block;
    color: var(--ae-cert-muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.ae-cert-profile strong {
    display: block;
    margin-top: 4px;
    font-size: 16px;
}

.ae-cert-list {
    display: grid;
    gap: 14px;
}

.ae-cert-card {
    display: grid;
    grid-template-columns: minmax(220px, .9fr) minmax(0, 1.6fr);
    gap: 18px;
    padding: 18px;
}

.ae-cert-card h2 {
    margin: 4px 0 8px;
    font-size: 24px;
}

.ae-cert-card p {
    display: inline-flex;
    min-height: 30px;
    align-items: center;
    margin: 0;
    border-radius: 999px;
    padding: 5px 11px;
    background: #e9f8ef;
    color: #128a4a;
    font-weight: 850;
}

.ae-cert-card dl {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 0;
}

.ae-cert-card dd {
    margin: 5px 0 0;
    font-size: 17px;
    font-weight: 800;
}

.ae-cert-card a {
    color: #2271b1;
}

.ae-cert-empty,
.ae-cert-notice {
    padding: 16px;
    font-weight: 800;
}

.ae-cert-notice {
    max-width: 920px;
    margin: 24px auto;
    background: #fff6e5;
    color: #8a5a00;
}

@media (max-width: 800px) {
    .ae-cert {
        padding: 16px;
    }

    .ae-cert-head {
        grid-template-columns: 1fr;
    }

    .ae-cert-actions {
        grid-column: 1;
        grid-row: auto;
        justify-content: flex-start;
    }

    .ae-cert-main-menu {
        width: fit-content;
    }

    .ae-cert-card,
    .ae-cert-card dl,
    .ae-cert-profile-form form {
        grid-template-columns: 1fr;
    }
}
