/* TCM shared styles (use site-wide; avoid introducing per-page duplicated CSS) */

:root {
  --bg1: #0b4dbb;
  --bg2: #0ea5e9;
  --card: rgba(255, 255, 255, 0.92);
  --ink: #0f172a;
  --muted: #475569;
  --line: rgba(15, 23, 42, 0.10);
  --shadow: 0 18px 60px rgba(2, 6, 23, 0.28);
  --radius: 18px;
  --focus: rgba(59, 130, 246, 0.45);

  /* Admin theme tokens (defaults = light) */
  --admin-bg: #f6f7f9;
  --admin-surface: #ffffff;
  --admin-ink: #0f172a;
  --admin-muted: #6b7280;
  --admin-line: #e5e7eb;
  --admin-nav: #111827;
  --admin-nav-ink: #e5e7eb;
  --admin-nav-hover: #1f2937;
}

/* Dark theme (opt-in via attribute) */
:root[data-theme="dark"] {
  --bg1: #0b1220;
  --bg2: #0b4dbb;
  --card: rgba(17, 24, 39, 0.92);
  --ink: #e5e7eb;
  --muted: #9ca3af;
  --line: rgba(229, 231, 235, 0.14);
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.55);

  --admin-bg: #0b1220;
  --admin-surface: #111827;
  --admin-ink: #e5e7eb;
  --admin-muted: #9ca3af;
  --admin-line: rgba(229,231,235,0.10);
  --admin-nav: #0b1220;
  --admin-nav-ink: #e5e7eb;
  --admin-nav-hover: #111827;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 15% 10%, rgba(255,255,255,0.25), transparent 60%),
    radial-gradient(900px 500px at 90% 30%, rgba(255,255,255,0.18), transparent 60%),
    linear-gradient(135deg, var(--bg1), var(--bg2));
}

/* Layout helpers */
.container {
  min-height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.card {
  width: min(460px, 100%);
  max-width: 100%;
  border-radius: var(--radius);
  background: var(--card);
  border: 1px solid rgba(255, 255, 255, 0.35);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card__header {
  padding: 18px 18px 0;
  text-align: center;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
  text-align: center;
}

.brand__mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255,255,255,0.85), rgba(255,255,255,0.35));
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,0.45);
}

.brand__mark span {
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #0b4dbb;
}

h1 {
  margin: 10px 0 6px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.muted { color: var(--muted); font-size: 13px; }

.card__body { padding: 18px; }

.form { display: grid; gap: 12px; }

label { font-size: 12px; color: var(--muted); }

.input {
  width: 100%;
  padding: 12px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.9);
  outline: none;
  transition: box-shadow 120ms ease, border-color 120ms ease;
}

.input:focus {
  border-color: rgba(59,130,246,0.6);
  box-shadow: 0 0 0 4px var(--focus);
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
}

.btn {
  width: 100%;
  border: 0;
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: white;
  background: linear-gradient(135deg, #1d4ed8, #0284c7);
  box-shadow: 0 10px 30px rgba(2, 132, 199, 0.35);
  transition: transform 120ms ease, box-shadow 120ms ease;
}

.btn:hover { transform: translateY(-1px); box-shadow: 0 14px 34px rgba(2, 132, 199, 0.42); }
.btn:active { transform: translateY(0px); }

.flash {
  padding: 11px 12px;
  border-radius: 12px;
  margin: 12px 0;
  border: 1px solid rgba(15,23,42,0.08);
}

.flash.success { background: rgba(16, 185, 129, 0.12); color: #065f46; }
.flash.error { background: rgba(239, 68, 68, 0.12); color: #991b1b; }

.card__footer {
  padding: 14px 18px 18px;
  border-top: 1px solid rgba(15,23,42,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.card a {
  color: #1d4ed8;
  text-decoration: none;
}

.card a:hover { text-decoration: underline; }

.small { font-size: 12px; }

/* Help bubble (modal) */
.help-q {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.18);
  color: rgba(255,255,255,0.95);
  font-weight: 900;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
}

.help-q:hover { background: rgba(255,255,255,0.28); }

.tcm-help {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.tcm-help.is-open { display: block; }

.tcm-help__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}

.tcm-help__panel {
  position: absolute;
  right: 18px;
  top: 72px;
  width: min(520px, calc(100vw - 36px));
  max-height: min(70vh, 720px);
  background: var(--card);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.tcm-help__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(15,23,42,0.10);
}

.tcm-help__title { font-weight: 800; font-size: 13px; color: var(--ink); }

.tcm-help__close {
  width: 30px;
  height: 30px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.75);
  cursor: pointer;
  font-weight: 900;
}

.tcm-help__frame {
  width: 100%;
  height: min(60vh, 520px);
  border: 0;
  background: transparent;
}

:root[data-theme="dark"] .tcm-help__panel {
  background: rgba(17,24,39,0.96);
  border-color: rgba(229,231,235,0.12);
}
:root[data-theme="dark"] .tcm-help__bar { border-bottom-color: rgba(229,231,235,0.10); }
:root[data-theme="dark"] .tcm-help__title { color: var(--ink); }
:root[data-theme="dark"] .tcm-help__close { background: rgba(255,255,255,0.08); color: var(--ink); }

/* Route suggestion dropdown (admin menus route field) */
.tcm-suggest__list{
  position:absolute;
  left:0; right:0;
  top: calc(100% + 6px);
  display:none;
  z-index: 50;
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  overflow:hidden;
  background: var(--admin-surface);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  max-height: 280px;
  overflow-y: auto;
}
.tcm-suggest__item{
  width:100%;
  text-align:left;
  padding:10px 12px;
  border:0;
  background: transparent;
  color: inherit;
  cursor:pointer;
}
.tcm-suggest__item:hover, .tcm-suggest__item.is-active{
  background: rgba(59,130,246,0.12);
}
:root[data-theme="dark"] .tcm-suggest__list{
  border-color: rgba(229,231,235,0.12);
  box-shadow: 0 10px 26px rgba(0,0,0,0.35);
}

/* On narrow screens keep it stacked */
@media (max-width: 420px) {
  .container { padding: 12px; }
  .brand {
    flex-direction: column;
    gap: 10px;
  }
  .card__header { padding: 16px 14px 0; }
  .card__body { padding: 14px; }
  .card__footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 12px 14px 14px;
  }
  h1 { font-size: 20px; }
}

@media (max-width: 720px) {
  .tcm-admin__topbar-inner { align-items: flex-start; flex-direction: column; }
  .tcm-admin__right { width: 100%; justify-content: space-between; }
}

/* A subtle shake for invalid login */
@keyframes shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-4px); }
  40%, 60% { transform: translateX(4px); }
}

.shake { animation: shake 420ms ease; }

/* Admin layout helpers (used by _layout_admin.php) */
.tcm-admin {
  min-height: 100vh;
  background: var(--admin-bg);
  color: var(--admin-ink);
}

.tcm-admin a { color: inherit; text-decoration: none; }

.tcm-admin__topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--admin-nav);
  color: var(--admin-nav-ink);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.tcm-admin__topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
}

.tcm-admin__brand {
  font-weight: 800;
  letter-spacing: -0.02em;
}

.tcm-admin__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.tcm-admin__nav a {
  display: inline-block;
  padding: 8px 10px;
  border-radius: 10px;
  color: var(--admin-nav-ink);
}

.tcm-admin__nav a:hover { background: var(--admin-nav-hover); }

.tcm-admin__right {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.tcm-admin__pill {
  font-size: 12px;
  color: var(--admin-nav-ink);
  opacity: 0.9;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
}

.tcm-admin__toggle {
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.06);
  color: var(--admin-nav-ink);
  padding: 8px 10px;
  border-radius: 10px;
  cursor: pointer;
}

.tcm-admin__logout {
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(255,255,255,0.10);
  color: var(--admin-nav-ink);
  padding: 8px 10px;
  border-radius: 10px;
}

.tcm-admin__content {
  padding: 16px;
}

.tcm-admin__surface {
  background: var(--admin-surface);
  border: 1px solid var(--admin-line);
  border-radius: 14px;
  padding: 14px;
}

/* -------------------------
   Admin catalog tree styles
   ------------------------- */

[data-catalog-tree] details {
  background: var(--admin-surface);
}

[data-catalog-tree] details > summary {
  list-style: none;
  user-select: none;
  padding: 8px 10px;
  border-radius: 10px;
}

[data-catalog-tree] details > summary::-webkit-details-marker { display:none; }

/* Level-specific accent colors (apply to every row)
   Note: we style both the <details> container AND the <summary> so the color shows
   even if the row has inline styles or nested wrappers.
*/
[data-catalog-tree] details[id^="org-"] {
  border-left: 6px solid rgba(37, 99, 235, 0.70) !important;
}
[data-catalog-tree] details[id^="org-"] > summary {
  background: rgba(37,99,235,0.10);
}

[data-catalog-tree] details[id^="dsc-"] {
  border-left: 6px solid rgba(14, 165, 233, 0.70) !important;
}
[data-catalog-tree] details[id^="dsc-"] > summary {
  background: rgba(14,165,233,0.10);
}

[data-catalog-tree] details[id^="crs-"] {
  border-left: 6px solid rgba(16, 185, 129, 0.70) !important;
}
[data-catalog-tree] details[id^="crs-"] > summary {
  background: rgba(16,185,129,0.10);
}

[data-catalog-tree] details[open] > summary {
  outline: 2px solid rgba(59,130,246,0.18);
}

.tcm-admin a.tcm-link {
  color: #1d4ed8;
  text-decoration: none;
}
.tcm-admin a.tcm-link:hover { text-decoration: underline; }

/* -------------------------
   Modal (generic)
   ------------------------- */

/* When any modal is open, lock page scroll so the background can't move */
body.tcm-modal-open {
  overflow: hidden;
}

.tcm-modal {
  position: fixed;
  inset: 0;
  display: none;
  z-index: 10000;
}

.tcm-modal.is-open { display: block; }

.tcm-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}

.tcm-modal__panel {
  position: absolute;
  left: 50%;
  top: 50px;
  transform: translateX(-50%);
  width: min(1600px, calc(100vw - 36px));
  max-height: min(92vh, 1200px);
  background: var(--admin-surface);
  color: var(--admin-ink);
  border: 1px solid var(--admin-line);
  border-radius: 16px;
  box-shadow: 0 18px 60px rgba(2,6,23,0.45);
  overflow: hidden;
}

.tcm-modal__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--admin-line);
  flex-wrap: nowrap; /* keep everything on one line */
}

.tcm-modal__title {
  font-weight: 800;
  flex: 1 1 auto;
  min-width: 0;
  text-align: left; /* title left-aligned */
  margin-left: 0; /* don't push title to the right */
}

.tcm-modal__close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--admin-line);
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-weight: 900;
}

/* keep header actions compact so they don't drop to a new line */
.tcm-modal__header-actions{
  display:flex;
  align-items:center;
  gap:10px;
  flex: 0 0 auto;
  flex-wrap: nowrap;
}

.tcm-hdr-field{
  display:flex;
  flex-direction:column;
  gap:4px;
}

/* Inline header field variant (input + label on one line) */
.tcm-hdr-field.tcm-hdr-field--inline{
  flex-direction: row;
  align-items: center;
  gap: 10px;
}

.tcm-hdr-field.tcm-hdr-field--inline .tcm-hdr-field__label{
  margin: 0;
  white-space: nowrap;
}

.tcm-hdr-field__label{
  font-size:12px;
  font-weight:700;
  color: var(--admin-muted);
  display:flex;
  align-items:center;
  gap:6px;
}

.tcm-hdr-field__input{
  height:32px;
  padding:6px 10px;
  border:1px solid var(--admin-line);
  border-radius:10px;
  background: var(--admin-bg);
  color: var(--admin-ink);
  min-width: 180px; /* slightly smaller to keep header on one line */
  max-width: 260px;
}

.tcm-modal__body-scroll {
  padding: 12px;
  overflow: auto;
  max-height: calc(min(92vh, 1200px) - 54px);
}

/* Key/value table inside modal */
.tcm-kv { width: 100%; border-collapse: collapse; }
.tcm-kv th, .tcm-kv td { padding: 8px; border-bottom: 1px solid var(--admin-line); vertical-align: top; }
.tcm-kv th { width: 260px; color: var(--admin-muted); font-weight: 700; }

.tcm-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
  min-width: max-content;
}

@media (max-width: 720px){
  .tcm-actions{ justify-content:flex-start; }
}

/* Active flag indicator */
.tcm-pill{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:2px 8px;
  border-radius:999px;
  font-size:12px;
  font-weight:800;
  border: 1px solid var(--admin-line);
  background: rgba(15,23,42,0.04);
}

.tcm-pill__dot{
  width:8px;
  height:8px;
  border-radius:999px;
  background:#94a3b8;
}

.tcm-pill--active{ background: rgba(16,185,129,0.10); border-color: rgba(16,185,129,0.24); }
.tcm-pill--active .tcm-pill__dot{ background:#10b981; }

.tcm-pill--inactive{ background: rgba(239,68,68,0.10); border-color: rgba(239,68,68,0.24); }
.tcm-pill--inactive .tcm-pill__dot{ background:#ef4444; }

/* Inline action pills (used in admin catalog_tree) */
.tcm-action-pill{
	display:inline-flex;
	align-items:center;
	gap:6px;
	padding:4px 10px;
	border-radius:999px;
	border:1px solid var(--admin-line);
	background:rgba(148,163,184,0.08);
	color:inherit;
	font-weight:700;
	font-size:12px;
	line-height:1.2;
	user-select:none;
}

.tcm-action-pill:hover{
	background:rgba(148,163,184,0.14);
}

.tcm-action-pill--primary{
	background:rgba(34,197,94,0.10);
	border-color:rgba(34,197,94,0.35);
}
.tcm-action-pill--primary:hover{
	background:rgba(34,197,94,0.16);
}

.tcm-action-pill--neutral{
	background:rgba(59,130,246,0.08);
	border-color:rgba(59,130,246,0.28);
}
.tcm-action-pill--neutral:hover{
	background:rgba(59,130,246,0.14);
}

/* Ensure nested details summaries look like clickable pills */
.tcm-inline-actions details > summary{
	list-style:none;
}
.tcm-inline-actions details > summary::-webkit-details-marker{
	display:none;
}

/* Inline actions: align to the right consistently */
.tcm-inline-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}

/* Make the <details> wrapper not collapse spacing oddly */
.tcm-inline-actions > details{
  display:inline-block;
}

/* -------------------------
   Modal editor form
   ------------------------- */

.tcm-form-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

@media (max-width: 860px){
  .tcm-form-grid{ grid-template-columns: 1fr; }
}

.tcm-form-row{ display:flex; flex-direction:column; gap:6px; }

.tcm-form-label{ font-size: 12px; font-weight: 700; color: var(--admin-muted); }

.tcm-form-input{
  width:100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--admin-line);
  background: rgba(255,255,255,0.85);
  color: var(--admin-ink);
  outline: none;
}

:root[data-theme="dark"] .tcm-form-input{ background: rgba(255,255,255,0.07); }

.tcm-modal-actions{ display:flex; justify-content:flex-end; gap:10px; margin-top:10px; }

/* Toggle switch */
.tcm-switch{
  display:inline-flex;
  align-items:center;
  gap:10px;
  cursor:pointer;
  user-select:none;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid var(--admin-line);
  background: rgba(148,163,184,0.06);
}

.tcm-switch input{ position:absolute; opacity:0; width:1px; height:1px; }

.tcm-switch__track{
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: rgba(148,163,184,0.45);
  position:relative;
  flex: 0 0 auto;
}

.tcm-switch__thumb{
  position:absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0,0,0,0.20);
  transition: transform 120ms ease;
}

.tcm-switch input:checked + .tcm-switch__track{ background: rgba(16,185,129,0.55); }
.tcm-switch input:checked + .tcm-switch__track .tcm-switch__thumb{ transform: translateX(18px); }

.tcm-switch__label{ font-weight:800; font-size: 12px; }

/* -------------------------
   Modal tabs
   ------------------------- */

.tcm-tabs__bar{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  padding: 10px 12px;
  border-bottom: 1px solid var(--admin-line);
  background: rgba(148,163,184,0.06);
}

.tcm-tab{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--admin-line);
  background: rgba(255,255,255,0.75);
  color: var(--admin-ink);
  cursor:pointer;
  font-weight:800;
  font-size:12px;
  text-decoration:none;
  user-select:none;
}

:root[data-theme="dark"] .tcm-tab{ background: rgba(255,255,255,0.07); }

.tcm-tab.is-active{
  background: rgba(59,130,246,0.14);
  border-color: rgba(59,130,246,0.35);
}

.tcm-tab:focus{ outline: 2px solid rgba(59,130,246,0.25); outline-offset: 2px; }

.tcm-tab-panel{ padding: 12px; }

/* -------------------------
   Searchable select (type-to-filter)
   ------------------------- */

.tcm-select{
  position: relative;
}

.tcm-select__menu{
  position:absolute;
  left:0;
  right:0;
  top: calc(100% + 4px);
  z-index: 10001;
  background: var(--admin-surface);
  border: 1px solid var(--admin-line);
  border-radius: 12px;
  box-shadow: 0 18px 60px rgba(2,6,23,0.20);
  overflow: hidden;
}

.tcm-select__items{
  max-height: 240px;
  overflow:auto;
}

.tcm-select__item{
  padding: 10px 12px;
  cursor:pointer;
  border-bottom: 1px solid var(--admin-line);
}

.tcm-select__item:last-child{ border-bottom: 0; }

.tcm-select__item:hover{ background: rgba(59,130,246,0.08); }

.tcm-select__empty{
  padding: 10px 12px;
  color: var(--admin-muted);
}

/* -------------------------
   Confirm modal (custom)
   Used by modal.js for dirty-close prompts
   ------------------------- */

.tcm-confirm{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 10050; /* above main modals */
}

.tcm-confirm.is-open{ display:block; }

.tcm-confirm__overlay{
  position:absolute;
  inset:0;
  background: rgba(0,0,0,0.55);
}

.tcm-confirm__panel{
  position:absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, calc(100vw - 36px));
  background: var(--admin-surface);
  color: var(--admin-ink);
  border: 1px solid var(--admin-line);
  border-radius: 16px;
  box-shadow: 0 18px 60px rgba(2,6,23,0.55);
  overflow: hidden;
}

.tcm-confirm__bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--admin-line);
}

.tcm-confirm__title{ font-weight: 900; }

.tcm-confirm__close{
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--admin-line);
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-weight: 900;
}

.tcm-confirm__body{
  padding: 12px;
}

.tcm-confirm__message{
  white-space: pre-wrap;
  color: var(--admin-ink);
}

.tcm-confirm__actions{
  display:flex;
  gap:10px;
  justify-content:flex-end;
  padding: 12px;
  border-top: 1px solid var(--admin-line);
}

.tcm-btn--danger{
  background: rgba(239,68,68,0.10);
  border-color: rgba(239,68,68,0.35);
}
.tcm-btn--danger:hover{ background: rgba(239,68,68,0.16); }

.tcm-btn--primary{
  background: rgba(34,197,94,0.10);
  border-color: rgba(34,197,94,0.35);
}
.tcm-btn--primary:hover{ background: rgba(34,197,94,0.16); }

.tcm-btn--ghost{
  background: transparent;
}
.tcm-btn--ghost:hover{ background: rgba(148,163,184,0.12); }

/* Catalog Tree: clone progress box */
.tcm-progress {
  margin: 10px 0 0;
  padding: 10px;
  border: 1px dashed var(--admin-line);
  border-radius: 10px;
  background: rgba(2, 6, 23, 0.02);
}
.tcm-progress__row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.tcm-progress__spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(100, 116, 139, 0.35);
  border-top-color: rgba(2, 132, 199, 0.95);
  border-radius: 50%;
  display: inline-block;
  animation: tcm-spin 0.9s linear infinite;
}
@keyframes tcm-spin {
  to { transform: rotate(360deg); }
}
.tcm-progress__log {
  max-height: 220px;
  overflow: auto;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  line-height: 1.35;
  color: rgba(30, 41, 59, 0.95);
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 8px;
  padding: 8px;
}
.tcm-progress__line {
  display: flex;
  gap: 10px;
  padding: 2px 0;
}
.tcm-progress__at {
  color: rgba(100, 116, 139, 0.9);
  white-space: nowrap;
}
.tcm-progress__msg {
  white-space: pre-wrap;
}
