@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@300;400;600&display=swap");
/* ── Variables ──────────────────────────────────────── */
:root {
  --bg: #f7f7f7;
  --surface: #fff;
  --border: #d1d1d1;
  --accent: #00b3ee;
  --accent2: #00529e;
  --text: #272727;
  --muted: #5a5a5a;
  --clear: #949494;
  --danger: #f87171;
  --success: #0fa05c;
  --radius: 6px;
  --radius-lg: 14px;
  --font: "Open Sans", sans-serif;
  --mono: "Courier New", monospace;
}

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

body {
  font-size: 16px;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

a {
  color: var(--accent2);
  text-decoration: none;
  position: relative;
}

a::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.25s ease;
}

a:hover::after {
  transform: scaleX(1);
}

/* ── Icons ────────────────────────────────────────── */

.icon {
  color: var(--accent);
  background-color: #cdf3ff;
  border-radius: var(--radius);
  padding: 8px;
  line-height: 0;
  display: inline-block;
  flex-shrink: 0;
}

/* ── Links ────────────────────────────────────────── */

.return-link a {
  display: flex;
  align-items: center;
  color: var(--muted);
  gap: 6px;
}

/* ── Buttons ────────────────────────────────────────── */

.btn-primary {
  background: var(--accent);
  color: #fff;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-family: var(--font);
  transition:
    opacity 0.2s,
    transform 0.1s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 15px;
  min-height: 40px;
}

.btn-primary:hover {
  opacity: 0.88;
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary:disabled {
  background: #baced5;
  cursor: not-allowed;
}

.btn-secondary,
#dd-profile-header a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.4rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.875rem;
  color: var(--text);
  background: #fff;
  transition: background 0.15s;
  white-space: nowrap;
  cursor: pointer;
}
.btn-secondary:hover {
  background: #f8f8f8;
}

#btn-close {
  opacity: 0.8;
  color: var(--muted);
  align-items: center;
  display: flex;
  cursor: pointer;
  background-color: transparent;
  border: none;
}

/* ── Avatar ────────────────────────────────────────── */

.big-avatar {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 600;
  flex-shrink: 0;
}
.medium-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
}

.mini-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.8rem;
  font-weight: 600;
  flex-shrink: 0;
}

.img-avatar {
  background: #fff;
  border: 1px solid #e8e8e8;
}

/* ── Form ───────────────────────────────────────────── */
.form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.form + p {
  margin-top: 20px;
  font-size: 0.9rem;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 4px;
}

.form-actions .btn-primary:hover {
  transform: none;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

label {
  font-size: 1rem;
  color: var(--muted);
  letter-spacing: 0.06em;
}

input[type="text"],
input[type="password"] {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: 0.65rem 1rem;
  font-size: 1rem;
  font-family: var(--mono);
  transition: border-color 0.2s;
  outline: none;
}

.password-field input[type="text"],
input[type="password"] {
  padding: 0.65rem 1.95rem 0.65rem 1rem !important;
}

input::-ms-clear,
input::-ms-reveal {
  display: none;
}

input.pass-box,
input.code-box {
  padding: 0;
  font-family: var(--font);
}
input:focus {
  border-color: var(--accent);
}
.field-error input {
  border-color: var(--danger) !important;
}
.password-field {
  position: relative;
  display: flex;
  flex-direction: column;
}
.confirm-password-field {
  padding-top: 20px;
}

.last-updated-password-date {
  font-size: 0.8rem;
  color: var(--clear);
  margin-top: 10px;
}

.password-field button {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
}

.field-error .error-message {
  color: var(--danger);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}
p.field-error {
  color: var(--danger);
  font-size: 0.875rem;
  margin-top: 0.25rem;
}
.password-rules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.password-rules .rule {
  font-size: 0.8rem;
  color: var(--clear);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 1px 0;
  white-space: nowrap;
}

.password-rules .check-line {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--clear);
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}
.password-rules .rule.ok .check-line {
  background: var(--success);
  color: #fff;
}

.field-space {
  border-top: 1px solid var(--border);
  margin: 1rem;
}

/* ── Alert ──────────────────────────────────────────── */
.alert-error {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: var(--danger);
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
.alert-error a {
  color: var(--danger);
  font-style: italic;
}

.message-success,
.message-error {
  text-align: center;
}

.message-success p,
.message-error p {
  font-size: 1.1rem;
  color: var(--text);
  padding-bottom: 20px;
}

.message-success .note,
.message-error .note {
  font-size: 0.9rem;
  color: var(--muted);
}

.message-success h1 {
  color: var(--success);
}
.message-error h1 {
  color: var(--danger);
}

.message-success .checkmark,
.message-error .errormark {
  font-size: 48px;
  margin: 20px 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
}

.message-success .checkmark {
  color: var(--success);
  border: 1px solid var(--success);
  background-color: #0fa05c24;
}

.message-error .errormark {
  color: var(--danger);
  border: 1px solid var(--danger);
  background-color: rgba(248, 113, 113, 0.14);
}

/* ── Footer ─────────────────────────────────────────── */
.site-footer {
  text-align: center;
  padding: 1.5rem;
  color: var(--muted);
  font-size: 1rem;
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.95);
}

/* ── Spinner ─────────────────────────────────────── */
.btn-arrow {
  display: inline-flex;
}

.btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid white;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  opacity: 0.7;
  flex-shrink: 0;
}

.htmx-request .btn-arrow {
  display: none;
}
.htmx-request .btn-spinner {
  display: inline-block;
}

.btn-loading .btn-arrow {
  display: none;
}
.btn-loading .btn-spinner {
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ── MFA ─────────────────────────────────────── */

.otp-inputs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 1.5rem 0;
  justify-content: space-between;
}

.pass-box {
  flex: 1 1 0%;
  min-width: 0;
  width: 0;
  height: 64px;
  text-align: center;
  font-size: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
  outline: none;
  box-sizing: border-box;
  padding: 0;
}

.pass-box:focus {
  border-color: var(--accent);
}
.otp-dot {
  font-size: 1.5rem;
  color: var(--muted);
  padding: 0 4px;
}
.otp-timer {
  text-align: center;
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 1rem;
}

.otp-alt-method {
  display: flex;
  justify-content: center;
}
.otp-alt-method a {
  color: var(--accent2);
  font-size: 0.9rem;
}
