/* ============================================================
   PASSWORD — EXECUTIVE ACCESS SCREEN
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Inter:wght@300;400;500&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:         #07080e;
  --bg-panel:   rgba(11, 14, 26, 0.88);
  --gold:       #c9a84c;
  --gold-glow:  rgba(201, 168, 76, 0.3);
  --gold-light: #e8d197;
  --white:      #efefef;
  --muted:      #6b7280;
  --error:      #ef4444;
  --error-glow: rgba(239, 68, 68, 0.25);
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  font-family: 'Inter', sans-serif;
}

/* ========================
   BACKGROUND
   ======================== */
.pw-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.pw-grid {
  position: absolute;
  inset: -60%;
  background-image:
    linear-gradient(rgba(201, 168, 76, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 168, 76, 0.045) 1px, transparent 1px);
  background-size: 90px 90px;
  animation: bgRotate 55s linear infinite;
}

@keyframes bgRotate {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.pw-radial {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse 55% 48% at 50% 50%,
    rgba(201, 168, 76, 0.07) 0%,
    transparent 70%
  );
}

/* Floating data lines */
.pw-lines { position: absolute; inset: 0; pointer-events: none; }

.pw-line {
  position: absolute;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(201, 168, 76, 0.35) 50%,
    transparent 100%
  );
  animation: lineFall linear infinite;
}

@keyframes lineFall {
  from { transform: translateY(-100vh); opacity: 0; }
  10%  { opacity: 1; }
  90%  { opacity: 1; }
  to   { transform: translateY(200vh); opacity: 0; }
}

/* Scan line */
.pw-scan {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(201, 168, 76, 0.025) 50%,
    transparent 100%
  );
  background-size: 100% 8px;
  animation: scanMove 8s linear infinite;
  pointer-events: none;
}

@keyframes scanMove {
  from { background-position: 0 -100vh; }
  to   { background-position: 0 100vh; }
}

/* ========================
   CORNER DECORATIONS
   ======================== */
.corner {
  position: fixed;
  width: 70px; height: 70px;
  z-index: 5;
  opacity: 0.45;
}

.corner-tl { top: 28px; left: 28px; border-top: 1px solid var(--gold); border-left: 1px solid var(--gold); }
.corner-tr { top: 28px; right: 28px; border-top: 1px solid var(--gold); border-right: 1px solid var(--gold); }
.corner-bl { bottom: 28px; left: 28px; border-bottom: 1px solid var(--gold); border-left: 1px solid var(--gold); }
.corner-br { bottom: 28px; right: 28px; border-bottom: 1px solid var(--gold); border-right: 1px solid var(--gold); }

/* ========================
   MAIN CONTAINER
   ======================== */
.pw-container {
  position: relative;
  z-index: 10;
  width: 100%;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
}

/* ========================
   TOP LABEL
   ======================== */
.pw-system-tag {
  font-family: 'Cinzel', serif;
  font-size: 9px;
  color: rgba(201, 168, 76, 0.6);
  letter-spacing: 6px;
  text-transform: uppercase;
  margin-bottom: 50px;
  display: flex;
  align-items: center;
  gap: 22px;
}

.pw-system-tag::before,
.pw-system-tag::after {
  content: '';
  display: block;
  width: 44px; height: 1px;
  background: rgba(201, 168, 76, 0.3);
}

/* ========================
   EMBLEM
   ======================== */
.pw-emblem {
  margin-bottom: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pw-emblem-outer {
  width: 110px; height: 110px;
  border: 1px solid rgba(201, 168, 76, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  animation: emblemPulse 3.5s ease-in-out infinite;
}

.pw-emblem-outer::before {
  content: '';
  position: absolute;
  inset: -10px;
  border: 1px solid rgba(201, 168, 76, 0.06);
  border-radius: 50%;
}

.pw-emblem-outer::after {
  content: '';
  position: absolute;
  inset: -20px;
  border: 1px solid rgba(201, 168, 76, 0.03);
  border-radius: 50%;
}

@keyframes emblemPulse {
  0%, 100% { box-shadow: 0 0 25px rgba(201, 168, 76, 0.1); }
  50%       { box-shadow: 0 0 55px rgba(201, 168, 76, 0.28); }
}

.pw-emblem-inner {
  width: 72px; height: 72px;
  border: 1px solid rgba(201, 168, 76, 0.28);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(201, 168, 76, 0.06);
}

.pw-emblem-svg {
  width: 34px; height: 34px;
  color: var(--gold);
}

/* ========================
   PANEL
   ======================== */
.pw-panel {
  background: var(--bg-panel);
  backdrop-filter: blur(32px);
  -webkit-backdrop-filter: blur(32px);
  border: 1px solid rgba(201, 168, 76, 0.14);
  padding: 52px;
  width: 100%;
  max-width: 460px;
  position: relative;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.pw-panel::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 12%; right: 12%;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--gold), transparent);
}

.pw-panel::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 35%; right: 35%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(201, 168, 76, 0.4), transparent);
}

/* Panel title */
.pw-title {
  font-family: 'Cinzel', serif;
  font-size: 18px;
  color: var(--white);
  text-align: center;
  margin-bottom: 6px;
  letter-spacing: 2px;
  font-weight: 600;
}

.pw-subtitle {
  font-size: 10px;
  color: var(--muted);
  text-align: center;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-bottom: 38px;
}

.pw-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 34px;
}

.pw-divider-line {
  flex: 1; height: 1px;
  background: rgba(201, 168, 76, 0.12);
}

.pw-divider-diamond {
  width: 5px; height: 5px;
  background: var(--gold);
  transform: rotate(45deg);
}

/* ========================
   INPUT
   ======================== */
.pw-input-group { margin-bottom: 22px; }

.pw-input-label {
  display: block;
  font-size: 8.5px;
  color: var(--gold);
  letter-spacing: 3.5px;
  text-transform: uppercase;
  margin-bottom: 10px;
  font-family: 'Cinzel', serif;
}

.pw-input-wrap { position: relative; }

.pw-input {
  width: 100%;
  background: rgba(7, 8, 14, 0.75);
  border: 1px solid rgba(201, 168, 76, 0.2);
  color: var(--white);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  padding: 16px 52px 16px 18px;
  letter-spacing: 4px;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
  appearance: none;
  -webkit-appearance: none;
}

.pw-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 22px rgba(201, 168, 76, 0.14);
}

.pw-input::placeholder {
  color: rgba(107, 114, 128, 0.45);
  letter-spacing: 2px;
  font-size: 13px;
}

.pw-toggle {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  font-size: 15px;
  display: flex;
  align-items: center;
  padding: 4px;
  transition: color 0.3s ease;
}

.pw-toggle:hover { color: var(--gold); }

/* ========================
   ERROR STATE
   ======================== */
.pw-panel.error {
  animation: panelShake 0.52s ease;
  border-color: rgba(239, 68, 68, 0.38);
  box-shadow: 0 0 40px var(--error-glow);
}

.pw-panel.error .pw-input {
  border-color: rgba(239, 68, 68, 0.4);
}

@keyframes panelShake {
  0%,100% { transform: translateX(0); }
  10%,30%,50%,70%,90% { transform: translateX(-9px); }
  20%,40%,60%,80%     { transform: translateX(9px); }
}

.pw-error {
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 10px;
  color: var(--error);
  letter-spacing: 2px;
  text-transform: uppercase;
  margin-bottom: 18px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.pw-error.show { opacity: 1; }

/* ========================
   SUBMIT BUTTON
   ======================== */
.pw-submit {
  width: 100%;
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  font-family: 'Cinzel', serif;
  font-size: 11px;
  letter-spacing: 4px;
  text-transform: uppercase;
  padding: 18px 24px;
  cursor: pointer;
  transition: all 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.pw-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform: translateX(-101%);
  transition: transform 0.42s ease;
}

.pw-submit:hover::before { transform: translateX(0); }
.pw-submit:hover { color: var(--bg); }

.pw-submit > * { position: relative; z-index: 1; }

/* ========================
   SUCCESS OVERLAY
   ======================== */
.pw-success {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.55s ease;
}

.pw-success.show {
  opacity: 1;
  pointer-events: all;
}

.pw-success-ring {
  width: 90px; height: 90px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 30px;
  margin-bottom: 28px;
  animation: successGlow 1.4s ease-in-out infinite;
}

@keyframes successGlow {
  0%,100% { box-shadow: 0 0 20px var(--gold-glow); }
  50%      { box-shadow: 0 0 60px var(--gold-glow); }
}

.pw-success-label {
  font-family: 'Cinzel', serif;
  font-size: 13px;
  color: var(--gold);
  letter-spacing: 5px;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.pw-success-sub {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 2px;
}

/* ========================
   FOOTER NOTE
   ======================== */
.pw-note {
  margin-top: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 9.5px;
  color: rgba(107, 114, 128, 0.4);
  letter-spacing: 1.5px;
}

.pw-bottom-tag {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 5;
  font-size: 9px;
  color: rgba(107, 114, 128, 0.3);
  letter-spacing: 1.5px;
  text-align: right;
}

@media (max-width: 520px) {
  .pw-panel { padding: 36px 28px; }
  .pw-title { font-size: 15px; }
  .pw-system-tag { font-size: 8px; letter-spacing: 4px; margin-bottom: 35px; }
  .pw-emblem-outer { width: 90px; height: 90px; }
}
