/* R15.1 — Backup operations: database + full vault file archives */
.backup-page-intro {
    margin-bottom: 18px;
}

.backup-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.backup-action-card {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 18px;
}

.backup-action-card h3 {
    margin: 4px 0 8px;
}

.backup-action-card p {
    margin: 0;
}

.backup-action-card form {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
}

.backup-action-file-card {
    border-color: rgba(91, 129, 255, 0.62);
    box-shadow: 0 12px 30px rgba(32, 76, 190, 0.14);
}

.backup-settings-grid {
    margin-bottom: 16px;
}

.backup-cron-panel,
.backup-history-panel {
    margin-bottom: 16px;
}

.backup-history-table code {
    overflow-wrap: anywhere;
}

@media (max-width: 900px) {
    .backup-action-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 680px) {
    .backup-action-card {
        flex-direction: column;
    }

    .backup-action-card form,
    .backup-action-card button {
        width: 100%;
    }

    .backup-history-table thead {
        display: none;
    }

    .backup-history-table,
    .backup-history-table tbody,
    .backup-history-table tr,
    .backup-history-table td {
        display: block;
        width: 100%;
    }

    .backup-history-table tr {
        padding: 12px 14px;
        margin: 0 0 10px;
        border: 1px solid rgba(115, 145, 205, 0.22);
        border-radius: 14px;
        background: rgba(7, 20, 42, 0.48);
    }

    .backup-history-table td {
        display: grid;
        grid-template-columns: minmax(104px, 0.8fr) minmax(0, 1.2fr);
        gap: 10px;
        padding: 7px 0;
        border: 0;
        text-align: start;
    }

    .backup-history-table td::before {
        content: attr(data-label);
        color: #8fa7d4;
        font-size: 12px;
        font-weight: 700;
    }

    .backup-history-table td.empty-cell {
        display: block;
        text-align: center;
    }

    .backup-history-table td.empty-cell::before {
        content: none;
    }
}

/* R15.2 — Google Drive external backup controls */
.backup-external-panel {
    margin-bottom: 1rem;
}

.backup-drive-status {
    display: grid;
    gap: .55rem;
    padding: 1rem;
    border: 1px solid var(--line, rgba(255,255,255,.12));
    border-radius: .9rem;
    background: rgba(255,255,255,.025);
}

.inline-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .65rem;
}

.inline-actions form {
    margin: 0;
}

.full-width-button {
    display: inline-flex;
    justify-content: center;
    width: 100%;
    margin-top: 1rem;
}

@media (max-width: 680px) {
    .backup-external-panel .section-title-row,
    .backup-external-panel .inline-actions {
        align-items: stretch;
    }

    .backup-external-panel .secondary-button,
    .inline-actions form,
    .inline-actions form button {
        width: 100%;
    }
}
