/**
 * Alterar palavra-passe — ePOS
 * Estilos para a página de definição de nova palavra-passe.
 */

.mp-page {
  max-width: 480px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.mp-breadcrumb {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 20px;
  letter-spacing: 0.01em;
}

.mp-breadcrumb a {
  color: #2563eb;
  text-decoration: none;
}

.mp-breadcrumb a:hover {
  text-decoration: underline;
}

.mp-breadcrumb span {
  margin: 0 6px;
  color: #cbd5e1;
}

.mp-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  overflow: hidden;
}

.mp-must-change {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 20px;
  background: #fef3c7;
  border-bottom: 1px solid #f59e0b;
  font-size: 13px;
  line-height: 1.45;
  color: #92400e;
}

.mp-must-change i {
  flex-shrink: 0;
  margin-top: 2px;
  font-size: 18px;
  color: #d97706;
}

.mp-must-change p {
  margin: 0;
}

.mp-must-change strong {
  color: #78350f;
}

.mp-card-header {
  padding: 28px 28px 24px;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border-bottom: 1px solid #e2e8f0;
  text-align: center;
}

.mp-card-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  background: #2563eb;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.35);
}

.mp-card-header h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  color: #0f172a;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.mp-card-header p {
  margin: 8px 0 0;
  font-size: 14px;
  color: #64748b;
  line-height: 1.45;
}

.mp-requirements {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: #64748b;
  text-align: left;
  max-width: 280px;
  margin-left: auto;
  margin-right: auto;
}

.mp-requirements li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 6px;
  line-height: 1.4;
}

.mp-requirements li:before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 6px;
  height: 6px;
  background: #94a3b8;
  border-radius: 50%;
}

.mp-form {
  padding: 28px 28px 32px;
}

.mp-form .mp-field {
  margin-bottom: 22px;
}

.mp-form .mp-field:last-of-type {
  margin-bottom: 26px;
}

.mp-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

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

.mp-input-wrap .mp-input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  font-size: 15px;
  pointer-events: none;
}

.mp-input-wrap input {
  width: 100%;
  padding: 12px 44px 12px 42px;
  font-size: 15px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.mp-input-wrap input::placeholder {
  color: #94a3b8;
}

.mp-input-wrap input:hover {
  border-color: #cbd5e1;
}

.mp-input-wrap input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.mp-input-wrap input.mp-invalid {
  border-color: #dc2626;
  background: #fef2f2;
}

.mp-input-wrap input.mp-invalid:focus {
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}

.mp-toggle-pwd {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  padding: 6px;
  border: none;
  background: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 15px;
  border-radius: 4px;
  transition: color 0.2s, background 0.2s;
}

.mp-toggle-pwd:hover {
  color: #64748b;
  background: #f1f5f9;
}

.mp-feedback {
  font-size: 12px;
  margin-top: 6px;
  padding-left: 1px;
  display: none;
  color: #dc2626;
  line-height: 1.4;
}

.mp-feedback.mp-visible {
  display: block;
}

/* Indicador de força da palavra-passe */
.mp-strength-wrap {
  margin-top: 12px;
}

.mp-strength-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
}

.mp-strength-segment {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: #e2e8f0;
  transition: background 0.25s ease;
}

.mp-strength-segment.mp-fill {
  background: #94a3b8;
}

.mp-strength-segment.mp-weak {
  background: #dc2626;
}

.mp-strength-segment.mp-fair {
  background: #ea580c;
}

.mp-strength-segment.mp-good {
  background: #ca8a04;
}

.mp-strength-segment.mp-strong {
  background: #16a34a;
}

.mp-strength-label {
  font-size: 12px;
  color: #64748b;
  font-weight: 500;
}

.mp-strength-label[data-level="0"] { color: #94a3b8; }
.mp-strength-label[data-level="1"] { color: #dc2626; }
.mp-strength-label[data-level="2"] { color: #ea580c; }
.mp-strength-label[data-level="3"] { color: #ca8a04; }
.mp-strength-label[data-level="4"] { color: #16a34a; }

/* Regras de palavra-passe (lista dinâmica) */
.mp-rules {
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
}

.mp-rules li {
  position: relative;
  padding-left: 22px;
  margin-bottom: 6px;
}

.mp-rules li:before {
  position: absolute;
  left: 0;
  top: 1px;
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  font-size: 11px;
  color: #cbd5e1;
  content: "\f00d";
}

.mp-rules li.mp-ok:before {
  content: "\f00c";
  color: #16a34a;
}

.mp-rules li.mp-ok {
  color: #334155;
}

.mp-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mp-btn-primary {
  width: 100%;
  padding: 14px 20px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: #2563eb;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.mp-btn-primary:hover:not(:disabled) {
  background: #1d4ed8;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.3);
}

.mp-btn-primary:active:not(:disabled) {
  transform: translateY(0);
}

.mp-btn-primary:disabled {
  opacity: 0.85;
  cursor: not-allowed;
}

.mp-btn-secondary {
  display: block;
  text-align: center;
  font-size: 14px;
  color: #64748b;
  text-decoration: none;
  padding: 10px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.mp-btn-secondary:hover {
  color: #2563eb;
  background: #f8fafc;
}

.mp-footer-note {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
  line-height: 1.5;
}

.mp-footer-note i {
  margin-right: 4px;
  font-size: 11px;
}

@media (max-width: 520px) {
  .mp-page {
    padding: 16px 12px 32px;
  }

  .mp-card-header,
  .mp-form {
    padding-left: 20px;
    padding-right: 20px;
  }

  .mp-card-header h1 {
    font-size: 18px;
  }

  .mp-requirements {
    max-width: none;
  }
}
