/* ============================================================ */
/* Trạm Nạp Thiết Bị — Blue Glass Theme (from Meter-Link S3)    */
/* ============================================================ */
:root {
  /* Surface — cool blue-white */
  --bg: #F0F4FA;
  --panel: rgba(255,255,255,.72);
  --panel-alt: rgba(255,255,255,.55);
  --field: #ffffff;
  --border: rgba(46,111,242,.14);
  --border2: rgba(46,111,242,.07);
  --text: #1A2332;
  --text-muted: #5A6A80;
  /* Accent — circuit blue */
  --pri: #2E6FF2;
  --pri2: #1E54D6;
  --pri-dim: rgba(46,111,242,.08);
  /* Status */
  --green: #0E9D6E;
  --green-dim: rgba(14,157,110,.12);
  --red: #D64545;
  --red-dim: rgba(214,69,69,.1);
  --purple: #6b5ca5;
  --purple-dim: rgba(107,92,165,.12);
  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(30,60,120,.05);
  --shadow: 0 2px 10px rgba(30,60,120,.06);
  --shadow-lg: 0 6px 24px rgba(30,60,120,.08);
  /* Radii */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  /* Type */
  --font-ui: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --font-data: "IBM Plex Mono", "Consolas", "Cascadia Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background:
    radial-gradient(ellipse 55% 38% at 28% 15%, rgba(46,111,242,.05), transparent 60%),
    radial-gradient(ellipse 45% 30% at 75% 85%, rgba(46,111,242,.03), transparent 55%),
    repeating-linear-gradient(0deg, rgba(46,111,242,.025) 0px, rgba(46,111,242,.025) 1px, transparent 1px, transparent 64px),
    repeating-linear-gradient(90deg, rgba(46,111,242,.025) 0px, rgba(46,111,242,.025) 1px, transparent 1px, transparent 64px),
    linear-gradient(180deg, #F0F4FA 0%, #EAF0F8 55%, #E4EAF4 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  min-height: 100vh;
}
h1, h2, h3 { font-weight: 600; margin: 0; }
button {
  font-family: var(--font-ui);
  font-weight: 600;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 16px;
  background: rgba(46,111,242,.04);
  color: var(--text);
  cursor: pointer;
  transition: all .18s cubic-bezier(.4,0,.2,1);
}
button:hover { background: rgba(46,111,242,.08); border-color: rgba(46,111,242,.22); transform: translateY(-1px); }
button:active:not(:disabled) { transform: scale(.96); }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
button.primary { background: linear-gradient(135deg, var(--pri2), var(--pri)); color: #fff; font-size: 15px; padding: 12px 20px; border-color: transparent; box-shadow: 0 2px 10px rgba(46,111,242,.25); }
button.primary:hover { background: linear-gradient(135deg, var(--pri), #5B8DFF); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(46,111,242,.4); }
button.primary:active:not(:disabled) { transform: scale(.97); }
button.danger { background: var(--red-dim); color: var(--red); border-color: transparent; }
button.danger:hover { background: var(--red); color: #fff; transform: translateY(-1px); }
input, select, textarea {
  font-family: var(--font-ui);
  background: var(--field);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  transition: border-color .2s, box-shadow .2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--pri);
  box-shadow: 0 0 0 3px rgba(46,111,242,.12);
}

/* ── Fieldset (device config) ── */
fieldset { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; margin-bottom: 10px; }
legend { font-weight: 600; font-size: 13px; color: var(--text); padding: 0 6px; }
label { color: var(--text-muted); font-size: 12px; display: block; margin-bottom: 4px; }
a { color: var(--pri); }

/* ── Login ── */
.login-full {
  width: 100vw; height: 100vh;
  display: flex; flex-direction: column;
  justify-content: flex-start; align-items: flex-end;
  padding-top: 12vh; padding-right: 10vw;
  background: url('/backgroud.png') center/cover no-repeat;
  position: relative; overflow: hidden;
  font-family: var(--font-ui);
}
.login-full::before {
  content: ''; position: absolute;
  width: 520px; height: 520px;
  background: radial-gradient(circle, rgba(46,111,242,.1), transparent);
  top: -120px; right: -60px; border-radius: 50%;
}
.login-full::after {
  content: ''; position: absolute;
  width: 360px; height: 360px;
  background: radial-gradient(circle, rgba(91,141,255,.06), transparent);
  bottom: -100px; left: -60px; border-radius: 50%;
}
.login-card {
  position: relative; z-index: 1;
  max-width: 400px; width: calc(100% - 32px);
  text-align: center;
  background: rgba(255,255,255,.85);
  backdrop-filter: blur(32px) saturate(120%);
  -webkit-backdrop-filter: blur(32px) saturate(120%);
  border-radius: var(--radius-lg);
  padding: 44px 36px 36px;
  border: 1px solid rgba(255,255,255,.6);
  box-shadow: var(--shadow-lg);
  animation: cardUp .6s cubic-bezier(.4,0,.2,1);
}
@keyframes cardUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }

.login-logo {
  width: 120px; height: auto;
  margin: 0 auto 18px;
}
.login-logo img { width: 100%; height: auto; display: block; }

.login-brand {
  font-size: 18px; font-weight: 700;
  color: var(--text); margin-bottom: 12px;
  letter-spacing: .3px;
  line-height: 1.3;
}
.login-brand span {
  background: linear-gradient(135deg, var(--pri), var(--pri2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.login-sub {
  color: var(--text-muted); font-size: 13px;
  margin-bottom: 24px; line-height: 1.5;
}

.login-card input {
  width: 100%; padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  background: rgba(255,255,255,.7);
  color: var(--text);
  margin-bottom: 10px;
  font-family: var(--font-ui);
  transition: all .2s;
}
.login-card input::placeholder { color: var(--text-muted); }
.login-card input:focus {
  outline: none; border-color: var(--pri);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(46,111,242,.15);
}
.login-card input.login-input-error {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(214,69,69,.15);
  animation: shake .4s ease;
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  75% { transform: translateX(4px); }
}

.login-btn {
  width: 100%; padding: 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--pri), var(--pri2));
  color: #fff; font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .2s;
  margin-top: 6px;
  font-family: var(--font-ui);
  box-shadow: 0 4px 18px rgba(46,111,242,.35);
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; letter-spacing: .3px;
}
.login-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 26px rgba(46,111,242,.5);
}
.login-btn:active:not(:disabled) { transform: scale(.97); }
.login-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.login-spinner {
  display: inline-block; width: 14px; height: 14px;
  border: 2px solid rgba(255,255,255,.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.login-error {
  color: var(--red); font-size: 12px;
  margin-bottom: 10px; min-height: 0; line-height: 1.4;
}
.login-footer {
  position: absolute; bottom: 20px; z-index: 1;
  color: rgba(255,255,255,.85);
  text-shadow: 0 1px 4px rgba(0,0,0,.4);
  font-size: 10.5px; text-align: center; width: 100%;
  letter-spacing: .8px;
  font-family: var(--font-data);
  text-transform: uppercase;
}

/* ── Topbar ── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  position: sticky; top: 0; z-index: 10;
}
.topbar h1 { font-size: 17px; letter-spacing: .5px; }
.topbar .who { color: var(--text-muted); font-size: 13px; }
.topbar .who b { color: var(--text); }

/* ── Port bar (shared USB selector) ── */
.port-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  background: var(--field);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
}
.port-bar button {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  white-space: nowrap;
}
.port-indicator {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #aaa;
  flex-shrink: 0;
}
.port-indicator.ready  { background: var(--green); box-shadow: 0 0 8px rgba(14,157,110,.4); }
.port-indicator.busy   { background: #f0a030; animation: pulse .7s ease-in-out infinite; box-shadow: 0 0 8px rgba(240,160,48,.5); }
.port-indicator.console{ background: var(--pri); box-shadow: 0 0 8px var(--pri-dim); }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(1.5); } }
.port-device {
  font-weight: 700;
  color: var(--pri);
  font-family: 'Consolas', 'Courier New', monospace;
}
.device-tag {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--pri-dim);
  padding: 2px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

/* ── Tabs ── */
.tabs {
  display: flex;
  gap: 2px;
  padding: 10px 20px 0;
  background: rgba(255,255,255,.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
  position: relative;
}
.tabs button {
  background: transparent;
  color: var(--text-muted);
  border: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  padding: 9px 18px;
  position: relative;
  transition: color .2s, background .2s;
}
.tabs button::after {
  content: '';
  position: absolute;
  bottom: 0; left: 18px; right: 18px;
  height: 2.5px;
  background: var(--pri);
  border-radius: 2px 2px 0 0;
  transform: scaleX(0);
  transition: transform .25s cubic-bezier(.4,0,.2,1);
}
.tabs button.active { background: var(--bg); color: var(--pri); font-weight: 700; }
.tabs button.active::after { transform: scaleX(1); }
.tabs button:not(.active):hover { color: var(--text); }
.tabs .tab-sep { width: 1px; background: var(--border); margin: 6px 6px; align-self: stretch; }

/* ── Pages ── */
.page { padding: 20px; display: none; }
.page.active { display: block; animation: pageIn .35s cubic-bezier(.4,0,.2,1); }
@keyframes pageIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

/* ── Cards ── */
.card {
  background: rgba(255,255,255,.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
  transition: transform .25s cubic-bezier(.4,0,.2,1), box-shadow .25s cubic-bezier(.4,0,.2,1);
  animation: cardIn .4s cubic-bezier(.4,0,.2,1) both;
}
.card:nth-child(1) { animation-delay: 0s; }
.card:nth-child(2) { animation-delay: .06s; }
.card:nth-child(3) { animation-delay: .12s; }
.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}
@keyframes cardIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
.card h2 { color: var(--pri); font-size: 13px; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 12px; }
.muted { color: var(--text-muted); font-size: 12px; }

.grid-2 { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; align-items: start; }

/* ── Table ── */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: var(--text-muted); font-weight: 600; padding: 8px 10px; background: rgba(46,111,242,.04); }
td { padding: 7px 10px; border-bottom: 1px solid var(--border2); font-family: var(--font-data); }
tr.row-done { color: var(--green); }
tr.row-pending { color: var(--text-muted); }
tr.row-failed { color: var(--red); }
tr.row-defective { color: var(--purple); }
tr.selected td { background: var(--pri-dim); }
tr td:first-child { font-family: var(--font-ui); }
tr:hover td { background: rgba(46,111,242,.03); }
tr { transition: background .15s; }
tr.row-done, tr.row-pending, tr.row-failed, tr.row-defective {
  animation: rowIn .35s cubic-bezier(.4,0,.2,1) both;
}
@keyframes rowIn { from { opacity: 0; transform: translateX(-8px); } to { opacity: 1; transform: translateX(0); } }
.table-wrap { max-height: 420px; overflow-y: auto; }
/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(46,111,242,.15); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(46,111,242,.3); }

.toolbar { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }

/* ── Filter chips ── */
.filter-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.filter-chips button {
  padding: 5px 12px; font-size: 12px; border-radius: 14px; background: var(--panel-alt); color: var(--text-muted);
  transition: all .25s cubic-bezier(.4,0,.2,1);
}
.filter-chips button.active { background: var(--pri); color: #fff; border-color: var(--pri); transform: scale(1.05); }

/* ── Station (provision center) ── */
.station { text-align: center; }
.station .serial-big {
  font-family: var(--font-data);
  font-size: 26px;
  font-weight: 700;
  margin: 8px 0 18px;
}
.status-light {
  width: 132px;
  height: 132px;
  border-radius: 50%;
  margin: 0 auto 16px;
  border: 4px solid var(--border);
  background: var(--panel-alt);
  transition: background .35s cubic-bezier(.4,0,.2,1), border-color .35s cubic-bezier(.4,0,.2,1), box-shadow .35s cubic-bezier(.4,0,.2,1);
}
.status-light.working {
  border-color: var(--pri);
  background: var(--pri);
  animation: statusPulse 1s ease-in-out infinite;
  box-shadow: 0 0 40px rgba(46,111,242,.4), 0 0 80px rgba(46,111,242,.15);
}
.status-light.ok {
  border-color: var(--green);
  background: var(--green);
  animation: statusOkIn .5s cubic-bezier(.4,0,.2,1);
  box-shadow: 0 0 30px rgba(14,157,110,.3);
}
.status-light.fail {
  border-color: var(--red);
  background: var(--red);
  animation: statusFailShake .5s ease;
  box-shadow: 0 0 30px rgba(214,69,69,.3);
}
@keyframes statusPulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.04); opacity: .7; } }
@keyframes statusOkIn { 0% { transform: scale(.85); } 60% { transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes statusFailShake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }
.station .status-text { font-weight: 700; font-size: 15px; margin-bottom: 4px; }
.station .status-detail { color: var(--text-muted); font-size: 12px; min-height: 32px; padding: 0 10px; }

/* ── Badges ── */
.badge { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; }
.badge.admin { background: var(--pri-dim); color: var(--pri); }
.badge.operator { background: var(--panel-alt); color: var(--text-muted); }
.badge.active { background: var(--green-dim); color: var(--green); }
.badge.defective { background: var(--purple-dim); color: var(--purple); }
.badge.ok { background: var(--green-dim); color: var(--green); }
.badge.fail { background: var(--red-dim); color: var(--red); }

/* ── Progress ── */
.progress-track { height: 8px; background: var(--panel-alt); border-radius: 4px; overflow: hidden; margin: 10px 0; }
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--pri2), var(--pri));
  width: 0%;
  transition: width .35s cubic-bezier(.4,0,.2,1);
  position: relative;
}
.progress-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,.35) 50%, transparent 100%);
  animation: shimmer 1.6s ease-in-out infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

/* ── Log / Terminal ── */
.log-box {
  background: #1A1A2E;
  color: #D4D4D4;
  font-family: var(--font-data);
  font-size: 12px;
  padding: 12px;
  border-radius: var(--radius-sm);
  height: 220px;
  overflow-y: auto;
  white-space: pre-wrap;
  border: 1px solid rgba(46,111,242,.1);
}

/* ── Toast ── */
.hidden { display: none !important; }
#toastHost { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column-reverse; gap: 8px; }
.toast {
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  padding: 12px 18px; border-radius: var(--radius-sm);
  font-size: 13px;
  box-shadow: var(--shadow-lg);
  animation: toastIn .35s cubic-bezier(.4,0,.2,1), toastOut .3s .35s cubic-bezier(.4,0,1,1) 3.3s forwards;
  pointer-events: none;
  max-width: 380px;
  position: relative;
  overflow: hidden;
}
.toast::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; height: 3px;
  background: var(--green);
  animation: toastBar 3s linear forwards;
}
.toast.err::after { background: var(--red); }
.toast.err { border-color: var(--red); color: var(--red); }
.toast.ok { border-color: var(--green); color: var(--green); }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px) scale(.95); } to { opacity: 1; transform: translateX(0) scale(1); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }
@keyframes toastBar { from { width: 100%; } to { width: 0%; } }

/* ── Modal ── */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(20,22,28,.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; z-index: 100;
  animation: fadeIn .2s ease;
}
.modal-backdrop.hidden { display: none !important; animation: none; }
.modal-box {
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-radius: var(--radius-md); padding: 24px 28px;
  width: 380px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
  animation: modalIn .3s cubic-bezier(.4,0,.2,1);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: scale(.92) translateY(-16px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-box h3 { font-size: 15px; margin-bottom: 16px; }
.modal-box .field { margin-bottom: 14px; }
.modal-box input, .modal-box select { width: 100%; }
.modal-box .actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; }

/* ── Console ── */
.console-input-row { display: flex; gap: 8px; margin-top: 10px; }
.console-input-row input { flex: 1; font-family: var(--font-data); }

/* ── Wizard Steps ── */
.wizard-step {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 8px;
  background: rgba(255,255,255,.35);
  transition: border-color .35s, box-shadow .35s, background .35s;
}
.wizard-step.active {
  border-color: var(--pri);
  box-shadow: 0 0 0 3px rgba(46,111,242,.08), 0 0 20px rgba(46,111,242,.06);
  background: rgba(255,255,255,.65);
}
.wizard-step.done {
  border-color: var(--green);
  background: rgba(14,157,110,.03);
}
.wizard-step.error {
  border-color: var(--red);
  background: rgba(214,69,69,.03);
}
.wizard-step-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.wizard-step-num {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--panel-alt);
  border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: var(--text-muted);
  transition: all .35s cubic-bezier(.4,0,.2,1);
  flex-shrink: 0;
}
.wizard-step.active .wizard-step-num {
  background: var(--pri);
  border-color: var(--pri);
  color: #fff;
  box-shadow: 0 0 12px rgba(46,111,242,.35);
}
.wizard-step.done .wizard-step-num {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}
.wizard-step-title {
  font-weight: 700; font-size: 13px; color: var(--text-muted);
  transition: color .3s;
}
.wizard-step.active .wizard-step-title { color: var(--pri); }
.wizard-step.done .wizard-step-title { color: var(--green); }
.wizard-step-status {
  margin-left: auto;
  font-size: 12px; font-weight: 700;
}
.wizard-step-status.ok { color: var(--green); animation: checkPop .4s cubic-bezier(.4,0,.2,1); }
.wizard-step-status.err { color: var(--red); }
.wizard-step-body { padding-left: 36px; }
@keyframes checkPop { 0% { transform: scale(0); } 60% { transform: scale(1.3); } 100% { transform: scale(1); } }

/* ── Port indicator in wizard ── */
.wiz-port-indicator {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: #aaa;
  display: inline-block;
  transition: background .3s, box-shadow .3s;
}
.wiz-port-indicator.on { background: var(--green); box-shadow: 0 0 8px rgba(14,157,110,.4); }

/* ── Provision Timeline ── */
.provision-timeline {
  padding: 6px 0;
}
.timeline-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  opacity: .4;
  transition: opacity .3s;
}
.timeline-item.active { opacity: 1; }
.timeline-item.done { opacity: .85; }
.timeline-item.fail { opacity: 1; }
.timeline-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  border: 2px solid var(--border);
  background: var(--field);
  flex-shrink: 0;
  transition: all .35s cubic-bezier(.4,0,.2,1);
  position: relative;
}
.timeline-item.active .timeline-dot {
  border-color: var(--pri);
  background: var(--pri);
  animation: dotPulse .8s ease-in-out infinite;
}
.timeline-item.done .timeline-dot {
  border-color: var(--green);
  background: var(--green);
}
.timeline-item.done .timeline-dot::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; color: #fff; font-weight: 700;
  animation: checkPop .35s cubic-bezier(.4,0,.2,1);
}
.timeline-item.fail .timeline-dot {
  border-color: var(--red);
  background: var(--red);
}
.timeline-item.fail .timeline-dot::after {
  content: '✕';
  position: absolute;
  inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 8px; color: #fff; font-weight: 700;
}
@keyframes dotPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.25); } }
.timeline-text {
  font-size: 12px;
  color: var(--text-muted);
  transition: color .3s;
}
.timeline-item.active .timeline-text { color: var(--text); font-weight: 600; }
.timeline-item.done .timeline-text { color: var(--green); }
.timeline-item.fail .timeline-text { color: var(--red); }

/* ── Provision log details ── */
.provision-log-details summary { user-select: none; }
.provision-log-details[open] summary { color: var(--pri); }

/* ── Auto-advance ── */
.auto-advance-bar {
  height: 4px;
  background: var(--panel-alt);
  border-radius: 2px;
  overflow: hidden;
  margin: 4px 0;
}
.auto-advance-fill {
  height: 100%;
  background: var(--pri);
  width: 100%;
  transition: width .1s linear;
  border-radius: 2px;
}

/* ── Pagination ── */
.pagination { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 10px 0; }
.pagination .muted { font-size: 13px; }
