:root{--tf4:#172033;--line:#dbe2ea;--soft:#f5f7fa;--ink:#1d2633;--accent:#2d6cdf}
body{background:var(--soft);color:var(--ink);font-size:14px}
.bg-tf4{background:var(--tf4)}
.navbar.bg-tf4{border-bottom:1px solid rgba(255,255,255,.08);box-shadow:0 1px 0 rgba(17,24,39,.25)}
.navbar.bg-tf4 .container-fluid{min-height:40px;padding-left:18px;padding-right:18px}
.tf4-brand{display:inline-flex;align-items:center;min-height:34px;margin-right:20px;padding:0 2px;color:#fff !important;font-family:Arial,"Helvetica Neue",sans-serif;font-size:20px;font-weight:900;letter-spacing:.01em;line-height:1;text-transform:uppercase}
.tf4-workspace-selector{flex:0 0 auto;margin-right:14px}
.tf4-workspace-toggle{gap:8px;margin-right:0;border:0;background:transparent}
.tf4-workspace-toggle:after{font-size:10px;opacity:.7}
.tf4-workspace-name{padding:5px 8px;border:1px solid rgba(255,255,255,.16);border-radius:5px;background:rgba(255,255,255,.06);font-size:11px;font-weight:700;letter-spacing:0;text-transform:none}
.tf4-workspace-menu{min-width:230px;padding:6px}
.tf4-workspace-menu .dropdown-item{display:flex;flex-direction:column;gap:2px;padding:9px 10px;border-radius:5px}
.tf4-workspace-menu .dropdown-item small{color:#718096;font-size:11px}
.navbar.bg-tf4 .navbar-nav{align-items:center;gap:2px}
.navbar.bg-tf4 .nav-link{display:flex;align-items:center;min-height:34px;padding:8px 9px;border-radius:6px;color:rgba(255,255,255,.78);font-size:13px;font-weight:500;line-height:1.1;transition:background-color .15s ease,color .15s ease}
.navbar.bg-tf4 .nav-link:hover,.navbar.bg-tf4 .nav-link:focus{background:rgba(255,255,255,.08);color:#fff}
.navbar.bg-tf4 .nav-link.show{background:rgba(255,255,255,.1);color:#fff}
.navbar.bg-tf4 .dropdown-menu{border:1px solid var(--line);border-radius:8px;box-shadow:0 14px 34px rgba(17,24,39,.14)}
.navbar.bg-tf4 .dropdown-item{font-size:13px}
.navbar.bg-tf4 .navbar-text{color:rgba(255,255,255,.76);font-size:12px;letter-spacing:.02em}
.navbar.bg-tf4 .navbar-text strong{color:#fff;font-weight:800}
.navbar.bg-tf4 .btn-outline-light{border-color:rgba(255,255,255,.55);border-radius:6px;color:#fff;font-weight:700;padding:6px 10px}
.navbar.bg-tf4 .btn-outline-light:hover,.navbar.bg-tf4 .btn-outline-light:focus{background:#fff;color:var(--tf4);border-color:#fff}
.panel,.metric{background:#fff;border:1px solid var(--line);border-radius:8px;padding:16px;box-shadow:0 1px 2px rgba(20,30,45,.04)}
.metric-label{font-size:12px;text-transform:uppercase;color:#65758b;font-weight:700}
.metric-value{font-size:30px;font-weight:800}
.metric-export{font-size:12px;text-decoration:none}
.decision-badge{display:inline-flex;align-items:center;justify-content:center;min-width:74px;padding:4px 10px;border-radius:999px;font-size:12px;font-weight:700}
.decision-review{background:#fff3cd;color:#7a5d00;border:1px solid #ffe69c}
.decision-auto{background:#d1e7dd;color:#0f5132;border:1px solid #a3cfbb}
.decision-error{background:#f8d7da;color:#842029;border:1px solid #f1aeb5}
.matcher-confidence-high{background:#d1e7dd;color:#0f5132;border:1px solid #a3cfbb}
.matcher-confidence-medium{background:#fff3cd;color:#7a5d00;border:1px solid #ffe69c}
.matcher-confidence-low,.matcher-confidence-not{background:#f8d7da;color:#842029;border:1px solid #f1aeb5}
.matcher-confidence-known-issue{background:#e7f1ff;color:#1849a9;border:1px solid #b6d4fe}
.matcher-status-matched{background:#e7f1ff;color:#1849a9;border:1px solid #b6d4fe}
.matcher-status-not-found{background:#f8d7da;color:#842029;border:1px solid #f1aeb5}
.matcher-status-manual{background:#eef2ff;color:#4338ca;border:1px solid #c7d2fe}
.section-inline-head{display:flex;align-items:center;gap:16px;justify-content:flex-start;flex-wrap:wrap}
.page-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}
.dashboard-hero{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;background:#fff;border:1px solid var(--line);border-radius:8px;padding:18px 20px;box-shadow:0 1px 2px rgba(20,30,45,.04)}
.dashboard-subhead{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.dashboard-roid{background:#eef4ff;color:#1849a9;border-color:#c8d8ff}
.dashboard-controls{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.dashboard-toggle-form{display:flex;align-items:center;gap:8px;padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:#fafcff}
.dashboard-control-label{font-size:12px;font-weight:700;text-transform:uppercase;color:#65758b}
.dashboard-run-btn{min-width:120px}
.dashboard-progress-panel{padding:18px 20px;background:linear-gradient(180deg,#fbfffc 0%,#f4fff8 100%)}
.dashboard-progress-panel-muted{background-image:linear-gradient(180deg,#fbfbfc 0%,#f4f5f7 100%);background-color:#f7f8fa}
.dashboard-progress-panel-off{background:#fff6f7 !important;background-image:none !important;border-color:#f1d6da !important}
.dashboard-progress-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;flex-wrap:wrap;margin-bottom:12px}
.dashboard-progress-subtext{font-size:13px;color:#4f6b57}
.dashboard-progress-badge{display:inline-flex;align-items:center;justify-content:center;min-width:72px;padding:8px 12px;border-radius:999px;background:#e6fff0;border:1px solid #b9efcb;color:#0f5132;font-size:12px;font-weight:700}
.dashboard-progress-badge-muted{background:#f3f4f6;border-color:#d1d5db;color:#4b5563}
.dashboard-progress-badge-off{background:#fdf1f2;border-color:#f3c6cb;color:#a9444e}
.dashboard-progress-badge-auto{min-width:92px;padding-inline:14px}
.dashboard-progress-track{position:relative;overflow:hidden;height:14px;border-radius:999px;background:#dff6e7;border:1px solid #c8ecd5}
.dashboard-progress-track-muted{background:#f3f4f6;border-color:#d1d5db}
.dashboard-progress-track-off{background:#fdf1f2;border-color:#f3c6cb}
.dashboard-progress-track-auto{height:10px}
.dashboard-progress-bar{height:100%;min-width:0;border-radius:999px;background:linear-gradient(90deg,#22c55e 0%,#32d67b 48%,#18a957 100%);box-shadow:0 0 0 rgba(34,197,94,0);transition:width .45s ease,box-shadow .45s ease}
.dashboard-progress-bar.is-active{box-shadow:0 0 16px rgba(34,197,94,.35)}
.dashboard-progress-bar.is-active:after{content:"";display:block;height:100%;width:120px;max-width:32%;margin-left:auto;background:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(255,255,255,.72) 55%,rgba(255,255,255,0) 100%);animation:tf4ProgressSweep 1.8s linear infinite}
.dashboard-progress-note{margin-top:10px;font-size:12px;color:#65758b}
.dashboard-debug-panel{margin-top:14px;border:1px solid #d8ece0;border-radius:8px;background:rgba(255,255,255,.72);overflow:hidden}
.dashboard-debug-panel-auto{margin-top:12px}
.dashboard-debug-summary{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 14px;cursor:pointer;list-style:none;font-size:12px;font-weight:700;text-transform:uppercase;color:#456452}
.dashboard-debug-summary::-webkit-details-marker{display:none}
.dashboard-debug-hint{font-weight:500;text-transform:none;color:#6b7f73}
.dashboard-debug-body{max-height:240px;overflow:auto;border-top:1px solid #e2efe7;background:#fbfffc}
.dashboard-debug-item{padding:10px 14px;border-top:1px solid #edf5f0}
.dashboard-debug-item:first-child{border-top:0}
.dashboard-debug-line{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-bottom:6px}
.dashboard-debug-candidate{font-weight:800;color:#172033}
.dashboard-debug-status,.dashboard-debug-outcome,.dashboard-debug-time{display:inline-flex;align-items:center;border:1px solid var(--line);border-radius:999px;padding:2px 8px;background:#fff;font-size:11px;color:#5d6b7d}
.dashboard-debug-meta{display:flex;gap:8px;flex-wrap:wrap;font-size:12px;color:#5c6f64}
.dashboard-debug-meta span{display:inline-flex;align-items:center;border:1px solid #e2ece5;border-radius:999px;padding:2px 8px;background:#fff}
.dashboard-debug-empty{padding:14px;color:#6f8478;font-size:12px}
.dashboard-progress-panel-off .h6{color:#6f2f38}
.dashboard-progress-panel-off .dashboard-progress-subtext{color:#8f4b55}
.dashboard-progress-panel-off .dashboard-progress-note{color:#9a6a72}
.dashboard-progress-panel-off .dashboard-debug-panel{border-color:#f1d6da;background:#fff8f9}
.dashboard-progress-panel-off .dashboard-debug-summary{color:#8f4b55;background:#fff8f9}
.dashboard-progress-panel-off .dashboard-debug-hint{color:#a2767d}
.dashboard-progress-panel-off .dashboard-debug-body{border-top-color:#f6e2e5;background:#fffdfd}
.dashboard-progress-panel-off .dashboard-debug-item{border-top-color:#f6e8ea}
.dashboard-progress-panel-off .dashboard-debug-candidate{color:#6f2f38}
.dashboard-progress-panel-off .dashboard-debug-status,
.dashboard-progress-panel-off .dashboard-debug-outcome,
.dashboard-progress-panel-off .dashboard-debug-time,
.dashboard-progress-panel-off .dashboard-debug-meta span{border-color:#f0dde0;background:#fff;color:#8f4b55}
.dashboard-progress-panel-off .dashboard-debug-empty{color:#9a6a72}
.dashboard-metric{position:relative;min-height:118px;display:flex;flex-direction:column;justify-content:space-between}
.dashboard-metric:before{content:"";position:absolute;left:16px;right:16px;top:0;height:3px;border-radius:999px;background:#d7e4ff}
.dashboard-metric .metric-value{font-size:34px;line-height:1}
.metric-foot{font-size:12px}
.dashboard-metric-error:before{background:#f3b4bc}
.dashboard-metric-error .metric-value{color:#842029}
.dashboard-primary-grid{align-items:start}
.dashboard-secondary-grid{align-items:start}
.dashboard-primary-panel{padding:20px 22px}
.dashboard-side-panel{height:100%}
.dashboard-secondary-stack{display:grid;gap:12px}
.dashboard-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:12px}
.dashboard-section-head-compact{margin-bottom:10px}
.dashboard-section-eyebrow{margin-bottom:4px;font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:#65758b}
.dashboard-status-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(120px,1fr));gap:10px}
.dashboard-status-grid-compact{grid-template-columns:repeat(3,minmax(0,1fr))}
.dashboard-status-grid-auto{grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:8px}
.dashboard-status-card{border:1px solid var(--line);border-radius:8px;padding:12px 14px;background:#fafcff}
.dashboard-status-label{font-size:12px;text-transform:uppercase;color:#65758b;font-weight:700;margin-bottom:6px}
.dashboard-status-value{font-size:24px;font-weight:800;line-height:1}
.dashboard-auto-progress-note{margin-top:8px;font-size:12px;color:#65758b}
.dashboard-auto-mini{display:flex;gap:10px;flex-wrap:wrap;margin-top:10px;font-size:12px;color:#65758b}
.dashboard-auto-mini span{display:inline-flex;align-items:center;gap:4px;border:1px solid var(--line);border-radius:999px;padding:4px 10px;background:#fafcff}
.dashboard-auto-mini strong{color:#1d2633}
.dashboard-auto-last{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:10px;font-size:12px;color:#65758b}
.dashboard-auto-last-label{font-weight:700;text-transform:uppercase;color:#65758b}
.dashboard-auto-last-reason{color:#1d2633}
.dashboard-debug-body-auto{max-height:180px}
.run-strip{display:flex;gap:10px;flex-wrap:wrap}
.run-strip span,.summary-pill{display:inline-flex;align-items:center;border:1px solid var(--line);background:#f9fbfd;border-radius:6px;padding:6px 10px}
.summary-row{display:flex;gap:10px;flex-wrap:wrap;align-items:center}
.table-sort-link{color:inherit;text-decoration:none;display:inline-flex;align-items:center;gap:4px}
.table-sort-link:hover{color:var(--accent)}
.table-sort-link.is-active{color:var(--accent);font-weight:700}
.table-sort-indicator{font-size:11px;line-height:1}
.run-strip .run-status{font-weight:700;text-transform:capitalize}
.run-strip .run-status-running{background:#d1e7dd;color:#0f5132;border-color:#a3cfbb}
.run-strip .run-status-preparing,.run-strip .run-status-waiting{background:#eef2ff;color:#4338ca;border-color:#c7d2fe}
.run-strip .run-status-recovering{background:#fff3cd;color:#7a5d00;border-color:#ffe69c}
.run-strip .run-status-blocked,.run-strip .run-status-paused,.run-strip .run-status-stopping,.run-strip .run-status-idle{background:#f3f4f6;color:#4b5563;border-color:#d1d5db}
.run-strip .run-status-off{background:#fdf1f2;color:#a9444e;border-color:#f3c6cb}
.run-strip .run-status-completed{background:#e7f1ff;color:#0a58ca;border-color:#b6d4fe}
.run-strip .run-status-failed{background:#f8d7da;color:#842029;border-color:#f1aeb5}
.run-strip .run-status-canceled{background:#f3e8ff;color:#6b21a8;border-color:#d8b4fe}
.run-strip .run-status-queued{background:#fff3cd;color:#7a5d00;border-color:#ffe69c}
.dashboard-empty{display:grid;place-items:center;min-height:88px;border:1px dashed var(--line);border-radius:8px;background:#fafcff;color:#65758b}
.dashboard-summary-table td:last-child,.dashboard-summary-table th:last-child{text-align:right}
.matcher-alt-list{display:grid;gap:6px;min-width:220px}
.matcher-alt-item{border:1px solid var(--line);border-radius:8px;padding:8px 10px;background:#fafcff}
.matcher-alt-target{font-weight:700;color:var(--ink);margin-bottom:2px}
.matcher-alt-group-link{margin-left:8px;font-weight:500;color:#65758b}
.matcher-alt-meta{display:flex;gap:6px;flex-wrap:wrap}
.matcher-alt-meta span{display:inline-flex;align-items:center;border:1px solid var(--line);border-radius:999px;padding:2px 8px;background:#fff;font-size:12px;color:#65758b}
.matcher-alt-inline-list{display:flex;gap:6px;flex-wrap:wrap;align-items:center;min-width:220px}
.matcher-alt-pill{display:inline-flex;align-items:center;gap:6px;flex-wrap:wrap;border:1px solid var(--line);border-radius:999px;padding:4px 10px;background:#fafcff;line-height:1.2}
.matcher-alt-pill-main{font-weight:700;color:var(--ink)}
.matcher-alt-pill-group{color:#65758b}
.matcher-alt-pill-meta{display:inline-flex;align-items:center;border:1px solid var(--line);border-radius:999px;padding:1px 6px;background:#fff;font-size:11px;color:#65758b}
.rule-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:8px}
.target-lines{display:grid;gap:8px}
.config-check-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:6px;border:1px solid var(--line);border-radius:6px;padding:8px;background:#fff}
.config-check{display:flex;gap:8px;align-items:center;margin:0}
.config-switch{border:1px solid var(--line);border-radius:6px;padding:10px 12px;background:#fff}
.compact-switch{padding:8px 12px 8px 36px;margin:0;min-width:88px}
.compact-switch .form-check-input{margin-left:-24px}
.config-dropdown-menu{width:100%;max-height:280px;overflow:auto}
.login-shell{min-height:80vh;display:grid;place-items:center}
.login-panel{width:min(420px,92vw);background:#fff;border:1px solid var(--line);border-radius:8px;padding:32px;box-shadow:0 10px 35px rgba(20,30,45,.08)}
.number-admin-input{min-height:160px;font-family:Consolas,"Liberation Mono",monospace;font-size:13px}
.number-admin-output{min-height:180px;max-height:420px;overflow:auto;margin:0;padding:14px;border:1px solid var(--line);border-radius:8px;background:#0f172a;color:#e5edf8;font-family:Consolas,"Liberation Mono",monospace;font-size:13px;line-height:1.45;white-space:pre}
.number-admin-batch-card{display:grid;grid-template-columns:minmax(240px,1fr) minmax(220px,1fr);gap:18px;padding:12px 16px;border-top:4px solid #b9c0c7;border-bottom:4px solid #b9c0c7;background:#f8fafc;font-family:Consolas,"Liberation Mono",monospace;font-size:14px}
.number-admin-batch-left,.number-admin-batch-right{display:grid;gap:4px;align-content:start}
.number-admin-batch-right{justify-self:center;min-width:220px}
.number-admin-success{color:#075985}
.number-admin-error{color:#842029}
.number-admin-log-wrap{max-height:280px;overflow:auto}
.number-admin-table-wrap{max-height:440px;overflow:auto}
.number-admin-table-wrap code{white-space:nowrap}
th{white-space:nowrap}
td{vertical-align:middle}
.empty{color:#65758b;margin:0}
@keyframes tf4ProgressSweep{
  from{transform:translateX(-120px)}
  to{transform:translateX(180px)}
}
@media (max-width: 991px){
  .navbar.bg-tf4 .navbar-nav{align-items:flex-start;padding-top:8px}
  .navbar.bg-tf4 .nav-link{width:100%}
  .dashboard-metric{min-height:auto}
  .dashboard-status-grid-compact{grid-template-columns:repeat(2,minmax(0,1fr))}
  .dashboard-status-grid-auto{grid-template-columns:repeat(2,minmax(0,1fr))}
  .number-admin-batch-card{grid-template-columns:1fr}
  .number-admin-batch-right{justify-self:start}
}
#groupConflictModal .modal-dialog {
  height: calc(100% - 1rem);
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

#groupConflictModal .modal-content {
  height: 100%;
  max-height: 100%;
  overflow: hidden;
}

#groupConflictModal .modal-content > form {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
}

#groupConflictModal .modal-header,
#groupConflictModal .modal-footer {
  flex: 0 0 auto;
}

#groupConflictModal .modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
}

#groupConflictModal thead {
  background: var(--bs-body-bg);
}

@media (min-width: 576px) {
  #groupConflictModal .modal-dialog {
    height: calc(100% - 3.5rem);
    margin-top: 1.75rem;
    margin-bottom: 1.75rem;
  }
}
.account-permission-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: .55rem 1rem;
}
.account-actions-row td { background: #f8fafc; }
.account-password-result { min-height: 1.2rem; color: #0f3d91; word-break: break-all; }
.audit-last-change { font-size: 1rem; }
.target-activity-layout { display: grid; grid-template-columns: minmax(280px, .75fr) minmax(480px, 1.5fr); gap: 1.5rem; }
.target-activity-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.target-activity-metrics > div { border: 1px solid #dbe4f0; border-radius: .65rem; padding: .9rem; background: #f8fbff; }
.target-activity-metrics strong { display: block; color: #10243e; font-size: 1.35rem; }
.target-activity-metrics span { display: block; color: #66758a; font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; }
.target-activity-row { display: grid; grid-template-columns: 90px 120px 110px 1fr; gap: .75rem; padding: .45rem 0; border-top: 1px solid #e5ebf3; align-items: center; }
@media (max-width: 1100px) { .target-activity-layout { grid-template-columns: 1fr; } }
