body.auth-locked > .header,
body.auth-locked > .container,
body.auth-locked > #archiveSection,
body.auth-locked > #baseDataSection,
body.auth-locked > #ruleSection { display: none !important; }

.auth-gate {
  display: none; position: fixed; inset: 0; z-index: 3000;
  background: #eef2f7; align-items: center; justify-content: center; padding: 24px;
}
body.auth-locked .auth-gate { display: flex; }
.auth-panel {
  width: min(420px, 100%); background: #fff; border: 1px solid #dfe5ec;
  border-radius: 8px; box-shadow: 0 18px 50px rgba(21, 40, 71, .15); overflow: hidden;
}
.auth-brand { background: #1a237e; color: #fff; padding: 24px 28px; }
.auth-brand h1 { font-size: 21px; line-height: 1.35; }
.auth-brand p { margin-top: 7px; font-size: 12px; opacity: .82; }
.auth-form { padding: 26px 28px 28px; }
.auth-form h2 { font-size: 17px; color: #1f2937; margin-bottom: 6px; }
.auth-form .auth-hint { color: #6b7280; font-size: 12px; line-height: 1.6; margin-bottom: 18px; }
.auth-field { margin-bottom: 14px; }
.auth-field label { display: block; margin-bottom: 5px; color: #4b5563; font-size: 12px; font-weight: 600; }
.auth-field input, .auth-field select {
  width: 100%; height: 40px; padding: 0 11px; border: 1px solid #cfd7e3;
  border-radius: 5px; font: inherit; font-size: 13px; background: #fff;
}
.auth-field input:focus, .auth-field select:focus { outline: none; border-color: #283593; box-shadow: 0 0 0 3px rgba(40,53,147,.1); }
.auth-error { min-height: 20px; margin: 4px 0 10px; color: #c62828; font-size: 12px; }
.auth-submit { width: 100%; height: 42px; }
.header { position: relative; }
.header-user { position: absolute; right: 40px; top: 18px; display: flex; align-items: center; gap: 10px; }
.header-user-meta { text-align: right; font-size: 12px; line-height: 1.4; }
.header-user-meta small { display: block; opacity: .72; }
.header-logout { width: 34px; height: 34px; padding: 0; border: 1px solid rgba(255,255,255,.35); border-radius: 5px; background: transparent; color: #fff; cursor: pointer; font-size: 17px; }
.header-logout:hover { background: rgba(255,255,255,.12); }
.auth-user-modal { max-width: 920px; }
.auth-user-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.auth-user-table th, .auth-user-table td { padding: 9px 8px; border-bottom: 1px solid #edf0f3; text-align: left; vertical-align: middle; }
.auth-user-table th { color: #667085; background: #f8fafc; }
.auth-user-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.auth-mini-btn { border: 1px solid #d7dde5; background: #fff; border-radius: 4px; padding: 5px 8px; cursor: pointer; font-size: 11px; }
.auth-mini-btn:hover { border-color: #283593; color: #283593; }
@media (max-width: 760px) {
  .header { padding-right: 155px; }
  .header-user { right: 16px; top: 15px; }
  .header-user-meta small { display: none; }
  .auth-user-table { min-width: 720px; }
}
.auth-audit-modal { width:min(1180px, calc(100vw - 32px)); max-width:1180px; }
.auth-audit-table { width:100%; border-collapse:collapse; font-size:12px; table-layout:fixed; }
.auth-audit-table th,.auth-audit-table td { padding:9px 8px; border-bottom:1px solid #e8edf5; text-align:left; vertical-align:top; overflow-wrap:anywhere; }
.auth-audit-table th { color:#526173; background:#f5f7fa; font-weight:600; }
.auth-audit-detail { max-height:280px; overflow:auto; white-space:pre-wrap; background:#f7f9fc; border:1px solid #dbe4f0; padding:12px; margin-top:12px; font:12px/1.55 Consolas,monospace; }
.auth-audit-actions { display:flex; gap:6px; flex-wrap:wrap; align-items:center; }
.auth-audit-actions .btn { white-space:nowrap; }
@media (max-width: 900px) {
  .auth-audit-modal .modal-body > div:first-child { grid-template-columns:1fr 1fr !important; }
  .auth-audit-actions { grid-column:1 / -1; }
}
#runtimeLogSection label {
  display: grid;
  gap: 5px;
  min-width: 0;
  font-size: 13px;
  color: #344054;
}
#runtimeLogSection input,
#runtimeLogSection select {
  box-sizing: border-box;
  height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 4px;
  padding: 6px 10px;
  background: #fff;
  color: #172033;
  font: inherit;
}
#runtimeLogRequest { width: 290px; }
#runtimeLogSection th { white-space: nowrap; }
#runtimeLogSection td { overflow-wrap: anywhere; }
#runtimeLogStatus { font-size: 13px; color: #475467; margin: 10px 0; }
