/* ── Security Modal sections ──────────────────────────────────────── */

.security-section {
  padding: 0 0 8px 0;
}

.security-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 10px 0;
}

.security-section-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 10px;
}

.security-divider {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 18px 0;
}

/* ── Security Reset warning box ──────────────────────────────────── */

.security-warning-box {
  background-color: rgba(180, 40, 40, 0.10);
  border-left: 3px solid #c94040;
  border-radius: 6px;
  padding: 12px 14px;
  margin-bottom: 14px;
}

.security-warning-text {
  font-size: 0.85rem;
  color: var(--text-primary);
  margin: 0 0 8px 0;
  line-height: 1.5;
}

.security-warning-list {
  margin: 6px 0 6px 20px;
  padding: 0;
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.security-erase-group {
  margin-bottom: 14px;
}

.security-erase-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.security-erase-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  background: var(--input-bg, var(--card-color));
  color: var(--text-primary);
  font-size: 0.9rem;
  box-sizing: border-box;
}

.security-reset-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn-danger {
  background-color: #c94040;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.15s;
}

.btn-danger:hover:not(:disabled) {
  background-color: #a83030;
}

.btn-danger:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.security-status-msg {
  font-size: 0.83rem;
  margin-top: 10px;
  min-height: 1.2em;
}

.security-status-info  { color: var(--text-secondary); }
.security-status-ok    { color: #6DBF8B; }
.security-status-error { color: #e05252; }

/* ── Verify System Integrity ─────────────────────────────────────── */

.security-verify-list {
  margin: 8px 0 10px 20px;
  padding: 0;
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

.security-verify-loading {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.security-verify-result-card {
  background: var(--card-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.security-verify-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.security-verify-label {
  font-size: 0.82rem;
  color: var(--text-secondary);
  min-width: 130px;
  font-weight: 600;
}

.security-verify-value {
  font-size: 0.82rem;
  color: var(--text-primary);
}

.security-verify-mono {
  font-family: monospace;
  font-size: 0.78rem;
  word-break: break-all;
}

.security-verify-link {
  font-size: 0.78rem;
  color: var(--accent-color, #6DBF8B);
  text-decoration: none;
}

.security-verify-link:hover { text-decoration: underline; }

.security-verify-badge {
  font-size: 0.82rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 12px;
}

.security-verify-pass {
  background-color: rgba(109, 191, 139, 0.15);
  color: #6DBF8B;
}

.security-verify-fail {
  background-color: rgba(224, 82, 82, 0.15);
  color: #e05252;
}

.security-verify-errors {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.security-verify-pre {
  white-space: pre-wrap;
  word-break: break-all;
  font-size: 0.75rem;
  background: var(--card-color);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 8px;
  margin-top: 6px;
  max-height: 150px;
  overflow-y: auto;
}

.security-verify-path-row {
  display: flex;
  gap: 8px;
  font-size: 0.78rem;
  align-items: flex-start;
  flex-wrap: wrap;
}

.security-verify-path-label {
  font-weight: 600;
  color: var(--text-secondary);
  min-width: 70px;
}

/* ── Security Reset full-screen overlay ──────────────────────────── */

.security-reset-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(6, 8, 7, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  animation: security-reset-fade-in 0.35s ease-out;
}

.security-reset-overlay.visible {
  display: flex;
}

@keyframes security-reset-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.security-reset-overlay-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

/* ── Phase 2: password display box ──────────────────────────────── */

.security-reset-password-label {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 16px 0 8px 0;
}

.security-reset-password-box {
  font-family: monospace;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--text-primary);
  background: rgba(109, 191, 139, 0.10);
  border: 1.5px solid rgba(109, 191, 139, 0.35);
  border-radius: 8px;
  padding: 14px 24px;
  letter-spacing: 0.04em;
  text-align: center;
  word-break: break-all;
  margin-bottom: 16px;
  min-width: 260px;
}

.security-reset-password-warning {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 20px;
  text-align: center;
}

.security-reset-reboot-btn {
  background-color: #6DBF8B;
  color: #0a0c0b;
  border: none;
  border-radius: 7px;
  padding: 11px 22px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background-color 0.15s, opacity 0.15s;
  white-space: nowrap;
}

.security-reset-reboot-btn:hover:not(:disabled) {
  background-color: #5aab78;
}

.security-reset-reboot-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ── First-login security banner ─────────────────────────────────── */

.security-first-login-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background-color: rgba(94, 173, 138, 0.08);
  border-bottom: 2px solid rgba(94, 173, 138, 0.25);
  color: var(--text-primary);
}

.security-banner-content {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.security-banner-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
  margin-top: 1px;
}

.security-banner-text {
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--text-primary);
}

.security-banner-dismiss {
  background: none;
  border: 1px solid var(--border-color);
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  color: var(--text-secondary);
  padding: 2px 7px;
  flex-shrink: 0;
  line-height: 1.4;
  transition: background-color 0.15s;
}

.security-banner-dismiss:hover {
  background-color: rgba(0,0,0,0.08);
}

/* ── Legacy security inline warning banner ───────────────────────── */

.security-inline-banner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px 14px;
  margin-bottom: 12px;
  background-color: rgba(180, 100, 0, 0.12);
  border-left: 3px solid #c97a00;
  border-radius: 6px;
  color: var(--text-primary);
}

.security-inline-icon {
  font-size: 1rem;
  color: #e69000;
  flex-shrink: 0;
}

.security-inline-text {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

.security-inline-link {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #e69000;
  text-decoration: none;
  border: 1px solid #c97a00;
  border-radius: 4px;
  padding: 4px 10px;
  align-self: flex-start;
  transition: background-color 0.15s;
}

.security-inline-link:hover {
  background-color: rgba(180, 100, 0, 0.22);
}

/* ── System change-password form extras ──────────────────────────── */

.sys-chpw-header {
  margin-bottom: 14px;
}

.sys-chpw-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.sys-chpw-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.pw-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.pw-input-wrap .matrix-form-input {
  padding-right: 2.4rem;
  width: 100%;
}

.pw-toggle-btn {
  position: absolute;
  right: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  padding: 2px 4px;
  line-height: 1;
  color: var(--text-secondary);
  opacity: 0.75;
  transition: opacity 0.15s;
}

.pw-toggle-btn:hover {
  opacity: 1;
}

.pw-hint {
  font-size: 0.76rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

.pw-credentials-note {
  font-size: 0.78rem;
  color: #c97a00;
  background-color: rgba(180, 100, 0, 0.10);
  border-left: 2px solid #c97a00;
  border-radius: 4px;
  padding: 7px 10px;
  margin-bottom: 12px;
  line-height: 1.5;
}
