/* Pages inside the frame: device cards, lists, banners, running backups, drives, storage, checklist. */

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card { border: 1px solid var(--divider); border-radius: 16px; padding: 18px; background: var(--surface); box-shadow: var(--shadow-sm); display: flex; flex-direction: column; gap: 14px; cursor: pointer; transition: box-shadow .15s; }
.card:hover { box-shadow: var(--shadow); }
.card-head { display: flex; align-items: center; gap: 12px; }
.card-head .dev-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--inset); display: grid; place-items: center; color: var(--muted); position: relative; }
.card-head .dev-ico .dot { width: 12px; height: 12px; border-color: var(--surface); }
.card-head b { font-size: 16px; color: rgb(var(--fg)); display: block; }
.card-head small { color: var(--muted); }
.card-stats { display: flex; gap: 20px; font-size: 13px; color: var(--muted); }
.card-stats b { display: block; white-space: nowrap; color: rgb(var(--fg)); font-size: 15px; font-weight: 600; }
/* chips: a fixed height and line-height 1 put the text on the optical middle; no vertical padding */
.status-chip { display: inline-flex; align-items: center; gap: 6px; height: 24px; line-height: 1; font-size: 12px; font-weight: 600; padding: 0 10px; border-radius: 999px; background: var(--chip); color: var(--muted); align-self: center; white-space: nowrap; }
.status-chip svg { width: 14px; height: 14px; }
.chips .status-chip { align-self: flex-start; }
.status-chip.ok { background: var(--ok-bg); color: var(--ok-fg); }
.status-chip.late { background: var(--warn-bg); color: var(--warn-fg); }
.status-chip.missing, .status-chip.error { background: var(--danger-bg); color: var(--danger-fg); }
.status-chip.note { background: var(--chip); color: var(--text); font-weight: 550; }

.banner { display: flex; align-items: center; gap: 14px; border-radius: 16px; padding: 16px 18px; background: linear-gradient(rgb(var(--primary) / .16), rgb(var(--primary) / .16)) var(--surface); margin-bottom: 20px; flex-wrap: wrap; }
.banner b { color: rgb(var(--fg)); }
.banner .spacer { flex: 1; }
.code { font: 700 18px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; background: var(--inset); padding: 8px 12px; border-radius: 10px; color: rgb(var(--fg)); border: 1px solid var(--divider); }

.section-title { font-size: 15px; font-weight: 650; margin: 28px 0 12px; color: rgb(var(--fg)); }
.list { border: 1px solid var(--divider); border-radius: 16px; overflow: hidden; background: var(--surface); }
.list-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--divider); flex-wrap: wrap; }
.list-row:last-child { border-bottom: 0; }
.list-row .grow { flex: 1; min-width: 180px; }
.list-row small { color: var(--muted); display: block; }
.howto { background: var(--surface); border: 1px solid var(--divider); border-radius: 16px; padding: 18px 20px; }
.howto code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.cmd { display: flex; align-items: center; gap: 8px; background: var(--inset); border: 1px solid var(--divider); border-radius: 10px; padding: 6px 6px 6px 14px; margin: 10px 0 4px; }
.cmd code { flex: 1; overflow-x: auto; white-space: nowrap; }
.banner.warn { background: linear-gradient(var(--warn-bg), var(--warn-bg)) var(--surface); color: var(--text); }
.banner.warn .muted { color: var(--warn-fg); overflow-wrap: anywhere; }
.banner.warn svg { color: var(--warn-fg); }
.wizard-steps { display: flex; flex-direction: column; gap: 10px; margin: 6px 0 4px; }
.wizard-steps .btn { justify-content: center; height: 46px; }

/* running backups */
.dot.running { background: var(--info); animation: pulse 1.6s ease-in-out infinite; }
.dot.new { background: var(--muted); }
.status-chip.running { background: var(--info-bg); color: var(--info-fg); }
.status-chip.new { background: var(--hover); color: var(--muted); }
@keyframes pulse { 50% { opacity: .35; } }
.bar { height: 6px; border-radius: 99px; background: var(--hover); overflow: hidden; margin: 10px 0 2px; }
.bar i { display: block; height: 100%; border-radius: 99px; background: var(--info); transition: width .6s ease; }
/* indeterminate: while the agent is still counting, a short segment travels – no percentage exists yet */
.bar.indet i { width: 30%; animation: slide 1.4s ease-in-out infinite; transition: none; }
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(340%); } }
.run-progress { margin-top: 6px; font-size: 13px; }
.run-done { margin-top: 10px; font-size: 13px; }
.card-run { display: flex; flex-direction: column; gap: 2px; }
.card-run .bar { margin: 0 0 8px; }
.card-run-text b { display: block; color: rgb(var(--fg)); font-size: 13.5px; font-weight: 600; }
.card-run-text small { color: var(--muted); font-size: 12.5px; }
.run-panel { border: 1px solid var(--divider); border-radius: 16px; padding: 18px 20px; margin-bottom: 22px; background: var(--surface); }
.run-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.run-head .spacer { flex: 1; }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--info); animation: pulse 1.6s ease-in-out infinite; }
.run-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-top: 14px; color: var(--muted); font-size: 13px; }
.run-stats b { display: block; color: rgb(var(--fg)); font-size: 17px; font-weight: 600; }
.run-current { margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.run-current div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: rtl; text-align: left; }
.parts { margin-top: 14px; border-top: 1px solid var(--divider); padding-top: 10px; max-height: 220px; overflow: auto; }
.part { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 13.5px; }
.part .grow { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.part small { color: var(--muted); } .part .num { min-width: 70px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pdot { width: 8px; height: 8px; border-radius: 50%; background: var(--divider); flex: none; }
.part.done .pdot { background: rgb(var(--primary)); } .part.running .pdot { background: var(--info); animation: pulse 1.6s ease-in-out infinite; }
.part.pending { color: var(--muted); }

/* drives */
.src-row.clickable { cursor: pointer; } .src-row.clickable:hover { background: var(--hover); }
/* the bar takes its own line below name and chip, so the chip stays centred on the text */
.list-row .full { flex-basis: 100%; }
.src-row .bar { max-width: 360px; margin: 0 0 2px; }
.src-row .grow b { display: block; }
.ficon.disk { background: rgb(var(--primary) / .16); color: rgb(var(--primary-dark)); }
.chev-r svg { width: 18px; height: 18px; stroke: var(--muted); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.list.versions { max-height: 50vh; overflow: auto; }
.loading.small { padding: 20px 0; }
@media (max-width: 720px) { .run-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
/* storage destinations */
.badge-mark { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; flex: none; font-weight: 700; font-size: 13px; letter-spacing: -.02em;
  color: var(--mark); background: color-mix(in srgb, var(--mark) 14%, transparent); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.tiles .tile { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; text-align: left; padding: 16px; border: 1px solid var(--divider); border-radius: 16px; background: var(--surface); box-shadow: var(--shadow-sm); cursor: pointer; transition: border-color .12s, box-shadow .12s, transform .12s; }
.tiles .tile:hover { border-color: rgb(var(--primary-dark)); box-shadow: var(--shadow); transform: translateY(-1px); }
.tiles .tile b { color: rgb(var(--fg)); font-size: 14.5px; }
.tiles .tile small { color: var(--muted); line-height: 1.35; }
.auth-card .tiles .tile { box-shadow: none; }
.dest-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.dest-card { border: 1px solid var(--divider); border-radius: 18px; padding: 18px; display: flex; flex-direction: column; gap: 14px; background: var(--surface); box-shadow: var(--shadow-sm); }
.dest-head { display: flex; align-items: center; gap: 12px; }
.dest-head .grow { flex: 1; min-width: 0; }
.dest-head b { display: block; color: rgb(var(--fg)); font-size: 15px; }
.dest-head small { color: var(--muted); }
.dest-facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; font-size: 13px; }
.dest-facts dt { color: var(--muted); }
.dest-facts dd { margin: 0; min-width: 0; overflow-wrap: anywhere; display: flex; align-items: center; gap: 8px; }
.dest-facts .dot { width: 8px; height: 8px; border-radius: 50%; background: rgb(var(--primary)); }
.dest-facts .dot.running { background: var(--info); }
.dest-actions { display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--divider); padding-top: 14px; }
.dest-form-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.dest-form-head h2 { margin: 0; font-size: 19px; color: rgb(var(--fg)); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 14px; }
.form-grid .field { grid-column: 1 / -1; margin: 0; }
.form-grid .field.half { grid-column: auto; }
.dest-form > p { margin: 14px 0 0; }
/* setup checklist */
.checklist { border: 1px solid var(--divider); border-radius: 16px; padding: 16px 18px; margin: 0 0 22px; display: flex; flex-direction: column; gap: 4px; background: var(--surface); box-shadow: var(--shadow-sm); }
.checklist > b { margin-bottom: 6px; }
.check-row { display: flex; align-items: center; gap: 12px; padding: 8px 6px; border-radius: 10px; color: var(--text); text-decoration: none; }
a.check-row[href]:hover { background: var(--hover, rgb(var(--primary) / .06)); }
.check-row.done { color: var(--muted); }
.check-row.next { font-weight: 600; }
.check-row small { display: block; font-weight: 400; color: var(--muted); }
.check-dot { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--divider); display: grid; place-items: center; flex: none; }
.check-row.done .check-dot { background: rgb(var(--primary)); border-color: rgb(var(--primary)); color: #00261d; }
.check-row.next .check-dot { border-color: rgb(var(--primary)); }
.check-dot svg { width: 14px; height: 14px; }
