.admin-page {
    min-height: 100%;
    box-sizing: border-box;
    padding: 36px 24px;
    background: #eef1f3;
}

.admin-container {
    max-width: 1120px;
    margin: 0 auto;
}

.admin-header,
.admin-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 7px 22px rgba(0, 0, 0, 0.09);
}

.admin-header {
    padding: 26px 30px;
    margin-bottom: 22px;
}

.admin-header h1,
.admin-card h2,
.admin-card h3 {
    margin-top: 0;
}

.admin-header p,
.admin-card p,
.admin-card li {
    line-height: 1.55;
}

.admin-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(250px, 1fr));
    gap: 18px;
}

.admin-card {
    padding: 24px 26px;
    margin-bottom: 18px;
}

.admin-link {
    display: inline-block;
    margin-top: 8px;
    padding: 10px 14px;
    border-radius: 9px;
    background: #54955C;
    color: #000;
    font-weight: 700;
    text-decoration: none;
}

.admin-link.secondary {
    background: #fff;
    border: 2px solid #54955C;
    color: #000;
}

.admin-link:hover {
    background: #54955C;
    color: #000;
}

.admin-warning,
.admin-info,
.admin-critical {
    border-radius: 10px;
    padding: 13px 15px;
    margin: 12px 0;
    line-height: 1.5;
}

.admin-warning {
    background: #fff2cc;
    border: 1px solid #d6b656;
    color: #5f4b00;
}

.admin-info {
    background: #e8f1ff;
    border: 1px solid #8ab4e8;
    color: #183d64;
}

.admin-critical {
    background: #f8d7da;
    border: 1px solid #c0392b;
    color: #7a1515;
}

.retention-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(130px, 1fr));
    gap: 12px;
    margin-top: 18px;
}

.retention-summary div,
.retention-meta div {
    padding: 13px;
    border-radius: 10px;
    background: #f2f4f6;
}

.retention-summary strong,
.retention-meta strong {
    display: block;
    font-size: 22px;
}

.retention-item {
    border-left: 6px solid #5c7c67;
}

.retention-item.warning {
    border-left-color: #d6a100;
}

.retention-item.critical {
    border-left-color: #b42318;
}

.retention-meta {
    display: grid;
    grid-template-columns: repeat(4, minmax(140px, 1fr));
    gap: 10px;
    margin: 14px 0;
}

.retention-status {
    font-weight: 800;
}

.retention-status.ok {
    color: #1d6b32;
}

.retention-status.warning {
    color: #8a5a00;
}

.retention-status.critical {
    color: #9d1c13;
}

.retention-form {
    margin: 1rem 0;
    padding: 1rem;
    border: 1px solid #d8dee7;
    border-radius: 12px;
    background: #f8fafc;
}

.retention-form label {
    display: block;
    margin-bottom: 0.55rem;
    font-weight: 700;
}

.retention-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.retention-form-row input,
.retention-form-row select {
    flex: 1 1 18rem;
    min-width: 0;
    padding: 0.7rem 0.8rem;
    border: 1px solid #aeb8c7;
    border-radius: 8px;
    background: #fff;
}

.retention-form-row button {
    border: 0;
    border-radius: 8px;
    padding: 0.7rem 1rem;
    background: #54955C;
    color: #000;
    font-weight: 700;
    cursor: pointer;
}

.retention-preview {
    margin: 1.1rem 0;
    padding-top: 0.25rem;
    border-top: 1px solid #d8dee7;
}

.retention-preview details {
    margin: 0.75rem 0;
}

.retention-preview summary {
    cursor: pointer;
    font-weight: 700;
}

.retention-inventory {
    list-style: none;
    margin: 0.65rem 0 0;
    padding: 0;
}

.retention-inventory li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid #e5e9ef;
}

.retention-backup-note {
    padding: 0.8rem;
    border-radius: 8px;
    background: #eef4fb;
}

.policy-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 16px;
}

.policy-stage {
    background: #f5f7f8;
    border-radius: 12px;
    padding: 18px;
}

.policy-stage ul {
    padding-left: 20px;
}

.admin-back {
    display: inline-block;
    margin-top: 8px;
    color: #000;
    font-weight: 700;
    text-decoration: none;
}

@media (max-width: 850px) {
    .admin-grid,
    .policy-grid,
    .retention-meta {
        grid-template-columns: 1fr;
    }

    .retention-summary {
        grid-template-columns: 1fr;
    }
}

@media print {
    html,
    body,
    .page-content,
    .admin-page {
        height: auto !important;
        min-height: 0 !important;
        overflow: visible !important;
        background: #fff !important;
    }

    .admin-page {
        padding: 0;
    }

    .admin-container {
        max-width: none;
    }

    .admin-header,
    .admin-card {
        box-shadow: none;
    }

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

    .admin-card,
    .policy-stage,
    .retention-item {
        break-inside: avoid;
        page-break-inside: avoid;
    }

    .operations-banner,
    .app-version-badge {
        display: none !important;
    }
}
