.ae-maintenance {
    --ae-maint-ink: #172433;
    --ae-maint-muted: #667085;
    --ae-maint-line: #d9e0e8;
    --ae-maint-blue: #2f80c0;
    --ae-maint-danger: #c6283f;
    width: calc(100vw - 32px);
    max-width: 1760px;
    margin-left: 50%;
    transform: translateX(-50%);
    padding: 34px 42px;
    background: #f5f7fa;
    color: var(--ae-maint-ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

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

.ae-maintenance-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: start;
    margin-bottom: 24px;
}

.ae-maintenance-head p,
.ae-maintenance-card > p:first-child {
    margin: 0 0 8px;
    color: var(--ae-maint-muted);
    font-size: 14px;
    font-weight: 850;
    text-transform: uppercase;
}

.ae-maintenance-head h1 {
    margin: 0;
    font-size: clamp(34px, 4vw, 58px);
    line-height: 1;
}

.ae-maintenance-head span,
.ae-maintenance-card p {
    color: var(--ae-maint-muted);
    font-size: 16px;
    line-height: 1.45;
}

.ae-maintenance-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: flex-end;
}

.ae-maintenance-actions a,
.ae-maintenance-button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 6px;
    padding: 10px 16px;
    background: var(--ae-maint-blue);
    color: #fff;
    font: inherit;
    font-weight: 850;
    text-decoration: none;
    cursor: pointer;
}

.ae-maintenance-actions a:last-child {
    background: #1f2d3d;
}

.ae-maintenance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 18px;
}

.ae-maintenance-stat,
.ae-maintenance-card {
    border: 1px solid var(--ae-maint-line);
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 28px rgba(23, 36, 51, .08);
}

.ae-maintenance-stat {
    min-height: 132px;
    padding: 20px;
}

.ae-maintenance-stat span {
    display: block;
    color: var(--ae-maint-muted);
    font-size: 14px;
    font-weight: 850;
}

.ae-maintenance-stat strong {
    display: block;
    margin: 12px 0 6px;
    font-size: 34px;
    line-height: 1;
}

.ae-maintenance-stat small {
    color: var(--ae-maint-muted);
    line-height: 1.35;
}

.ae-maintenance-card {
    margin-top: 18px;
    padding: 22px;
}

.ae-maintenance-card h2 {
    margin: 0 0 8px;
    font-size: 28px;
    line-height: 1.15;
}

.ae-maintenance-card-soft {
    background: #eaf8f0;
    border-color: #bfe8d1;
}

.ae-maintenance-card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: center;
}

.ae-maintenance-form {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto;
    gap: 14px;
    align-items: end;
    margin-top: 16px;
}

.ae-maintenance-form label span {
    display: block;
    margin-bottom: 8px;
    color: var(--ae-maint-muted);
    font-size: 13px;
    font-weight: 850;
    text-transform: uppercase;
}

.ae-maintenance-form input {
    width: 100%;
    min-height: 46px;
    border: 1px solid var(--ae-maint-line);
    border-radius: 6px;
    padding: 10px 12px;
    font: inherit;
}

.ae-maintenance-danger {
    border-color: #f0bcc6;
}

.ae-maintenance-button-danger {
    background: var(--ae-maint-danger);
}

.ae-maintenance-alert {
    margin-bottom: 18px;
    padding: 16px 18px;
    border-radius: 8px;
    font-weight: 850;
}

.ae-maintenance-alert-ok {
    background: #eaf8f0;
    color: #00833d;
}

.ae-maintenance-alert-error {
    background: #fdecef;
    color: var(--ae-maint-danger);
}

.ae-maintenance-locked {
    max-width: 860px;
}

@media (max-width: 780px) {
    .ae-maintenance {
        width: calc(100vw - 20px);
        padding: 20px;
    }

    .ae-maintenance-head,
    .ae-maintenance-card-head,
    .ae-maintenance-form {
        grid-template-columns: 1fr;
    }

    .ae-maintenance-actions {
        justify-content: flex-start;
    }
}
