.backups-page { width: min(1320px, 100%); margin: 0 auto; padding: 0 18px 28px; display: grid; align-content: start; gap: 18px; }
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.panel-heading, .backup-actions, .table-actions { display: flex; align-items: center; gap: 12px; }
.panel-heading { justify-content: space-between; }
.panel h2 { margin: 0; font-size: 19px; }
.panel p { margin: 5px 0 0; }
.backup-actions, .table-actions { flex-wrap: wrap; justify-content: flex-end; }
.operation-status { height: 60px; display: grid; align-content: center; gap: 3px; padding: 8px 14px; background: #f8fafc; color: var(--muted); }
.operation-status.is-initializing { visibility: hidden; }
.operation-status[data-state="running"], .operation-status[data-state="queued"] { border-color: #bfdbfe; background: #eff6ff; color: #1d4ed8; }
.operation-status[data-state="failed"] { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.operation-status[data-state="succeeded"] { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
.settings-icon-btn { width: 40px; min-width: 40px; padding: 0; }.settings-icon-btn svg { width: 20px; height: 20px; fill: currentColor; }
.loading-spinner { width: 14px; height: 14px; display: inline-block; flex: 0 0 auto; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: backups-spin .7s linear infinite; }@keyframes backups-spin { to { transform: rotate(360deg); } }
.operation-title { color: var(--text); font-weight: 650; }.operation-detail { overflow: hidden; color: inherit; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.toast { position: fixed; right: 20px; bottom: 20px; z-index: 1100; max-width: min(420px, calc(100vw - 40px)); padding: 12px 14px; border: 1px solid #bfdbfe; border-radius: 10px; background: #eff6ff; box-shadow: 0 12px 30px rgba(15,23,42,.16); color: #1d4ed8; }.toast.success { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }.toast.error { border-color: #fecaca; background: #fef2f2; color: #b91c1c; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(180px, 1fr)); gap: 16px; margin-top: 18px; }
.field { display: grid; gap: 7px; }
.field span { color: var(--muted); font-size: 13px; }
.field input, .field select, .field textarea { min-height: 42px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--text); font: inherit; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid rgba(37,99,235,.14); border-color: var(--primary); }
.field-wide { grid-column: 1 / -1; }
.check-field { display: flex; align-items: center; gap: 9px; min-height: 42px; padding-top: 23px; }
.settings-note { color: var(--muted); font-size: 13px; }
.message { padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: #eff6ff; color: #1e40af; }
.message.error { background: #fef2f2; border-color: #fecaca; color: #b91c1c; }
.message.success { background: #ecfdf5; border-color: #a7f3d0; color: #047857; }
.table-wrap { position: relative; margin-top: 15px; overflow-x: auto; }
.table-wrap.is-loading { min-height: 132px; overflow: hidden; }.table-wrap.is-loading table { opacity: .45; pointer-events: none; }.table-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; background: rgba(255,255,255,.72); color: var(--muted); font-size: 13px; }.table-loading.hidden { display: none; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 12px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 12px; font-weight: 600; }
td { font-size: 13px; }
.comment { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status-ok { color: #047857; font-weight: 600; }.status-error { color: #b91c1c; font-weight: 600; }
.btn-danger { color: #b91c1c; border-color: #fecaca; }.btn-danger:hover { background: #fef2f2; border-color: #f87171; }
.btn-danger-solid { color: #fff; background: #b91c1c; border-color: #b91c1c; }.btn-danger-solid:hover { color: #fff; background: #991b1b; border-color: #991b1b; }
.btn:disabled, .btn-danger-solid:disabled { opacity: .52; cursor: not-allowed; }
.empty-state { padding: 36px 12px; color: var(--muted); text-align: center; }
.modal-open { overflow: hidden; }
.modal-backdrop { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 24px; background: rgba(15, 23, 42, .55); }
.modal-backdrop.hidden { display: none; }
.settings-dialog, .restore-dialog { width: min(980px, 100%); max-height: min(760px, calc(100vh - 48px)); display: flex; flex-direction: column; overflow: hidden; background: var(--panel); border-radius: 16px; box-shadow: 0 24px 70px rgba(15, 23, 42, .3); }
.restore-dialog { width: min(720px, 100%); }
.dialog-header, .dialog-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--border); }
.dialog-header h2 { margin: 0; font-size: 20px; }.dialog-header p { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.dialog-close { width: 38px; height: 38px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); font-size: 28px; line-height: 1; cursor: pointer; }.dialog-close:hover { background: #f1f5f9; color: var(--text); }
.dialog-actions { justify-content: flex-end; border-top: 1px solid var(--border); border-bottom: 0; }
.settings-dialog .dialog-actions { padding-bottom: 24px; }
.settings-layout { min-height: 420px; display: grid; grid-template-columns: 250px 1fr; overflow: auto; }
.destinations-pane { padding: 18px; border-right: 1px solid var(--border); background: #f8fafc; }
.destinations-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }.btn-small { min-height: 32px; padding: 5px 9px; font-size: 12px; }
.destinations-list { display: grid; gap: 8px; }
.destination-item { width: 100%; display: grid; gap: 4px; padding: 11px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--text); text-align: left; cursor: pointer; }.destination-item:hover { border-color: #93c5fd; }.destination-item.selected { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(37,99,235,.1); }.destination-item.active { border-color: #86efac; background: #f0fdf4; }.destination-item.active.selected { border-color: var(--primary); }.destination-item-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }.destination-item-title > span { overflow: hidden; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }.destination-item-title em { flex: 0 0 auto; padding: 2px 6px; border-radius: 999px; background: #dcfce7; color: #047857; font-size: 10px; font-style: normal; font-weight: 700; line-height: 1.3; }.destination-item small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; }
.destination-editor { padding: 20px; overflow: auto; }.empty-editor { align-self: center; justify-self: center; color: var(--muted); }
.destination-title-row { display: flex; align-items: end; gap: 12px; }.destination-name-field { flex: 1; }.active-field { display: flex; align-items: center; gap: 8px; min-height: 42px; white-space: nowrap; }
.connection-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 18px; padding: 14px; border: 1px solid var(--border); border-radius: 12px; background: #f8fafc; }.connection-card > div { display: grid; gap: 4px; }.field-caption { color: var(--muted); font-size: 12px; }.connection-card .muted { font-size: 12px; }
.folder-field { display: grid; grid-template-columns: 1fr auto; gap: 8px; }.folder-field .btn { min-height: 42px; }
.notification-settings { display: grid; gap: 14px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--border); }.notification-settings p { margin: 3px 0 0; font-size: 12px; }.notification-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }.notification-options label { display: flex; align-items: center; gap: 8px; }
.restore-content { padding: 20px; overflow: auto; }.restore-loading { min-height: 180px; display: grid; place-items: center; color: var(--muted); }.restore-warning { margin: 0 0 16px; padding: 12px 14px; border: 1px solid #fed7aa; border-radius: 10px; background: #fff7ed; color: #9a3412; }
.scenario-list { display: grid; gap: 10px; }.scenario-card { display: flex; align-items: flex-start; gap: 12px; padding: 13px 14px; border: 1px solid var(--border); border-radius: 12px; background: #fff; cursor: pointer; }.scenario-card:has(input:checked) { border-color: var(--primary); background: #eff6ff; box-shadow: 0 0 0 2px rgba(37,99,235,.08); }.scenario-card.incompatible { border-color: #fecaca; }.scenario-card.disabled { opacity: .55; cursor: default; }.scenario-card input { margin-top: 4px; }.scenario-copy { display: grid; gap: 3px; }.scenario-copy > span { color: var(--muted); font-size: 13px; }.scenario-copy small { color: var(--primary); font-size: 12px; }.scenario-card.incompatible small { color: #b91c1c; }.compatibility-summary { min-height: 22px; margin-top: 16px; }
@media (max-width: 760px) {
    .backups-page { padding: 0 10px 20px; gap: 12px; }
    .panel { padding: 12px; border-radius: 12px; }
    .operation-status { height: 58px; padding: 8px 12px; }
    .operation-title, .operation-detail { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .panel-heading { align-items: stretch; flex-direction: column; gap: 14px; }
    .panel-heading h2 { font-size: 18px; }
    .backup-actions { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; gap: 8px; width: 100%; }
    .backup-actions .btn { width: 100%; min-height: 44px; padding: 0 9px; }
    .backup-actions #createBtn { grid-column: 1 / -1; }
    .settings-icon-btn { width: 44px; min-width: 44px; }
    .table-wrap { margin-top: 12px; overflow: visible; }
    .table-wrap.is-loading { min-height: 150px; }
    table { display: block; min-width: 0; }
    thead { display: none; }
    tbody { display: grid; gap: 10px; }
    tr.backup-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; padding: 13px; border: 1px solid var(--border); border-radius: 12px; background: #fff; }
    tr.backup-row td { display: grid; gap: 2px; min-width: 0; padding: 0; border: 0; }
    tr.backup-row td::before { content: attr(data-label); color: var(--muted); font-size: 11px; font-weight: 600; }
    tr.backup-row .backup-date, tr.backup-row .comment, tr.backup-row .backup-actions-cell { grid-column: 1 / -1; }
    tr.backup-row .backup-date { font-weight: 650; }
    tr.backup-row .comment { max-width: none; white-space: normal; overflow-wrap: anywhere; }
    tr.backup-row .backup-actions-cell::before { display: none; }
    .table-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 3px; }
    .table-actions .btn { width: 100%; min-height: 42px; padding: 0 8px; }
    .table-actions [data-restore] { grid-column: 1 / -1; }
    tr.backup-error-row { display: block; padding: 12px; border: 1px solid #fecaca; border-radius: 10px; }
    tr.backup-error-row td { display: block; padding: 0; border: 0; overflow-wrap: anywhere; }
    .empty-state { padding: 28px 8px; }
    .toast { right: 12px; bottom: 12px; max-width: calc(100vw - 24px); }
    .modal-backdrop { padding: 0; }
    .settings-dialog, .restore-dialog { width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
    .dialog-header { padding: 14px 16px; }
    .dialog-header h2 { font-size: 18px; }
    .dialog-actions, .settings-dialog .dialog-actions { padding: 12px 14px 18px; }
    .dialog-actions .btn { flex: 1; min-height: 44px; }
    .settings-layout { display: block; flex: 1; min-height: 0; overflow-y: auto; }
    .destinations-pane { padding: 14px; border-right: 0; border-bottom: 1px solid var(--border); }
    .destinations-list { display: flex; overflow-x: auto; padding-bottom: 3px; scroll-snap-type: x proximity; }
    .destination-item { min-width: 180px; scroll-snap-align: start; }
    .destination-editor { padding: 16px 14px 24px; overflow: visible; }
    .settings-grid, .notification-options { grid-template-columns: 1fr; gap: 12px; }
    .field-wide { grid-column: auto; }
    .check-field { padding-top: 0; }
    .destination-title-row, .connection-card { align-items: stretch; flex-direction: column; }
    .folder-field { grid-template-columns: 1fr; }
    .folder-field .btn, .connection-card .btn { width: 100%; }
    .active-field { white-space: normal; }
    .restore-content { padding: 14px; }
    .restore-warning { padding: 10px 12px; }
    .scenario-card { padding: 12px; }
}
