/* ==================== ACCOUNT MODAL ==================== */

.account-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 200;
  align-items: center;
  justify-content: center;
}

.account-modal-overlay.open {
  display: flex;
}

.account-modal {
  background: white;
  border-radius: var(--radius);
  width: 480px;
  max-width: calc(100vw - 32px);
  max-height: 90vh;
  overflow-y: auto;
  z-index: 201;
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.account-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.account-modal-title {
  font-family: var(--font);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.account-modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: rgba(0,0,0,0.05);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.account-modal-close:hover {
  background: rgba(0,0,0,0.1);
  color: var(--text);
}

.account-modal-section {
  padding: 20px 0;
  border-bottom: 1px solid rgba(0,0,0,0.07);
}

.account-modal-section:last-of-type { border-bottom: none; }

.account-modal-section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.am-form-group { margin-bottom: 16px; }
.am-form-group:last-child { margin-bottom: 0; }

.am-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.am-input {
  width: 100%;
  padding: 10px 0;
  border: none;
  border-bottom: 1.5px solid rgba(0,0,0,0.1);
  font-size: 15px;
  font-family: var(--font);
  color: var(--text);
  background: transparent;
  outline: none;
  transition: border-color 0.15s;
  box-sizing: border-box;
}

.am-input:focus { border-bottom-color: var(--text); }
.am-input::placeholder { color: #C7C7CC; }

.am-readonly {
  color: var(--text-secondary);
  cursor: default;
  border-bottom-style: dashed;
}

.am-hint {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 5px;
}

.am-hint-inline {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 400;
}

.account-modal-alert {
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 4px;
  line-height: 1.45;
}

.account-modal-alert.error {
  background: #FEF2F2;
  color: #B91C1C;
  border: 1px solid rgba(185,28,28,0.15);
  display: block !important;
}

.account-modal-alert.success {
  background: #F0FDF4;
  color: #166534;
  border: 1px solid rgba(22,101,52,0.15);
  display: block !important;
}

.account-modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 18px;
}

.am-btn-save {
  padding: 9px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--font);
  cursor: pointer;
  border: none;
  background: var(--text);
  color: white;
  transition: opacity 0.15s;
  display: flex;
  align-items: center;
  gap: 8px;
}

.am-btn-save:hover { opacity: 0.8; }
.am-btn-save:disabled { opacity: 0.35; cursor: default; }

.account-modal-footer {
  padding-top: 16px;
  border-top: 1px solid rgba(0,0,0,0.07);
  margin-top: 4px;
}

.am-btn-signout {
  padding: 9px 20px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  cursor: pointer;
  border: 1.5px solid rgba(0,0,0,0.1);
  background: transparent;
  color: var(--text-secondary);
  transition: all 0.15s;
}

.am-btn-signout:hover {
  border-color: rgba(0,0,0,0.22);
  color: var(--text);
}
