:root {
  --cb-bg: #f4f6f8;
  --cb-nav: #1f2a37;
  --cb-ink: #1b2430;
  --cb-muted: #64707d;
  --cb-line: #e1e5ea;
  --cb-ok: #1f8a5b;
  --cb-warn: #b7791f;
  --cb-err: #c2403a;
  --bs-primary: #2563a8;
  --bs-primary-rgb: 37, 99, 168;
  --bs-body-color: var(--cb-ink);
  --bs-body-bg: var(--cb-bg);
  --bs-border-color: var(--cb-line);
}
body { font-size: .925rem; font-variant-numeric: tabular-nums; }
.btn-primary { --bs-btn-bg: #2563a8; --bs-btn-border-color: #2563a8; --bs-btn-hover-bg: #1d4f88; --bs-btn-hover-border-color: #1d4f88; --bs-btn-active-bg: #1a4677; }
.app-nav { background: var(--cb-nav); }
.app-nav .navbar-brand { color: #fff; font-weight: 600; letter-spacing: .01em; }
.app-nav .navbar-brand .bi { color: #7fb4ea; font-size: 1.35rem; }
.app-nav .nav-link { color: rgba(255,255,255,.72); border-radius: .375rem; padding: .4rem .75rem !important; }
.app-nav .nav-link:hover { color: #fff; }
.app-nav .nav-link.active { color: #fff; background: rgba(255,255,255,.1); }
.app-nav .navbar-toggler { border-color: rgba(255,255,255,.3); }
.app-nav .navbar-toggler-icon { filter: invert(1); }
.nav-meta { color: rgba(255,255,255,.7); }
@media (max-width: 991px) { .nav-meta { padding: .75rem 0; flex-wrap: wrap; } }

.card { border-color: var(--cb-line); border-radius: .6rem; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
.section-label { letter-spacing: .06em; font-size: .72rem; }

/* client cards */
.client-card .card-header { background: #fff; border-bottom: 1px solid var(--cb-line); padding: .9rem 1.1rem; }
.client-card .client-name { font-weight: 600; font-size: 1.05rem; }
.client-card.state-error { border-top: 3px solid var(--cb-err); }
.client-card.state-warn  { border-top: 3px solid var(--cb-warn); }
.client-card.state-ok    { border-top: 3px solid var(--cb-ok); }
.health { font-size: .75rem; font-weight: 600; padding: .25rem .55rem; border-radius: 999px; white-space: nowrap; }
.health-ok    { background: #e3f3eb; color: var(--cb-ok); }
.health-warn  { background: #fbf0dc; color: #8a5a12; }
.health-error { background: #f9e3e2; color: var(--cb-err); }
.kv { display: grid; grid-template-columns: minmax(150px, 38%) 1fr; gap: .45rem 1rem; margin: 0; }
.kv dt { color: var(--cb-muted); font-weight: 400; }
.kv dd { margin: 0; }
.big-time { font-size: 1.5rem; font-weight: 600; line-height: 1.1; }
.sizes { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; }
.sizes > div { background: var(--cb-bg); border-radius: .45rem; padding: .5rem .65rem; }
.sizes .lbl { font-size: .72rem; color: var(--cb-muted); text-transform: uppercase; letter-spacing: .04em; }
.sizes .val { font-weight: 600; }
.snap-list { list-style: none; padding: 0; margin: 0; }
.snap-list li { display: flex; justify-content: space-between; gap: .75rem; padding: .3rem 0; border-bottom: 1px dashed var(--cb-line); }
.snap-list li:last-child { border-bottom: 0; }
.snap-list a { text-decoration: none; }

.volume-box { min-width: 280px; }
.volume-box .progress { height: .5rem; }

/* tables */
.table { margin: 0; --bs-table-bg: transparent; }
.table > :not(caption) > * > * { padding: .55rem .9rem; border-color: var(--cb-line); }
.table thead th { font-size: .72rem; text-transform: uppercase; letter-spacing: .05em; color: var(--cb-muted); font-weight: 600; background: #fafbfc; }
.table-hover > tbody > tr:hover > * { --bs-table-bg-state: #f3f7fb; }
.file-name { display: inline-flex; align-items: center; gap: .5rem; word-break: break-all; }
.file-name .bi-folder-fill { color: #d39e2e; }
.file-name .bi-file-earmark { color: var(--cb-muted); }
.file-name a { text-decoration: none; color: inherit; }
.file-name a:hover { color: var(--bs-primary); text-decoration: underline; }
.col-act { width: 1%; white-space: nowrap; text-align: right; }
.col-num { text-align: right; white-space: nowrap; }
.path-cell { word-break: break-all; }
.empty { padding: 2.5rem 1rem; text-align: center; color: var(--cb-muted); }

.breadcrumb { font-size: .875rem; background: #fff; border: 1px solid var(--cb-line); border-radius: .5rem; padding: .5rem .85rem; }
.breadcrumb a { text-decoration: none; }

.logbox { background: #111821; color: #d6dee8; font-size: .78rem; line-height: 1.45; padding: .85rem 1rem; margin: 0; max-height: 360px; overflow: auto; white-space: pre-wrap; word-break: break-word; border-radius: 0 0 .6rem .6rem; }
.logbox-tall { max-height: 60vh; border-radius: .5rem; }
.logbox .l-err { color: #ff8f86; }
.logbox .l-ok { color: #8fd6ad; }
.logbox .l-warn { color: #f2c46d; }

.target-option { border: 1px solid var(--cb-line); border-radius: .5rem; padding: .65rem .85rem .65rem 2.25rem; margin-bottom: .5rem; }
.target-option:has(input:checked) { border-color: var(--bs-primary); background: #f1f6fc; }
.target-option:has(input:disabled) { opacity: .55; }

.skeleton { background: linear-gradient(90deg, #eceff3 0%, #f6f8fa 50%, #eceff3 100%); background-size: 200% 100%; animation: sk 1.4s infinite; border: 0; }
.skeleton-card { height: 340px; }
@keyframes sk { to { background-position: -200% 0; } }

.login-page { min-height: 100vh; display: grid; place-items: center; background: var(--cb-nav); padding: 1rem; }
.login-card { width: 100%; max-width: 380px; }

@media (max-width: 575px) {
  .kv { grid-template-columns: 1fr; gap: .1rem; }
  .kv dd { margin-bottom: .5rem; }
  .sizes { grid-template-columns: 1fr 1fr; }
  .hide-sm { display: none; }
}
