:root {
  --agate-primary: #0a5bd3;
  --agate-primary-2: #124aa1;
  --agate-accent: #cf9941;
  --bg: #071024;
  --panel: rgba(10, 18, 36, 0.94);
  --panel-soft: rgba(255, 255, 255, 0.055);
  --text: #e8eef8;
  --muted: #9fb2cf;
  --border: rgba(255, 255, 255, 0.12);
  --success: #16a34a;
  --danger: #ef4444;
  --warning: #f59e0b;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 10% 10%, rgba(10, 91, 211, 0.22), transparent 32%),
    radial-gradient(circle at 90% 0%, rgba(207, 153, 65, 0.16), transparent 28%),
    linear-gradient(135deg, #071024 0%, #0b1630 52%, #061024 100%);
}


/* Prevent the lock screen from flashing before JavaScript confirms that protection is enabled and locked. */
body.lock-preload .container {
  display: none;
}

a { color: var(--agate-accent); }
a:hover { color: #f1c478; }

.container { max-width: 560px; margin: 5vh auto; padding: 22px; }
.container.wide { max-width: 780px; }
.card {
  position: relative;
  overflow: hidden;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 26px;
  box-shadow: 0 22px 70px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(8px);
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(120deg, rgba(255,255,255,0.08), transparent 34%);
}
.card > * { position: relative; z-index: 1; }

.brand { display: flex; gap: 13px; align-items: center; margin-bottom: 8px; }
.brand img { height: 34px; max-width: 190px; object-fit: contain; }
.brand h1 { font-size: 21px; margin: 0; letter-spacing: 0.2px; line-height: 1.2; }
.subtitle { color: var(--muted); font-size: 18px; margin: 2px 0 20px; }
.notice {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.045);
  border-radius: 16px;
  padding: 12px 14px;
  color: var(--muted);
  font-size: 13px;
  margin: 12px 0;
}
.notice.warning { border-color: rgba(245, 158, 11, 0.35); color: #f6d79d; }
.notice.success { border-color: rgba(22, 163, 74, 0.35); color: #b7f0c7; }

.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { margin: 13px 0; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 7px; }
.input, select, textarea {
  width: 100%;
  padding: 10px 15px;
  border-radius: 10px;
  background: #0e1b35;
  border: 1px solid var(--border);
  color: var(--text);
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.input:focus, select:focus, textarea:focus {
  border-color: rgba(10, 91, 211, 0.85);
  box-shadow: 0 0 0 4px rgba(10, 91, 211, 0.18);
}
.input[disabled], select[disabled], textarea[disabled] { opacity: .55; cursor: not-allowed; }
/* Masked secret inputs use text fields with visual masking to reduce Chrome/password-manager autofill suggestions on the lock screen. */
.masked-secret {
  -webkit-text-security: disc;
  -text-security: disc;
}
.masked-secret::selection {
  background: rgba(10, 91, 211, 0.35);
}

.help { font-size: 12px; color: #8aa0bf; margin-top: 7px; }
.actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; align-items: center; }
.btn {
  cursor: pointer;
  padding: 5px 15px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: linear-gradient(135deg, var(--agate-primary), var(--agate-primary-2));
  color: white;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  min-height: 40px;
}
.btn:hover { filter: brightness(1.08); color: #fff; }
.btn.secondary { background: transparent; border-color: rgba(255,255,255,.22); color: var(--text); font-weight: 500;}
.btn.ghost { background: transparent; color: var(--muted); border-color: transparent; }
.btn.danger { background: linear-gradient(135deg, #dc2626, #991b1b); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.status { margin-top: 12px; font-size: 13px; min-height: 20px; color: var(--muted); }
.status.good { color: #b7f0c7; }
.status.bad { color: #fecaca; }
.minor { opacity: .95; font-size: 12px; color: var(--muted); }
.divider { height: 1px; background: var(--border); margin: 22px 0; }

.footer {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
}
.footer-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 12px; flex-wrap: wrap; }
.footer a { color: var(--muted); text-decoration: none; border-bottom: 1px dotted rgba(159,178,207,.55); }
.footer a:hover { color: var(--agate-accent); }
.footer-link-button {
  color: var(--muted);
  text-decoration: none;
  border: 0;
  border-bottom: 1px dotted rgba(159,178,207,.55);
  background: transparent;
  padding: 0;
  font: inherit;
  cursor: pointer;
}
.footer-link-button:hover { color: var(--agate-accent); }


.fade-in { animation: fade .45s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.pulse { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity:.72; } 50% { opacity:1; } }

@media (max-width: 640px) {
  .container { margin: 0; padding: 14px; }
  .card { border-radius: 18px; padding: 20px; }
  .grid { grid-template-columns: 1fr; }
  .brand h1 { font-size: 18px; }
}

@media print {
  body { background: #fff; color: #111; }
  .card { box-shadow: none; border: 1px solid #ddd; background: #fff; }
  .footer a, a { color: #0645ad; }
}
