.account-container {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 3rem 1rem;
  min-height: calc(100vh - 3.5rem);
}

.account-card {
  background: white;
  border-radius: 10px;
  padding: 2rem;
  width: 100%;
  max-width: 24rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.account-card h2 {
  margin: 0;
  font-size: 1.5rem;
}

.account-card .nav-lang-switch {
  align-self: flex-end;
}

.account-card .nav-lang-link {
  color: #888;
}

.account-card .nav-lang-link:hover {
  background-color: rgba(0, 0, 0, 0.06);
  color: #333;
}

.account-card .nav-lang-active {
  background-color: rgba(0, 0, 0, 0.08);
  color: #333;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 500;
  color: #444;
}

.remember-me-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #444;
  cursor: pointer;
}

.form-group .form-control {
  padding: 0.5rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.9rem;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}

.form-group .form-control:focus {
  outline: none;
  border-color: rgb(5, 39, 103);
  box-shadow: 0 0 0 2px rgba(5, 39, 103, 0.15);
}

.btn-account-submit {
  width: 100%;
  padding: 0.6rem;
  border: none;
  border-radius: 6px;
  font-size: 0.95rem;
  cursor: pointer;
  background-image: linear-gradient(90deg, rgb(5, 39, 103) 0%, #3a0647 70%);
  color: white;
}

.btn-account-submit:hover {
  opacity: 0.9;
}

.account-switch {
  margin: 0;
  font-size: 0.875rem;
  text-align: center;
  color: #555;
}

/* Navbar auth section */
.nav-username {
  color: #d7d7d7;
  font-size: 0.875rem;
  padding: 0 0.5rem;
}

.btn-nav-logout {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

/* Two-factor authentication */
.account-card-wide {
  max-width: 32rem;
}

.twofactor-status {
  margin: 0;
}

.twofactor-status-on {
  color: rgb(20, 110, 60);
}

.twofactor-steps {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-left: 1.2rem;
  margin: 0;
}

.twofactor-qr {
  display: block;
  margin-top: 0.5rem;
  width: 200px;
  height: 200px;
  image-rendering: pixelated;
}

.twofactor-actions {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.btn-account-secondary {
  background-image: none;
  background-color: #eee;
  color: #222;
}

.btn-account-danger {
  background-image: none;
  background-color: #b3261e;
  color: white;
}

.twofactor-confirm {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem;
  background: #fdecea;
  border-radius: 6px;
}

.recovery-codes-box {
  background: #fff8e1;
  border-radius: 6px;
  padding: 1rem;
}

.recovery-codes-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.4rem;
  margin-top: 0.75rem;
  font-family: ui-monospace, Consolas, monospace;
}

/* Invitation codes */
.invite-generate-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.invite-generate-row .btn-account-submit {
  width: auto;
  white-space: nowrap;
}

.invite-code-list {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  max-height: 26rem;
  overflow-y: auto;
}

.invite-code-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 6px;
  background: #f4f4f6;
  flex-wrap: wrap;
}

.invite-code-row-inactive {
  opacity: 0.55;
}

.invite-code-info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-family: ui-monospace, Consolas, monospace;
}

.invite-code-usage {
  font-family: inherit;
  font-size: 0.8rem;
  color: #555;
}

.invite-code-status-revoked {
  font-family: inherit;
  font-size: 0.8rem;
  color: #b3261e;
}

.invite-code-actions {
  display: flex;
  gap: 0.5rem;
}

.invite-code-actions .btn-account-submit {
  width: auto;
}
