#backupper-app {
  --bu-page: transparent;
  --bu-panel: #ffffff;
  --bu-panel-alt: #f3f5f7;
  --bu-input: #ffffff;
  --bu-border: #b8c0c8;
  --bu-border-strong: #68737e;
  --bu-text: #1d252c;
  --bu-muted: #52606b;
  --bu-accent: #e85d24;
  --bu-accent-hover: #c94a17;
  --bu-good: #087a55;
  --bu-bad: #b4232f;
  --bu-focus: rgba(232, 93, 36, .25);
  background: var(--bu-page);
  color: var(--bu-text) !important;
  font-size: 15px;
  line-height: 1.45;
  max-width: 1500px;
  padding: 10px 18px 40px;
}

html.dark #backupper-app,
body.dark #backupper-app,
body.theme-dark #backupper-app,
body.black #backupper-app,
[data-theme="dark"] #backupper-app {
  --bu-panel: #1d2228;
  --bu-panel-alt: #272e35;
  --bu-input: #13181d;
  --bu-border: #53606c;
  --bu-border-strong: #85919c;
  --bu-text: #f5f7f9;
  --bu-muted: #bdc6ce;
  --bu-accent: #ff8b3d;
  --bu-accent-hover: #ff9e5c;
  --bu-good: #52d6a1;
  --bu-bad: #ff7b85;
  --bu-focus: rgba(255, 139, 61, .32);
}

.bu-header { align-items: center; display: flex; justify-content: space-between; margin: 6px 0 22px; }
#backupper-app .bu-header h1 { color: var(--bu-text) !important; font-size: 30px; font-weight: 700; line-height: 1.2; margin: 0; }
#backupper-app .bu-header p { color: var(--bu-muted) !important; font-size: 16px; margin: 5px 0 0; }
.bu-health { background: var(--bu-panel); border: 1px solid var(--bu-border); border-radius: 999px; color: var(--bu-text); font-weight: 600; padding: 9px 15px; }
.bu-health.ok { color: var(--bu-good); }
.bu-health.bad { color: var(--bu-bad); }

.bu-tabs { border-bottom: 2px solid var(--bu-border-strong); display: flex; gap: 3px; margin-bottom: 20px; overflow-x: auto; }
#backupper-app .bu-tabs button {
  appearance: none;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 4px solid transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--bu-muted) !important;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .04em;
  margin: 0 !important;
  min-height: 46px;
  padding: 11px 16px !important;
  text-shadow: none !important;
  text-transform: none;
  white-space: nowrap;
}
#backupper-app .bu-tabs button:hover { color: var(--bu-text) !important; }
#backupper-app .bu-tabs button.active { border-bottom-color: var(--bu-accent) !important; color: var(--bu-text) !important; }

.bu-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.bu-card { background: var(--bu-panel); border: 1px solid var(--bu-border); border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.12); color: var(--bu-text); padding: 18px; }
#backupper-app .bu-card h2, #backupper-app .bu-card h3 { color: var(--bu-text) !important; font-weight: 700; margin-top: 0; }
.bu-stat { color: var(--bu-text); font-size: 32px; font-weight: 700; }
#backupper-app .bu-muted { color: var(--bu-muted) !important; }
.bu-toolbar { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; margin-bottom: 14px; }
.bu-actions { display: flex; flex-wrap: wrap; gap: 7px; }

#backupper-app .bu-button {
  appearance: none;
  background: var(--bu-panel-alt) !important;
  border: 1px solid var(--bu-border-strong) !important;
  border-radius: 5px !important;
  box-shadow: none !important;
  color: var(--bu-text) !important;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  margin: 0 !important;
  min-height: 38px;
  padding: 8px 13px !important;
  text-shadow: none !important;
}
#backupper-app .bu-button:hover { border-color: var(--bu-accent) !important; }
#backupper-app .bu-button.primary { background: var(--bu-accent) !important; border-color: var(--bu-accent) !important; color: #ffffff !important; }
#backupper-app .bu-button.primary:hover { background: var(--bu-accent-hover) !important; }
#backupper-app .bu-button.danger { color: var(--bu-bad) !important; }
#backupper-app .bu-button:disabled { cursor: wait; opacity: .55; }

.bu-table { border-collapse: collapse; color: var(--bu-text); width: 100%; }
.bu-table th, .bu-table td { border-bottom: 1px solid var(--bu-border); color: var(--bu-text); padding: 12px 8px; text-align: left; vertical-align: top; }
.bu-table th { color: var(--bu-muted); font-size: 13px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; }
.bu-status { border: 1px solid currentColor; border-radius: 999px; display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 8px; text-transform: uppercase; }
.bu-status.success { background: rgba(8,122,85,.10); color: var(--bu-good); }
.bu-status.failed, .bu-status.cancelled { background: rgba(180,35,47,.10); color: var(--bu-bad); }
.bu-status.running, .bu-status.queued, .bu-status.warning { background: rgba(232,93,36,.10); color: var(--bu-accent); }

.bu-form { display: grid; gap: 15px; grid-template-columns: repeat(2, minmax(220px, 1fr)); }
#backupper-app .bu-form label { color: var(--bu-text) !important; display: grid; font-size: 14px; font-weight: 600; gap: 7px; }
.bu-form .wide { grid-column: 1 / -1; }
#backupper-app .bu-form input,
#backupper-app .bu-form select,
#backupper-app .bu-form textarea,
#backupper-app select {
  background: var(--bu-input) !important;
  border: 1px solid var(--bu-border-strong) !important;
  border-radius: 5px !important;
  box-shadow: none !important;
  color: var(--bu-text) !important;
  font: inherit;
  min-height: 40px;
  padding: 9px 10px !important;
}
#backupper-app .bu-form input:focus,
#backupper-app .bu-form select:focus,
#backupper-app .bu-form textarea:focus,
#backupper-app button:focus-visible {
  border-color: var(--bu-accent) !important;
  box-shadow: 0 0 0 3px var(--bu-focus) !important;
  outline: none;
}
#backupper-app .bu-form input[type="checkbox"] { accent-color: var(--bu-accent); min-height: 22px; width: 22px; }
#backupper-app .bu-form textarea { min-height: 100px; resize: vertical; }
.bu-empty { color: var(--bu-muted); font-size: 15px; padding: 34px; text-align: center; }
#bu-toast { background: var(--bu-panel); border: 1px solid var(--bu-border-strong); border-radius: 6px; bottom: 24px; color: var(--bu-text); display: none; font-weight: 600; max-width: 460px; padding: 12px 16px; position: fixed; right: 24px; z-index: 20; }
#bu-toast.show { display: block; }
#bu-toast.error { border-color: var(--bu-bad); color: var(--bu-bad); }

@media (max-width: 700px) {
  #backupper-app { padding-left: 8px; padding-right: 8px; }
  .bu-form { grid-template-columns: 1fr; }
  .bu-header { align-items: flex-start; flex-direction: column; gap: 12px; }
  .bu-table { display: block; overflow-x: auto; }
}
