/* Change Password — Security Vault console */

.pwd-page {
  max-width: none;
  width: 100%;
}

.pwd-intro {
  margin-bottom: 1.35rem;
}

.pwd-crumb {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.7rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.pwd-crumb a:hover {
  color: var(--brand);
}

.pwd-crumb i,
.pwd-crumb svg {
  width: 12px !important;
  height: 12px !important;
  opacity: 0.55;
}

.pwd-crumb strong {
  color: var(--ink-soft);
  font-weight: 600;
}

.pwd-intro .page-title {
  margin: 0 0 0.35rem;
  font-size: clamp(1.55rem, 2.4vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--ink);
}

.pwd-intro > p {
  margin: 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Vault split */
.pwd-vault {
  display: grid;
  grid-template-columns: minmax(240px, 0.9fr) 1.25fr;
  gap: 0;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  min-height: 560px;
}

/* Left panel */
.pwd-panel {
  position: relative;
  padding: 1.75rem 1.45rem 1.5rem;
  color: #e8f8f2;
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(16, 185, 129, 0.35), transparent 55%),
    linear-gradient(165deg, #0b6e56 0%, #00a67e 48%, #085041 100%);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pwd-panel__glow {
  position: absolute;
  right: -40%;
  bottom: -20%;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(16, 185, 129, 0.35), transparent 70%);
  pointer-events: none;
}

.pwd-panel__icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  margin-bottom: 1.15rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  backdrop-filter: blur(6px);
}

.pwd-panel__icon i,
.pwd-panel__icon svg {
  width: 26px !important;
  height: 26px !important;
  color: #a7f3d0;
}

.pwd-panel h2 {
  position: relative;
  margin: 0 0 0.45rem;
  font-family: "Syne", sans-serif !important;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.pwd-panel > p {
  position: relative;
  margin: 0 0 1.35rem;
  font-size: 0.84rem;
  line-height: 1.5;
  color: rgba(236, 253, 245, 0.78);
}

.pwd-tips {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
  flex: 1;
}

.pwd-tips li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.78rem;
  line-height: 1.4;
  color: rgba(236, 253, 245, 0.92);
}

.pwd-tips i,
.pwd-tips svg {
  width: 15px !important;
  height: 15px !important;
  flex-shrink: 0;
  margin-top: 0.1rem;
  color: #6ee7b7;
}

.pwd-panel__meta {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-top: 1.35rem;
  padding-top: 1.1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.pwd-panel__meta small {
  display: block;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(236, 253, 245, 0.55);
  margin-bottom: 0.2rem;
}

.pwd-panel__meta strong {
  font-size: 0.88rem;
  font-weight: 600;
  color: #fff;
}

/* Right console */
.pwd-console {
  padding: 1.5rem 1.55rem 1.6rem;
  background: #fff;
}

.pwd-console__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.35rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px dashed var(--line);
}

.pwd-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.4rem;
  padding: 0.28rem 0.6rem;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid color-mix(in srgb, var(--brand) 20%, #fff);
}

.pwd-badge i,
.pwd-badge svg {
  width: 12px !important;
  height: 12px !important;
}

.pwd-console__head h3 {
  margin: 0;
  font-family: "Syne", sans-serif !important;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* Strength ring */
.pwd-strength-ring {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}

.pwd-strength-ring svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.pwd-strength-ring__bg,
.pwd-strength-ring__fg {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
}

.pwd-strength-ring__bg {
  stroke: #e5e7eb;
}

.pwd-strength-ring__fg {
  stroke: #d1d5db;
  stroke-dasharray: 97.4;
  stroke-dashoffset: 97.4;
  transition: stroke-dashoffset 0.4s var(--ease), stroke 0.3s ease;
}

.pwd-strength-ring[data-level="1"] .pwd-strength-ring__fg {
  stroke: #dc2626;
  stroke-dashoffset: 72;
}

.pwd-strength-ring[data-level="2"] .pwd-strength-ring__fg {
  stroke: #d97706;
  stroke-dashoffset: 48;
}

.pwd-strength-ring[data-level="3"] .pwd-strength-ring__fg {
  stroke: #12b886;
  stroke-dashoffset: 24;
}

.pwd-strength-ring[data-level="4"] .pwd-strength-ring__fg {
  stroke: #00a67e;
  stroke-dashoffset: 0;
}

.pwd-strength-ring span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.pwd-strength-ring[data-level="1"] span { color: #dc2626; }
.pwd-strength-ring[data-level="2"] span { color: #d97706; }
.pwd-strength-ring[data-level="3"] span { color: #12b886; }
.pwd-strength-ring[data-level="4"] span { color: #00a67e; }

/* Form */
.pwd-form {
  display: grid;
  gap: 1.05rem;
}

.pwd-field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink-soft);
}

.pwd-input {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.15rem 0.55rem 0.15rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.pwd-input:focus-within {
  background: #fff;
  border-color: color-mix(in srgb, var(--brand) 45%, var(--line));
  box-shadow: 0 0 0 3px rgba(0, 166, 126, 0.12);
}

.pwd-input__lead {
  width: 16px !important;
  height: 16px !important;
  color: var(--muted);
  flex-shrink: 0;
}

.pwd-input:focus-within .pwd-input__lead {
  color: var(--brand);
}

.pwd-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0.75rem 0.25rem;
  font-size: 0.9rem;
  color: var(--ink);
}

.pwd-input input::placeholder {
  color: #9ca3af;
}

.pwd-toggle {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.pwd-toggle:hover {
  background: #fff;
  color: var(--brand);
}

.pwd-toggle i,
.pwd-toggle svg {
  width: 16px !important;
  height: 16px !important;
}

/* Segment meter */
.pwd-meter {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.35rem;
  margin-top: 0.65rem;
}

.pwd-meter span {
  height: 4px;
  border-radius: 999px;
  background: #e5e7eb;
  transition: background 0.25s ease;
}

.pwd-meter[data-level="1"] span:nth-child(1) { background: #dc2626; }
.pwd-meter[data-level="2"] span:nth-child(-n+2) { background: #d97706; }
.pwd-meter[data-level="3"] span:nth-child(-n+3) { background: #12b886; }
.pwd-meter[data-level="4"] span { background: #00a67e; }

/* Live rules */
.pwd-rules {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem 0.75rem;
}

.pwd-rules li {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  color: var(--muted);
  transition: color 0.2s ease;
}

.pwd-rules li i,
.pwd-rules li svg {
  width: 12px !important;
  height: 12px !important;
  flex-shrink: 0;
}

.pwd-rules li.is-ok {
  color: var(--brand);
  font-weight: 500;
}

.pwd-match {
  margin: 0.45rem 0 0;
  font-size: 0.75rem;
  font-weight: 500;
}

.pwd-match.is-ok {
  color: var(--brand);
}

.pwd-match.is-bad {
  color: var(--coral);
}

/* Actions */
.pwd-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.35rem;
  padding-top: 0.35rem;
}

.pwd-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 48px;
  padding: 0.7rem 1.25rem;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.pwd-btn i,
.pwd-btn svg {
  width: 16px !important;
  height: 16px !important;
}

.pwd-btn--ghost {
  background: var(--surface-2);
  border-color: var(--line);
  color: var(--ink-soft);
}

.pwd-btn--ghost:hover {
  background: #fff;
  border-color: var(--line-strong);
}

.pwd-btn--primary {
  flex: 1;
  min-width: 180px;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-mid), var(--brand-deep));
  box-shadow: 0 10px 22px rgba(0, 166, 126, 0.28);
}

.pwd-btn--primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0, 166, 126, 0.34);
}

.pwd-btn--primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.nav-sub a.is-active {
  color: var(--brand);
  font-weight: 600;
  background: var(--brand-soft);
}

@media (max-width: 991.98px) {
  .pwd-vault {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .pwd-panel {
    padding: 1.35rem 1.2rem 1.25rem;
  }

  .pwd-tips {
    grid-template-columns: 1fr 1fr;
  }

  .pwd-console {
    padding: 1.25rem 1.15rem 1.35rem;
  }
}

@media (max-width: 575.98px) {
  .pwd-tips {
    grid-template-columns: 1fr;
  }

  .pwd-rules {
    grid-template-columns: 1fr;
  }

  .pwd-actions {
    flex-direction: column-reverse;
  }

  .pwd-btn--ghost,
  .pwd-btn--primary {
    width: 100%;
  }
}
